Skip to content

Instantly share code, notes, and snippets.

View arskiy's full-sized avatar
🌸

Alice arskiy

🌸
  • AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa
View GitHub Profile
@arskiy
arskiy / julia.rs
Created November 27, 2022 20:44
ffmpeg -framerate 25 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p out.mp4
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;
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):
# here be dragons
from manim import *
import math
import numpy as np
config["background_color"] = "#301934"
def point_addition(p, q):
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;
@arskiy
arskiy / python-pip-env-default.nix
Last active April 4, 2020 19:25
creates a working impure python env in nixos. replace <packages> with the packages you want.
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:
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()