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 as req | |
import concurrent.futures as cf | |
import string | |
import random | |
WORKERS = 32 | |
random_str = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(128)) | |
def worker(): | |
while True: |
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
cimport cython | |
# USE cmdline below to build extension | |
# python setup.py build_ext --inplace --force | |
import numpy as np | |
cimport numpy as cnp | |
from libc.stdlib cimport rand, srand, RAND_MAX | |
cdef extern from "<Windows.h>": |
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
#include <stdlib.h> // for rand() and RAND_MAX | |
int randint(int min, int max) { | |
return (rand() % (max + 1 - min)) + min; | |
} |
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 bash | |
# SPDX-License-Identifier: GPL-2.0 | |
# | |
# Copyright (C) 2016-2018 Jason A. Donenfeld <[email protected]>. All Rights Reserved. | |
die() { | |
echo "[-] Error: $1" >&2 | |
exit 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
set bell-style visible | |
set completion-ignore-case on | |
set completion-map-case on | |
set completion-display-width 106 | |
set output-meta on | |
set skip-completed-text on | |
set convert-meta on | |
"\e`s": backward-word # ctrl-left | |
"\e`t": forward-word # ctrl-right |
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
%%cython -a -f -c=-O3 | |
# -c=-DCYTHON_TRACE=1 | |
# -c=-std=c++11 | |
# -c=-DCYTHON_TRACE=1 | |
# -c=-DCYTHON_TRACE=1 -c=-g --link-args=-g | |
# %%cython -a -c=-DCYTHON_TRACE=1 | |
# -c=-O3 | |
# -c=-g --link-args=-g | |
# --cplus | |
#-c=-march=native -c=-mtune=native |
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
quantile_list_big = [(1. - 0.1 ** x) + (0.1 ** (x + 1)) * y for x in xrange(1, 8+1) for y in xrange(1, 10)] | |
quantile_list_small = [(1. - 0.1 ** x) for x in xrange(1, 8+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
package com.example.bkmz.surface_view_test; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; | |
public class CustomSurfView extends SurfaceView implements SurfaceHolder.Callback { |
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
## arrow up | |
"\e[A":history-search-backward | |
## arrow down | |
"\e[B":history-search-forward |
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
# -*- coding: utf-8 -*- | |
""" | |
Demonstrates very basic use of ImageItem to display image data inside a ViewBox. | |
""" | |
## Add path to library (just for examples; you do not need this) | |
# import initExample | |
from pyqtgraph.Qt import QtCore, QtGui | |
import numpy as np |