i) create config file
$ jupyter notebook --generate-config
ii) create password
import numpy as np | |
import tensorflow as tf | |
NUM_THREADS = 4 | |
data = np.array([[0.2, 0.3], [0.4, 0.9], [0.8, -1.2], [-1.3, -0.2]]) | |
target = np.array([1, 0, 1, 0]) | |
queue = tf.FIFOQueue(capacity=3, | |
dtypes=[tf.float32, tf.int32], |
# range_input_producer( | |
# limit, | |
# num_epochs=None, | |
# shuffle=True, | |
# seed=None, | |
# capacity=32, | |
# shared_name=None, | |
# name=None) | |
# Produces the integers from 0 to limit-1 in a queue. |
# strided_slice( | |
# input_, | |
# begin, | |
# end, | |
# strides=None, | |
# begin_mask=0, | |
# end_mask=0, | |
# ellipsis_mask=0, | |
# new_axis_mask=0, | |
# shrink_axis_mask=0, |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from matplotlib import rc | |
sns.set_style("darkgrid") | |
# for using latex in plt it requires one installation: | |
# $ sudo apt install dvipng | |
rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) |
from sklearn import linear_model | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# generating fake linear data. | |
# Where x = square meter, y = house price | |
cond = False | |
while not cond: |
import matplotlib.pyplot as plt | |
from datetime import date | |
#data | |
logic_tuple = [(1936, 3), (1937, 6), (1938, 3), (1939, 5), | |
(1940, 2), (1941, 2), (1942, 7), (1943, 1), | |
(1944, 2), (1945, 2), (1947, 2), (1948, 4), | |
(1949, 7), (1950, 3), (1951, 2), (1952, 5), |
from nltk.translate.bleu_score import modified_precision | |
pt = "em plano aberto, a cidade parece linda" | |
ref = "in a wide shot, the city looks beautiful" | |
c1 = "in the open, the city looks beautiful" | |
c2 = "in open plan, the city looks gorgeous" |
import cv2 | |
img = cv2.imread("0.png") | |
font = cv2.FONT_HERSHEY_PLAIN | |
bottomLeftCornerOfText = (15,25) | |
fontScale = 1 | |
fontColor = (255,25,55) | |
lineType = 2 | |
cv2.putText(img,"""up: 0.02""", |
Directional Derivative | |
http://tutorial.math.lamar.edu/Classes/CalcIII/DirectionalDeriv.aspx | |
https://www.ime.unicamp.br/~valle/Teaching/MA211/Aula6.pdf |