vagrant plugin install vagrant-vbguest
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 pylab import * | |
from math import log | |
def fitExponent(tList,yList,ySS=0): | |
''' | |
This function finds a | |
tList in sec | |
yList - measurements | |
ySS - the steady state value of y | |
returns |
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/python3 | |
import sys | |
def is_odd(integer): | |
if integer % 2 == 0: | |
return False | |
else: | |
return True |
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/python3 | |
import sys | |
from functools import reduce | |
n,m = input().strip().split(' ') | |
n,m = [int(n),int(m)] | |
a = [int(a_temp) for a_temp in input().strip().split(' ')] | |
b = [int(b_temp) for b_temp in input().strip().split(' ')] |
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/python3 | |
import sys | |
import itertools | |
n,k = input().strip().split(' ') | |
n,k = [int(n),int(k)] | |
a = [int(a_temp) for a_temp in input().strip().split(' ')] | |
combinations = list(itertools.combinations(a, 2)) |
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/python3 | |
import sys | |
n = int(input().strip()) | |
scores = list(map(int, input().strip().split(' '))) | |
# your code goes here | |
# highest score | |
max = -float("inf") |
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
def solution(N): | |
# write your code in Python 2.7 | |
bin_representation = "{0:b}".format(N) | |
bin_representation = 'x' + bin_representation | |
bin_representation = bin_representation + 'x' | |
start_index = [i for i in range(0, len(bin_representation)) if ((bin_representation[i] == '1') and (bin_representation[i+1]=='0'))] | |
end_index = [i for i in range(0, len(bin_representation)) if ((bin_representation[i] == '1') and (bin_representation[i-1]=='0'))] | |
print(start_index) |
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 collections import deque | |
# you can write to stdout for debugging purposes, e.g. | |
# print "this is a debug message" | |
def solution(A, K): | |
# write your code in Python 2.7 | |
d=deque(A) | |
d.rotate(K) | |
return list(d) |
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
def solution(X, Y, D): | |
# write your code in Python 2.7 | |
gap = Y-X | |
if gap % D == 0: | |
return gap / D | |
else: | |
return gap / D + 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
sudo apt-get install redis-server | |
sudo /etc/init.d/redis-server restart | |
neo4j start | |
neo4j status | |
sudo apt-get install mongodb-server | |
sudo apt-get install mongodb-clients | |
killall mongod | |
cd ~ |
OlderNewer