Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Arnold timarnold

  • Aurora
  • Pittsburgh, Pennsylvania, United States
View GitHub Profile
View rona-plots.py
import pandas as pd
import matplotlib.pyplot as plt
import pylab as plot
import numpy as np
from scipy.optimize import curve_fit
def func(x, a, b):
return a * np.power(b, x)
def logistic(x, L, k, x0):
View corona.py
import pandas as pd
import matplotlib.pyplot as plt
import pylab as plot
import numpy as np
from scipy.optimize import curve_fit
def func(x, a, b):
return a * np.power(b, x)
# Graph
View covid.py
import pandas as pd
import matplotlib.pyplot as plt
import pylab as plot
import numpy as np
# Graph appearance parameters
params = {
'legend.fontsize': 20,
'legend.handlelength': 2,
'axes.titlesize': 24,
View fetch_coronavirus_pa.py
import requests
import json
from html.parser import HTMLParser
from lxml import html, etree
from datetime import timedelta, date
URL_BASE = "https://archive.org/wayback/available?url=https://www.health.pa.gov/topics/disease/coronavirus/Pages/Cases.aspx&timestamp="
COUNTIES = [
"Adams",
"Allegheny",
View look_away
#!/usr/bin/env python
import math
import rospy
from sensor_msgs.msg import Image, JointState
from simple_arm.srv import *
class LookAway(object):
def __init__(self):
View gist:f0140aa7fa5f1e91181fe09f131301b4
#!/usr/bin/env python
import math
import rospy
from std_msgs.msg import Float64
from sensor_msgs.msg import JointState
from simple_arm.srv import *
def at_goal(pos_j1, goal_j1, pos_j2, goal_j2):
tolerance = .05
View keybase.md

Keybase proof

I hereby claim:

  • I am timcamber on github.
  • I am timcamber (https://keybase.io/timcamber) on keybase.
  • I have a public key whose fingerprint is CFB3 7C3F 33A3 9FEF 176D 9842 5293 C403 EEE0 C3C8

To claim this, I am signing this object:

View iPhone-Search.rb
require 'rubygems'
require 'json'
require 'cgi'
require "net/http"
require "uri"
# Find your store here: http://www.ifoapplestore.com/store-number-list/
stores =
{
"Towson" => "R063",
View ReactiveCocoa.md

ReactiveCocoa

A lot is being written these days about ReactiveCocoa and the paradigms it introduces. In my opinion, there are only two sides giving their opinion: the ones that know a lot about it and are therefore obviously biased, and the ones that refuse to learn it.

I decided to write something myself because I think I'm right in the middle. A few months ago I knew nothing about it, and now I know enough to want to use it every day. I hope that by not being an expert, I can actual introduce a few really simple ideas in a much easier way to pick up by newcomers, to show why I think ReactiveCocoa is an incredibly powerful tool to help us write better, cleaner, and more maintainable code.

It's signals all the way down

The base of everything that happens in ReactiveCocoa is signals. I'm going to try to explain what they represent and why they fit in the way we think about what happens on an app. A lot of the things you may read about Functional Reactive Programming end up confusing you when t

View Star.m
UIImage *im = [UIImage imageNamed:@"8n2ty.jpg"];
UIImageView *iv = [[UIImageView alloc] initWithImage:im];
[self.view addSubview:iv];
CGFloat w = im.size.width / 2.;
CGFloat h = im.size.height / 2.;
UIImage *q1, *q2, *q3, *q4;
CGRect r1 = CGRectMake(0, 0, w, h);
CGRect r2 = CGRectMake(w, 0, w, h);
CGRect r3 = CGRectMake(0, h, w, h);