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 | |
| # -*- coding: utf-8 -*- | |
| import time | |
| import random | |
| import multiprocessing | |
| def drop(cube_index: int) -> int: | |
| return cube_index, random.randint(1, 6) |
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
| #!/bin/bash | |
| # Create folder for certificates | |
| mkdir -p certs | |
| cd certs | |
| # Generate password for CA certificate | |
| < /dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c 16 > password.txt | |
| # Generate certificates |
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
| #!/bin/bash | |
| </dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c ${1:-16} ; echo -n |
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
| #!/bin/sh | |
| base64 -d $1 | gzip -d > $2 |
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
| #!/bin/sh | |
| echo -e "kill \`more /var/run/udhcpc.eth1.pid\`\nifconfig eth1 192.168.99.$2 netmask 255.255.255.0 broadcast 192.168.99.255 up" | docker-machine ssh $1 sudo tee /var/lib/boot2docker/bootsync.sh > /dev/null |
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/python | |
| #-*- coding: utf-8 -*- | |
| numeral_map = tuple(zip( | |
| (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1), | |
| ('M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I') | |
| )) | |
| def int_to_roman(i): | |
| result = [] |
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/python | |
| #-*- coding: utf-8 -*- | |
| import glob | |
| from mutagen.mp3 import MP3 | |
| for track in glob.glob('/home/<user>/Music/*.mp3'): | |
| mp3 = MP3(track) | |
| try: | |
| mp3.delete() |
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
| sudo: false | |
| language: python | |
| python: | |
| - "2.7" | |
| - "3.6" | |
| install: pip install tox-travis | |
| script: tox | |
| notifications: | |
| email: false |
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/python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| EDBO connector | |
| Author: Eldar Aliiev | |
| Email: e.aliiev@vnmu.edu.ua | |
| """ | |
| __license__ = "Cecill-C" |
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/python | |
| # -*- coding: utf-8 -*- | |
| from threading import Thread, current_thread | |
| from queue import Queue | |
| thread_count = 25 | |
| def run(queue, result_queue): |
NewerOlder