The purpose of this is not to be an exhaustive list or a reference for ES6 features. This is intended to share the interesting ideas that are coming down the pipeline and to explore their intentions.
This file contains 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
# Execute the following commands one at a time from a bash prompt. | |
# download docx2txt by Sandeep Kumar | |
wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt | |
# make a wrapper | |
echo '#!/bin/bash | |
docx2txt.pl $1 -' > docx2txt | |
chmod +x docx2txt | |
# make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide |
This file contains 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
var formidable = require('formidable'), | |
http = require('http'), | |
util = require('util'); | |
var FileUploadService = {}; | |
FileUploadService.purpose = function(){ | |
console.log("\n"); | |
console.log("-----------------------------------------------"); |
This file contains 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
#!/env/python | |
# coding=utf8 | |
""" | |
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal. | |
Formula: | |
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60)) | |
Assumes S/W are negative. |
This file contains 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
/* | |
* A function that converts a PostGIS query into a GeoJSON object. | |
* Copyright (C) 2012 Samuel Giles <sam@sam-giles.co.uk> | |
* | |
* 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 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
This file contains 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 mock | |
from django.test import TestCase, Client | |
import datetime | |
class StubDate(datetime.datetime): | |
pass | |
class TestApp(TestCase): | |
@mock.patch('app.views.datetime.datetime', StubDate) #app is the $django_application_name |
This file contains 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
from django.core.serializers import json | |
class MyClass(json.DjangoJSONEncoder): | |
def default(self, o): | |
return o + 5 | |
json.dumps([1, 2, 3], cls=MyClass) |
This file contains 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 json | |
import luigi | |
import luigi.hdfs | |
import luigi.hadoop | |
import pandas as pd | |
import numpy | |
import pandas | |
luigi.hadoop.attach(numpy, pandas) |
This file contains 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
from colorsys import hsv_to_rgb | |
import json | |
import logging | |
log = logging.getLogger('electioncenter.lib.kml') | |
import struct | |
from django.contrib.gis.geos import GEOSGeometry | |
def hsv_to_kml_hex(h, s, v): | |
""" |
This file contains 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
APP_NAME=PixelFed Test | |
APP_ENV=local | |
APP_KEY= | |
APP_DEBUG=true | |
APP_URL=http://localhost | |
ADMIN_DOMAIN="localhost" | |
APP_DOMAIN="localhost" | |
LOG_CHANNEL=stack |
OlderNewer