<jupyter_start><jupyter_text>Table of Contents The following command line launches the parallel ipython cores:<jupyter_code>!ipcluster start -n 4
from nbtools import execute_in_parallel
from planet4 import io
db = io.DBManager()
data = db.get_image_id_markings('bo3')[:10]
def calc_stuff(fpath):
    d = {'path': fpath}
    d['length'] = len(pd.read_csv(fpath))
    return d
results = execute_in_parallel(calc_stuff, data)
df = pd.DataFrame(results.result)
from planet4 import markings, io, plotting
import seaborn as sns
sns.set_context('paper')
from planet4 import io
db= io.DBManager()
print(db.dbname)
data = db.get_image_id_markings('bo3')
print('Shape:',data.shape)
from configparser import ConfigParser
config = ConfigParser()
config.read("/Users/klay6683/.pyciss.ini")
config['paths']['my_mac']
df = db.get_image_id_markings('6n3')
df.classification_id.nunique()
p4id = markings.ImageID('6n3')
%matplotlib inline
fig, ax = plt.subplots(ncols=2, figsize=(16,5))
p4id.show_subframe(ax[0])
p4id.plot_fans(lw=1, ax=ax[1])
fig.tight_layout()
ax[0].set_title(f"{p4id.imgid}, original input")
ax[1].set_title(f"{p4id.imgid}, Planet Four fan markings")
plt.savefig("/Users/klay6683/Dropbox/src/p4_paper1/figures/fan_markings.png",
            bbox_inches='tight',
            dpi=200)
print(id_.data.image_url.iloc[0])
p4id = markings.ImageID('1aa')
plotting.plot_image_id_pipeline('1aa', datapath='catalog_1.0b2', save=True, savetitle='pipeline',
                                saveroot='/Users/klay6683/Dropbox/src/p4_paper1/figures/')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1447704081632653, 'fraction_numerical': 0.03316326530612245, 'mean_word_length': 5.676595744680851, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '511114', 'license': '0BSD', 'n_tokens_mistral': 621, 'n_tokens_neox': 593, 'n_words': 104, 'path': 'notebooks/io development.ipynb', 'repo_name': 'CitizenScienceInAstronomyWorkshop/P4_sandbox', 'size': '1568'}