I hereby claim:
- I am starfys on github.
- I am starfys (https://keybase.io/starfys) on keybase.
- I have a public key ASBwKh51bcXg42N0IEnsQmLlLapOB-qIEN0nDwV8SBvYvwo
To claim this, I am signing this object:
| //Based on the fast inverse square root function | |
| // https://en.wikipedia.org/wiki/Fast_inverse_square_root | |
| // Some original comments preserved for humor value | |
| // Designed to try to mimic the original as closely as possible | |
| function Q_rsqrt(number) | |
| { | |
| var i; | |
| var x2, y; | |
| const threehalfs = 1.5; | |
| use std::collections::hash_map::{self, HashMap}; | |
| use std::hash::Hash; | |
| pub struct HashWrap<K, V>(HashMap<K, V>); | |
| impl<K, V> From<HashMap<K, V>> for HashWrap<K, V> { | |
| fn from(value: HashMap<K, V>) -> Self { | |
| Self(value) | |
| } | |
| } |
| from math import sqrt | |
| import time | |
| def is_prime(n): | |
| if n == 1 or (n > 2 and n % 2 == 0): | |
| return False | |
| else: | |
| rbool = True | |
| sroot = int(sqrt(n) + 1) | |
| for i in range(3,sroot,2): |
| #![feature(iterator_step_by)] | |
| extern crate rayon; | |
| use rayon::prelude::*; | |
| use std::time::SystemTime; | |
| fn is_prime(n: i64) -> bool { | |
| if n == 1 || (n > 2 && n % 2 == 0) { | |
| false | |
| } else { | |
| let mut rbool = true; |
| /// Determines whether something is a robot | |
| fn is_robot(entity: Entity) -> bool { | |
| // TODO: Write this for real | |
| unimplemented!() | |
| } | |
| #[test] | |
| fn test_robot_detector() { | |
| assert_eq!(is_robot(Entity::SamRemedios), false); | |
| assert_eq!(is_robot(Entity::Roomba), true); |
| /// Performs nuclear fission by reference | |
| void atom_splitter(Atom atom, Atom& atom_out_1, Atom& atom_out_1) { | |
| // Oak Ridge won't let us show this | |
| } | |
| int main() { | |
| Atom uranium = Atom::Uranium; | |
| Atom krypton, barium; | |
| atom_splitter(uranium, &krypton, &barium); | |
| } |
| std::string day_name; | |
| switch(day_number) { | |
| case 0: | |
| day_name = "Sunday"; | |
| break; | |
| case 1: | |
| day_name = "Monday"; | |
| break; | |
| case 2: | |
| day_name = "Tuesday"; |
| let day_name = match day_number { | |
| 0 => "Sunday", | |
| 1 => "Monday", | |
| 2 => "Tuesday", | |
| 3 => "Wednesday", | |
| 4 => "Thursday", | |
| 5 => "Friday", | |
| 6 => "Saturday" | |
| _ => panic!("There are only 7 days in a week.") | |
| }; |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/env python3 | |
| import matplotlib.pyplot as plt | |
| from scipy.optimize import curve_fit | |
| import numpy as np | |
| from math import log | |
| with open('resilience.txt','r') as res_file: | |
| data = list(map(str.rstrip, res_file.readlines())) | |
| data = list(map(lambda line: tuple(map(float, line.split(',')))[1], data)) |