Skip to content

Instantly share code, notes, and snippets.

View ramayac's full-sized avatar
🏠
Working from home.

ramayac ramayac

🏠
Working from home.
View GitHub Profile
# coding=UTF-8
from __future__ import division
import nltk
from collections import Counter
# This is a simple tool for adding automatic hashtags into an article title
# Created by Shlomi Babluki
# Sep, 2013
@pdaire
pdaire / fci_job.json
Last active December 16, 2015 19:10
Un nuevo miembro para el devteam. Te esperamos
{
"Ofrecemos":
[
"Trabajo que importa, con posibilidades de cambiar el mundo.",
"Satisfacción profesional y personal",
"Espacio para aprender, investigar e innovar",
"Ser miembro de un equipo amistoso, respetuoso e innovador",
"Ser parte de una organización multidisciplanaria con redes en varios países",
"Mesa de ping-pong",
"café café"
@ramayac
ramayac / Calculo.java
Created March 19, 2013 17:31
Simple ejemplo de cómo hacer cálculo de días corrientes y laborales.
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;
public class Calculo {
public static final String formatofecha = "dd/MM/yyyy";
public static final String letraescape = "x";
import java.util.ListIterator;
GridSpace[][] grid;
final int SIZE = 200;
ArrayList<GridSpace> points;
void setup() {
size(1000, 1000);
background(255);
stroke(0,0,0);
@ndarville
ndarville / business-models.md
Last active February 27, 2025 10:00
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
<!DOCTYPE html>
<html>
<head><title>ChamberedTest</title></head>
<script type="text/javascript" src="js/chambered.js"></script>
<style type="text/css">
canvas, img {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@codingjester
codingjester / three_legged_oauth.py
Last active December 9, 2018 02:34
Tumblr 3 Legged OAuth using Python lib OAuth2
import urlparse
import oauth2 as oauth
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
request_token_url = 'https://www.tumblr.com/oauth/request_token'
access_token_url = 'https://www.tumblr.com/oauth/access_token'
authorize_url = 'https://www.tumblr.com/oauth/authorize'
@piercemoore
piercemoore / redditReaderBasic.php
Created July 13, 2012 16:55
Quick Reddit reader in PHP
<?php
// Full disclosure: I wrote this while writing a Twitter Bootstrap enabled site, so the class tags are Twitter bootstrap enabled. Shouldn't be hard to style, though.
$subReddit = "webdev"; // Enter the subreddit name here with no /r/ in front
$selfTextLimit = 250; // Character limit for self text entries
$pageData = json_decode( file_get_contents( "http://www.reddit.com/r/$subReddit/.json" ) );
foreach( $pageData->data->children as $post ): ?>
@jboner
jboner / latency.txt
Last active April 18, 2025 16:13
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD