Enlaces y referencias relacionados con la charla La gran explosión de datos en astronomía. Cómo sobrevivir a la avalancha de datos usando Python. de la PyConES 2016
Librerías generales:
#!/usr/bin/env python | |
from __future__ import print_function | |
from subprocess import check_output, check_call | |
device_name = "Synaptics Large Touch Screen" | |
def get_device_number(): | |
""" | |
Get the device number of the device using xinput. |
## Anaconda | |
# Based on http://stackoverflow.com/questions/370047/what-is-the-most-elegant-way-to-remove-a-path-from-the-path-variable-in-bash#370255 | |
anaconda () { | |
path=$(IFS=':';t=($PATH);n=${#t[*]};a=();for ((i=0;i<n;i++)); do p="${t[i]%%*anaconda*}"; [ "${p}" ] && a[i]="${p}"; done;echo "${a[*]}"); | |
export PATH=~/anaconda/bin:$path | |
} | |
noanaconda () { | |
path=$(IFS=':';t=($PATH);n=${#t[*]};a=();for ((i=0;i<n;i++)); do p="${t[i]%%*anaconda*}"; [ "${p}" ] && a[i]="${p}"; done;echo "${a[*]}"); | |
export PATH=$path |
import pexpect | |
file_in = "input.dat" | |
file_out = "output.txt" | |
c = pexpect.spawn ('asurv') | |
c.expect('(CARRIAGE RETURN TO CONTINUE)') | |
c.sendline('') | |
c.expect('(CARRIAGE RETURN TO CONTINUE)') | |
c.sendline('') |
#!/usr/bin/env python | |
""" | |
Solutions to the problem proposed in http://gu.com/p/493zk/stw | |
""" | |
from itertools import permutations | |
from decimal import Decimal | |
def p(x): | |
""" | |
Define the problem. Follow the canonical order of operations |
#!/usr/bin/env python3 | |
# -*- coding: utf8 -*- | |
##### | |
# Copyright (C) 2015 J. Sabater | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
from __future__ import print_function | |
from bluetooth.ble import GATTRequester | |
from time import sleep | |
def get_accel(data): | |
""" | |
Get the acceleration values from the data | |
TODO: Add CRC check | |
See: http://legacy.punchthrough.com/bean/the-arduino-reference/accelerationreading/ | |
""" |
from __future__ import print_function | |
import locale | |
import datetime | |
import re | |
import os | |
from os.path import isfile, join | |
import unicodedata | |
from unidecode import unidecode | |
Enlaces y referencias relacionados con la charla La gran explosión de datos en astronomía. Cómo sobrevivir a la avalancha de datos usando Python. de la PyConES 2016
Librerías generales:
#!/usr/bin/env python | |
import sys | |
import PyQt5 | |
from PyQt5.QtWidgets import QApplication | |
from PyQt5.QtCore import QThread, QUrl | |
from PyQt5.QtWebKitWidgets import QWebView | |
from bottle import Bottle |