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
# -*- coding:utf8 -*- | |
# !/usr/bin/env python | |
# Copyright 2017 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
{ | |
"id": "035bea35-c51b-4ccc-be8c-61846b506b78", | |
"timestamp": "2018-01-26T14:04:28.967Z", | |
"lang": "en", | |
"result": { | |
"source": "agent", | |
"resolvedQuery": "I don't how to update goals", | |
"action": "", | |
"actionIncomplete": false, | |
"parameters": { |
We can't make this file beautiful and searchable because it's too large.
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
satisfaction_level last_evaluation number_project average_montly_hours time_spend_company Work_accident left promotion_last_5years sales salary | |
0.38 0.53 2 157 3 0 1 0 sales low | |
0.8 0.86 5 262 6 0 1 0 sales medium | |
0.11 0.88 7 272 4 0 1 0 sales medium | |
0.72 0.87 5 223 5 0 1 0 sales low | |
0.37 0.52 2 159 3 0 1 0 sales low | |
0.41 0.5 2 153 3 0 1 0 sales low | |
0.1 0.77 6 247 4 0 1 0 sales low | |
0.92 0.85 5 259 5 0 1 0 sales low | |
0.89 1 5 224 5 0 1 0 sales low |
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 | |
weight1 = 0.0 | |
weight2 = -2.0 | |
bias = 1.0 | |
# DON'T CHANGE ANYTHING BELOW | |
# Inputs and outputs |
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 | |
# Set weight1, weight2, and bias so that only the inputs 1,1 falls into positive area | |
weight1 = 2.0 | |
weight2 = 2.0 | |
bias = -1 | |
# Inputs and otutputs | |
test_inputs = [(0, 0), (0, 1), (1, 0), (1, 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
import numpy as np | |
import cv2 | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
import glob | |
# prepare object points | |
#Enter the number of inside corners in x | |
nx = 9 | |
#Enter the number of inside corners in y |
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
# ----------- | |
# User Instructions | |
# | |
# Implement a P controller by running 100 iterations | |
# of robot motion. The desired trajectory for the | |
# robot is the x-axis. The steering angle should be set | |
# by the parameter tau so that: | |
# | |
# steering = -tau * crosstrack_error | |
# |
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 | |
# Use the cartpole environment. | |
env = gym.make('CartPole-v0') | |
# environment has to be reset first. | |
env.reset() | |
# This flag to is used to represent the end of an episode. | |
# An episode ends when the pole falls down. | |
done = False | |
# counter to check the number of moves for which the balance of the pole |
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 math | |
import rospy | |
from std_msgs.msg import Float64 | |
def mover(): | |
pub_j1 = rospy.Publisher('/simple_arm/joint_1_position_controller/command', | |
Float64, queue_size=10) | |
pub_j2 = rospy.Publisher('/simple_arm/joint_2_position_controller/command', | |
Float64, queue_size=10) | |
rospy.init_node('arm_mover') |
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
def get_embedding_layer(vocab_index, learned_embeddings, max_words, embedding_dim, max_seq_len, do_train): | |
"""" | |
Creates the Embedding layer using learned embedding and word indesx map of all | |
unique words in the text corpus. | |
||Params|| | |
vocab_index : Map of all unique words in your text corpus as keys and their index as values | |
learned_embeddings: Learned embedding representation from GLove/Word2Vec. | |
max_words: Max words to be used from the vocab |