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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ |
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 numpy as np | |
import matplotlib.pyplot as plt | |
class Filter: | |
def __init__(self, filter=None): | |
self.filter = filter | |
self.filter.predict() | |
def get_point(self): | |
return self.filter.x[0:2, :].flatten() |
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
"""Implementation of Figure 5.2 in Artificial Intelligence: A Modern Approach | |
[MINIMAX Algorithm] | |
AIMA p.164 Ch.5 Adversarial Search | |
function Minimax(state) returns a value | |
if terminal-test(state): | |
return utility(state) | |
if player(state) == MAX: | |
return max( Minimax(RESULT(state, action)) for every action in Action(s) ) |
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
""" This file calculates the fitness of 8-queens problem | |
How to use: | |
In terminal, | |
$ python fitness_8_queens.py 24748552 | |
Input: 24752411 | |
Output: 22 |
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 json | |
import requests | |
url = "http://news.naver.com/main/mainNews.nhn" | |
payloads = {'componentId': 949984, 'page': 1, 'date': '2016-03-13 00:00:00'} | |
req = requests.get(url, params=payloads) | |
js = json.loads(req.text) | |
print(js.keys()) # dict_keys(['itemList', 'dateList', 'pagerInfo', 'currentDate']) | |
for item in js['itemList']: |
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
library(tensorflow) | |
rm(list=".Random.seed", envir=globalenv()) | |
batch.size = 128L | |
max.step = 500L | |
print.every = 10L | |
hidden.dim = 64L | |
dropout = 0.5 | |
tf$reset_default_graph() | |
X <- tf$placeholder(tf$int64, shape(NULL, max.seq)) |
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
library(shiny) | |
library(gsheet) | |
# Helper Functions | |
read.list <- function(url = "https://docs.google.com/spreadsheets/d/1aJ2Bv8CCR4OhBoVdsQD16OWON89VwuaLYKDDP-OiTG4") { | |
as.data.frame(gsheet::gsheet2tbl(url)) | |
} | |
read.data <- function(url) { | |
data <- as.data.frame(gsheet::gsheet2tbl(url)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer