I hereby claim:
- I am tracek on github.
- I am tracek (https://keybase.io/tracek) on keybase.
- I have a public key ASAnakbg2gzt50cHIRePbtoR_SqQjqUgZGnoTMVhT6rpvgo
To claim this, I am signing this object:
import re | |
import numpy as np | |
with open('code-corp.log') as f: | |
log = f.readlines() | |
latency = [] | |
timeout = [] | |
for idx, line in enumerate(log): |
# For Khaned | |
FROM jupyter/base-notebook | |
USER $NB_UID | |
RUN pip install --yes ----no-cache-dir jupyter numpy matplotlib pandas pulp | |
COPY FooD_Kind.csv [destination] |
# The script illustartes stunning difference on my machine with processing of signal with multiprocessing and joblib. | |
# The slowness of multiprocessing is likely caused by oversubscription | |
import time | |
import numpy as np | |
import librosa | |
from joblib import Parallel, delayed | |
from functools import partial | |
from multiprocessing import Pool |
I hereby claim:
To claim this, I am signing this object:
# Use `LabelEncoder` to encode encode labels with value between 0 and n_classes-1. | |
import pandas as pd | |
from sklearn.preprocessing import LabelEncoder | |
df = pd.DataFrame({'UserName': ['Peter', 'Richard', 'Peter'], 'exam': [1,2,2], 'score': [70,80,60]}) | |
le = LabelEncoder() | |
df['UserName'] = le.fit_transform(df['UserName']) |
def validate_against_metadata(met, paths): | |
""" | |
Checks the list of images to ensure that a metadata entry exists for each one | |
if this is not the case, remove that image from the upload list. | |
Also check for blank values in the metadata fields, which will cause Property KeyErrors on GEE | |
Behaviour at the moment is to stop the upload if either type of errors is found, to allow the user to edit the file. | |
:param met - a dictionary of dictionaries containing the metadata entries: | |
:param paths - a list of full filepaths: | |
:return: updated list of full filepaths | |
""" |