This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# letter_subplots.py | |
# Jim Bagrow | |
# Last Modified: 2021-05-07 | |
import numpy as np | |
import matplotlib.pyplot as plt |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss1full.xsl"?> | |
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.nature.com/~d/styles/itemcontent.css"?> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns="http://purl.org/rss/1.0/" xmlns:admin="http://webns.net/mvcb/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"> | |
<channel rdf:about="http://feeds.nature.com/nature/rss/current"> | |
<title>Nature - Issue - nature.com science feeds</title> | |
<description>Nature is the international weekly journal of science: a magazine style journal that publishes full-length research papers in all disciplines of science, as well as News and Views, reviews, news, features, commentaries, web focuses and more, covering all branches of science and how science i |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# method_chaining.py | |
# Jim Bagrow | |
# Last Modified: 2016-12-05 | |
""" | |
Method chaining (or cascading) is a technique for making many calls to an | |
object with less code. Each method should return a reference to the object |
This file contains 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
#!/usr/bin/env python | |
# color_stuff.py | |
# Jim Bagrow | |
# Last Modified: 2016-12-01 | |
import colorsys | |
def distinguishable_colors(num, sat=1.0, val=1.0): | |
"""Generate a list of `num' rgb hexadecimal color strings. The strings are |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# exhaustive_search_linearRegression.py | |
# Jim Bagrow | |
# Last Modified: 2015-10-05 | |
import sys, os | |
import numpy as np | |
import scipy, scipy.stats |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# annotate_with_graphlayout.py | |
# Jim Bagrow | |
# Last Modified: 2015-12-09 | |
""" | |
Rough improvement of scatter point label placement using | |
force-directed graph layout. |
This file contains 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
#!/usr/bin/env python | |
# extract_backbone.py | |
# Jim Bagrow | |
# Last Modified: 2010-11-18 | |
import sys, os | |
import networkx as nx | |
This file contains 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
#!/usr/bin/env python | |
# weather | |
# Jim Bagrow | |
# Last Modified: 2014-01-01 | |
""" | |
This script requires: | |
1. a weather underground API key |
This file contains 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
#!/usr/bin/env python | |
# weighted_choice.py | |
# Jim Bagrow | |
# Last Modified: 2012-11-06 | |
import random, bisect | |
import pylab | |
def weighted_choice(choices, num_draws=1): |
This file contains 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
javascript: | |
var youtubeid = getQueryVariable("v"); | |
if (youtubeid != undefined){ | |
window.location="http://youtube.googleapis.com/v/"+youtubeid+"&autoplay=1"; | |
} | |
function getQueryVariable(variable) { | |
/* courtesy: http://stackoverflow.com/a/1623707 */ | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); |
NewerOlder