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
while true; do | |
acpi -t | |
sleep 5 | |
done |
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
while sleep 2; do acpi -t; done |
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
import numpy as np | |
p = {} | |
p["Felipe"] = 140 | |
p["Pedri"] = 150 | |
p["Ale"] = 495 | |
p["Amanda"] = 0 | |
p["Andre"] = 0 | |
p["Caio"] = 0 |
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
""" | |
I should like to say two things, one intellectual and one moral: | |
The intellectual thing I should want to say to them is this: | |
When you are studying any matter or considering any philosophy, ask yourself only what are the facts | |
and what is the truth that the facts bear out. Never let yourself be diverted either | |
by what you wish to believe or by what you think would have beneficent social effects | |
if it were believed, but look only and solely at what are the facts. | |
That is the intellectual thing that I should wish to say. |
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
import os | |
folder = "RandomSeq" | |
seq = os.listdir(folder) | |
seq.sort() | |
for file in seq: | |
path = os.path.join(folder, file, "model.test") |
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 nltk.translate.bleu_score import sentence_bleu, brevity_penalty, SmoothingFunction | |
reference = [ "In the farm's afternoons there is too much blue".split(" ") ] | |
candidate = "In the afternoons of the farm there is too much blue".split(" ") | |
score = sentence_bleu(reference, candidate) | |
print("candidate1") | |
print(score) | |
print(len(reference[0]), len(candidate)) | |
print("BP = {}".format(brevity_penalty(len(reference[0]), len(candidate)))) | |
candidate = "In the farm's afternoons there is a lot of blue".split(" ") | |
score = sentence_bleu(reference, candidate) |
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
import argparse | |
def smart_generator(name, | |
class_name, | |
area, | |
credits, | |
professors): | |
content = """Disciplina {} | |
Tópicos Avançados de Pesquisa em @ |
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
Directional Derivative | |
http://tutorial.math.lamar.edu/Classes/CalcIII/DirectionalDeriv.aspx | |
https://www.ime.unicamp.br/~valle/Teaching/MA211/Aula6.pdf |
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
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""", |
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 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" |
NewerOlder