View julia.rs
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
extern crate image; | |
extern crate num; | |
extern crate rayon; | |
use num::complex::Complex; | |
use std::path::Path; | |
use rayon::prelude::*; | |
const WIDTH: usize = 1920; | |
const HEIGHT: usize = 1080; |
View newtonsmethod.sage
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 numpy as np | |
x = var('x') | |
f(x) = (x-80)*(x-52.2)*(x-4.4)*(x+3)*(x+70.2)*(x+7.4) | |
fp = diff(f,x) | |
NewtonIteration(x) = x - f(x)/fp(x) | |
roots = [] | |
for i in np.arange(-100.0, 100.0, 0.2): |
View scene.py
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
# here be dragons | |
from manim import * | |
import math | |
import numpy as np | |
config["background_color"] = "#301934" | |
def point_addition(p, q): |
View bresenham.rs
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
pub struct Point { | |
x: i32, | |
y: i32, | |
} | |
fn line(x1: i32, y1: i32, x2: i32, y2: i32, map: &Map) -> Vec<Point> { | |
let mut coordinates = vec![]; | |
let mut x1 = x1; | |
let mut y1 = y1; |
View python-pip-env-default.nix
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
with import <nixpkgs> {}; | |
with pkgs.python27Packages; | |
stdenv.mkDerivation { | |
name = "impurePythonEnv"; | |
buildInputs = [ | |
automake | |
autoconf | |
gcc-arm-embedded-7 | |
# these packages are required for virtualenv and pip to work: |
View qutebrowser-1.6.0-block-youtube-ads.patch
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
credits: @tadeokondrak | |
--- a/qutebrowser/components/adblock.py | |
+++ b/qutebrowser/components/adblock.py | |
@@ -119,6 +119,14 @@ class HostBlocker: | |
return False | |
host = request_url.host() | |
+ path = request_url.path() | |
+ query = request_url.query() |