UTC: 2024-05-04 12:34 mlt/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
Ignored | History | Force Test | Releases
# Chain sqitch metadata dump to structure.sql dumping | |
# | |
# Structure dump does not include any data | |
# whilst Sqitch expect its metadata at all times. | |
# This allows to cache DB schema in a single sql dump to speed up tests | |
# while allowing continuous deployment of new changes with sqitch. | |
# | |
# sqitch deploy ... | |
# bundle exec rails db:structure:dump RAILS_ENV=test | |
# bundle exec rails test |
#!/usr/bin/env python | |
""" | |
Split a PostgreSQL plain dump file into files for each of its objects. | |
This is used to compare two SQL database contents: both contents are dumped to a | |
plain text file, and they are then processed through this script which generates | |
a file for each database object, which can then be compared using a directory | |
diff program. | |
""" |
# Mix this into an AR class for lookup tables to perform an inquiry. | |
# For example, if Movie has Genre and genres table has id->genre mapping | |
# then one could use the_movie.genre.comedy? instead of the_movie.genre.genre == 'comedy' | |
module LookupTable | |
def self.included(base) | |
raise "#{name} can only be included into classes that inherit from ActiveRecord::Base, #{base.name} does not." unless base < ActiveRecord::Base | |
base.instance_variable_set :@lookup_column, base.name.demodulize.underscore | |
base.extend(ClassMethods) | |
end |
/** | |
JSON editable input. | |
Internally value stored as {city: "Moscow", street: "Lenina", building: "15"} | |
Supported editors: | |
- https://github.com/json-editor/json-editor | |
- https://github.com/josdejong/jsoneditor | |
@class json | |
@extends abstractinput |
UTC: 2024-05-04 12:34 mlt/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
Ignored | History | Force Test | Releases
UTC: 2018-12-19 23:24 mlt/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
#include "embeddedRCall.h" | |
#include <R_ext/Parse.h> | |
int | |
main(int argc, char *argv[]) | |
{ | |
SEXP e, tmp; | |
int hadError; | |
ParseStatus status; |
CREATE FUNCTION excel_column(col integer) | |
RETURNS text AS | |
$BODY$ | |
WITH RECURSIVE t(n, out) AS ( | |
SELECT col/26-(col%26=0)::int, chr((col-1)%26 + 65) | |
UNION ALL | |
SELECT n/26-(n%26=0)::int, chr((n-1)%26 + 65) || out FROM t | |
where n>0 | |
) | |
SELECT out FROM t where n=0; |
headers['X-Accel-Buffering'] = 'no' | |
headers['Cache-Control'] = 'no-cache' | |
headers['Content-Type'] = 'text/csv; charset=utf-8' | |
headers['Content-Disposition'] = 'inline; filename="data.csv"' | |
headers['Content-Encoding'] = 'gzip' | |
sql = "select * from something;" | |
self.response_body = SqlToCsvStreamer.new(sql) |
import os, sys, glob, arcpy, string, zipfile, time, urllib, json | |
import shutil, urllib2 | |
from contextlib import closing | |
def printMessage(messageString): | |
#print messageString | |
arcpy.AddMessage(messageString) | |
def duration_human(seconds): | |
seconds = long(round(seconds)) |