This file contains hidden or 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
;;This configuration works for emacs 24 | |
;;Indenting code (for me it works for python ,ruby, c , c++) | |
(electric-indent-mode t) | |
;;Auto pairing for opening and closing brackets and such more stuff | |
(electric-pair-mode t) | |
;;Removing blank spaces and | |
(electric-layout-mode t) |
This file contains hidden or 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
;;@@Requirements | |
(add-to-list 'load-path "~/.emacs.d/plugins/") | |
(add-to-list 'load-path "~/.emacs.d/plugins/rinari/") | |
;;Ido-mode | |
;;********************************************************* | |
(require 'ido) | |
(ido-mode t) | |
;;********************************************************* |
This file contains hidden or 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
# | |
# run script by python server.py | |
# open browser with http://127.0.0.1:8000/ | |
# this will open index.html in current directory as default | |
# | |
# | |
import sys | |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler |
This file contains hidden or 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 itertools | |
''' | |
Here some functios a, b, c, d | |
which if we can run recursively | |
using itertools | |
''' | |
def a(): | |
print "hello" | |
def b(): |
This file contains hidden or 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
""" | |
Description: | |
Get Lecture notes for machine learning | |
from http://cs229.stanford.edu/materials.html | |
Usage: | |
python ml_notes.py | |
""" | |
import urllib2 | |
import os |
This file contains hidden or 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 pound | |
sudo apt-get install pound | |
Configure pound to start | |
sudo /etc/default/pound | |
set start=1 |
This file contains hidden or 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/sh | |
sudo echo "Acquire::http { Proxy "http://172.21.14.100:3142"; };" > sudo /etc/apt/apt.conf | |
APPS="gcc g++ python flex bison vim git emacs24 python-pip python-easygui python-tk openssh-server" | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install $APPS |
This file contains hidden or 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
#!/usr/bin/python3 | |
""" | |
File :aitictac.py | |
Arficital Intelligence to play tictac toe | |
Using MinMax n-ply search algorithm | |
""" | |
class Board: | |
def __init__(self, board=[]): | |
self.boardvisual = {2: '-', 3:'X', 5: 'O' } | |
if board: |
This file contains hidden or 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
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int poss_win(int *board,char choice) | |
{ | |
int val, check; | |
if(choice == 'X') | |
val = 18; | |
else | |
val = 50; |
This file contains hidden or 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
class Conv: | |
def __init__(self): | |
# self.x_start = int(input()) | |
# self.x_n = [ int(i) for i in raw_input().split(' ')] | |
# self.h_start = int(input()) | |
# self.h_n = [ int(i) for i in raw_input().split(' ')] | |
self.x_start = 0 | |
self.x_n = [1, 2, 3, 1] | |
self.h_start = 1 | |
self.h_n = [1, 2, 1, -1] |
OlderNewer