This file contains 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
# http://askubuntu.com/questions/192620/how-to-make-ubuntu-iso-bootable-on-a-usb-stick-with-osx | |
# | |
# Requirements: | |
# - pen drive formatted in FAT | |
# - iso file downloaded from: http://cdimage.debian.org/debian-cd/7.2.0/amd64/iso-dvd/debian-7.2.0-amd64-DVD-1.iso | |
# - pen drive is on /dev/disk1 -> check with "diskutil list" | |
hdiutil convert -format UDRW -o debianDVD.img debian-7.2.0-amd64-DVD-1.iso | |
diskutil unmountDisk /dev/disk1 | |
sudo dd if=debianDVD.img of=/dev/rdisk1 bs=1m |
This file contains 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
library(shiny) | |
shinyServer(function(input, output) { | |
# Make three independent, repeatable copies of rnorm so that the underlying | |
# random values don't change | |
rnorm1 = repeatable(rnorm) | |
rnorm2 = repeatable(rnorm) | |
rnorm3 = repeatable(rnorm) | |
This file contains 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
library(MCMCpack) | |
x <- 0.5 | |
shape <- 2 | |
scale <- 3 | |
dinvgamma(x, shape, scale) | |
#from scipy.stats import invgamma |
This file contains 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
When yo try to install rgl in R you have an error about glu.h | |
%%%%%%%%%%%%%%% | |
checking GL/glu.h usability... no | |
checking GL/glu.h presence... no | |
checking for GL/glu.h... no | |
configure: error: missing required header GL/glu.h | |
ERROR: configuration failed for package ‘rgl’ | |
* removing ‘/home/angel/R/x86_64-suse-linux-gnu-library/3.2/rgl’ | |
Warning in install.packages : |
This file contains 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
#Load library mass and set seed | |
library(MASS) | |
set.seed(100) | |
# We are going to use 3 random variables | |
m <- 3 | |
# Number of samples to be drawn | |
n <- 2000 |
This file contains 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
;+ | |
; NAME: | |
; query_argonaut | |
; | |
; PURPOSE: | |
; Query the Argonaut server for 3D dust information or SFD | |
; | |
; CALLING SEQUENCE: | |
; qresult = query_argonaut(/struct, /debug, _extra=coords) | |
; |
This file contains 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
# Multiple plot function | |
# | |
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) | |
# - cols: Number of columns in layout | |
# - layout: A matrix specifying the layout. If present, 'cols' is ignored. | |
# | |
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), | |
# then plot 1 will go in the upper left, 2 will go in the upper right, and | |
# 3 will go all the way across the bottom. | |
# |
This file contains 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
import numpy as np | |
from astropy.table import Table, Column | |
def transpose_table(tab_before, id_col_name='ID'): | |
'''Returns a copy of tab_before (an astropy.Table) with rows and columns interchanged | |
id_col_name: name for optional ID column corresponding to | |
the column names of tab_before''' | |
# contents of the first column of the old table provide column names for the new table | |
# TBD: check for duplicates in new_colnames & resolve | |
new_colnames=tuple(tab_before[tab_before.colnames[0]]) |
This file contains 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 scipy import stats | |
from theano.tensor.nlinalg import det, matrix_inverse, trace, eigh | |
from pymc3 import transforms | |
from pymc3.distributions.distribution import Continuous, Discrete, draw_values, generate_samples | |
from pymc3.distributions.special import gammaln, multigammaln | |
from pymc3.distributions.dist_math import bound, logpow, factln | |
class MvNormal(Continuous): | |
r""" |
This file contains 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
Existe un problema cuando se instala Rmath en julia (OpenSUSE) | |
julia> Pkg.build("Rmath") | |
INFO: Building Rmath | |
INFO: Attempting to Create directory /home/angel/.julia/v0.5/Rmath/deps/downloads | |
INFO: Directory /home/angel/.julia/v0.5/Rmath/deps/downloads already created | |
INFO: Downloading file https://github.com/JuliaLang/Rmath-julia/archive/v0.1.tar.gz | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (77) error setting certificate verify locations: |
OlderNewer