This file contains hidden or 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 logging | |
import random | |
import re | |
import requests | |
import time | |
session = requests.Session() | |
response = session.get('https://www.azed.gov/adeinfo/empower-hotline') | |
cookies = session.cookies.get_dict() | |
now = int(time.time()) |
This file contains hidden or 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
use std::io::prelude::*; | |
use std::io::BufReader; | |
use std::fs::File; | |
fn main() { | |
let left_chars = b"qwertasdfgzxcvb"; | |
let right_chars = b"yuiophjklnm"; | |
let words = BufReader::new(File::open("/usr/share/dict/words").unwrap()).lines().map(Result::unwrap); | |
let mut left_words = Vec::new(); | |
let mut right_words = Vec::new(); |
This file contains hidden or 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
#![feature(slice_patterns)] | |
use std::cmp::max; | |
fn print_vec(vec: &Vec<u32>) { | |
for i in vec { | |
print!("{} ", i); | |
} | |
println!(""); | |
} |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am mtahmed on github. | |
* I am sddelbecbc (https://keybase.io/sddelbecbc) on keybase. | |
* I have a public key whose fingerprint is D37F 2EF0 F1F6 48DC 30D4 D433 DEDE 5FE3 CFDD 2958 | |
To claim this, I am signing this object: |
This file contains hidden or 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 argparse | |
import random | |
parser = argparse.ArgumentParser(description='Monty Hall problem simulator.') | |
parser.add_argument('--switch', action='store_true', | |
help='Switch every time. Default: false.') | |
parser.add_argument('--trials', default=1000, type=int, | |
help='Number of trials. Default: 1000') | |
args = parser.parse_args() |
This file contains hidden or 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
{ | |
'class': 'Cat', | |
'num_legs': 4, | |
'cuteness': 9100, | |
'fur_color': 'brown', | |
'eyes_color': 'blue', | |
'cute': 'def cuter(self):\n print("*rolls over*")\n print("Meow!")\n' | |
} |
This file contains hidden or 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 types | |
class Cat: | |
num_legs = 4 | |
cuteness = 9001 | |
def __init__(self, fur_color, eyes_color): | |
self.fur_color = fur_color | |
self.eyes_color = eyes_color | |
This file contains hidden or 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
{ | |
'class': 'Cat', | |
'num_legs': 4, | |
'cuteness': 9100, | |
'fur_color': 'brown', | |
'eyes_color': 'blue', | |
} |
This file contains hidden or 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
class Cat: | |
num_legs = 4 | |
cuteness = 9001 | |
def __init__(self, fur_color, eyes_color): | |
self.fur_color = fur_color | |
self.eyes_color = eyes_color | |
def cute(self): | |
print("Meow!") |
NewerOlder