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 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() |
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 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] |
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 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) |
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
// 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; |
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
# मान्छे | |
मान्छेको यो चोला | |
कसरी बित्यो, खै के होला | |
छैन केहि उसको पोल्टोमा | |
बाँचेकै छ, तर त्यो मृग तृष्णामा | |
आसा थियो ठुलो, | |
उसका ती मिठा सपना | |
ब्यूँझाउन खोज्थो अरूले |
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
#!/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): |
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
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
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(): |
NewerOlder