Skip to content

Instantly share code, notes, and snippets.

View Sun-Wukong's full-sized avatar

Jason Sun-Wukong

  • Dirty Jersey
View GitHub Profile
@Sun-Wukong
Sun-Wukong / tut0.py
Created August 15, 2018 17:47
Getting into ArcGIS with Jupyter!
``` Downloading Data from ArcGIS ```
from arcgis.gis import *
import os
from zipfile import ZipFile
# GIS Datset ID
public_data_item_id = 'a04933c045714492bda6886f355416f2'
# Rando GIS connection object
anon_gis = GIS()
class Character {
constructor(x, y) {
this.x = x;
this.y = y;
this.health_ = 100;
}
damage() {
this.health_ = this.health_ - 10;
}
@Sun-Wukong
Sun-Wukong / CopyTut.gradle
Last active February 13, 2017 21:12
Collection of Groovy / Gradle files for enrichment
//
task copyImages(type: Copy) {
from 'images'
into 'build'
dependsOn = [ "copJpegs", "copyBmps", "copyPngs"]
}
task copyJpegs(type: Copy) {
from 'images'
include '*.jpg'
# Quick list of neo4j queries I'm trying out
# Keywords for querying are MATCH, WHERE, RETURN, ORDERBY, and SKIP|LIMIT
Match(actor:Person)-[ACTED_IN]->(movie {title: 'Cloud Atlas'})
Where actor.name = "Tom Hanks"
return actor;
Match(actor:Person)-[ACTED_IN]->(movie {title: 'The Matrix'})
return actor.name;
@Sun-Wukong
Sun-Wukong / TODO.txt
Created January 30, 2016 21:04
Spotify and Soundkick requests abtraction
TODO:
Things to get from Spotify GET api.spotify.com/track:
Song track( the track object )
Artist name(get that out of the track object: aka track.artist.name or track.artist.id)
Things to query from Soundkick
response = GET ( http://api.songkick.com/api/3.0/search/artists.json?query={artist name from spotify track object}&apikey={your_api_key}:
@Sun-Wukong
Sun-Wukong / exer10.php
Last active January 12, 2016 16:58
Taking a crack at FB's Hack lang
<?hh
//Lambdas in Hack
function vector_add1(Vector<int> $v): Vector<int> {
// Example of lambda expressions.
return $v->map($x ==> $x + 1);
}
function vector_mult2(Vector<int> $v): Vector<int> {
// lamba multiplying all the elements by 2
return $v->map($n ==> $n *2);
@Sun-Wukong
Sun-Wukong / lab1.html
Created January 11, 2016 05:46
Submissions for DEV205x
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
font-family: Verdana;
}
h1, h2, h3 {
color: darkblue;
}
@Sun-Wukong
Sun-Wukong / ContainerInstance.json
Last active April 25, 2020 00:45
Snippets, scripts, and plugins for general tasks
{
"name": "string",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"location": "string",
"tags": {},
"identity": {
"type": "string",
"userAssignedIdentities": {}
},
@Sun-Wukong
Sun-Wukong / Pset.cs
Created January 5, 2016 18:36
My solution for Module 11's problem set. This applies to Dev204X on edX
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@Sun-Wukong
Sun-Wukong / comparisons.sh
Last active December 14, 2015 18:52
Hackerrank bash scripting challenges
read X
read Y
if [ $X -gt $Y ]; then
echo "X is greater than Y";
elif [ $X -eq $Y ]; then
echo "X is equal to Y";
else
echo "X is less than Y";
fi