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
running 9 tests | |
test test_read_returns_available_data_before_timeout::case_1 ... FAILED | |
test test_read_returns_available_data_before_timeout::case_2 ... FAILED | |
test test_timeout_greater_zero::case_1 ... FAILED | |
test test_timeout_greater_zero::case_2 ... FAILED | |
test test_timeout_greater_zero::case_3 ... FAILED | |
test test_timeout_max ... FAILED | |
test test_timeout_zero::case_1 ... FAILED | |
test test_timeout_zero::case_2 ... FAILED |
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 itertools | |
import json | |
import math | |
import string | |
############################ | |
encrypted_hex = """ | |
put the encrypted response here | |
""" |
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
#! /bin/env python3 | |
from datetime import datetime | |
start = datetime.now() | |
while True: | |
now = datetime.now() | |
print("\r"+str(now-start), end="") |
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
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative |
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
# Configration for https://github.com/dzamlo/pureline | |
colors[Orange]='\[\e[38;5;208m\]' # 256 Col Orange Foreground | |
colors[On_Orange]='\[\e[48;5;208m\]' # 256 Col Orange Background | |
colors[DarkGrey]='\[\e[38;5;237m\]' # 256 Col Dark Grey Foreground | |
colors[On_DarkGrey]='\[\e[48;5;237m\]' # 256 Col Dark Grey Background | |
colors[Blue]='\[\e[38;5;21m\]' # 256 Col Blue Foreground | |
colors[On_Blue]='\[\e[48;5;21m\]' # 256 Col Blue Background | |
colors[Red]='\[\e[38;5;1m\]' # 256 Col Red Foreground | |
colors[On_Red]='\[\e[48;5;1m\]' # 256 Col Red Background | |
colors[Pink]='\[\e[38;5;13m\]' # 256 Col Pink Foreground |
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 fileinput | |
import tokenize | |
import matplotlib.pyplot as plt | |
from wordcloud import WordCloud | |
if __name__ == '__main__': | |
# If some files don't have the same encoding, this is likely to not work correctly. | |
tokens = tokenize.tokenize(fileinput.input(mode='rb').readline) | |
tokens_no_string = (t for t in tokens if t.type not in [tokenize.ENCODING, tokenize.STRING]) |
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
history_dir="${HOME}/.history/$(date +%Y/%m)" | |
mkdir -p "$history_dir" | |
HISTFILE="$history_dir/$(date --iso-8601=seconds)_${HOSTNAME}_$$" | |
export HISTSIZE="NOTHING" | |
export HISTFILESIZE="NOTHING" | |
export HISTTIMEFORMAT='%F %T ' | |
HISTCONTROL=ignoreboth | |
shopt -s histappend | |
shopt -s histverify | |
shopt -s cmdhist |
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
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="AB Shutter3 ", TAG+="systemd", PROGRAM="/bin/systemd-escape -p [email protected] $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c" |
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 pyopencl as cl | |
import pyopencl.array as clarray | |
import numpy as np | |
context = cl.create_some_context() | |
queue = cl.CommandQueue(context) | |
a = clarray.empty(queue, (10,20), np.float32, order='F') | |
print(a.get()) |