Install following
- hbase-1.2.9
- janusgraph-0.2.2-hadoop2
import tensorflow as tf | |
tf.reset_default_graph() | |
s1 = tf.Session() | |
g = tf.get_default_graph() | |
foo_var = tf.Variable(42, name='foo') | |
assign_14 = foo_var.assign(14, name="assign_14") | |
assign_17 = foo_var.assign(17, name="assign_17") |
IFACE=wlo1 | |
VPN_MTU=1380 | |
WL_MTU=$(cat /sys/class/net/$IFACE/mtu) | |
ip a | grep 'state UP' | |
echo "Checking: $IFACE MTU=$WL_MTU and VPN requires MTU=$VPN_MTU" | |
if [ "$WL_MTU" -gt "$VPN_MTU" ] | |
then |
git-svn is a git command that allows using git to interact with Subversion repositories.git-svn is part of git, meaning that is NOT a plugin but actually bundled with your git installation. SourceTree also happens to support this command so you can use it with your usual workflow.
Reference: http://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
You need to create a new local copy of the repository with the command
$ python3 pivot-pandas.py
date stock_code price
0 2018-08-27 001 10.0
1 2018-08-27 002 11.0
2 2018-08-27 003 12.0
3 2018-08-27 004 13.0
4 2018-08-26 001 14.0
5 2018-08-26 002 15.0
Given a 6 sided dice, how many number of throws are required to guarantee a 6 as output?
This solution is basically finding expectation over 1 roll, 2 rolls, 3 rolls ... and so on until infinite rolls of dice. Basically SUM( k * P(rolls=k)) for k = 1 to infinity. Now probability we get a 6 in exactly kth roll is defined as P(rolls=k) = q^(k-1) * p, where p is probability we get a 6 in kth roll, and q^(k-1) is probability we do not get a 6 in all k-1 rolls. I guess it still cannot guarantee that we will always get a 6, rather that if we roll on average of 6 times in a row, we will get definitely get a 6. Quite interesting problem indeed.
References: