Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabrizio Milo Mistobaan

View GitHub Profile
View decomposepromptsimple.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View introtologprobs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View defaultapinotebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View explorecontextstuffing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View dag.py
with models.DAG() as dag:
dataset = 'BREATHE'
# create a task for each table in the BREATHE dataset
for table_name in list_breathe_tables():
destination_uri = 'gs://' + '/'.join((dest_bucket,
'{{ ds_nodash }}', # one day is enough for the full snapshot
table_name,
table_name + '-{{ ds_nodash }}-*.jsonl'))
View bigquery.sql
DECLARE SAMPLE_SIZE INT64 DEFAULT 5;
SELECT *
FROM
BREATHE.ncbi_xml
WHERE
RAND() < SAMPLE_SIZE/(SELECT COUNT(*) FROM `BREATHE.ncbi_xml`)
@Mistobaan
Mistobaan / README.md
Last active Apr 2, 2021
How to fix the AMAG Installation on MacOS Catalina
View README.md

I Purchased this mini keyboard to extend my editor with combinations of keys that I will never remember. Sadly installing the App was problematic as it does not work right away.

  1. The App is written in Adobe air (!). Download and install their library
  2. Install and run this command to overcome Catalina problems (Steve we miss you) (from this thread)[https://community.adobe.com/t5/air/adobe-air-error-message-macosx-catalina/td-p/10683302?page=1]:
sudo xattr -r -d com.apple.quarantine /Library/Frameworks/Adobe\ AIR.framework
  1. Downloaded the online software from Koolertron as of today (2020 June 20) is this link
@Mistobaan
Mistobaan / Install
Created Jun 8, 2020 — forked from ines/Install
Streamlit + spaCy
View Install
pip install streamlit
pip install spacy
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_md
python -m spacy download de_core_news_sm
@Mistobaan
Mistobaan / snippet.py
Created Jun 7, 2020
Restart the Python Environment is a reload is required
View snippet.py
# how to make sure to restart the jupyter notebook
try:
%pip install --user --quiet --upgrade my_module
import my_module
except ModuleNotFoundError:
import os
os.kill(os.getpid(), 9)
@Mistobaan
Mistobaan / snippet.py
Created Jun 6, 2020
How to Compute Virtual Epochs in Tensorflow
View snippet.py
NUM_TRAINING_EXAMPLES = 1000 * 1000
STOP_POINT = 14.3
TOTAL_TRAINING_EXAMPLES = int(STOP_POINT * NUM_TRAINING_EXAMPLES)
BATCH_SIZE = 100
NUM_CHECKPOINTS = 15
steps_per_epoch = (TOTAL_TRAINING_EXAMPLES //
(BATCH_SIZE*NUM_CHECKPOINTS))
cp_callback = tf.keras.callbacks.ModelCheckpoint(...)
history = model.fit(trainds,
validation_data=evalds,