Skip to content

Instantly share code, notes, and snippets.

View strawstack's full-sized avatar

Richard strawstack

View GitHub Profile
<!DOCTYPE html>
<html><head>
<!-- REQUIRED -->
<!--
File called 'graph.json' in the same directory containing
list of edges. Example:
[
["A", "B"],
@strawstack
strawstack / LeetCodeLikes.json
Last active October 15, 2019 21:02
Like and Dislike data for 1126 LeetCode Questions!
[
{
"question": {
"questionId": "1344",
"questionFrontendId": "1224",
"title": "Maximum Equal Frequency",
"titleSlug": "maximum-equal-frequency",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 69,
@strawstack
strawstack / policy.txt
Created July 22, 2019 20:33
Privacy Policy
Privacy Policy
Richard built the C2G app as a Free app. This SERVICE is provided by Richard at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at C2G unless otherwise defined in this Privacy Policy.
@strawstack
strawstack / SummerOfLeetCode2019.json
Last active May 18, 2019 07:33
SummerOfLeetCode2019
{
"2": {
"date": "Sun 21 Apr",
"level": "medium",
"url": "https://leetcode.com/problems/add-two-numbers/"
},
"3": {
"date": "Tuesday 23 Apr",
"level": "medium",
"url": "https://leetcode.com/problems/longest-substring-without-repeating-characters/"
@strawstack
strawstack / K.java
Last active October 2, 2018 02:57
Solution to 2018 ACM problem K - orbits
import java.io.*;
import java.util.*;
/*
* @author DarkMarksDoe
* @author Strawstack
*/
/* sample input
6
@strawstack
strawstack / d1.cpp
Created September 6, 2018 03:20
Advent of Code 2016 Day 1
#include<iostream>
#include <string>
#include <map>
#include <utility>
using namespace std;
/*
* Run instruction: `g++ d1.cpp && ./a.out < input.txt`
* `input.txt` is the input file from the problem: http://adventofcode.com/2016/day/1
@strawstack
strawstack / kiji.txt
Last active September 10, 2017 19:32
listings
39 listings found
Title: Cash bonus and free truck!
Date: 2017-09-09 21:48:35
Price: Please Contact
Url: /v-condo-for-sale/ottawa/cash-bonus-and-free-truck/1296412553
Title: Investors!!
Date: 2017-09-09 21:44:15
Price: Please Contact
@strawstack
strawstack / kiji.py
Last active September 10, 2017 19:32
Get listings from kiji
import urllib.request
from bs4 import BeautifulSoup
import time
from datetime import datetime, timedelta
data = [] # array to hold listings found
seenFirstYesterday = False
nextpage = True
number = 0
base = "https://www.kijiji.ca"