Skip to content

Instantly share code, notes, and snippets.

View miguelvb's full-sized avatar

Miguel Vazquez-Prada miguelvb

View GitHub Profile
@miguelvb
miguelvb / _.md
Last active August 29, 2015 14:14
WindRose D3
@miguelvb
miguelvb / automatic.md
Created August 18, 2016 10:40
automatic?

What is we were automatic ?


Say I (I meaining what happens to "me", i.e.: experiences that I am aware of) am automatic.
When we say automatic, we say that we do not have any control on what is happening now to/from us and what will happen.
It is like the Newtonian model of Physics, where the past determines fully the present and the future.
So all the "working" of the galaxy, stars, planets, earth, people around us, weather, our body, our habitudes, our past, influence our present in a way that we can not decide what we feel and think.
It is automatic.
That does NOT mean that it can be ANY thing... because the "universe" follows some "rules", and for example, if somebody throws and apple, it will go up and down, and not down and up.
Same for us: our behaviour will be "determined" by how the "Universe" works, our body, our mind, our reactions, etc.

@miguelvb
miguelvb / _.md
Last active October 14, 2016 06:29
test_
@miguelvb
miguelvb / .block
Last active October 14, 2016 13:00
treemap
license: mit
@miguelvb
miguelvb / index.html
Created March 13, 2017 20:35
saving svg layer in leaflet map
<!DOCTYPE html>
<html>
<head>
<title>Save SVG - Leaflet</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://unpkg.com/leaflet-image@latest/leaflet-image.js"></script>
@miguelvb
miguelvb / comellas_db.csv
Last active August 17, 2017 12:28
skysafari list creation from csv with R
UMi 02h 31m 49.080s +89d 15m 50.78s Alfa UMi 1 Umi Polar Polaris Doble 199
UMi 14h 50m 42.320s +74d 09m 19.82s Beta UMi 7 Umi Kochab Kokab Kochah Estrella 199
UMi 15h 20m 43.716s +71d 50m 02.46s Gamma UMi 13 Umi Pherkad Doble Optica 199
UMi 15h 29m 23.592s +80d 27m 00.96s Pi 1-Pi 2 Umi Σ 1972 Doble Doble-Doble 199
Cam 12h 49m 13.657s +83d 24m 46.44s Σ 1694 Doble 200
UMi 13h 38m 41.070s +74d 18m 36.33s V Umi Variable Irregular 200
UMi 16h 08m 27.271s +86d 11m 59.56s W Umi Variable Binaria eclipsante 200
UMi 16h 32m 39.220s +78d 11m 53.60s NGC 6217 Galaxia Sb 200
Dra 17h 42m 00.000s +72d 10m 00.00s Psi 1 Dra 44 Dra Doble 201
Dra 18h 20m 45.430s +71d 20m 16.13s Phi Dra 43 Dra Doble 202
@miguelvb
miguelvb / wds_catalog.R
Last active August 17, 2017 18:11
WDS Double Star Catalog Binoculars
## WDS Catalog ##
## http://ad.usno.navy.mil/wds/Webtextfiles/wdsnewframe.html
file_ = "~/Documents/CREACIONES/Astronomia/Star_Gazing/sky_safary/wds_csv/wds_catalog_xlsx.csv"
data <- read.csv(file=file_, header =T,sep = ";")
str(data)
wds <- data
save(wds, file = "~/Documents/CREACIONES/Astronomia/Star_Gazing/sky_safary/wds_csv/wds_catalog.Rdata")
library(data.table)
@miguelvb
miguelvb / tracer.py
Created September 29, 2017 10:41
tracer python
import inspect
class TracerClass(object):
def __init__(self):
self.whitespace = ' '
self.indent_lvl = 0
self.watched_dir = T_CONTROLLERS_DIR
def trace(self, frame, event, arg):
@miguelvb
miguelvb / sonic-py error
Created March 3, 2018 09:07
error inicio sonic-pi rpi v2 raspbian stretch
pi@raspberrypi:~/Documents/Antropoloops/codes/keyboard/examples $ sudo ruby /opt/sonic-pi/app/server/bin/sonic-pi-server.rb
Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
- OK
Scsynth port: 4556
- OK
Scsynth send port: 4556
@miguelvb
miguelvb / keys_to_sounds.py
Last active March 8, 2018 23:43
keys to sounds in rapsberry pi
import termios, fcntl, sys, os
import pygame.mixer
from time import sleep
from sys import exit
fd = sys.stdin.fileno()
oldterm = termios.tcgetattr(fd)
newattr = termios.tcgetattr(fd)