Skip to content

Instantly share code, notes, and snippets.

View teyber's full-sized avatar

Reed Teyber teyber

View GitHub Profile
@aahoo
aahoo / energyplus weather file download python2.py
Last active October 26, 2023 22:36
Automatically download energyplus weather data files (epw and ddy), 2 versions python 2 and 3
import json
import re
import urllib2
path_to_save = '' # create a directory and write the name of directory here
data_file = urllib2.urlopen('https://github.com/NREL/EnergyPlus/raw/develop/weather/master.geojson')
data = json.load(data_file)
# or you can download master.geojson and run the below code instead of downloading from the net
# with open('master.geojson') as data_file:
# data = json.load(data_file)
@JoanTheSpark
JoanTheSpark / KiCAD_CopperSpiral_v2.py
Created November 27, 2015 08:54
v2 with spin direction and increasing amount of segments per turn for smoother result in outer circles
import sys, os
import shutil
import math
import itertools
from copy import deepcopy
# 0 1 2 3 4 5 6
LIST_elmt = [" ("," (start ",") (end ",") "," (layer ",") ","))"]
#LIST_elmt = [" (gr_line (start 131.571908 182.314571) (end 112.874456 120.68499) (angle 90) (layer Dwgs.User) (width 0.1))"]
#LIST_elmt = [" (segment (start 118.7 106.7) (end 119.4 106.7) (width 0.25) (layer B.Cu) (net 0))"]
@JoanTheSpark
JoanTheSpark / KiCAD_CopperSpiral.py
Created November 26, 2015 11:19
KiCAD BZR6097, Python, Copper Track Spiral
import sys, os
import shutil
import math
import itertools
from copy import deepcopy
# 0 1 2 3 4 5 6
LIST_elmt = [" ("," (start ",") (end ",") "," (layer ",") ","))"]
#LIST_elmt = [" (gr_line (start 131.571908 182.314571) (end 112.874456 120.68499) (angle 90) (layer Dwgs.User) (width 0.1))"]
#LIST_elmt = [" (segment (start 118.7 106.7) (end 119.4 106.7) (width 0.25) (layer B.Cu) (net 0))"]