Skip to content

Instantly share code, notes, and snippets.

View BlogBlocks's full-sized avatar

Jack Northrup BlogBlocks

View GitHub Profile
@BlogBlocks
BlogBlocks / dabblet.css
Last active December 8, 2017 13:45
Untitled
body{
padding:20px;
background-color:#cfcfcf;
}
#header{
margin:0 auto;
width:95%;
height:40px;
@BlogBlocks
BlogBlocks / admin-header.php
Last active December 8, 2017 13:47
Online Data-based Book Creator with Search
<div id="header">
<h1>Tales of the Saltman</h1>
<p>by Jack Northrup</p>
<a class="right" href="index.php">Home</a>
</div>
@BlogBlocks
BlogBlocks / 0_reuse_code.js
Last active December 8, 2017 13:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@BlogBlocks
BlogBlocks / Url_fetch.php
Last active July 18, 2018 03:48
Fetch HTML Store In MySQL
<?php
function GetPage($URL)
{
#Get the source content of the URL
$source = file_get_contents($URL);
#Extract the raw URl from the current one
$scheme = parse_url($URL, PHP_URL_SCHEME); //Ex: http
$host = parse_url($URL, PHP_URL_HOST); //Ex: www.google.com
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BlogBlocks
BlogBlocks / Creating-C++-Image-viewer.ipynb
Last active July 18, 2018 03:45
Creating an image viewer in C++
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BlogBlocks
BlogBlocks / robot.py
Last active December 8, 2017 13:46
python robot demonstrating use of filters
# Make a robot called myrobot that starts at
# coordinates 30, 50 heading north (pi/2).
# Have your robot turn clockwise by pi/2, move
# 15 m, and sense. Then have it turn clockwise
# by pi/2 again, move 10 m, and sense again.
#
# Your program should print out the result of
# your two sense measurements.
#
# Don't modify the code below. Please enter
@BlogBlocks
BlogBlocks / WIX_STUFF.ipynb
Last active July 18, 2018 03:44
Jupyter Notebook using WIX
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Where to get the data:
# https://catalog.data.gov/dataset/crimes-2001-to-present-398a4
# THIS IS A BIG FILE - 1.5 gig
# prints the Headers and the First Line
# USAGE EXAMPLE: python HeadFirst.py Crimes_-_2001_to_present.csv
import sys
filename = sys.argv[1]
def headFirst(filename):
N=1000
f=open(filename)