Skip to content

Instantly share code, notes, and snippets.

View jsutch's full-sized avatar

Jeff Sutch jsutch

View GitHub Profile
@jsutch
jsutch / index.html
Created March 30, 2015 06:51
Seattle Business Data 2011
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3 with SVG Elements</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: #ddddff;
print grading(random.randrange(1,100))
#!/usr/local/bin/python
import random
import time
# add time delta
#Bubble sort list
group2 = [3,2,1,9,7,9,5,1]
#!/usr/local/bin/python
mynewlist = ['Richardson', 4, 'Reggie Kray', 2, 'Gee', 'Monahan', "23"]
x = 0
# mynewlist = [s for s in mylist3 if s.isdigit()]
all(isinstance(item, int) for item in mynewlist)
while x < len(mynewlist):
from flask import Flask, render_template
app= Flask(__name__)
@app.route('/')
@app.route('/success')
@app.route('/test')
def hello_world():
return render_template('index.html')
127.0.0.1 - - [11/May/2016 16:38:13] "GET /success HTTP/1.1" 200 -
^C(venv) Shrdlu:new_environment person$ python hello1.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger pin code: 128-550-458
127.0.0.1 - - [11/May/2016 16:39:27] "GET /success HTTP/1.1" 200 -
127.0.0.1 - - [11/May/2016 16:39:30] "GET /test HTTP/1.1" 200 -
127.0.0.1 - - [11/May/2016 16:40:28] "GET /test HTTP/1.1" 200 -
127.0.0.1 - - [11/May/2016 16:38:13] "GET /success HTTP/1.1" 200 -
^C(venv) Shrdlu:new_environment person$ python hello1.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger pin code: 128-550-458
127.0.0.1 - - [11/May/2016 16:39:27] "GET /success HTTP/1.1" 200 -
127.0.0.1 - - [11/May/2016 16:39:30] "GET /test HTTP/1.1" 200 -
127.0.0.1 - - [11/May/2016 16:40:28] "GET /test HTTP/1.1" 200 -
@jsutch
jsutch / server.py
Created May 17, 2016 00:29
New Test
# Assignment: Landing Page
# MandatoryDeadline: Monday of Week 4Difficulty Level: BasicEstimated Time: 1-2 hrs
# Create a flask project capable of handling the following routes:
# localhost:5000/ This route should serve a view file called index.html and display a greeting.
# localhost:5000/ninjas This route should serve a view file called ninjas.html and display information about ninjas.
# localhost:5000/dojos/new This route should serve a view file called dojos.html and have a form (don't worry where the form should be sent to - action=' ').
# Now create a folder inside of our project labeled static. Remember, this static folder will be used to serve all of our static content (stylesheets, images, javascript files, etc.)! Now try placing a stylesheet in the static folder and referencing it in our view files (templates).
from flask import Flask, render_template, url_for

Keybase proof

I hereby claim:

  • I am jsutch on github.
  • I am jeffsutch (https://keybase.io/jeffsutch) on keybase.
  • I have a public key ASBDUYgTbz0lOCYHEtxbHPj9Rw1QByD3MQ21pddEcC8tMAo

To claim this, I am signing this object:

attrs = ['name', 'time', 'mainmob', 'room', 'experience', 'maxhps', 'maxmana', 'maxmoves', 'currenthps', 'currentmana', 'gold', 'bank', 'current_str', 'current_int', 'current_wis', 'current_dex', 'current_con', 'armor_on', 'clarity_on', 'sanctuary_on', 'regeneration_on', 'strength_on', 'senselife_on', 'infravision_on', 'kick_multiplier', 'kick_timer', 'harm_multiplier', 'harm_timer']
Raw output:
Amy 1554253429 tree1 6109 478772369 133073 10084 546 133073 8900 4508972 4000000 45 56 195 40 40 1 1 1 1 1 1 1 3 10 3 15
Basil 1554253429 tree3 6120 124484223 110445 10209 545 110445 8998 5869655 4000000 45 40 213 40 40 1 1 1 1 1 1 1 3 10 3 15
Bert 1554253432 tree3 6120 691951455 87643 10395 654 87643 8884 16488715 0 45 40 213 40 40 1 1 1 1 1 1 1 3 10 3 15
Bobby 1554253432 tree4 6123 632243881 74446 10244 674 74446 10050 21601039 0 49 40 176 40 58 1 1 1 1 1 1 1 3 10 3 15
Bruce 1554253432 tree4 6123 113532700 73164 8296 660 73164 8075 42395450 0 45 40 185 48 40 1 1 1 1 1 1 1 3 10 3 15
1554253409 tree3 6120 447985128