Skip to content

Instantly share code, notes, and snippets.

View dalmat36's full-sized avatar

Matt Dalesio dalmat36

View GitHub Profile
library(blscrapeR)
df <- get_bls_county(stateName = "Pennsylvania")
bls_map_county(map_data=df, fill_rate = "unemployed_rate",
stateName = "Pennsylvania")
@dalmat36
dalmat36 / SexualAssaults.js
Last active April 22, 2016 17:31
Maptime State College Meetup: Mapping Sexual Assault Data with Leaflet
var assaults = {
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features": [
{
@dalmat36
dalmat36 / Hello.groovy
Created April 9, 2016 20:43
Hello AWS Lambda with Groovy
package testing
import com.amazonaws.services.lambda.runtime.Context
import org.bson.Document;
public class Hello {
public List<Document>; myHandler(People people, Context context) {
def listOfPeople = []
Document person1 = new Document().append("name", people.person1)
group 'testing'
version '1.0-SNAPSHOT'
apply plugin: 'groovy'
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def mainClassName = 'testing.Hello'
package testing
/**
* Created by dalesiom on 3/24/2016.
*/
class People {
String person1;
String person2;
String person3;
package testing
import com.amazonaws.services.lambda.runtime.Context
import org.bson.Document;
public class Hello {
public List<Document> myHandler(People people, Context context) {
def listOfPeople = []
Document person1 = new Document().append("name", people.person1)
[{
"id":1,
"model":"XLCS-BD",
"name":"Model 100 Pellet Stove",
"varient":"Black Door",
"manufacturer":"Kozi Pellet ",
"productType":"Stove",
"fuelType":"Pellet",
"description":"40K BTUS, Holds 50 lbs of pellets, 10 tube heat exchanger, Large Ash pan, Rod and scraper heat exchanger cleaner, Top loading fuel system, Stainless steel burn pot, Large viewing window with 1400*F ceramic glass, electronic ignition, Manual Draft control, Automatic fan control, Glass Saver/ Air wash system, Thermostaticly capable, 2 inch clearance, Certified for mobile home installation, and a MX control gives the option of running the stove on Automatic (On/Off), Hi-Low, or Manual Mode (1-5 Burning Levels) W25\" x D23\" xH31",
"image":""
[{
"id":1,
"name":"Model 100 Pellet Stove",
"manufacturer":"Kozi Pellet ",
"productType":"Stove",
"fuelType":"Pellet",
"description":"40K BTUS, Holds 50 lbs of pellets, 10 tube heat exchanger, Large Ash pan, Rod and scraper heat exchanger cleaner, Top loading fuel system, Stainless steel burn pot, Large viewing window with 1400*F ceramic glass, electronic ignition, Manual Draft control, Automatic fan control, Glass Saver/ Air wash system, Thermostaticly capable, 2 inch clearance, Certified for mobile home installation, and a MX control gives the option of running the stove on Automatic (On/Off), Hi-Low, or Manual Mode (1-5 Burning Levels) W25\" x D23\" xH31",
"variant":[
{
"model":"XLCS-BD",
@dalmat36
dalmat36 / app.js
Created February 26, 2016 00:47
This example displays the latest five posts from my personal wordpress blog using the public wordpress API and AngularJS
angular.module('postsApp', [])
.controller('PostListController',[ '$http', function($http) {
var postList = this;
postList.posts = [];
/*postList.posts = [{
ID: 666,
date: "2016-01-23T18:51:17-05:00",
title: "2015 Cloud IaaS Platforms",
short_URL: "http://wp.me/p28wpS-aK"
}, {
A <- c(1,2,3,4,5)
B <- c(6,7,8,9,10)
C <- setdiff(A,B) #Result: 1,2,3,4,5
write.csv(C, file = "C:/MyData.csv")