In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
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
#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
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
"""Create a notebook containing code from a script. | |
Run as: python make_nb.py my_script.py | |
""" | |
import sys | |
import nbformat | |
from nbformat.v4 import new_notebook, new_code_cell | |
nb = new_notebook() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Wine | Alcohol | Malic.acid | Ash | Acl | Mg | Phenols | Flavanoids | Nonflavanoid.phenols | Proanth | Color.int | Hue | OD | Proline | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 14.23 | 1.71 | 2.43 | 15.6 | 127 | 2.8 | 3.06 | .28 | 2.29 | 5.64 | 1.04 | 3.92 | 1065 | |
1 | 13.2 | 1.78 | 2.14 | 11.2 | 100 | 2.65 | 2.76 | .26 | 1.28 | 4.38 | 1.05 | 3.4 | 1050 | |
1 | 13.16 | 2.36 | 2.67 | 18.6 | 101 | 2.8 | 3.24 | .3 | 2.81 | 5.68 | 1.03 | 3.17 | 1185 | |
1 | 14.37 | 1.95 | 2.5 | 16.8 | 113 | 3.85 | 3.49 | .24 | 2.18 | 7.8 | .86 | 3.45 | 1480 | |
1 | 13.24 | 2.59 | 2.87 | 21 | 118 | 2.8 | 2.69 | .39 | 1.82 | 4.32 | 1.04 | 2.93 | 735 | |
1 | 14.2 | 1.76 | 2.45 | 15.2 | 112 | 3.27 | 3.39 | .34 | 1.97 | 6.75 | 1.05 | 2.85 | 1450 | |
1 | 14.39 | 1.87 | 2.45 | 14.6 | 96 | 2.5 | 2.52 | .3 | 1.98 | 5.25 | 1.02 | 3.58 | 1290 | |
1 | 14.06 | 2.15 | 2.61 | 17.6 | 121 | 2.6 | 2.51 | .31 | 1.25 | 5.05 | 1.06 | 3.58 | 1295 | |
1 | 14.83 | 1.64 | 2.17 | 14 | 97 | 2.8 | 2.98 | .29 | 1.98 | 5.2 | 1.08 | 2.85 | 1045 |
OlderNewer