View webscrapping_weedclassification.java
package webscrapping_weedclassification;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
View swiftNavigation.hs
--ghc 7.10
f :: Integer -> Integer
f 0 = 1
f 1 = 1
f n = f (n-1) + f (n-2)
--I just google searched this.
isPrime :: Integer->Bool
isPrime x = null [y | y<-[2..floor (sqrt (fromIntegral x))], x `mod` y == 0]
View simpleImageProcessing.py
import math
from scipy import ndimage as ndi
from skimage import feature
import numpy as np
import os
from scipy import ndimage as ndi
import cv2
import Queue
View gears.html
<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v4.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
function createDivGear(color, strokeWidth, dashArray, cx, cy, r, time, rot){
var svg = d3.select("svg");
View smallServer.py
from flask import Flask, flash, redirect, render_template, request, url_for
from flaskext.mysql import MySQL
import sys
mysql = MySQL()
app = Flask(__name__)
app.secret_key = 'many random bytes'
app.config['MYSQL_DATABASE_USER'] = 'root'
View stupidSort.java
private ArrayList<LatLng> closestPoints_stupidSort(ArrayList<Pair<LatLng, Double>> pairs) {
ArrayList<Pair<LatLng, Double>> newPairs = new ArrayList<Pair<LatLng,Double>>();
for(int i = 0; i < pairs.size(); i ++){
if(newPairs.size() == 0){ newPairs.add(new Pair<LatLng, Double>(pairs.get(i).first, pairs.get(i).second)); continue; }
for(int j = 0; j < newPairs.size(); j++){
if(newPairs.get(j).second > pairs.get(i).second){
int jf = (j > 0)? j-1: j;
Log.v("NEW VAL OF JF : ", newPairs.size() + " : " + jf);
newPairs.add(jf, new Pair<LatLng, Double>(pairs.get(i).first, pairs.get(i).second));