This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# El ID dew huawei es 12d1 | |
echo "0x12d1" > ~/.android/adb_usb.ini | |
# ver donde esta el dispositivo (conectado vua USB) | |
lsusb | |
# Bus 001 Device 009: ID 12d1:107e Huawei Technologies Co., Ltd. | |
# ver los pemisos | |
ls /dev/bus/usb/001/009 | |
sudo chmod 666 /dev/bus/usb/001/009 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Documento original que se busca certifical | |
f = open('Presupuesto 2017.zip', 'rb') | |
presup_bytes = f.read() | |
f.close() | |
# documento de resumen de signatura, incluye el hash del doc original, la clave publica de la firma y el valor de la firma | |
f = open('document.json', 'rb') | |
json_doc = f.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
matricularse en la universidad provincial de cordoba. | |
Esta universidad abre los cupos de a 10 por la gran demanda que hay en los horarios de mañana | |
''' | |
import requests | |
import time | |
from datetime import datetime | |
from random import randint | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convertir CSV con un campo GeoJson en GeoJson de verdad | |
""" Muestra de los datos | |
barrio_nombre,localidad_comuna_nombre,partido_departamento_nombre,provincia_nombre,geometry | |
Sakura,Burzaco,Almirante Brown,Buenos Aires,"{""type"":""MultiPolygon"",""coordinates"":[[[[-58.3932940197438,-34.8414643460426],[-58.3897210142988,-34.8411327603842],[-58.3895424606404,-34.8422852562742],[-58.3931483187865,-34.8425747694022],[-58.3932940197438,-34.8414643460426]]]]}" | |
Barrio Tharram I,Burzaco,Almirante Brown,Buenos Aires,"{""type"":""MultiPolygon"",""coordinates"":[[[[-58.4011976024542,-34.8158546691101],[-58.4042565185486,-34.8173238122425],[-58.4058282782524,-34.8152186171327],[-58.4027190430739,-34.8137432573857],[-58.4011976024542,-34.8158546691101]]]]}" | |
Barrio Tharram II,Burzaco,Almirante Brown,Buenos Aires,"{""type"":""MultiPolygon"",""coordinates"":[[[[-58.4072933057172,-34.8191618268144],[-58.4090854427554,-34.8166801468689],[-58.407535685131,-34.8159373702445],[-58.4074343864498,-34.8160800560938],[-58.4058081 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import F, Func, Value | |
# todos | |
MyModel.objects.all() | |
.update( | |
campo_a_reemplazar=Func( | |
F('campo_a_reemplazar_u_otro'), | |
Value('txt_buscar'), | |
Value('txt_reemplazar'), | |
function='replace')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# combinaciones de lk - xcvb - op - ghjk | |
p0 = ['l', 'k'] | |
p1 = ['x', 'c', 'v', 'b'] | |
p2 = ['o', 'p'] | |
p3 = ['g','h','j','k'] | |
c = 0 | |
for l0 in p0: | |
for l1 in p1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# pasar a CSV el recurso de datos en | |
# http://democraciaconcodigos.github.io/election-2013/ | |
# lista de escuelas de cordoba a octubre de 2013 | |
import sys | |
import json | |
import codecs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) | |
{isApple=true;} | |
var pgp = document.createElement('script'); | |
pgp.type = 'text/javascript'; | |
if (isApple) | |
{pgp.src = 'js/cordova.ios.js';} | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I wrote this: | |
--- | |
customlog: | |
- | |
format: combined | |
target: /usr/local/apache/domlogs/mydomain.com | |
- | |
format: "\"%{%s}t %I .\\n%{%s}t %O .\"" |
NewerOlder