Skip to content

Instantly share code, notes, and snippets.

import csv
def main():
# estructura del fichero de microdatos de la DGT y creación de lista con las partes que lo componen
widths = 8,1,8,30,22,1,21,2,1,5,6,6,6,3,2,2,2,2,24,2,2,1,8,5,8,1,1,9,3,5,30,7,3,5,1,1,1,1,1,1,11,25,25,35,70,6,6,4,4,3,8,4,4,4,6,30,50,35,25,35,4,4,4,1,25,1,4,25,8
slices = []
offset = 0
for w in widths:
slices.append(slice(offset, offset + w))
offset += w
/*
* You can use this stylesheet as a place to get started
* for styling your own version of Talk!
* Author: Sam Hankins, Coral Project, 2018
* License: Apache 2.0
*/
* {
/* font-family: inherit; */
}
@jmoreno
jmoreno / ManuelBartual3.json
Created August 29, 2017 19:00
ManuelBartual3.json
This file has been truncated, but you can view the full file.
[
[
{
"contributors": null,
"coordinates": null,
"created_at": "Mon Aug 21 19:46:55 +0000 2017",
"display_text_range": [
0,
137
],
@jmoreno
jmoreno / ManuelBartualPlot.py
Created August 29, 2017 18:57
ManuelBartualPlot.py
# coding: utf-8
# Simple demo with multiple subplots and XKCD FTW!!!.
import numpy as np
import matplotlib.pyplot as plt
import json
import datetime
tweet_ids = []
@jmoreno
jmoreno / posibilidades.md
Last active August 12, 2017 08:27
Las posibilidades de Medium

Lo que pretendo es averiguar todo lo que se puede conseguir de Medium utilizando un austero editor de Markdown...

Titulo 1

Titulo 2

¿Hasta donde llegaremos? Pues hasta el segundo nivel...

Citas

@jmoreno
jmoreno / CreateGist.py
Created August 9, 2017 23:46
Prueba de fuego
import urllib2
import json
import workflow
import console
params = workflow.get_parameters()
description = params.get('Description')
filename = params.get('Filename')
content = params.get('Content')
@jmoreno
jmoreno / ElGordo.py
Created December 18, 2016 15:51
ElGordo.py
import requests
import json
numeros_jugados =[12345, 23456, 34567]
api = 'http://api.elpais.com/ws/LoteriaNavidadPremiados'
url_estado_sorteo = '{!s}?s=1'
url_resultado_numero = '{!s}?n={!s}'
url_resultado_general = '{!s}?n=resumen'
require 'nokogiri'
require 'csv'
doc = File.open("exportación.xml") {|f| Nokogiri::XML(f)}
CSV.open('HealthData.csv', 'wb', col_sep: ";") do |csvfile|
csvfile << ["Locale"]
doc.css("HealthData").each do |healthData|
csvfile << [healthData["locale"]]
end
require 'nokogiri'
require 'axlsx'
doc = File.open("exportación.xml") {|f| Nokogiri::XML(f)}
apple_health_export_xlsx = Axlsx::Package.new
apple_health_export_xlsx.workbook.add_worksheet(:name => "HealthData") do |sheet|
sheet.add_row ["Locale"]
doc.css("HealthData").each do |healthData|
@jmoreno
jmoreno / gist_importer.py
Created July 22, 2016 12:51
gist_importer.py
import clipboard
from urllib.parse import urlparse
import os.path
import requests
import dialogs
import editor
shared_url = clipboard.get()
if shared_url: