-
:bowtie:
😄 - :smile:
😆 - :laughing:
😊 - :blush:
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
#!/bin/sh | |
#Updates codes | |
#Author: Breno Brito | |
#Updated in 13/04/2018 | |
export dir=$PWD | |
echo Updating website | |
echo | |
cd $dir/website |
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
net start w32time | |
w32tm /resync /force | |
net stop w32time |
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 twittter_main | |
# Execute Pytest in the cmd to assert the test. | |
def test_post_sem_usuario_sem_msg(): | |
assert twittter_main.post('->') == 'Comando invalido!' | |
def test_post_sem_msg(): | |
assert twittter_main.post("Alice ->") == "Post sem mensagem!" |
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 { checkFiveCards, checkCard, checkHand, higherCard } from './poker'; | |
// Should use 'export function' for functions in './poker' file | |
describe('Checar 5 cartas', () => { | |
test('checa mão com cinco cartas', () => { | |
expect(checkFiveCards('2H 3D 5S 9C KD')).toEqual(true); | |
}); | |
test('checa mão com 4 cartas', () => { | |
expect(checkFiveCards('2H 3D 5S 9C')).toEqual(false); |
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
/* Techbricks.nl Line Follower | |
Based on a PID controller, using the NXT 1.0 light sensor | |
NXC firmware 1.28 | |
www.techbricks.nl | |
last modified 03/03/2010 Breno version*/ | |
/* Proportional gain, straight forward reaction of the controller | |
Larger values typically mean faster response since the larger the error, | |
the larger the proportional term compensation. | |
An excessively large proportional gain will lead to process instability and oscillation.*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
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
# from https://www.kaggle.com/kmader/july-24-micro-challenge | |
from contextlib import redirect_stdout | |
from io import StringIO | |
def simulate_game(verbose=False): | |
out_buffer = StringIO() | |
with redirect_stdout(out_buffer): | |
blackjack.simulate_one_game() | |
out_str = out_buffer.getvalue() | |
if verbose: |
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 pandas as pd, numpy as np | |
import yfinance as yf | |
import datetime as dt | |
import re | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
sns.set() | |
plt.rcParams['figure.figsize'] = [10,6] | |
plt.rcParams["font.weight"] = "bold" | |
plt.rcParams["axes.labelweight"] = "bold" |
OlderNewer