- 한국어 번역(초벌): nacyot
- 같이 읽으면 좋은 문서들
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
######################################### | |
## GLOBAL REQUIREMENTS AND DEFINITIONS ## | |
######################################### | |
require(RCurl) | |
require(XML) | |
loginURL <- "https://accounts.google.com/ServiceLogin" | |
authenticateURL <- "https://accounts.google.com/accounts/ServiceLoginAuth" | |
insightsURL <- "http://www.google.com/insights/search/overviewReport" |
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
0: | |
messages: | |
- Hello! | |
- I'm a Bot! | |
next: 1 | |
1: | |
messages: | |
- "What's your name?" | |
input: |
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
0: | |
messages: | |
- "Would you like to send me a picture?" | |
input: | |
type: buttons_single_select | |
key: picture_yes_no | |
options: | |
[Yes, sure]: | |
input: | |
type: image |
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
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)) |
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
# Installing TOR on mac: brew install tor | |
# Run TOR on custom port: tor --SOCKSPort 9050 | |
# Check the 'origin' field in the response to verify TOR is working. | |
library(httr) | |
GET("https://httpbin.org/get", use_proxy("socks5://localhost:9050")) | |
# Set proxy in curl | |
library(curl) | |
h <- new_handle(proxy = "socks5://localhost:9050") |
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: utf-8 | |
from __future__ import print_function | |
import numpy as np | |
from keras.models import Sequential | |
from keras.layers import Embedding | |
window_size = 1 | |
# using skipgram embeddings built using fasttext: | |
# fasttext skipgram -input dataset -output dataset.skipgram |
The fundamental unit in PyTorch is the Tensor. This post will serve as an overview for how we implement Tensors in PyTorch, such that the user can interact with it from the Python shell. In particular, we want to answer four main questions:
- How does PyTorch extend the Python interpreter to define a Tensor type that can be manipulated from Python code?
- How does PyTorch wrap the C libraries that actually define the Tensor's properties and methods?
- How does PyTorch cwrap work to generate code for Tensor methods?
- How does PyTorch's build system take all of these components to compile and generate a workable application?
PyTorch defines a new package torch
. In this post we will consider the ._C
module. This module is known as an "extension module" - a Python module written in C. Such modules allow us to define new built-in object types (e.g. the Tensor
) and to call C/C++ functions.
OlderNewer