git checkout feature
git rebase dev
git push --force # car l'historique a changé, OK si personne ne travail sur _feature_
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
const dataGroupBy = (data:[], group_fields:string[], metric_field:string, method:string) => { | |
const agg_function:(arr:[], field:string) => number = ((arr, field) => { | |
switch(method){ | |
case 'sum': | |
return _.sumBy(arr, field) | |
case 'min': | |
return _.minBy(arr, field)[field] | |
case 'max': | |
return _.maxBy(arr, field)[field] |
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 socket | |
import threading | |
import sys | |
import logging | |
import locale | |
import re | |
from datetime import datetime | |
locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8') |
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 random | |
class Door: | |
def __init__(self, name): | |
self.is_winner = False | |
self.is_open = False | |
self.name = name | |
self.is_chosen = False | |
def __repr__(self): |
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 io | |
from sys import stdout, stdin, stderr | |
import clevercsv | |
import chardet | |
""" | |
Script permettant de lire un csv sur l'entrée standard, et de retourner sur la sortie un CSV RFC-4180 en UTF-8. | |
Le script detecte l'encoding (chardet) et le dialect (clevercsv). |
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
\copy mytable from 'fichier.json' WITH csv quote e'\x01' delimiter e'\x02' |
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 table_name, column_name, col_description((table_schema||'.'||table_name)::text::regclass, ordinal_position) | |
from information_schema.COLUMNS | |
where table_schema = 'sinoe' and table_name LIKE 'ind_reg%'; | |
-- https://stackoverflow.com/a/44493548/10995624 |
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 VIEW pgmetadata.v_dataset_as_inspire AS | |
WITH "MaintenanceFrequencyCode"(code, inspire_code) AS ( | |
VALUES | |
('NEC','asNeeded'), | |
('YEA','annually'), | |
('MON','monthly'), | |
('WEE', 'weekly'), | |
('DAY','daily'), | |
('TRI', 'quarterly'), | |
('BIA', 'biannually'), |
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
/* | |
Indication de la puissance "instantanné" a partir de l'index EDF (en Wh). | |
Il s'agit en fait l'évolution de l'index sur la plus petite unité de temps possible (dépend de la fréquence de remonté | |
de l'info, en général 1 min ou 30 sec) | |
divisée par l'interval entre les deux mesures --> puissance en W. | |
Sur des intervals de temps plus longz, selon correspond à la puissance moyenne utilisée. | |
*/ | |
SELECT | |
*, |
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
<!-- Parcelles forestières de l'Office National des Forêts en Hauts-de-France (buffer km) --> | |
<OGRVRTDataSource> | |
<OGRVRTLayer name="parcelle_forestiere"> | |
<SrcDataSource>WFS:http://ws.carmencarto.fr/WFS/105/ONF_Forets?</SrcDataSource> | |
<SrcLayer>PARC_PUBL_FR</SrcLayer> | |
<OpenOptions> | |
<OOI key="EXPOSE_GML_ID">NO</OOI> | |
</OpenOptions> | |
<SrcRegion clip="FALSE">POLYGON ((579103 6997695, 580761 7001558, 584837 7004703, 587571 7012556, 591593 7017267, 590762 7022295, 594586 7051079, 593335 7071052, 596473 7076232, 594661 7085073, 595662 7089514, 601773 7092190, 608651 7098986, 618354 7103072, 635982 7106966, 640941 7110703, 645076 7109880, 653102 7112036, 656746 7111226, 669828 7115154, 672622 7112574, 675038 7103420, 678738 7096492, 677637 7085125, 684331 7082539, 689115 7074279, 691164 7074164, 694702 7077503, 706352 7082297, 713130 7081417, 723351 7068188, 722741 7061611, 725127 7050924, 727759 7049711, 732990 7053527, 738247 7052558, 741178 7049682, 746729 |
NewerOlder