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
{"lastUpload":"2019-10-11T12:15:48.249Z","extensionVersion":"v3.4.3"} |
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 moviepy.editor import * | |
from multiprocessing import Process, Semaphore | |
import sys | |
segment_length = float(sys.argv[1]) | |
frames = float(sys.argv[2]) | |
original_video = VideoFileClip("original.mp4") | |
duration = original_video.duration | |
clip_start = 0 |
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 japronto import Application | |
app = Application() | |
def get(url): | |
def wrap_function(func): | |
app.router.add_route(url, func, method='GET') | |
return wrap_function |
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 falcon | |
api = falcon.API() | |
def get(url): | |
def wrap_function(func): | |
print(url) | |
api.add_route(url, type('Dummie', (object, ), {'on_get': func})) | |
return func |
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 ipdb | |
class Clase2: | |
pass | |
class Clase1: | |
def __init__(self): | |
self.example = {} |
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 urllib2 | |
import hashlib | |
import os | |
import json | |
download_base = "http://desmadrestudio.com/static/ld48/" | |
# obtain find images/* -exec md5sum {} + | |
j = urllib2.urlopen(download_base + 'update.json') | |
j_obj = json.load(j) | |
list_download = j_obj['files'] |
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 tornado.httpserver import HTTPServer | |
import tornado.ioloop | |
import tornado.web | |
import uuid | |
from tornado.concurrent import run_on_executor | |
from concurrent.futures import ThreadPoolExecutor | |
@tornado.web.stream_request_body | |
class MainHandler(tornado.web.RequestHandler): | |
executor = ThreadPoolExecutor(max_workers=400) |
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 threading import Thread | |
import sys | |
import socket | |
host, port = sys.argv[1], int(sys.argv[2]) | |
connect_per_thread = int(sys.argv[4]) | |
def many_connection(): | |
while True: | |
sockets = [] |
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
#include <Python.h> | |
#include <stdio.h> | |
#include <string.h> | |
typedef struct { | |
PyObject_HEAD | |
char* trans; | |
int len_letters; | |
char* letters; | |
int repeat; |
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
#include <stdio.h> | |
#include <pthread.h> | |
void* calculate() | |
{ | |
int i = 0; | |
int b = 0; | |
for(i=0; i<100000000; i++){ | |
b = i+b; | |
} |
NewerOlder