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
#!/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
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
[ | |
{ | |
"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
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
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
import 'dart:io'; | |
import 'package:file_picker/file_picker.dart'; | |
import 'package:flutter/material.dart'; | |
class FilePickerFormField extends StatelessWidget { | |
final Function(String) validator; | |
final Function(String) onSaved; | |
final String labelText; | |
final String hintText; |
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 requests | |
from bs4 import BeautifulSoup as BS | |
from multiprocessing.dummy import Pool | |
def get_elo(nickname): | |
sess=requests.Session() | |
r=sess.get(f"https://paladins-tracker.de/search/player/{nickname}") | |
soup=BS(r.text,"html.parser") | |
link=soup.select_one(".player-meta.clearfix a") | |
if link==None: |
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 requests | |
from bs4 import BeautifulSoup as BS | |
from collections import namedtuple | |
from math import ceil | |
#config | |
lvs=[10,15,20] | |
mean_exp=32000 | |
#---- | |
table=[20000,60000,120000,200000,300000,420000,560000,720000,900000,1100000,1320000,1560000,1820000,2100000,2400000,2720000,3060000,3420000,3800000,4200000] | |
def fix_exp(exp,lvl): |
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 mininet.topo import Topo | |
from mininet.net import Mininet | |
from mininet.node import Node | |
from mininet.log import setLogLevel, info | |
from mininet.cli import CLI | |
class LinuxRouter( Node ): | |
"""A Node with IP forwarding enabled. | |
Means that every packet that is in this node, comunicate freely with its interfaces.""" |