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
source ~/.git-prompt.sh | |
# bash prompt | |
export THIN_WHITE="\033[0;00m" | |
export BLACK="\033[0;30m" | |
export RED="\033[0;31m" | |
export GREEN="\033[0;32m" | |
export YELLOW="\033[0;33m" | |
export BLUE="\033[0;34m" | |
export GREY="\033[1;34m" |
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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
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
def root(x, n): | |
if n == 1: | |
return x | |
if x == 1: | |
return x | |
high = x if x > 1 else 1 | |
low = 0 | |
mid = (high+low)/2 |
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 numpy as np | |
def covariance(X): | |
""" | |
Computes the covariance matrix of X | |
:param X: Input data of shape (N, M) where N is the | |
number of samples and M is the number of | |
features | |
:return: Output data of shape (M, M) where Output[i][j] | |
is Cov(feature_i, feature_j) |
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 ray | |
from gym import spaces | |
from ray.rllib.env.multi_agent_env import MultiAgentEnv | |
import numpy as np | |
from ray.tune.registry import register_env | |
from ray.rllib.agents.registry import get_agent_class | |
from ray.rllib.rollout import rollout | |
import time | |
from ray import tune |
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
;; row major matrix multiplication | |
(defun row_major_mm (a b c) | |
(flet ( | |
(col (mat i) (mapcar #'(lambda (row) (elt row i)) mat)) | |
(row (mat i) (elt mat i)) | |
) | |
(loop for k from 0 below (length (row a 0)) | |
do (loop for i from 0 below (length a) | |
do (let ((temp (elt (elt a i) k))) |
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 csv | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def read_file(filename): | |
lines = [] | |
csvreader = csv.reader(open(filename)) | |
for line in csvreader: | |
lines.append(line) |
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/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun Sep 23 12:28:46 2018 | |
@author: Arpit | |
""" | |
import random | |
''' |
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
package c4; | |
import java.io.IOException; | |
import openingBook.Book; | |
import openingBook.BookSum; | |
import java.util.Scanner; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.BufferedWriter; |