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
import functools | |
import inspect | |
import shutil | |
import sys | |
import time | |
from datetime import datetime, timedelta | |
from pathlib import Path | |
from joblib import Memory |
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
from transformers import AutoModel, AutoTokenizer | |
import torch | |
from tqdm.notebook import trange, tqdm | |
import pandas as pd | |
from bm.studies.utils import match_list | |
import numpy as np | |
import matplotlib.pyplot as plt | |
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
import itertools | |
import json | |
import os | |
import re | |
import typing as tp | |
from collections import defaultdict | |
from pathlib import Path | |
import datalad | |
import datalad.api |
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
#pip install benepar | |
#pip install protobuf==3.20.0 | |
import spacy | |
import numpy as np | |
class Parser(): | |
def __init__(self,): | |
model = 'fr_core_news_sm' |
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
import grequests # pip install grequests | |
from pathlib import Path | |
from tqdm import tqdm | |
import textgrid # pip install git+https://github.com/kylerbrown/textgrid#egg=textgrid | |
import typing as tp | |
import numpy as np | |
def online_MAUS_aligner( | |
txt_files, wav_files, language, ext="TextGrid", save_dir=None, |
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
from Levenshtein import editops | |
def match_list(A, B, on_replace="delete"): | |
"""Match two lists of different sizes and return corresponding indice | |
Parameters | |
---------- | |
A: list | array, shape (n,) | |
The values of the first list |
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
from pynput.mouse import Controller | |
import time | |
mouse = Controller() | |
for i in range(10_000_000): | |
mouse.move((i % 2)*2-1, 0) | |
time.sleep(60.) |
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
import numpy as np | |
from scipy.stats import ttest_1samp, wilcoxon | |
def ttest(a): | |
return ttest_1samp(a, 0) | |
n_times = 30 | |
n_chans = 4 |
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
# To add a new cell, type '# %%' | |
# To add a new markdown cell, type '# %% [markdown]' | |
# %% | |
#%matplotlib inline | |
# pip install python-levenshtein | |
import mne | |
import pandas as pd | |
import numpy as np | |
from scipy.io import loadmat | |
import matplotlib.pyplot as plt |
NewerOlder