This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Chris Hoffman | |
| # 2011-6-17 | |
| # Description: takes a | |
| import pyodbc | |
| import sys | |
| import csv | |
| import argparse | |
| import glob | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyodbc | |
| import sys | |
| import csv | |
| conn = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\the\path\to\the.accdb;') | |
| cursor = conn.cursor() | |
| def output_col(col): | |
| if col: | |
| if isinstance(col, unicode): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chris@ubuntu:~/hud-pinellas$ rails console | |
| Loading development environment (Rails 3.0.9) | |
| irb(main):001:0> task = TimesheetTask.where('parent_id is not null').first | |
| => #<TimesheetTask id: 11261534, name: "Community Meetings", description: "attendance at meetings with local service providers...", task_type: "Voucher", parent_id: 1065399318, created_at: "2011-07-08 15:48:17", updated_at: "2011-07-08 15:48:17", lft: nil, rgt: nil> | |
| irb(main):002:0> task.ancestors | |
| => [] | |
| irb(main):003:0> task.parent | |
| => #<TimesheetTask id: 1065399318, name: "Customer Service", description: nil, task_type: "Voucher", parent_id: 600959503, created_at: "2011-07-08 15:48:17", updated_at: "2011-07-08 15:48:17", lft: nil, rgt: nil> | |
| irb(main):004:0> TimesheetTask.rebuild! | |
| => [#<TimesheetTask id: 36577376, name: "Special Programs (FSS, H, Other)", description: nil, task_type: "Voucher", parent_id: nil, created_at: "2011-07-08 15:48:17", updated_at: "2011-08-03 14:59:37", lft: 1, rgt: 34>, #<TimesheetTask id: 56366788, name: "Staff Meetings", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for(i in unique(mcg$runid)) { | |
| png(paste("plots/greater_than_5_meters/",sprintf("%02d",i),".png",sep=""), width=1024, height=768) | |
| df2 <- mcg[mcg$runid == i & mcg$distance > 5,] # remove the second condition for the "all" plots | |
| plot(df2$lon.y, df2$lat.y, cex=0.1) | |
| lines(c(df2$lon.x,df2$lon.y),c(df2$lat.x,df2$lat.y),col=1 + df2$runid %% 31) | |
| title(main=paste("RUN", i), col.main=1+i%%31, font.main=3) | |
| dev.off() | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You can use this class in your console. For example | |
| # p = ProfilingTools.new | |
| # p.profiled_request(:controller => :welcome, :action => :index) | |
| # this will profile whole application stack and save file in your tmp/profiler folder | |
| # You can also use +request+ method just to see the output for example: | |
| # | |
| # p.request(:controller => :offers, :action => :index) | |
| # | |
| # p.response.body | |
| # p.response.cookies # and so on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul { | |
| list-style: disc; | |
| margin: 10px; | |
| padding-left: 10px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "user_id": "105324781372784188083", | |
| "email": "[email protected]", | |
| "verified_email": true, | |
| "name": "Carmine Moleti", | |
| "given_name": "Carmine", | |
| "family_name": "Moleti", | |
| "link": "https://plus.google.com/105324781372784188083", | |
| "picture": "https://lh6.googleusercontent.com/-IqhctvRS11k/AAAAAAAAAAI/AAAAAAAAATE/emxQvFOrhXk/photo.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT 1 FROM `models` WHERE | |
| (`models`.`id` = BINARY 'd178546e-39bc-11e2-8b8b-40406f66ce3e' | |
| AND `models`.`id` != 'd178546e-39bc-11e2-8b8b-40406f66ce3e') LIMIT 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # added | |
| gem 'activemerchant' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # locales/en.yml | |
| en: | |
| time: | |
| formats: | |
| ical: "%Y%m%dT%H%M%SZ" |