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 scala.concurrent._ | |
import ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
val is = 1 to 10 toList | |
def db = s"${Thread.currentThread}" | |
def f(i: Int) = Future { | |
println(db + s" -> \t I'm ${i} -> \t I start to sleep") | |
Thread.sleep(1*1000) |
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
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm | |
sudo rpm -i jdk-8u45-linux-x64.rpm | |
# Search jdk | |
rpm -qa|grep jdk |
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
CREATE EXTENSION postgis; | |
SELECT postgis_full_version(); | |
SELECT st_geomfromtext('POINT(-1 38)', 4329); | |
SELECT st_asewkt('0101000020E9100000000000000000F0BF0000000000004340'); | |
SELECT st_geomfromtext('LINESTRING(-13 21,0 0,3 2)') AS mycheckmark; |
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
CREATE EXTENSION postgis; | |
SELECT postgis_full_version(); | |
SELECT st_geomfromtext('POINT(-1 38)', 4329); | |
SELECT st_asewkt('0101000020E9100000000000000000F0BF0000000000004340'); | |
SELECT st_geomfromtext('LINESTRING(-13 21,0 0,3 2)') AS mycheckmark; |
We can't make this file beautiful and searchable because it's too large.
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
b,25.8092,-80.24 | |
b,25.8587,-80.2094 | |
b,25.4849,-80.461 | |
b,25.8471,-80.2415 | |
b,25.6849,-80.3125 | |
b,25.7502,-80.2429 | |
b,25.6003,-80.3537 | |
b,25.8306,-80.2661 | |
b,25.926,-80.1617 | |
b,25.9466,-80.2056 |
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
SELECT st_geomfromtext('POINT(-1 38)', 4329); | |
select st_asewkt('0101000020E9100000000000000000F0BF0000000000004340'); | |
select st_geomfromtext('LINESTRING(-13 21,0 0,3 2') as mycheckmark; |
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
SELECT st_geomfromtext('POINT(-1 38)', 4329); | |
select st_asewkt('0101000020E9100000000000000000F0BF0000000000004340'); | |
select st_geomfromtext('LINESTRING(-13 21,0 0,3 2') as mycheckmark; |
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
"""Library to interface with the GEO (GDS- GEO DataSets) repository""" | |
import os | |
import re | |
import sys | |
import urllib | |
import traceback | |
from datetime import datetime | |
import time | |
import enchant |
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 white-list based PAC without regexp, by @janlay | |
* It's just simple and fast. | |
* Last update: Dec 9, 2013 | |
* Special thanks to @Paveo | |
*/ | |
function FindProxyForURL(url, host) { | |
var PROXY = "PROXY 127.0.0.1:8800;SOCKS 127.0.0.1:8801"; | |
var DEFAULT = "DIRECT"; |
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
first_denom = {1:1,2:5,3:10,4:25,5:50} | |
def cc_rec(amount, kinds_of_coins = 5): | |
if amount == 0: | |
return 1 | |
elif amount < 0 or kinds_of_coins == 0: | |
return 0 | |
else: | |
return cc_rec(amount, kinds_of_coins - 1) + \ | |
cc_rec(amount - first_denom[kinds_of_coins], kinds_of_coins) |