start new:
tmux
start new with session name:
tmux new -s myname
var debug = require("debug")("torrent:read"); //npm install debug | |
var bencode = require("bencode"); //npm install bencode - https://en.wikipedia.org/wiki/Bencode | |
var fs = require("fs"); | |
var crypto = require("crypto"); | |
var _ = require("underscore"); //npm install underscore | |
var percent_encoding = { | |
encode: function(buffer) { | |
var ret = "", a2z, AtoZ, zero2nine, other_valid_symbols, all_unreserved_symbols; |
This section describes the conventions used here to describe type signatures.
A [T]
is an array-like value (only ever used read-only in this API), i.e., one with an integer length
and whose indexed properties from 0 to length - 1
are of type T
.
A type T?
should be read as T | undefined
-- that is, an optional value that may be undefined
.
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<script type=text/javascript> | |
navigator.getUserMedia = navigator.getUserMedia | |
|| navigator.webkitGetUserMedia | |
|| navigator.mozGetUserMedia; |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
Flamegraphing in Rust can now be done with a new cargo
subcommand. Please check this out before embarking on the legacy journey below:
https://github.com/flamegraph-rs/flamegraph
perf
, using Brendan Gregg's guide:
http://www.brendangregg.com/perf.html#Prerequisitesflamegraph
from repo:I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
A list of public training logs from neural network image generation models, since I think they're interesting.
=== Start of delete_post.py === | |
from atproto import Client | |
def main() -> None: | |
client = Client() | |
client.login('my-handle', 'my-password') | |
# same with the like_post.py example we need to keep a reference to the post |