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
prometheus.exporter.unix "node" { | |
set_collectors = [ | |
"uname", | |
"cpu", | |
"cpufreq", | |
"loadavg", | |
"meminfo", | |
"filesystem", | |
"netdev", | |
] |
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
# ~/.zshrc file for zsh interactive shells. | |
# see /usr/share/doc/zsh/examples/zshrc for examples | |
setopt autocd # change directory just by typing its name | |
#setopt correct # auto correct mistakes | |
setopt interactivecomments # allow comments in interactive mode | |
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ | |
setopt nonomatch # hide error message if there is no match for the pattern | |
setopt notify # report the status of background jobs immediately | |
setopt numericglobsort # sort filenames numerically when it makes sense |
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 time | |
import asyncio | |
import re | |
from functools import wraps | |
VERBOSITY = 1 | |
CBLACK = '\33[30m' |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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 python | |
import binascii | |
import argparse | |
def head_dump(path, head = None): | |
with open(path, "rb") as fh: | |
buf = fh.read(head) if head else fh.read(head) | |
print(binascii.hexlify(buf, b' ')) |
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 asyncio | |
SOCKET_BUFFER_SIZE = 64 | |
QUEUE_SIZE = 1500 | |
WARNING = '\033[93m' | |
STD = '\033[0m' | |
def print_y(msg): | |
print(f"{WARNING}{msg}{STD}") |
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 itertools import cycle | |
import numpy as np | |
import pandas as pd | |
from sklearn.linear_model import lasso_path, enet_path, lars_path, LassoLarsIC, LinearRegression | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.pipeline import make_pipeline |
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/bash | |
#### Default Configuration | |
CONCURRENCY=4 | |
REQUESTS=10 | |
TARGET="http://127.0.0.1/api_endpoint" | |
REQ_ARG="?[1-$REQUESTS]" |
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/bash | |
pdflatex --jobname=figure-1 main.tex | |
pdflatex --jobname=plot-1 main.tex |
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 math import factorial, ceil | |
def fact(n): | |
""" | |
n! | |
<just as a reminder, we do prefer using C implementation of math library therefore> | |
""" | |
if n == 0 : | |
return 1 | |
else : |
NewerOlder