Skip to content

Instantly share code, notes, and snippets.

View BlogBlocks's full-sized avatar

Jack Northrup BlogBlocks

View GitHub Profile
@eskriett
eskriett / GoogleMapDownloader.py
Last active June 6, 2024 17:31
A python script to download high resolution Google map images given a longitude, latitude and zoom level.
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib
import Image
@pebreo
pebreo / ngram.py
Last active July 28, 2018 21:02
An n-gram generator in Python (newbie program)
from collections import Counter
from random import choice
import re
class Cup:
""" A class defining a cup that will hold the words that we will pull out """
def __init__(self):
self.next_word = Counter() # will keep track of how many times a word appears in a cup
@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;
@bogger
bogger / deploy.prototxt
Last active May 28, 2022 21:55
GoogLeNet_cars
name: "GoogleNet"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
# hierarchy 1
# conv -> relu -> pool -> lrn
@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