To use it:
python kinto_bootstrap.py -s http://localhost:8888 -a token:my-token -v
$ python kinto_bootstrap.py --help
usage: kinto_bootstrap.py [-h] [-s SERVER] [-a AUTH] [-b BUCKET] [-v] [-q]
[-D]
Bootstrap bucket
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript"> | |
function vimeoLoadingThumb(id){ | |
var url = "http://vimeo.com/api/v2/video/" + id + ".json?callback=showThumb"; | |
var id_img = "#vimeo-" + id; | |
var script = document.createElement( 'script' ); | |
script.type = 'text/javascript'; |
type alias Page = | |
{ name : String | |
, url : String | |
, created_at : Date | |
, title : String | |
, description : String | |
, url : String | |
} | |
import aiohttp | |
import asyncio | |
import os | |
WOLEET_SERVER = 'https://api.woleet.io/v1' | |
WOLEET_HEADERS = { | |
'Authorization': 'Bearer {}'.format(os.getenv('WOLEET_BEARER_TOKEN')), | |
'Content-Type': 'application/json' | |
} |
To use it:
python kinto_bootstrap.py -s http://localhost:8888 -a token:my-token -v
$ python kinto_bootstrap.py --help
usage: kinto_bootstrap.py [-h] [-s SERVER] [-a AUTH] [-b BUCKET] [-v] [-q]
[-D]
Bootstrap bucket
# -*- coding: utf-8 -*- | |
# This is PY3 only code using asyncIO | |
import asyncio | |
import aiohttp | |
import base64 | |
import json | |
from random import randint | |
from kinto_client import Client, Endpoints | |
from pyquery import PyQuery as pyquery |
# -*- coding: utf-8 -*- | |
# This is PY3 only code using asyncIO | |
import asyncio | |
import aiohttp | |
from pyquery import PyQuery as pyquery | |
async def fetch_info(session, record): | |
if 'blockID' not in record: | |
print("{} doesn't have a blockID".format(record['id'])) |
var value = 0; | |
var regex = /[+-]?\d+\,\d+/g; | |
$('.ember-view .price').each(function(){ value += $(this).html().match(regex).map(function(v) { return parseFloat(v.replace(',', '.')); })[0] }); | |
console.log(value); |
SELECT numero, geom FROM parcelle | |
WHERE ST_Intersects(geom, ST_Transform( | |
ST_ConvexHull('SRID=4326;MULTIPOINT(2.232 48.818, | |
2.246 48.82, | |
2.241 48.809, | |
2.232 48.818)'::geometry), | |
27572)); |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from six.moves import input, xrange, map | |
from string import ascii_letters | |
alphabet = "ABCDEFGHIJKLMNOPQRSTUVXYZ" | |
def get_maps(keyword): | |
keyword = keyword.upper().replace('W', 'V') |
# -*- coding: utf-8 -*- | |
M = [["A", "B", "C", "D", "E"], | |
["F", "G", "H", "IJ", "K"], | |
["L", "M", "N", "O", "P"], | |
["Q", "R", "S", "T", "U"], | |
["V", "W", "X", "Y", "Z"]] | |
def decode(texte): |