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 'package:flutter/material.dart'; | |
class MyFocusNode extends FocusNode { | |
MyFocusNode() : super() { | |
print("constructor"); | |
} | |
@override | |
void dispose() { | |
print("dispose"); |
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 subprocess import getstatusoutput as shell | |
from subprocess import Popen,PIPE,STDOUT | |
import shlex | |
import re | |
import argparse | |
import os | |
from tqdm import tqdm | |
from math import ceil,log10 | |
def get_video_length(fname): |
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
[ | |
{ | |
"name":"REP", | |
"time_seconds":60 | |
}, | |
{ | |
"name":"SWITCH", | |
"time_minutes":3 | |
} | |
] |
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 curses | |
from time import time,sleep | |
from random import randrange,random | |
from math import cos,sin,pi | |
import argparse | |
class TUI: | |
FPS=60 | |
def __init__(self,screen,no_particles): |
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
#!/usr/bin/env python3 | |
import argparse | |
import os | |
parser=argparse.ArgumentParser() | |
parser.add_argument("input",type=str) | |
args=parser.parse_args() | |
out_pdf=os.path.splitext(os.path.split(args.input)[-1])[0] +".pdf" |
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 sklearn.datasets import make_blobs | |
# import pandas as pd | |
import numpy as np | |
centers=[ | |
[.1,.1], | |
[.2,.1], | |
[.3,.1], | |
[.4,.1], | |
[.5,.1], |
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 io import StringIO | |
from random import gauss,randrange | |
max_chars=63206 #https://sproutsocial.com/insights/social-media-character-counter/ | |
wrong="9" | |
right="6" | |
f=StringIO() |
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 signal | |
from contextlib import contextmanager | |
class TimeOutError(RuntimeError):pass | |
@contextmanager | |
def timeout(duration): | |
def timeout_handler(signum, frame): | |
raise TimeOutError() | |
signal.signal(signal.SIGALRM, timeout_handler) | |
signal.alarm(duration) | |
try: |
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 | |
from selenium import webdriver | |
import gdown | |
import argparse | |
parser=argparse.ArgumentParser() | |
parser.add_argument("url") | |
args=parser.parse_args() | |