Declare a 2D texture with integer coordinates:
______w_______
|(0,0) |
| |
| |h
| |
|_____(w-1,h-1)|
~$ git clone -b release-4.12 git://github.com/echonest/echoprint-codegen.git | |
Cloning into 'echoprint-codegen'... | |
remote: Counting objects: 665, done. | |
remote: Compressing objects: 100% (280/280), done. | |
remote: Total 665 (delta 428), reused 612 (delta 376) | |
Receiving objects: 100% (665/665), 1.40 MiB | 578 KiB/s, done. | |
Resolving deltas: 100% (428/428), done. | |
~$ cd echoprint-codegen/ | |
~/echoprint-codegen$ cd src/ | |
~/echoprint-codegen/src$ vi Makefile # edit BOOST_CFLAGS and other variables as necessary |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/json | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
Declare a 2D texture with integer coordinates:
______w_______
|(0,0) |
| |
| |h
| |
|_____(w-1,h-1)|
#!/usr/bin/perl | |
use LWP::UserAgent; | |
use HTTP::Request; | |
$city = shift || die "startoftheday <city> <state>"; | |
$state = shift || die "startoftheday <city> <state>"; | |
@time = localtime; | |
$year = $time[5] + 1900; |
# Description: | |
# Know name day in No Idea bar | |
# | |
# Dependencies: | |
# "cheerio": "0.12.0" | |
# "moment": "2.0.0" | |
# | |
# Configuration: | |
# | |
# Commands: |
#!/usr/bin/env python | |
import os | |
import sqlite3 | |
from csvkit import table, CSVKitWriter | |
from csvkit.cli import CSVKitUtility | |
from csvkit.sql import make_create_table_statement, make_table | |
#!/usr/bin/env python | |
import cgi | |
import os | |
import mistune | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
from SocketServer import TCPServer | |
from cStringIO import StringIO |
import requests | |
import json | |
class Diffbot(object): | |
""" | |
A simple Python interface for the Diffbot api. | |
Relies on the Requests library - python-requests.org | |
Usage: |
from num2words import num2words | |
from matplotlib import pyplot | |
lang = 'de' | |
words = [num2words(i, lang=lang) for i in range(1000000)] | |
fig = pyplot.figure() | |
ax = fig.add_subplot(111) | |
ax.semilogx([len(word) for word in words], color='green') |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Scramble_test { | |
public class Scrambler { | |
UInt32 mask = 0; | |
UInt32 value = 1; |