Skip to content

Instantly share code, notes, and snippets.

sed -e 's/\"True\"/\"1\"/g' \
-e 's/\"False\"/\"0\"/g' < /path/to/source.txt > /path/to/result.txt
WITH SourceData AS
(
SELECT
[MyColumn] AS ID, -- 1. The column containing the sequence
RowNum = ROW_NUMBER() OVER (ORDER BY [MyColumn])
FROM
dbo.[MyTable] -- 2. The table containing the column
),
Ranked AS
(
@muratgu
muratgu / imgsync.py
Last active August 29, 2015 14:23
Upload image to Flickr with tags and title
import glob, os, sys
import pyexiv2
import flickrapi
import subprocess
import flickrapi
import webbrowser
class MyFlickr:
def __init__(self, api_key, api_secret, flickr_userid):
self.flickr = self.connect(api_key, api_secret)
@muratgu
muratgu / schematize
Created June 7, 2015 01:47
How to convert a Tabletop result (i.e. csv import) to a javascript object, using a target schema.
<script src="tabletop.js"></script>
<script type="text/javascript">
window.onload = function() {
init()
};
var public_spreadsheet_url = 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdDNZUzRlYldnWTZCLXdrMXlYQzVxSFE&output=html';
function init() {
Tabletop.init( {