This file contains hidden or 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
import numpy as np | |
# Here, `filenames` is list of path to the images | |
# and `labels` are the associated labels. | |
class S2Sequence(tf.keras.utils.Sequence): | |
def __init__(self, filenames, batch_size): | |
self.filenames = list(glob.glob(filenames)) | |
self.batch_size = batch_size | |
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 hidden or 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
__version__ = '1.3.0' | |
__nest_version__ = '2.1.0' | |
from .nestpy import * | |
# blah blah | |
NESTcalc._GetYields = NESTcalc.GetYields | |
def myfunction(**kwargs): | |
"""alskdfjaklfd |
This file contains hidden or 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
import strax | |
from straxen.contexts import xenon1t_dali | |
def xenon1t_fried(output_folder='./strax_data', build_lowlevel=False): | |
st = xenon1t_dali(output_folder, build_lowlevel) | |
st.storage=[ | |
strax.DataDirectory( | |
'/data/xenon1t/strax_data_raw', | |
take_only='raw_records', | |
provide_run_metadata=True, |
This file contains hidden or 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
import inspect | |
from straxen import contexts | |
def get_context(name, processing_version): | |
"""Contact the RunDB to see grab context associated with some | |
processing version | |
""" | |
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 hidden or 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
import pandas as pd | |
my_countries = ('United Kingdom', 'Rwanda',) # Change me | |
url = 'https://raw.githubusercontent.com/ilyankou/passport-index-dataset/master/passport-index-matrix.csv' | |
df = pd.read_csv(url).set_index('Passport') != 0 | |
selection = df.loc[my_countries, :] | |
visa_countries = (selection.sum(axis=0) == 0) | |
print('Top 10 Complementary', df.loc[:, visa_countries].sum(axis=1).sort_values(ascending=False).head(10)) |
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 hidden or 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
backend: pgf | |
pgf.texsystem: pdflatex # change this if using xetex or lautex | |
text.usetex: True # use LaTeX to write all text | |
font.family: serif | |
font.serif: [] # blank entries should cause plots to inherit fonts from the document | |
font.sans-serif: [] | |
font.monospace: [] | |
axes.labelsize: 10 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder