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 | |
import json | |
import os | |
from rattler import ( | |
Environment, | |
LockFile, | |
Platform, | |
VirtualPackage, | |
solve_with_sparse_repodata, | |
) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>PipeFunc Graph</title> | |
<script src="https://unpkg.com/[email protected]/dist/jquery.min.js"></script> | |
<script src="https://unpkg.com/[email protected]/jquery.mousewheel.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/jquery.color.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/d3.min.js"></script> |
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
digraph { | |
graph [bb="0,0,783.73,403", | |
rankdir=LR | |
]; | |
node [label="\N", | |
shape=rectangle | |
]; | |
subgraph cluster_legend { | |
graph [bb="8,312,775.73,395", | |
color=black, |
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
NB=FNAME.ipynb | |
pip install nbqa autoflake pyupgrade black isort nbconvert jupyter_contrib_nbextensions | |
nbqa isort $NB | |
nbqa black $NB | |
nbqa autoflake -i --remove-all-unused-imports $NB | |
nbqa pyupgrade $NB --py38-plus | |
jupyter nbconvert --clear-output --inplace $NB |
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
//@version=4 | |
study(title="CTO Line", shorttitle="CTO", overlay=true, resolution="") | |
smma(src, length) => | |
smma = 0.0 | |
smma := na(smma[1]) ? sma(src, length) : (smma[1] * (length - 1) + src) / length | |
smma | |
v1 = smma(hl2, 15) | |
m1 = smma(hl2, 19) | |
m2 = smma(hl2, 25) | |
v2 = smma(hl2, 29) |
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
sudo su | |
dd if=/dev/sda1 of=./sda1.image | |
dd if=/dev/sda2 of=./sda2.image | |
dd if=/dev/sda3 of=./sda3.image | |
dd if=/dev/sda4 of=./sda4.image | |
dd if=/dev/sda5 of=./sda5.image | |
dd if=/dev/sda6 of=./sda6.image | |
dd if=/dev/sda7 of=./sda7.image | |
zip test.zip sda* |
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.tri as mtri | |
from matplotlib import pyplot as plt | |
def plot_loss(learner, cmap="viridis", xy_size=(10, 10)): | |
fig, ax = plt.subplots(figsize=xy_size) | |
x_size, y_size = xy_size | |
ip = learner.ip() | |
zs = learner.loss_per_triangle(ip) | |
tri = ip.tri |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 ipywidgets as widgets | |
class SelectMultipleInteract(widgets.HBox): | |
def __init__(self, combos, **plot_kwargs): | |
self.W1 = widgets.SelectMultiple( | |
options={str(x): x for x in combos}, | |
description="Combinations", | |
disabled=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
import functools | |
import random | |
import time | |
import types | |
class A: | |
def f(self): | |
time.sleep(1) | |
return random.random() |
NewerOlder