Skip to content

Instantly share code, notes, and snippets.

View thejefflarson's full-sized avatar
👨‍👩‍👧‍👦
being a dad

Jeff Larson thejefflarson

👨‍👩‍👧‍👦
being a dad
View GitHub Profile
@thejefflarson
thejefflarson / train.py
Created April 4, 2020 01:59
Captcha solver
from tensorflow.keras import Input, Model
from tensorflow.keras.models import load_model
from tensorflow.keras.layers import (
Conv2D,
Activation,
MaxPooling2D,
Dropout,
Flatten,
Dense,
)

Keybase proof

I hereby claim:

  • I am thejefflarson on github.
  • I am thejefflarson (https://keybase.io/thejefflarson) on keybase.
  • I have a public key ASAOCcrYOEybgCz32LXRx9GKWVql6FI2-BVOfali5Qf_Ago

To claim this, I am signing this object:

createEngine((err, engine) => {
if (err) throw err;
engine.scan(buffer, (err, result) => {
if (err) throw err;
console.log(result);
});
});
class Thing {
val = null;
constructor(val) {
this.val = val;
}
unwrap() {
throw "unimplemented!";
}
is_ok() {
library("readr")
data <-read_csv("https://raw.githubusercontent.com/propublica/compas-analysis/master/compas-scores-two-years.csv")
library("dplyr")
data <- filter(data, type_of_assessment=="Risk of Recidivism")
library("ggplot2")
ggplot(data=filter(data, race =="African-American"), aes(ordered(decile_score))) + geom_bar()
ggplot(data=filter(data, race =="Caucasian"), aes(ordered(decile_score))) + geom_bar()
ggplot(data, aes(race, decile_score)) + geom_boxplot(notch=TRUE)
means <- filter(data, race == "Caucasian" | race == "African-American")
means <- mutate(data, white = race == "Caucasian")
{
"id":402181258,
"id_str":"402181258",
"name":"Richard \u261d\ud83c\udffbSpencer",
"screen_name":"RichardBSpencer",
"location":"Alexandria, VA",
"profile_location":null,
"description":"Co-Editor of https:\/\/t.co\/TBcoNIGaHJ. President of The National Policy Institute. Support: https:\/\/t.co\/FmiNPpJQZd Media: hello@richardbspencer.com.",
"url":"https:\/\/t.co\/1kKtYmOvjG",
"entities":{
pub trait HasAcs {
fn valid(&self) -> bool;
fn from_row(row: &HashMap<&str, &str>) -> Self;
fn file() -> &'static str;
}
fn process_acs<T: HasAcs + diesel::query_builder::AsChangeset>() {
use schema::locations::dsl::*;
let conn = establish_connection();
find {../data/www.huffingtonpost.com,../data/www.thenation.com} -type f -print0 |\
xargs -0 pv |\
iconv -c -t UTF8 |\
gsed "s/['’]s//g" | gsed "s/s['’]//g" |\
gsed 's/http.* //g' |\
gsed "s|[“”,‘/\"—…:;()#@!<>{}?=% &*_]| |g" |\
gtr -d "'" |\
gtr -d "’" |\
gtr "[:upper:]" "[:lower:]" |\
gsed 's/[0-9]/ /g' |\
import asyncio
import aiohttp
import os
import random
import re
import sys
import traceback
from io import StringIO
from lxml.html import parse, make_links_absolute
from lxml.cssselect import CSSSelector
require 'resolv'
require 'thread'
require 'csv'
require 'set'
ALPHABET = ('a'..'z').to_a + ('0'..'9').to_a + ['-']
def convert(num)
return ALPHABET[0] if num == 0
base = ALPHABET.length
converted = []