Skip to content

Instantly share code, notes, and snippets.

@chenghan
chenghan / gist:7456549
Last active February 5, 2022 20:17
Instructor code that was shown on screen
import sys
salesTotal = 0
oldKey = None
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 2:
# Something has gone wrong. Skip this line.
continue
import sys
salesTotal = 0.0
oldKey = None
dummy_Data=["Miami 12.34","Miami 99.07","Miami 55.07","NYC 88.97","NYC 33.56"]
for line in dummy_Data:
data = line.strip().split(" ")
if len(data) != 2:
# Something has gone wrong. Skip this line.
continue
@SpotlightKid
SpotlightKid / MarkdownPDF.py
Last active August 25, 2023 20:55
Markdown to PDF Conversion for Pythonista
# Markdown to PDF Conversion
#
# This script converts Markdown markup to PDF directly on your iOS device.
#
# Please see the "Requirements" section in the docstring below for required
# dependencies and the "Installation" section for instructions on how to
# install them.
#
# Run this script directly or put it into the Pythonista editor action menu
# with one of the following options as the first and sole argument:
@jacohend
jacohend / overpass_speed.py
Created January 18, 2016 06:45
Get speed limits from OSM's Overpass API within a certain radius of gps coordinates
import overpy
import sys
import simplejson as json
#pip install overpy
#python overpass_speed.py 37.7833 -122.4167 500
def maxspeed(coordinates, radius):
lat, lon = coordinates
api = overpy.Overpass()
@coryhouse
coryhouse / package.json
Last active April 15, 2023 15:08
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@marcellobenigno
marcellobenigno / readme.md
Last active May 14, 2021 12:44
Install Geoserver on Ubuntu 14.04 LTS

GeoServer Installation On Ubuntu 14.04 LTS

Install Tomcat7:

sudo apt-get install tomcat7 tomcat7-admin

Add a new Tomcat user: