Skip to content

Instantly share code, notes, and snippets.

View yohanboniface's full-sized avatar
💭
Set your status

Yohan Boniface yohanboniface

💭
Set your status
View GitHub Profile
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
<!DOCTYPE html>
<html>
<meta charset="utf-8" />
<head>
<title>Input color events test case</title>
</head>
<body>
<input type="color" name="myinput" />
<div id="events"></div>
<script type="text/javascript">
{
"cache": {
"name": "Disk",
"path": "/var/cache/stache"
},
"layers": {
"hdm": {
"provider": {
"name": "mapnik",
"mapfile": "/home/ybon/src/hdm/hdm/mapnik.xml",
@yohanboniface
yohanboniface / gist:7e6f7bfe72fde415dbc5
Created December 20, 2014 22:15
Unique words in BANO corpus
This file has been truncated, but you can view the full file.
5 Aa
2 AA/13
1 Aade
1 Aaison
1 Aalmatt
24 Aalto
1 Aaouats
4 Aar
5 Aaro
133 Aaron
import csv
import json
import time
from addok.import_utils import FIELDS
def main(filepath, destination, limit=None):
print('Processing', filepath)
{
"env": {
"browser": true,
"node": true
},
"rules": {
"quotes": "single",
"indent": [2, 2]
}
}
@yohanboniface
yohanboniface / gist:a00c1c818a40920ab222
Created July 8, 2015 12:38
Kosmtik localconfig for osm-bright
/* globals exports */
exports.LocalConfig = function (localizer, project) {
localizer.where('Layer').if({'Datasource.type': 'postgis'}).then({
'Datasource.dbname': 'idf',
'Datasource.password': '',
'Datasource.user': 'ybon',
'Datasource.host': ''
});
localizer.where('Layer').if({id: 'ne_places'}).then({'Datasource.file': '/home/ybon/Code/maps/osm-bright/osm-bright/data/ne_places/10m-populated-places-simple.shp'});
};
** Rubriques papier :
2011-08-15 17:23:31 CEST LOG: duration: 9284.827 ms statement:
SELECT "libe_contentmodel".* FROM "libe_contentmodel"
INNER JOIN "libe_contenttosection" ON ("libe_contentmodel"."id" = "libe_contenttosection"."content_model_id")
WHERE ("libe_contenttosection"."section_id" = 69 AND "libe_contentmodel"."workflow_state" = 20 )
ORDER BY "libe_contentmodel"."computed_ponderation" DESC, "libe_contentmodel"."updating_date" DESC LIMIT 4
** pour savoir si un objet fait partie d'un dossier
2011-08-15 17:23:32 CEST LOG: duration: 1136.757 ms statement:
SELECT "libe_section".* FROM "libe_section"
FlagInstance.objects.add(request.user, content_object,
creator, comment, send_signal=True)
=>
FlagInstance.objects.add(
request.user,
content_object,
creator,
comment,