Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3.7 | |
import argparse | |
import os | |
import numpy as np | |
import speech_recognition as sr | |
import whisper | |
import torch | |
from datetime import datetime, timedelta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Re-analyze GeoMx data from Rendeiro et al. 2021 doi:s41586-021-03475-6 | |
Requirements (Python 3.10+): | |
pip install \ | |
"anndata" \ | |
"matplotlib>=3.8.3" \ | |
"numpy>=1.26.4" \ | |
"pandas>=2.1.0" \ | |
"scanpy" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Download file from Google Drive URL | |
""" | |
import os | |
import time | |
import click | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.firefox.options import Options as FirefoxOptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oil | saturated | polyunsaturated (omega 3 & 6) | monounsaturated | trans fat | other fat | omega 3 | omega 6 | yield, litres per hectare | smoke point | flavour | cooking conditions | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
almond | 0.08 | 0.17 | 0.7 | 0.0 | 0.05 | 0.0 | 0.17 | 1380 | 230 | 2 | >230 °C (Deep-frying) | |
beef tallow | 0.5 | 0.04 | 0.42 | 0.0 | 0.04 | 0.01 | 0.03 | - | 220 | 1 | 200-229 °C (Stir-frying) | |
flaxseed | 0.09 | 0.66 | 0.2 | 0.0 | 0.05 | 0.59 | 0.13 | 506 | 107 | 2 | <150 °C (Dressings) | |
apricot kernel | 0.06 | 0.29 | 0.6 | 0.0 | 0.05 | 0.0 | 0.29 | 680 | 257 | 0 | >230 °C (Deep-frying) | |
argan | 0.18 | 0.37 | 0.43 | 0.0 | 0.02 | 0.02 | 0.35 | 0.06 | 218 | 2 | 200-229 °C (Stir-frying) | |
avocado | 0.12 | 0.14 | 0.71 | 0.0 | 0.03 | 0.01 | 0.13 | 2638 | 269 | 1 | >230 °C (Deep-frying) | |
brazil nut | 0.25 | 0.36 | 0.39 | 0.0 | 0.0 | 0.0 | 0.36 | 2392 | 195 | 2 | 150-199 °C (Light saute) | |
butter | 0.51 | 0.03 | 0.21 | 0.033 | 0.25 | 0.0 | 0.03 | - | 167 | 2 | 150-199 °C (Light saute) | |
butter, clarified (ghee) | 0.65 | 0.03 | 0.32 | 0.0 | 0.0 | 0.0 | 0.03 | - | 235 | 2 | >230 °C (Deep-frying) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Use dataloaders with nuclei coordinates for training. | |
""" | |
from functools import partial | |
import requests | |
import h5py | |
from tqdm import tqdm | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Terminate on first error | |
set -e | |
# Check if input file is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <input_file.pdf>" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
A simple example of how to use the Accelerator API | |
to train a vision model on a dummy dataset. | |
Accelerator enables training on a single or multiple GPUs. | |
Run once `accelerate config` to set up your configuration file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Run the experiments for the quantization speedup and plot results. | |
""" | |
import subprocess | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert a TIFF file generated by IndicaLabs (HALO) to a usable TIFF file. | |
""" | |
import typing as tp | |
from pathlib import Path | |
from xml.etree import ElementTree | |
import tifffile | |
from tifffile.tiffcomment import tiffcomment |
NewerOlder