Skip to content

Instantly share code, notes, and snippets.

Avatar

Rich Jones Miserlou

View GitHub Profile
@Miserlou
Miserlou / gist:11500b2345d3fe850c92
Created Apr 27, 2015
1000 Largest US Cities By Population
View gist:11500b2345d3fe850c92
Largest 1000 Cities in America
2013 popuation data - Biggest US Cities By Population
rank,city,state,population,2000-2013 growth
1,New York,New York,8405837,4.8%
2,Los Angeles,California,3884307,4.8%
3,Chicago,Illinois,2718782,-6.1%
4,Houston,Texas,2195914,11.0%
5,Philadelphia,Pennsylvania,1553165,2.6%
@Miserlou
Miserlou / flask_binary.py
Created Feb 17, 2017
Flask serving binary data example
View flask_binary.py
import io
from flask import Flask, send_file
app = Flask(__name__)
@app.route('/logo.jpg')
def logo():
"""Serves the logo image."""
with open("logo.jpg", 'rb') as bites:
@Miserlou
Miserlou / cities.json
Created Apr 30, 2015
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
View cities.json
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@Miserlou
Miserlou / sort_map_by_value_example.ex
Last active May 12, 2022
How to Sort a Map By Value In Elixir
View sort_map_by_value_example.ex
# I couldn't find this easily in the documentation or on Google.
# Here's how you sort a map in Elixir.
# Maps aren't a sorted structure, so the result is a keyword list.
input = %{
player_1: %{score: 2},
player_2: %{score: 1},
player_3: %{score: 10}
player_4: %{score: 5}
}
@Miserlou
Miserlou / shell_invoke.sh
Created Aug 31, 2017
Execute Lambda Shell Commands With Zappa
View shell_invoke.sh
zappa invoke --raw 'import subprocess; print subprocess.check_output("ls");'
@Miserlou
Miserlou / semantic-2.2.9.html
Created Mar 4, 2017
Semantic UI 2.2.9 CDN Starter
View semantic-2.2.9.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Semantic UI CDN</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.js"></script>
</head>
<body>
@Miserlou
Miserlou / heatmap.py
Created Feb 15, 2019
Heatmaps with Dask, Holoviews and Datashader
View heatmap.py
import time
import datashader as ds
import pandas as pd
import numpy as np
import holoviews as hv
from holoviews import opts
from colorcet import fire
from datashader import transfer_functions as tf
from dask import dataframe as dd
@Miserlou
Miserlou / geo_platforms_with_organism.json
Created May 9, 2018
geo_platforms_with_organism.json
View geo_platforms_with_organism.json
This file has been truncated, but you can view the full file.
[
{
"gpl": "GPL570",
"num_samples": 137985,
"organism": "Homo sapiens",
"title": "[HG-U133_Plus_2] Affymetrix Human Genome U133 Plus 2.0 Array"
},
{
"gpl": "GPL13112",
View bully_cop_veto.md

The Bully Cop Veto

A simple democratic tool will give people the basic democratic dignity of getting to choose who polices their communities.

"All cops are bastards." That's not as bad as it sounds, really - lots of people are bastards. Many of my friends are bastards. I can be a bit of a bastard myself.

I'm not, however, a sadistic psychopath. Bastards, sure, but not all cops are sadistic psychopaths, either - but there are thousands of them all over the country. They sit at the very center of America's police oppression problem - the Bully Cops.

When I say the Bully Cop, you all immediately know exactly who I mean. I've met a few in my life, maybe you have too. If you haven't, consider yourself lucky, but you've certainly seen them in any of the shaky cell-phone videos showing the brutal, murderous police violence that we all know familiarly, but never get used to.

They're the particular type of people who are attracted to the job for all of the wrong reasons. They don't want to improve their commu

View Ultimate Full-Body Dumbbell Workout | Andy Speer.md

Based on: Ultimate Full-Body Dumbbell Workout | Andy Speer

Complex 1: Power and Stretching

Perform 3 rounds, resting 60-90 sec. between rounds

  1. Dumbbell Clean: 10 reps
  2. Dumbbell Push Press: 10 reps
  3. Dumbbell Front Squat: 10 reps

Complex 2: Hypertrophy Series

Perform 3 rounds, resting 60 sec. between rounds