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
from line_profiler import LineProfiler | |
def do_profile(follow=[]): | |
def inner(func): | |
def profiled_func(*args, **kwargs): | |
try: | |
profiler = LineProfiler() | |
profiler.add_function(func) | |
for f in follow: | |
profiler.add_function(f) |
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
# Concept for specifying alignment in markdown/rst/similar thing | |
Specifying how to align images, text etc in markdown is not great. | |
Here's a concept on how that could be written | |
The following image is on the left: | |
|[1]-| | |
[1]: image.png |
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 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
" Enable | |
set list | |
" what character to display instead of spaces | |
set listchars=tab:»\ ,trail:-,precedes:←,extends:→,eol:↲,nbsp:␣,space:· | |
" number of spaces a Tab counts for | |
set tabstop=4 | |
" how many spaces an (auto)indent operation will use | |
" this may mix tabs and spaces according to other settings | |
" e.g. if ts=4 and sw=6 with noexpandtab, >> will add <tab><sp><sp> | |
set shiftwidth=4 |
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
receivers: | |
otlp: | |
protocols: | |
grpc: | |
processors: | |
# Did not test without this batch, yet. Might be unnecessary. | |
batch: | |
exporters: |
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
[package] | |
name = "app" | |
version = "0.1.0" | |
description = "A Tauri App" | |
authors = ["you"] | |
license = "" | |
repository = "" | |
default-run = "app" | |
edition = "2021" | |
rust-version = "1.57" |
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
from multiprocessing import Pool | |
import fileinput | |
def download(url): | |
from subprocess import check_call | |
check_call(["curl", "--silent", "-O", url]) | |
return url |
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 json | |
import ast | |
from ast import ( | |
ClassDef, | |
FunctionDef, | |
arguments, | |
arg, | |
BinOp, | |
Name, | |
Add, |
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
/** | |
* Computes the borda count of strings in a range. | |
* @param {Array<Array<string>>} input The range with strings. | |
* @return A string with the winning string and its score. | |
* @customfunction | |
*/ | |
function BORDA_WINNER(input) { | |
let votes = {}; | |
let n_rows = input.length; |
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
# Enable the link | |
ip link set ens18 up | |
# Set the IP | |
ip address add 192.168.1.123/24 dev ens18 | |
# Add a route | |
ip route add default via 192.168.1.1 | |
# Set the nameserver |