Skip to content

Instantly share code, notes, and snippets.

View christian-blades-cb's full-sized avatar

Christian Blades christian-blades-cb

View GitHub Profile
➜ src git:(master) ✗ cargo bench -j 2
Finished release [optimized] target(s) in 0.0 secs
Running /home/cblades/dev/rust/prime_sieve/target/release/deps/prime_sieve-6cf5846238c99524
running 3 tests
test tests::bench_sundaram_hashset_1000 ... bench: 1,641,005 ns/iter (+/- 87,741)
test tests::bench_sundaram_vec_1000 ... bench: 81,529 ns/iter (+/- 3,800)
test tests::bench_sundaram_vec_10000 ... bench: 7,592,283 ns/iter (+/- 426,879)
test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured

Self-Hosted VPN

Pricing

providercheapest tier $/moegress $/GBfree egress GBingress $/GBfree ingress GB$/TB/mo
GCE00.12100122.76
AWS00.0910092.07
Azure00.08750088.653
@christian-blades-cb
christian-blades-cb / rust_demo.rs
Created February 14, 2018 01:07
shapr's bookwords demo in rust
#[allow(unused_variables, dead_code)]
fn demo() {
let somenumber = 1; // immutable variable
let somestring = "somestring"; // also ummutable
// with type signature
let some_other_string: &str = "some other string";
}
#[allow(dead_code)]
@christian-blades-cb
christian-blades-cb / rust_class.org
Last active March 2, 2018 03:24
Rust Class Resources

Rust Class

Getting Started

  • Install Rust: https://www.rustup.rs/
    • NOTE the other-installation-methods link, I recommend not piping the internet into your shell
  • Install rustfmt rustup component add rustfmt-preview
  • For code completion, install racer https://github.com/racer-rust/racer
  • For linting, install clippy cargo +nightly install clippy
    • NOTE: change your editor’s clippy command to cargo +nightly clippy to ensure that clippy also works in stable

References

import wave
import numpy as np
# band-pass filter https://plot.ly/python/fft-filters/
def bandpass(lowfreq, highfreq, framerate, frames):
# fL = 3900 / framerate
# fH = 4200 / framerate
fL = lowfreq / framerate
fH = highfreq / framerate

Emacs

(define-key global-map "\C-cc" 'org-capture)
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/agenda.org" "Tasks")
"* TODO %?\n %i\n %a")
("j" "Journal" entry (file+datetree "~/org/journal.org")
"* %?\nEntered on %U\n %i\n %a")
("m" "TODO from mail" entry (file+headline "~/org/agenda.org" "Email")
"* TODO %?\nref: %a")
))
@christian-blades-cb
christian-blades-cb / init.el
Created September 25, 2019 13:32
emacs lsp python
;; pip install 'python-language-server[all]'
(when (executable-find "pyls")
(add-hook 'python-mode-hook #'company-mode)
(add-hook 'python-mode-hook #'lsp))
(use-package lsp-mode
:ensure t
:hook ((rust-mode . lsp)
(go-mode . lsp)
(python-mode . lsp))
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; make sure use-package is installed
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
Video: Video: We Are The Champions http://bit.ly/1dVMYJ WHO WOULDNT FAVOR A CHAMPIONS WEBPAGE http://on.fb.me/1dVMYI WE ARE THE CHAMPIONS WEBPAGE http://bit.ly/1dkVN4 WE DO IT AGAIN AND AGAIN http://bit.ly/29zFTGs CHAMPIONS WEBPAGE http://bit.ly/29zFTGs http://bit.ly/29zFTGs We will prevail CHAMPIONS WEBPAGE http://bit.ly/29zFTGs http://bit.ly/29zFTGs We will prevail http://transfer.yahoo.com/j/id/10001 William Shatner as Captain James T. Kirk
we just had to put up with this fucking idiot customer service rep for an electronics store . ive had it with his bullshit. ive had enough. ive had enough of this shit. ive written him a letter , and he will return my things if i do not get my account suspended. http://i.imgur.com/V1XSx.jpg
http://i.imgur.com/YXpg.jpg my.heads.up.this.is.a.fair.and.temperament.with.a.giant.ass.on.it.gaining.power.on.my.iphone.uta.phone.uta.ti.me.to.the.unity.game.android.com/uploads/levels/speedrun/4th.march.2013.1080p.BLURED.md5sum.bin
http://bit.ly/1dVMYJ FEATURE - THE HYPNOTIZER "