UTC: 2018-12-19 23:24
mlt/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
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)) |
| ## this script extracts soil component(s) data from SSURGO DB for use | |
| ## in DrainMod model. Rosetta should be used to derive VGM parameters | |
| library(RODBC) | |
| ## library(RPostgreSQL) | |
| library(plyr) | |
| file <- 'ssurgo2rosetta.txt' # output file name to import into Rosetta | |
| con <- odbcConnectAccess("C:/webdata/soils/soil_mn061/soildb_MN_2003.mdb") | |
| ## con <- odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:/webdata/soils/soil_mn061/soildb_MN_2003.mdb") |
| # Copyright 2015 Mikhail Titov <mlt@gmx.us> | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| from datetime import timedelta | |
| import argparse, os, sys | |
| import logging | |
| from serial import Serial, SerialException | |
| from binascii import hexlify | |
| import struct | |
| import re | |
| from chirp.bitwise import bcd_to_int |
| ;;; crbasic-mode.el --- CR1 editing mode | |
| ;; Copyright (C) 2014 Mikhail Titov | |
| ;; Author: Mikhail Titov <mlt@gmx.us> | |
| ;; URL: https:// | |
| ;; Keywords: crbasic, cr1 | |
| ;; Version: 1.0.0 | |
| ;; This program is free software; you can redistribute it and/or modify |
| table.shingle<-function(..., as.data.frame=F) { | |
| dots<-list(...) | |
| stopifnot(all(sapply(dots, class) %in% c("shingle","factor"))) | |
| stopifnot(length(unique(sapply(dots, length)))==1) | |
| dims<-sapply(dots, nlevels) | |
| varnames<-tail(lapply(match.call(), deparse),-1) | |
| varnames["as.data.frame"] <- NULL | |
| res<-array(0, dims, `names<-`(lapply(dots, function(x) as.vector(sapply(levels(x), paste, collapse=":"))), varnames)) | |
| isinlevel<-function(z, ints) { | |
| if(is.factor(z)) { |