Skip to content

Instantly share code, notes, and snippets.

View nicolas17's full-sized avatar

Nicolás Alvarez nicolas17

  • Buenos Aires, Argentina
View GitHub Profile
@nicolas17
nicolas17 / array_pair_dict.cpp
Last active March 13, 2016 05:02
"Is there an easy STL way to sort a structure of arrays? Imagine array of keys and array of values, sort by key such that a single index will access both key and associated value."
// Copyright 2016 Nicolás Alvarez
// As long as you retain this notice you can do whatever you want
// with this stuff. If we meet some day, and you think this stuff
// is worth it, you can buy me some chocolate in return.
#include <cstdio> // printf
#include <iterator> // iterator category tags
#include <algorithm> // sort
#include <utility> // pair
#!/usr/bin/python3
import requests
import json
import os
import sys
import re
try:
from tqdm import tqdm
#!/usr/bin/python3
import requests
import re
import json
query = """
[out:json];
area
["name"="Posadas"]["is_in:country_code"="AR"][admin_level=8];
ID timestamp Active Anticipate AutoReady AutoScan FaceDetected Off On Ready StationaryFingers UILock Unknown VSFOMCal
12431 1454036946.12503 81799532.0 324121.0 43729.0 599031626.0 190545966.0 107862839.0
12432 1454037075.14576 81839649.0 324604.0 43729.0 600076218.0 190651267.0 107927277.0
12433 1454037192.09575 81887315.0 324621.0 43729.0 600099886.0 190730899.0 107959013.0
12434 1454039578.8333 81889345.0 324621.0 43729.0 600137226.0 190737712.0 107963801.0
12435 1454039588.8974 81891375.0 324621.0 43729.0 602517140.0 190744549.0 107968622.0
12436 1454039659.5741 81899773.0 324653.0 43729.0 602520286.0 190785023.0 108000576.0
12437 1454040540.15809 81916400.0 324868.0 43729.0 602550573.0 190834499.0 108033095.0
12438 1454041075.2077 81930350.0 324901.0 43729.0 603381624.0 190878797.0 108063319.0
before after
15088: nicolas17 15575: nicolas17
12507: maryann 12507: maryann
10177: ignaciolep 11309: nicfer
8456: pertile 11166: ignaciolep
7982: baumi 10567: pertile
6734: nicfer 8092: fr@nc0
6284: sk53 7982: baumi
5580: fr@nc0 6284: sk53
@nicolas17
nicolas17 / 4039486-history.xml
Created January 3, 2016 03:59
Relation 4039486 history, without members
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
<relation id="4039486" changeset="25438870" timestamp="2014-09-14T18:18:10Z" version="1" visible="true" user="Jim Grisham" uid="325031">
<tag k="name" v="Lake Superior"/>
</relation>
<relation id="4039486" changeset="25443110" timestamp="2014-09-14T21:33:56Z" version="2" visible="true" user="Jim Grisham" uid="325031">
<tag k="name" v="Lake Superior"/>
</relation>
<relation id="4039486" changeset="27063098" timestamp="2014-11-27T09:01:32Z" version="3" visible="true" user="HolgerJeromin" uid="67862">
<tag k="ele" v="184"/>
@nicolas17
nicolas17 / abreviaturas.txt
Last active January 2, 2016 16:34
Prefijos abreviados de calles
Abreviaturas en cualquier lado del nombre
c | palabra
-------+--------------
12358 | Av.
1859 | J.
1616 | Dr.
1587 | A.
1523 | M.
928 | B.
@nicolas17
nicolas17 / circulos.md
Last active December 24, 2015 05:49
Polígonos circulares de escuelas en Argentina
@nicolas17
nicolas17 / aita.md
Created December 20, 2015 01:34
App in the Air experience
  1. Open app for the first time.
    • There seems to be a motion effect in the world map when I tilt the device. If the idea is to make the world map appear in the background and the application name in the foreground, the motion effect is backwards.
  2. Go to Add flight.
  3. Enter LA as an airline code.
  4. The "enter flight number" screen appears.
    • There is no blinking cursor in the text field to enter the number, so it looks as if the field wasn't selected. I kept tapping it to make it selected, before I noticed I could just type the number on the keyboard. It also means I can't move the cursor, or paste...
    • There is no limit to how many digits I can type, even though flight numbers can't be longer than 4 digits.
    • Why can't I just type "LA 2426" in the previous screen? Why force me through two steps?
  5. Enter 2426 and tap Done.
  6. As the date, select Nov 29th and tap Search.
bashdb<20> help info
List of info subcommands:
info args -- Argument variables (e.g. $1, $2, ...) of the current stack frame.
info breakpoints -- Status of user-settable breakpoints
info display -- Show all display expressions
info files -- Source files in the program
info functions -- All function names
info line -- list current line number and and file name
info program -- Execution status of the program.