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 matplotlib.pyplot as plt | |
import mpl_toolkits.axes_grid1.inset_locator | |
fig, ax = plt.subplots() | |
matrix = np.random.normal(size=(100, 100)) | |
sm = ax.matshow(matrix) | |
# Attach a small axes to the lower right of the main axes. It's an "inset" | |
# placed outside of the plot. The size is 0.02 width x 0.5 height of the |
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
hi def link cppSTLfunction Function | |
hi def link cppSTLfunctional NONE | |
hi def link cppSTLconstant NONE | |
hi def link cppSTLnamespace cppNamespaceStd | |
hi def link cppSTLexception NONE | |
hi def link cppSTLiterator NONE | |
hi def link cppSTLiterator_tag NONE | |
hi def link cppSTLenum NONE | |
hi def link cppSTLios NONE | |
hi def link cppSTLcast NONE |
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
plt.style.use("paper") | |
# Name prop colors. You may need to change it to match your matplotlib style to use. | |
names = ["nb:blue", "nb:red", "nb:green", "nb:yellow", "nb:cyan", "nb:purple", "nb:magenta", "nb:gray"] | |
props = plt.rcParams["axes.prop_cycle"] | |
assert len(names) == len(props) | |
cc = plt.cm.colors.colorConverter | |
for name, prop in zip(names, props): | |
cc.colors[name] = prop["color"] |
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
zshrc::rainbow() { | |
local i=$1 | |
#local palette=( 197 220 82 49 33 129 ) | |
#local size=${#palette} | |
local palette= | |
set -A palette 197 220 82 49 33 129 | |
local size=${#palette} | |
# Normalize index to a non-negative value by cycling. |
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
# git clone [email protected]:example/fork.git | |
# git remote add upstream https://github.com/example/upstream.git | |
git pull upstream master | |
git push origin master |
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 * as http from "https://deno.land/[email protected]/http/mod.ts"; | |
interface RequestData { | |
method: string; | |
path: string; | |
headers: Headers; | |
body: ArrayBuffer; | |
} | |
interface MockData { |
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
function asleep(delay: number): Promise<void> { | |
return new Promise<void>((resolve, reject) => setTimeout(resolve, delay)); | |
} | |
console.log(Date.now()); | |
await asleep(100); | |
console.log(Date.now()); |
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 matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.animation import FuncAnimation | |
from IPython.display import Video | |
# Make a spiral | |
step_count = 10000 | |
random = np.random.RandomState(0) |
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
# Figure | |
figure.figsize: 3.6, 2.0 | |
figure.dpi: 150 | |
figure.frameon: True | |
figure.edgecolor: none | |
figure.facecolor: white | |
figure.autolayout: False | |
figure.constrained_layout.use: True |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder