I hereby claim:
- I am jgomo3 on github.
- I am jgomo3 (https://keybase.io/jgomo3) on keybase.
- I have a public key whose fingerprint is E8CA 7677 6DF0 F87E 23D7 21DA BE66 27F0 D1C6 243A
To claim this, I am signing this object:
<!DOCTYPE html> | |
<!-- | |
http://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file | |
Ya que el API FileSave de HTML 5 no lo soportan todos los navegadores, use la | |
opción del Uri Content. | |
--> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Data Uri, ejemplo</title> |
# Código que solo satisface el req 2 | |
class CNEEnlacesParser(HTMLParser): | |
def __init__(self): | |
self.enlaces = [] | |
def handle_starttag(self, tag, attrs): | |
dict_attrs = dict(attrs) | |
si el tag es un "a" y tiene como atributos "id"=="region_ref" y "href": |
class ResultadosParser(HTMLParser): | |
def __init__(self): | |
self.estamos_en_el_div = False | |
self.tds = 0 | |
self.candidato = {} # Un dict vacio | |
self.resultados = [] | |
def handle_startag(self, tag, args): # | |
dict_args = dict(args) |
CREATE TEMPORARY TABLE object_with_cases | |
( | |
id int, | |
case int | |
); | |
INSERT INTO object_with_cases | |
(id, case) | |
VALUES | |
(3, 1) |
#!/bin/sh | |
# consolidar.sh | |
# | |
# 10 de junio de 2016 | |
# Concatena a los pdf de la carpeta `Preliminares` los pdf | |
# correspondientes con el mismo nombre en la carpeta `Respuestas` | |
# y el resultado lo genera con el mismo nombre en la carpeta | |
# Consolidados. | |
# |
import psycopg2 as pg | |
from io import BytesIO | |
from collections import defaultdict | |
from contextlib import contextmanager | |
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED | |
READ_COMMIT = ISOLATION_LEVEL_READ_COMMITTED | |
AUTO_COMMIT = ISOLATION_LEVEL_AUTOCOMMIT |
I hereby claim:
To claim this, I am signing this object:
# Given a table of strings, which could reference any other string in the table, | |
# returns the string after resolving all the references. | |
# Example: | |
# table = {a: 'ツ', b: '(%{a})', c1: '¯\_', c2: '_/¯', o: '%{c1}%{b}%{c2}'} | |
# explode_key(table, :o) => ¯\_(ツ)_/¯ | |
# It doesn't allow circular references. | |
def explode_key(keys_table, key) | |
partial_string = keys_table[key] | |
allowed_loops = keys_table.keys.length # [1] |
Suppose you have, by mistake, added your IDE's project folder (you know, these .idea
folders with all kinds of local paths and configuration data and settings in it) to the Git repository of your project. (We're talking about a whole folder here, but the same rules apply to individual files as well.)
Of course, you only realize that two days after the fact and have already pushed it, and your colleagues have already pulled it. They use the same IDE as you do, so whenever they change a setting or fix paths, they can either
(ns clojure-noob.smash-hobbits | |
(:require [clojure.string :as str])) | |
(def asym-hobbit-body-parts [{:name "head" :size 3} | |
{:name "left-eye" :size 1} | |
{:name "left-ear" :size 1} | |
{:name "mouth" :size 1} | |
{:name "nose" :size 1} | |
{:name "neck" :size 2} | |
{:name "left-shoulder" :size 3} |