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
# Adapted to python3 from the accepted answer on https://stackoverflow.com/questions/38463369/subtitles-within-matplotlib-legend | |
# Legend guide: https://matplotlib.org/3.1.0/tutorials/intermediate/legend_guide.html | |
import matplotlib.text as mtext | |
class LegendTitle(object): | |
def __init__(self, text_props=None): | |
self.text_props = text_props or {} | |
super(LegendTitle, self).__init__() |
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 | |
import matplotlib.cm as cmap | |
import matplotlib.colors as mcolors | |
rain = cmap.ScalarMappable(norm=mcolors.Normalize(vmin=0,vmax=1.), cmap='rainbow') | |
for i in range(10): | |
plt.plot(range(10), [x*i for x in range(10)], c=rain.to_rgba(i/10)) | |
plt.show() |
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 | |
import plotly.graph_objs as go | |
import plotly.tools as tls | |
import numpy as np | |
fig, ax = plt.subplots() | |
x = np.linspace(0, 10) | |
ax.plot(x, np.sin(x), '--', linewidth=2) | |
ax.plot(x, np.cos(x), '--', linewidth=2) |
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 plotly.graph_objects as go | |
x = np.linspace(0,10,100) | |
fig = go.Figure() | |
fig.add_scatter(x=x, y=np.sin(x)) | |
fig.show() |
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
{ | |
"shortcuts": [ | |
{ | |
"command": "jupyterlab_code_formatter:format", | |
"keys": [ | |
"Ctrl Shift F" | |
], | |
"selector": ".jp-Notebook.jp-mod-editMode", | |
"args": {} | |
}, |
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
{ | |
"codeCellConfig": { | |
"autoClosingBrackets": false | |
} | |
} |
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
awk -v OFS='\t' '{print $1, $2, $3, $4, "sweep_up", $5}' 170722_006.dat > a.dat |
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
# https://github.com/jiaaro/pydub | |
from pydub import AudioSegment | |
files_path = '' | |
file_name = '' | |
startMin = 9 | |
startSec = 50 |
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 | |
# Script to convert multiple images to pdf and put them together into a single file. | |
# It executes in the directory where the images are: topdf IMG_1.jpg IMG_2.JPG IMG_3.jpeg OUTPUT_NAME | |
declare -a Files=("${@:1:$(( $#-1 ))}") | |
for file in ${Files[@]} | |
do | |
convert $file ${file%.*}.pdf |
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
{ | |
"command": { | |
"bind": { | |
"shift-pageup": "jupyter-notebook:move-cell-up", | |
"shift-pagedown": "jupyter-notebook:move-cell-down", | |
"n,n": "jupyter-notebook:restart-kernel-and-run-all-cells", | |
"u,u": "jupyter-notebook:restart-kernel-and-clear-output", | |
"g,g": "auto:hide_code:toggle_all", | |
"shift-u": "RISE:toggle-subslide" | |
} |
OlderNewer