I hereby claim:
- I am geordee on github.
- I am geordee (https://keybase.io/geordee) on keybase.
- I have a public key whose fingerprint is B080 8F53 E444 1D52 1AEB EC98 F8C6 6936 5C6E 4DC6
To claim this, I am signing this object:
class GenericDatatable | |
delegate :params, :h, :link_to, :raw, to: :@view | |
def initialize(view, records) | |
@view = view | |
@records = records | |
end | |
def as_json(options = {}) | |
{ |
# Assumptions: | |
* Rails 3.2.x | |
* nginx | |
* capistrano deploy | |
* "X-Accel-Mapping header missing" messages in nginx error.log file | |
* You want to serve static files with nginx instead of Rails | |
# nginx configuration: |
.tab-bar { | |
height: 32px; | |
padding: 0; | |
.tab { | |
-webkit-transform: none; | |
top: 1px; | |
left: 2px; | |
line-height: 25px; |
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-twitter' | |
gem 'omniauth-facebook' | |
gem 'omniauth-linkedin' |
curl -XDELETE 'http://localhost:9200/alien' | |
curl -XPUT "http://localhost:9200/alien" -d' | |
{ | |
"settings": { | |
"analysis": { | |
"filter": { | |
"index_ngram_filter": { | |
"type": "edgeNGram", | |
"min_gram": 2, |
namespace :elasticsearch do | |
desc 'Setup Elasticsearch index and mappings' | |
task :setup do | |
load('db/elasticsearch.rb') | |
end | |
end |
#!/usr/bin/env python | |
import tweepy | |
from collections import Counter | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
access_token = 'access_token' | |
access_token_secret = 'access_token_secret' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import os | |
import numpy | |
import pandas | |
xlsx = './workbook.xlsx' | |
df = pandas.read_excel(open(xlsx,'rb'), sheetname=0) | |
id_vars = ['Department', 'Category', 'Item'] |
#!/usr/bin/env python | |
import os | |
import numpy | |
import pandas | |
xlsx = './workbook.xlsx' | |
df = pandas.read_excel(open(xlsx,'rb'), sheetname=1) | |
df2 = pandas.pivot_table(df, |