Skip to content

Instantly share code, notes, and snippets.

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

@sharno
sharno / ride.java
Created February 5, 2014 23:22
USACO your ride is here solution
/*
ID: sharnob1
LANG: JAVA
PROG: ride
*/
import java.io.*;
class ride {
public static void main (String [] args) throws IOException {
@sharno
sharno / gist:c70cbf06377b36168e7f
Last active August 29, 2015 14:13
small currency detector
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
String message= "From HSBC: 08JAN15 METRO MARKET EGP 48.70-";
Matcher currencyMatcher = Pattern.compile("(?:EGP|USD|EUR)(?=\\s\\d*)").matcher(message);
@FXML
private void switchService () {
if (isRunning) {
serverController.stopService();
isRunning = false;
Platform.runLater(new Runnable() {
@Override
public void run() {
@sharno
sharno / .gitignore
Last active November 3, 2022 13:12
Java servlet/JSP project .gitignore file
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
{
"list" : "poi",
"category": { "label": [
{
"lang": "pt-PT", "term": "primary",
"value": "My Second cat" },
{
"lang": "ar-EG", "term": "primary", "value": "test"
} ],
"lang": "pt-PT", "term": "category", "value": "teste"
var express = require('express');
var request = require('request');
var async = require('async');
var querystring = require('querystring');
var app = express()
var myUrl = "http://jes.iti.gov.eg/CitySDK/categories?List=poi"
var auth = "http://jes.iti.gov.eg/CitySDK/auth?username=admin&password=defaultCitySDKPassword"
app.post('/', function (req, res) {
@sharno
sharno / app.js
Last active August 29, 2015 14:17
var request = require('request');
var myUrl = "http://jes.iti.gov.eg/CitySDK/categories?List=poi"
var auth = "http://jes.iti.gov.eg/CitySDK/auth?username=admin&password=defaultCitySDKPassword"
var data = {"list":"poi", "category" : { "label" : [ { "lang" : "pt-PT",
"term" : "primary",
"value" : "First Category"
},
import urllib2
import urllib
from bs4 import BeautifulSoup
url = "http://www.gocomics.com/calvinandhobbes/1985/11/18"
domain = "http://www.gocomics.com"
def make_soup(url):
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
import sys
import pandas as pd
file_names = [sys.argv[1], sys.argv[2]]
frames = []
output_filename = ""
for file_name in file_names: