Skip to content

Instantly share code, notes, and snippets.

Luis Sevillano LuisSevillano

Block or report user

Report or block LuisSevillano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@veltman
veltman / README.md
Last active Dec 9, 2019
Generating an SVG from a set of shapefiles
View README.md

Generating an SVG from a set of shapefiles

The USGS provides detailed downloads of fire perimeters, with timestamped files that can be used to show the spread of a major fire over time.

Using the 2017 Thomas fire as an example, we'll process this data into a single SVG file with all the different perimeter measurements.

This index page contains links to a series of shapefiles of the fire boundary, each one with a timestamp:

https://rmgsc.cr.usgs.gov/outgoing/GeoMAC/2017_fire_data/California/Thomas/

@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active Jan 21, 2020
A Ruby script for collecting phone record statistics from a Facebook user data dump
View facebook-contact-info-summary.rb
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@TheMapSmith
TheMapSmith / flights.js
Last active Aug 16, 2018
Fetching flight info
View flights.js
var fs = require('fs');
var request = require('request-promise');
var moment = require('moment')
// Globals
global.timestamp = moment().unix()
global.allPlaybacks = [];
global.geojson = {};
global.geojson['type'] = 'FeatureCollection';
global.geojson['features'] = [];
@thomasp85
thomasp85 / particles.R
Created Feb 26, 2018
Particles on CRAN
View particles.R
library(tidygraph)
library(particles)
library(jsonlite)
library(magick)
# Prepare text polygons
text <- read_json('text.json')
par_text <- text$layers[[3]]$paths
on_text <- text$layers[[2]]$paths
cran_text <- text$layers[[1]]$paths
View city_change.R
library(tidycensus)
library(tidyverse)
library(extrafont)
city16 <- get_acs(geography = "place",
variables = "B01003_001",
survey = "acs1") %>%
filter(estimate > 500000) %>%
rename(estimate16 = estimate)
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active Feb 29, 2020
npm's proposal for supporting ES modules in node
View esm_in_node_proposal.md

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@EfratVil
EfratVil / index.html
Last active Jan 19, 2018
highlight.js
View index.html
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>highlight.js</title>
<script src="//d3js.org/d3.v4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/default.min.css" rel="stylesheet" />
<script>hljs.initHighlightingOnLoad();</script>
<style>
@Fil
Fil / .block
Last active Jan 1, 2020
Versor dragging with inertia
View .block
license: gpl-3.0
@jeroen
jeroen / cranscraper.R
Last active Oct 18, 2017
Fast scraping of package metadata using curl multi API
View cranscraper.R
# Globals
repos <- 'https://cloud.r-project.org'
pkgdata <- available.packages(repos = repos)
pkgs <- row.names(pkgdata)
# On success
make_callback <- function(i, url){
function(res){
if(res$status == 200){
buf <- rawConnection(res$content)
@nitaku
nitaku / README.md
Last active Nov 15, 2017
Circle packing with hierarchical edge bundling
View README.md
You can’t perform that action at this time.