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
Test executor: ['/opt/conda/bin/python'] | |
Running distributed/rpc/tensorpipe/test_dist_autograd_spawn ... [2020-06-17 10:01:31.480372] | |
Running tests... | |
---------------------------------------------------------------------- | |
V0617 10:01:33.548001 11988 /var/lib/jenkins/workspace/third_party/tensorpipe/tensorpipe/core/context.cc:118] Context 11988:c0 created | |
V0617 10:01:33.548062 11988 /var/lib/jenkins/workspace/third_party/tensorpipe/tensorpipe/core/context.cc:120] Context 11988:c0 aliased as worker0 | |
V0617 10:01:33.558348 11990 /var/lib/jenkins/workspace/third_party/tensorpipe/tensorpipe/core/context.cc:118] Context 11990:c0 created | |
V0617 10:01:33.558446 11991 /var/lib/jenkins/workspace/third_party/tensorpipe/tensorpipe/core/context.cc:118] Context 11991:c0 created | |
V0617 10:01:33.558470 11991 /var/lib/jenkins/workspace/third_party/tensorpipe/tensorpipe/core/context.cc:120] Context 11991:c0 aliased as worker3 |
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
"""Demo asynchronous server using only generators. | |
Test with: | |
$ netcat -N 127.0.0.1 1234 | |
""" | |
import enum | |
import select | |
import socket |
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
export AWS_ACCESS_KEY_ID="" | |
export AWS_SECRET_ACCESS_KEY="" | |
export PASSPHRASE="" | |
export DEST="s3://s3.eu-west-3.amazonaws.com/backup-luca-wehrstedt/evron" | |
duplicity restore --file-to-restore /home/luca/Bilancio/bilancio.gnucash --s3-use-new-style --s3-european-buckets $DEST bilancio.gnucach |
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 math | |
fixed = 0.552284749831 / math.sqrt(2) | |
fixed = 0.3915 | |
print(fixed) | |
def get_point_along_bezier(p1, p2, r, out_d, in_d, rel, out_l, in_l, t): | |
dx = p2[0] - p1[0] | |
dy = p2[1] - p1[1] |
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
./scripts/cmsDropDB -y > /dev/null; | |
./scripts/cmsInitDB > /dev/null; | |
./cmscontrib/AddAdmin.py admin -p admin > /dev/null | |
# -w is the number of workers (there need to be enough already listed in cms.conf). | |
# -s is the number of submissions, each of 50 (?) testcases. | |
# also, in Worker.__init__ set fake_time to 0.1. | |
python cmstestsuite/RunTimeTest.py -w 16 -s 10 |
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
module type S = sig | |
type 'a process | |
type 'a in_port | |
type 'a out_port | |
val new_channel: unit -> 'a in_port * 'a out_port | |
val put: 'a -> 'a out_port -> unit process | |
val get: 'a in_port -> 'a process | |
val doco: unit process list -> unit process | |
val return: 'a -> 'a process |
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 sys | |
import random | |
import pygame | |
pygame.init() | |
grid = (39, 29) | |
cell = (20, 20) | |
width = grid[0] * cell[0] | |
height = grid[1] * cell[1] |
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 re | |
def camelcase_to_underscore(name): | |
return "_".join(w.lower() for w in re.findall("(?:[A-Z][a-z]+|[A-Z]+(?:$|(?=[A-Z][a-z])))", name)) |
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
#!/usr/bin/env python3 | |
import argparse | |
import random | |
def genera_codice(): | |
result = "" | |
c1 = random.randint(1, 3); | |
for i in range(c1): |
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
#!/usr/bin/env python3 | |
import sys | |
import time | |
import urllib.request | |
import hashlib | |
import subprocess | |
url = sys.argv[1] |