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
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use clojure.core.logic)) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) | |
(defn init [vars hints] |
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
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
<ipython-input-34-180a07193cfb> in <module>() | |
21 for eval_name, evaluation in evaluations.iteritems(): | |
22 for year in range(2002, 2013): | |
---> 23 metric = evaluation(ranker, year) | |
24 results.append({ | |
25 'rank': name, | |
<ipython-input-34-180a07193cfb> in <lambda>(rank, year) |
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
for x in range(100): print x%3/2*'Fizz'+x%5/4*'Buzz' or x+1 |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:2c5a94596837b925899f0aab294f5a5d31a0c6227abf97c00b871ecbe116bcdf" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
csvsql --db postgresql:///test1 --insert Problem_Set_Operations_Research.csv | |
# I was having some trouble getting a csv file inserted into a Postgres Database. The above line worked. | |
\dt | |
#Shows the tables in a particular database | |
\connect test1 | |
#Connects to a database with a particular name in the case above "test1" |
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
# -*- coding: utf-8 -*- | |
""" | |
LICENSE: BSD (same as pandas) | |
example use of pandas with oracle mysql postgresql sqlite | |
- updated 9/18/2012 with better column name handling; couple of bug fixes. | |
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
to do: | |
save/restore index (how to check table existence? just do select count(*)?), | |
finish odbc, |
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
install.packages("caret") | |
install.packages("rpart") | |
install.packages("tree") | |
install.packages("randomForest") | |
install.packages("e1071") | |
install.packages("ggplot2") | |
table <- read.csv("DataSciIntro/assignment5//seaflow_21min.csv") | |
library("caret") | |
library("rpart") |
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
install.packages("caret") | |
install.packages("rpart") | |
install.packages("tree") | |
install.packages("randomForest") | |
install.packages("e1071") | |
install.packages("ggplot2") | |
table <- read.csv("DataSciIntro/assignment5//seaflow_21min.csv") | |
library("caret") | |
library("rpart") |
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
__author__ = 'Miroslaw Horbal' | |
__email__ = 'miroslaw@gmail.com' | |
__date__ = '14-06-2013' | |
from numpy import array, hstack | |
from sklearn import metrics, cross_validation, linear_model | |
from scipy import sparse | |
from itertools import combinations | |
import numpy as np |
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
#!/bin/bash | |
virtualenv .env && | |
source .env/bin/activate && | |
sudo apt-get install -y libevent-dev && | |
sudo apt-get install -y libyaml-0-2 && | |
sudo apt-get install --yes --force-yes automake autoconf libtool* gfortran && | |
sudo apt-get install --yes --force-yes liblapack-dev && | |
sudo apt-get install --yes --force-yes binutils && | |
sudo apt-get install -y libatlas-dev && | |
sudo apt-get install -y build-essential --upgrade && |
OlderNewer