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
<replace-with class="com.dreamskiale.client.history.Html5Historian"> | |
<when-type-is class="com.google.gwt.place.shared.PlaceHistoryHandler.DefaultHistorian"/> | |
<any> | |
<when-property-is name="user.agent" value="gecko1_8"/> | |
<when-property-is name="user.agent" value="safari"/> | |
<when-property-is name="user.agent" value="opera"/> | |
</any> | |
</replace-with> | |
<replace-with class="com.dreamskiale.client.history.HashBangHistorian"> | |
<when-type-is class="com.google.gwt.place.shared.PlaceHistoryHandler.DefaultHistorian"/> |
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
private native void pushState(String url) /*-{ | |
url += $wnd.location.search; | |
$wnd.history.pushState(null, $doc.title, url); | |
}-*/; | |
private native void replaceState(String url) /*-{ | |
url += $wnd.location.search; | |
$wnd.history.replaceState(null, $doc.title, url); | |
}-*/; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<p>hello world</p> | |
</body> | |
</html> |
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, hashlib | |
from os import listdir | |
from os.path import isfile, join | |
mypath = "." | |
files = [ f for f in listdir(mypath) if isfile(join(mypath,f)) ] | |
hashes = set() |
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
###################################################################### | |
# Task: Describe a Turing machine that shifts the input string one | |
# space to the right and places the symbol ($) in the first location | |
# on the tape. | |
###################################################################### | |
# Enter values below for | |
# q_0 : the initial state (an int) | |
# q_a : the accept state (an int) | |
# q_r : the reject state (an int) | |
# delta : the transition function expressed as a dictionary |
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 gym | |
import pandas as pd | |
import numpy as np | |
import random | |
# https://gym.openai.com/envs/CartPole-v0 | |
# Carlos Aguayo - carlos.aguayo@gmail.com | |
class QLearner(object): |
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 pandas as pd | |
from xgboost import XGBClassifier | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import accuracy_score | |
from sklearn.preprocessing import LabelEncoder | |
dataset = pd.read_csv('https://github.com/primaryobjects/voice-gender/raw/master/voice.csv', header=0).values | |
x = dataset[:, :-1] | |
y = dataset[:, -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
from jira import JIRA | |
from dateutil.parser import parse | |
import pandas as pd | |
# For any ticket that was externally reported or labeled a hotfix in the last 90 days, compute: | |
# 1. Number of comments | |
# 2. How long it took for it to be labeled hotfix | |
# 3. Number of transitions across squads | |
username = 'carlos.aguayo' |
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 selenium import webdriver | |
from BeautifulSoup import BeautifulSoup | |
import requests | |
options = webdriver.ChromeOptions() | |
options.add_argument('headless') | |
driver = webdriver.Chrome(chrome_options=options) | |
driver.set_window_size(1280, 1600) | |
filename = 'NOTICE.html' |
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
__________________________________________________________________________________________________ | |
Layer (type) Output Shape Param # Connected to | |
================================================================================================== | |
input_1 (InputLayer) (None, None, None, 3 0 | |
__________________________________________________________________________________________________ | |
conv2d_1 (Conv2D) (None, None, None, 3 864 input_1[0][0] | |
__________________________________________________________________________________________________ | |
batch_normalization_1 (BatchNor (None, None, None, 3 96 conv2d_1[0][0] | |
__________________________________________________________________________________________________ | |
activation_1 (Activation) (None, None, None, 3 0 batch_normalization_1[0][0] |
OlderNewer