Skip to content

Instantly share code, notes, and snippets.

Test of something strange <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQQEhUUEhQWFRUXGBcaFxgYGBcYHBwbFRgYGRgXGCAaHSggHR4lGxggITEiJSkrLi8wGx8zODMtNygtLisBCgoKDg0OGxAQGy8kICU0LC80NDQ0NCwvNzQsLCwsNCwsLCwsNCwsLCwsLCwsLCwsNCwsLCwsLCwsLDQsLCwsLP/AABEIAOEA4QMBEQACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAAABgMFBwQCAf/EAEoQAAIBAwIEAwUEBwMJBwUAAAECAwAEERIhBQYxQRMiUQcyYXGBFFKRoSNCYnKx0fAzNMEVJENTc4KSovFEk5Sys9LhFjZUhNP/xAAcAQABBQEBAQAAAAAAAAAAAAAAAgMEBQYBBwj/xAA5EQABAwIEAgcHAwQCAwAAAAABAAIDBBEFEiExQVETImFxgZHwBjKhscHR4RRCUhUjM/EWNJKisv/aAAwDAQACEQMRAD8A3GhCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKELnu72OLHiOq56Ancn0UdSflXCQN0Kvl42SP0cTH0aQiJe/UHMg6fc7io0lbDHuU62F7tguObikpz+kRRvsiZI9DqckH/h/+a2TG42+6FIbROO65ZLotnVJM2e+vRtjoPCC4+fXfr0qE/HH/tCeFCOKi8X4zf8AiJ//AH1H/rEyc/RsR4n7U3/iJ/8A30f1iZH6Ni+pNg51Tf8AfzH07M5HalNxqYLho2KaPiEq+7O/Q4DqjgenQKxx8WyfXO9So8dP7gm3UPJdkPG5QfMiSDuUJRvhhXyP+cdPpU6LGIX76Jh1I8bLsg4/C2A5MTHG0o07nOAG9xjt0VjVjHPHJ7jrqO5jm7hWlPJCK
import twitter
OAUTH_TOKEN = ""
OAUTH_SECRET = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
twitter_stream = twitter.TwitterStream(
auth=twitter.OAuth(OAUTH_TOKEN, OAUTH_SECRET,
CONSUMER_KEY, CONSUMER_SECRET)
# packages in environment at /opt/tljh/user:
#
# Name Version Build Channel
absl-py 0.5.0 <pip>
alembic 1.0.0 <pip>
amqp 2.3.2 <pip>
appdirs 1.4.3 py_1 conda-forge
argon2-cffi 18.3.0 <pip>
asn1crypto 0.24.0 py36_0
astor 0.7.1 <pip>
@story645
story645 / hw4_readme.md
Last active May 23, 2019 17:12
HW4 Readme

Using the linked list class from homework 3, implement a stack class with the following methods:

  1. push
  2. pop
  3. top

Then use that stack to solve the following problem:

Suppose that you have n queens from a chessboard. Is it possible to place all n queens on the board so that no two queens are in the same row, no two queens are in the same column, and no two queens are on the same diagonal?

Using the linked list class from homework 3, implement a queue class with the following methods:

  1. push
  2. pop
  3. front
  4. back

Then use that queue to solve the following problem:

Write a simulation program of the lines at a grocery store. The program will be similar to the car wash simulation, except that there

@story645
story645 / hw6_readme.md
Created May 23, 2019 20:03
Homework 6 Readme
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
fig, ax = plt.subplots()
s = ax.scatter([0, .5, 1], [1, .5, 0], c=[1,2,3],
edgecolor='k', s=1000, zorder=10)
im = ax.matshow([[1,1,1],[2,2,2],[3,3,3]], cmap='RdBu')
fig.colorbar(s)
fig.colorbar(im)
def to24(time):
try:
hour, minute, local = time.split(":")
except (ValueError, AttributeError):
return time
h = int(hour)
m = int(minute)
if time.endswith('AM'):
numpy
scipy
matplotlib
cartopy
netCDF4
xarray
pandas
geopandas
geoplot
scikit-image