Skip to content

Instantly share code, notes, and snippets.

@mazieres
mazieres / funnyPlaces.md
Created February 4, 2014 14:06
Funny 2013 Github Profiles Locations

Funny 2013 Github Profiles Locations

On a Github profile, one can inform his location, such as "San Fransisco, CA" or "Paris, France". Some profiles use this feature to freely describe where they feel they are. Here's a list of funny locations found on github users profiles, ranked by the number of users claiming it.

Data was extracted from Github Archive. for 2013 only.

Their is numerous false positives.

by @mazieres.

@mazieres
mazieres / FRA_ISO_3166-2.csv
Created March 2, 2022 06:29
ISO 3166-2 FRA
subdiv_type iso_3166-2 subdiv_name parent_subdiv
département métropolitain FR-01 Ain FR-ARA
département métropolitain FR-02 Aisne FR-HDF
département métropolitain FR-03 Allier FR-ARA
département métropolitain FR-06 Alpes-Maritimes FR-PAC
département métropolitain FR-04 Alpes-de-Haute-Provence FR-PAC
collectivité européenne FR-6AE Alsace FR-GES
département métropolitain FR-08 Ardennes FR-GES
département métropolitain FR-07 Ardèche FR-ARA
département métropolitain FR-09 Ariège FR-OCC
@mazieres
mazieres / namograph.ipynb
Last active June 21, 2023 06:29
Python companion to the work described here : https://mazieres.gitlab.io/namograph/index.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mazieres
mazieres / namograph-diy.ipynb
Created June 21, 2023 06:19
A simple example of the use of the Namograph -- https://mazieres.gitlab.io/namograph/index.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mazieres
mazieres / FRA_ISO_3166-2.json
Created March 3, 2022 07:11
ISO 3166-2 FRANCE JSON
{
"FR-01": {
"parent_subdiv": "FR-ARA",
"subdiv_name": "Ain",
"subdiv_type": "d\u00e9partement m\u00e9tropolitain"
},
"FR-02": {
"parent_subdiv": "FR-HDF",
"subdiv_name": "Aisne",
"subdiv_type": "d\u00e9partement m\u00e9tropolitain"
@mazieres
mazieres / MAP_FRA_ISO_3166-2.svg
Last active March 2, 2022 10:39
SVG Map of France with most of ISO_3166-2 subdivisions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
FR-01;Ain;metropolitan department
FR-02;Aisne;metropolitan department
FR-03;Allier;metropolitan department
FR-04;Alpes-de-Haute-Provence;metropolitan department
FR-06;Alpes-Maritimes;metropolitan department
FR-07;Ardèche;metropolitan department
FR-08;Ardennes;metropolitan department
FR-09;Ariège;metropolitan department
FR-10;Aube;metropolitan department
FR-11;Aude;metropolitan department
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
FR-ARA;Auvergne-Rhône-Alpes;metropolitan region
FR-BFC;Bourgogne-Franche-Comté;metropolitan region
FR-BRE;Bretagne;metropolitan region
FR-CVL;Centre-Val de Loire;metropolitan region
FR-20R;Corse;metropolitan collectivity with special status
FR-GES;Grand-Est;metropolitan region
FR-GP;Guadeloupe;overseas region
FR-GF;Guyane (française);overseas region
FR-HDF;Hauts-de-France;metropolitan region
FR-IDF;Île-de-France;metropolitan region
@mazieres
mazieres / myPCA.py
Last active November 15, 2021 03:04
# coding: utf-8
"""Generic usage of Principal Component Analysis"""
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
import numpy as np
#!/usr/bin/env python3
import subprocess
def cli(cmd_str):
process = subprocess.Popen(cmd_str, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
output, error = process.communicate()
output, error = [x if len(x) > 0 else None
for x in (output.decode().strip(), error.decode().strip())]