Skip to content

Instantly share code, notes, and snippets.

View maulberto3's full-sized avatar

Mauricio maulberto3

View GitHub Profile
@minrk
minrk / Retina Figures.ipynb
Created August 9, 2012 04:37
2x plots for Retina displays with matplotlib and the IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@rxaviers
rxaviers / gist:7360908
Last active June 17, 2024 11:45
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@benweitzel
benweitzel / navbar.html
Last active May 23, 2024 17:12
A simple HTML and CSS navigation bar that is extremely easy to customize.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Horizontal Navigation Bar w/Rollover Effect</title>
<style type="text/css">
<!--
#navbar ul {
margin: 0;
padding: 5px;
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@mie00
mie00 / download.py
Created July 1, 2014 13:30
pdf free books
# -*- coding: utf-8 -*-
import re
import urllib
from multiprocessing import Pool
import requests
import progressbar
CHUNK_SIZE = 1024 * 1024 # 1MB
def download(i):
@karpathy
karpathy / min-char-rnn.py
Last active June 16, 2024 04:05
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@varmais
varmais / thinced.js
Created October 1, 2015 19:43
Geolocation to Promise wrap example
var getPosition = function (options) {
return new Promise(function (resolve, reject) {
navigator.geolocation.getCurrentPosition(resolve, reject, options);
});
}
getPosition()
.then((position) => {
console.log(position);
})
@balzer82
balzer82 / TimeSeries-Decomposition.ipynb
Last active June 20, 2022 14:38
TimeSeries Decomposition in Python with statsmodels and Pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@opchaves
opchaves / mongodb-cheat-sheet.md
Last active September 10, 2022 21:51
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Connect to a database after starting mongo client

$ mongo
use dbname

Call this command before using a specific database. This command also creates the database, but the new database is only save when you insert the first document in a collection.