Skip to content

Instantly share code, notes, and snippets.

Même si ça n’a aucun rapport avec le World nuclear report dont je voulais juste signaler, qu’on aime ou pas le nucléaire, il faut constaster que c’est sacrément sur le déclin.

Peut-être que la planète entière a tord, mais le fait est là. Et les causes sont différentes selon les pays :

  • Allemagne : idéologie
  • Japon : traumatisme
  • États-Unis : libéralisme
  • France : repos sur les lauriers
  • Suisse : pragmatisme
  • Chine : besoin de plus d’élec très vite
@Tristramg
Tristramg / noeuds_pcc.csv
Created December 12, 2019 18:48
Freepsico
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Id epsico;CodeCI;libelle epsico;RGI_XX;RGI_YY
1;1545;XT_EUROTUNNEL;614341.545792;7092360.109963
2;111047;WB_ATHUS;903694.718043;6942358.332877
3;111278;00_PORTE DE CLICHY;649765.557543;6866218.953405
4;111757;00_BASE LN3 TOURNAN;684167.918280;6848148.259596
5;111823;AS_POSTE 74 JABLINES;680170.844762;6870551.828718
6;111849;BV_MARNE LA VALLEE CHESSY;684058.185286;6863342.137107
7;111872;BM_POSTE 71 PRESLES EN BRIE;681893.019550;6845566.733473
8;112086;EP_GRANDPUITS BAGNEAUX;696106.527480;6832869.959393
9;112136;00_EP A.T.O.;862360.872623;6529814.994946
<html>
<head>
<script>
var options = {
enableHighAccuracy: true,
timeout: 5000,
maximumAge: 0
};
function success(pos) {
macro_rules! select_variables (
() => {""};
($head:ident $($tail:ident)*) => {
concat!(" ?", stringify!($head), select_variables!($($tail)*));
};
);
macro_rules! fmt(
($a:tt) => {stringify!($a)};
(?$a:tt) => {concat!("?", stringify!($a))};
macro_rules! select_variables (
() => {""};
($head:ident $($tail:ident)*) => {
concat!(" ?", stringify!($head), select_variables!($($tail)*));
};
);
macro_rules! fmt(
($a:tt) => {stringify!($a)};
(?$a:tt) => {concat!("?", stringify!($a))};
ALTER
TABLE countries
DROP COLUMN IF EXISTS width,
DROP COLUMN IF EXISTS height,
ADD COLUMN width float,
ADD COLUMN height float;
WITH parts AS (
select gid, (st_dump(geog::geometry)).geom AS geom FROM countries
),
# Identifier le réseau à extraire
* Dans le GTFS, choisir le réseau à isoler à partir du fichier agency.txt
* Notez le `agency_id`
* Par exemple pour Carabus, `CAR:Authority:1`
# Utilisez l’outil OneBusAway
* Téléchargez sur http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/1.3.4-SNAPSHOT/onebusaway-gtfs-transformer-cli.html
* Executez:
`java -jar onebusaway-gtfs-transformer-cli-1.3.4-20150503.062227-12.jar --transform='{"op": "retain", "match": {"file": "agency.txt", "agency_id": "CAR:Authority:1"}}' naq-aggregated-gtfs.zip carabus.zip`
use std::f64;
#[derive(Clone)]
pub struct Point {
pub lat: f64, // plutôt y (cf le pâté en bas)
pub lon: f64, // plutôt x
}
// la convention est plutôt d’avoir juste new. Point::new est moins redondant que Point::new_point
// Cependant, tout particulièrement dans le cas des coordonnées l’ordre est source de confusion.
[error] GenServer Transport.ImportDataWorker terminating
** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:
from r0 in Transport.Resource,
where: r0.url == ^"http://www.metromobilite.fr/data/Horaires/SEM-GTFS.zip"
(ecto) lib/ecto/repo/queryable.ex:69: Ecto.Repo.Queryable.one/3
(transport) lib/transport/resource.ex:84: Transport.Resource.save/2
(transport) lib/transport/resource.ex:55: Transport.Resource.validate_and_save/1
(transport) lib/transport/import_data_worker.ex:37: Transport.ImportDataWorker.handle_cast/2
WITH grenoble AS (
SELECT id from dataset where spatial = 'Grenoble-Alpes Métropole'
)
INSERT into resource
(dataset_id, url, format, title)
SELECT grenoble.id, resource.* FROM (VALUES
('https://app-be8e53a7-9b77-4f95-bea0-681b97077017.cleverapps.io/gtfs_rt', 'gtfs-rt', 'Flux temps réel GTFS RT'),
('https://app-be8e53a7-9b77-4f95-bea0-681b97077017.cleverapps.io/', 'siri-lite', 'API temps réel Siri Lite')
) as resource, grenoble;