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
| # Original gesture source code: https://github.com/Sadaival/Hand-Gestures | |
| # Original source code video demonstration: https://youtu.be/v-XcmsYlzjA | |
| from FoxDot import * | |
| import traceback | |
| import cv2 | |
| import numpy as np | |
| import math | |
| cap = cv2.VideoCapture(0) |
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 sys | |
| import time | |
| import multiprocessing | |
| import os | |
| def supercollider(): | |
| SC_CMD = "rm -f /tmp/foxdot.sc; echo FoxDot.start >> /tmp/foxdot.sc; sclang /tmp/foxdot.sc" | |
| proc = multiprocessing.Process(target=lambda : os.system(SC_CMD), args=()) | |
| proc.start() | |
| return proc |
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 os | |
| import sys | |
| import time | |
| import multiprocessing | |
| def supercollider(): | |
| SC_CMD = "rm -f /tmp/foxdot.sc; echo FoxDot.start >> /tmp/foxdot.sc; sclang /tmp/foxdot.sc" | |
| proc = multiprocessing.Process(target=lambda : os.system(SC_CMD), args=()) | |
| proc.start() | |
| return proc |
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 os | |
| import sys | |
| def unir_txts(carpeta_con_los_txts): | |
| lista_de_txts = os.listdir(carpeta_con_los_txts) # Esto arma la lista de todos los archivos que estan en ese directorio/carpeta | |
| texto_final = "" # Variable donde voy a ir juntando el texto de todos los txts | |
| for nombre_del_txt in lista_de_txts: # recorro los archivos uno por una | |
| # uno el nombre de la carpeta con el nombre del archivo para armar la ruta exacta donde el txt se ubica |
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 glob | |
| from music21 import converter, instrument, note, chord, interval, pitch | |
| import sys | |
| from tqdm import tqdm | |
| def valid_note(note_number): | |
| return -12*5 <= note_number <= 12*5 | |
| def first_note(notes_to_parse): | |
| for element in notes_to_parse: |
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 | |
| from music21 import instrument, note, stream, chord | |
| import sys | |
| import numpy as np | |
| def convert_to_float(frac_str): | |
| try: | |
| return float(frac_str) | |
| except ValueError: | |
| num, denom = frac_str.split('/') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from bs4 import BeautifulSoup | |
| import requests | |
| import os | |
| def descargar_noticia(url): | |
| page = requests.get(url) | |
| soup = BeautifulSoup(page.content, 'html.parser') | |
| noticia = "" |
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 math | |
| from es_lemmatizer import lemmatize | |
| import spacy | |
| from nltk.tokenize import word_tokenize | |
| from nltk import ngrams, FreqDist | |
| from tqdm import tqdm | |
| from collections import defaultdict | |
| import unidecode | |
| import sys | |
| import os |