Skip to content

Instantly share code, notes, and snippets.

View mxcoder's full-sized avatar

ricardoe mxcoder

  • DUS
View GitHub Profile
@mxcoder
mxcoder / nacht-der-museen-2023-programm.md
Last active April 19, 2023 13:46
Nacht der Museen 2023

Nacht Der Museen 2023 - Programm


01 Akademie Galerie / Die neue Sammlung – Düsseldorfer Nacht der Museen

Ausstellung

Absolvent*innen 2021/2022

http://acapulco.gob.mx
http://av.sectur.gob.mx
http://cancun.gob.mx
http://celaya.gob.mx
http://cepropie.gob.mx
http://chimalhuacan.gob.mx
http://cnegsr.salud.gob.mx
http://coahuila.gob.mx
http://coyoacan.df.gob.mx
http://culiacan.gob.mx
@mxcoder
mxcoder / 19S_SEP_EscuelasAbiertasJoin.py
Created October 4, 2017 03:45
Script used to normalize and join datasets from Mexico's Education Ministry for all schools that are now open after the Earthquakes of Sep 2017
# coding: utf-8
import os
import csv
import pandas as pd
import unidecode
directory = '2017-10-03/'
estados = ['CDMX','CHIAPAS','EDOMEX','GUERRERO','HIDALGO','MICHOACAN','MORELOS','OAXACA','PUEBLA','TLAXCALA']
files = [f for f in os.listdir(os.path.join(directory, 'csv'))]
@mxcoder
mxcoder / xlsx2csv.sh
Created October 4, 2017 03:42
Convert XLSX files in a folder to CSV using LibreOffice
#!/bin/bash
DIR="./myfolder/"
# Cleanup
rm "${DIR}/csv/*"
# Convert XLSX to CSV
# https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
# CSV, DoubleQuotes, UTF8, NoSkipping, NoCellFormats, NoLangId, QuoteAll, NumbersAsNumbers, SaveCellsAsShown
#!/bin/bash
# prerequisites:
# libs: xsv, curl, dity, xpath, sed, paste
# files: procesado.csv contains in column 1 the ID for the DRO and column 3 the url of the popup
for line in `xsv select 1,3 --no-headers procesado.csv`; do
# skip first line, need to research if theres an option for it
if [ "${line}" != "No.,Datos" ]; then
# split $line into $data array[id,url]
@mxcoder
mxcoder / arcgis_attachments.py
Last active September 28, 2017 18:00
Creates list of attachments in arcgis repos
# coding: utf-8
import requests
import sys
# Replace these values
instance='REPLACEME.arcgis.com/REPLACEME'
document='REPLACEME'
layer='REPLACEME' #usually 0
baseURL='https://'+instance+'/ArcGIS/rest/services/'+document+'/FeatureServer/'+layer
@mxcoder
mxcoder / rAF.js
Created January 28, 2014 00:36 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@mxcoder
mxcoder / nginx.conf
Created January 23, 2014 22:44
Nginx + PHP configuration template for CodeIgniter projects
server {
listen 80;
server_name {domain} {domain}.localhost;
root /var/www/{domain};
include /etc/nginx/conf.d/common.conf;
include /etc/nginx/conf.d/php.conf;
#include /var/www/{domain}/app.conf;
location / {
try_files $uri $uri/ /index.php;
}
@mxcoder
mxcoder / php.conf
Created January 23, 2014 22:33
Nginx PHP configuration
index index.php index.html;
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;