Skip to content

Instantly share code, notes, and snippets.

Shawn Graham shawngraham

Block or report user

Report or block shawngraham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View getpics.py
"""
pip instal fitz
pip install PyMuPDF
"""
import fitz
doc = fitz.open("file.pdf")
for i in range(len(doc)):
for img in doc.getPageImageList(i):
xref = img[0]
@shawngraham
shawngraham / soc-talk.md
Last active Aug 19, 2019
social media talk notes
View soc-talk.md

Me & My Social Media Habits

Shawn Graham, Department of History, Carleton U @electricarchaeo

tenured-minion

...well, everyone needs an avatar, right? Social media is performative. Choose wisely.

image

image Kate Galloway; see slideshare link at bottom

View golems-in-the-city-with-colds.nlogo
@shawngraham
shawngraham / network-message.nlogo
Created Mar 25, 2019
message-on-a-network for netlogo
View network-message.nlogo
View jesuits-groove.rb
#require 'csv'
#data = CSV.parse(File.read("/Users/shawngraham/jesuit/jes2.csv"), {:headers => true, :header_converters => :symbol})
#trying to get a bit more performative with the sonic-pi. Two columns of topics.
use_bpm 50
live_loop :amen_break do
sample :loop_amen, beat_stretch: 2 #,cutoff: 70
sleep 2
end
View trading-pots-on-a-network.netlogo
View text-to-csv.bat
@echo off
setlocal EnableDelayedExpansion
if exist result.csv del result.csv
for %%f in (*.txt) do (
set i=0
for /F "delims=" %%l in (%%f) do (
set /A i+=1
set line!i!=%%l
)
echo %%f, !line1!, !line2!, >> result.csv
@shawngraham
shawngraham / earth.py
Created Mar 5, 2019
grabbing cambridge airphotos
View earth.py
from bs4 import BeautifulSoup
import csv
import requests
file = open("output.txt", "w")
# f = csv.writer(open("output.csv", "w"))
# f.writerow(["domain", "fulllink"])
pages = []
View netlogo-commits.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View netlogo-commits
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: %3 Pages: 1 -->
<svg width="1996pt" height="58947pt"
viewBox="0.00 0.00 1995.62 58947.45" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 58943.4457)">
You can’t perform that action at this time.