Skip to content

Instantly share code, notes, and snippets.

View rhoit's full-sized avatar
🎪
An empty shell

rho rhoit

🎪
An empty shell
View GitHub Profile

Config your Conky with simple bash script

INTRO

disclaimer

not to be taken seriously!

requirements

import numpy as np
import matplotlib.pyplot as plt
n = 100
x = np.arange(n)
plt.plot(x, x, label='linear')
plt.plot(x, 2*x, label='double')
plt.plot(x, x*x, label='square')
plt.plot(x, x**3, label='power')
plt.grid()
import matplotlib.pyplot as plt
def myplot(x, y, **kwargs):
plt.plot(x, y, **kwargs)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('My plot')
plt.show()
x = [1, 3, 4, 5]
import numpy as np
import matplotlib.pyplot as plt
methods = [
'none', 'bessel', 'bicubic', 'bilinear', #'antialiased',
'catrom', 'gaussian', 'hamming', 'hanning', 'hermite', 'kaiser',
'lanczos', 'mitchell', 'nearest', 'quadric', 'sinc', 'spline16',
'spline36',
]
np.random.seed(0)
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
// A lot of hidden blocks are drawn, I don't really care
int[][] result;
float t, c;
# मान्छे
मान्छेको यो चोला
कसरी बित्यो, खै के होला
छैन केहि उसको पोल्टोमा
बाँचेकै छ, तर त्यो मृग तृष्णामा
आसा थियो ठुलो,
उसका ती मिठा सपना
ब्‍यूँझाउन खोज्थो अरूले
#!/usr/bin/env python3
import math
import turtle
turtle.speed(0)
# turtle.tracer(n=0, delay=0)
def square(length):
for i in range(4):

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

def multipart_encoder(params, files):
boundry = uuid.uuid4().hex
lines = list()
for key, val in params.items():
if val is None: continue
lines.append('--' + boundry)
lines.append('Content-Disposition: form-data; name="%s"'%key)
lines.extend([ '', val ])
for key, uri in files.items():