Skip to content

Instantly share code, notes, and snippets.

View defvol's full-sized avatar

Rodolfo Wilhelmy defvol

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 4, 2024 15:48
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@daniel-j-h
daniel-j-h / cut.sh
Created August 9, 2016 10:58
1/ go to geojson.io draw bounding box, save as bbox.geojson 2/ cut.sh big.pbf bbox.geojson small.pbf
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
if [ $# -ne 3 ]; then
echo "Usage: cut.sh planet.pbf bbox.geojson outfile"
exit 1
# coding: utf-8
# Imports
import os
import cPickle
import numpy as np
import theano
import theano.tensor as T
@fchollet
fchollet / classifier_from_little_data_script_2.py
Last active September 13, 2023 03:34
Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@nez
nez / gist:773260e6553b3f3cea9b
Created October 16, 2015 20:49
Clojure para bobos
Para instalar lein: leiningen.org
Para probar desde internet: tryclj.com
doc source
defn fn def #()
aridades multiples
& apply
@jeffbr13
jeffbr13 / ckan.yaml
Created May 5, 2014 21:33
A complete Ansible playbook for installing CKAN
---
- hosts: all
sudo: yes
vars:
- db_name: ckan_default
- db_user: ckan_default
- db_password: ckan_default
- ckan_package_filename: 'python-ckan_2.2_amd64.deb'
@mekler
mekler / censo_2013_inegi.py
Last active August 29, 2015 13:55
Scrapper para descargar la información del Censo Educativo 2013
# coding=utf-8
import pycurl
import StringIO
import sys
import ast
import pymongo
from pymongo import MongoClient
def construyeSQL(cadena):
aux = cadena.split(' ')
@trinitronx
trinitronx / xcode-cli-tools.sh
Last active January 18, 2024 05:20
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
# 2021-12-09:
# This script is no longer supported!
# Apple broke all direct downloads without logging with an Apple ID first.
# The number of hoops that a script would need to jump through to login,
# store cookies, and download is prohibitive.
# Now we all must manually download and mirror the files for this to work at all :'-(
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
@diegovalle
diegovalle / download-mapa-digital.sh
Last active June 11, 2020 00:36
Download the shapefiles contained in the Mapa Digital de México
#! /bin/bash
# Author: Diego Valle-Jones
# Web: http://www.diegovalle.net
# Purpose: Download the shapefiles contained in the Mapa Digital de México
# comunicaciones y transportes
# cultura
# curvas de nivel
# hidrografia
@diegovalle
diegovalle / download-census-shp.sh
Last active May 20, 2019 19:20
Download shapefiles at the census tract and block level for all of urban Mexico—more than 5 GB of data!
#!/bin/bash
# Author: Diego Valle-Jones
# Web: http://www.diegovalle.net
# Purpose: Download shapefiles of manzanas (blocks), agebs (census areas), ejes
# viales (streets), interesting areas and a whole bunch of other stuff
# Note that you'll need a recent version of innoextract
# http://constexpr.org/innoextract/, one that can work with files
# created by version 5.5 of Inno Setup, the one in Ubuntu universe is
# not recent enough. The version available at