Skip to content

Instantly share code, notes, and snippets.

View mrchypark's full-sized avatar

ChanYub Park mrchypark

View GitHub Profile
@knoepfle
knoepfle / Google Insights.R
Created January 11, 2011 11:56
fetch a CSV file from a Google Insights search
#########################################
## 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"
@inceax
inceax / osmc-raspberrypi2.md
Last active November 14, 2020 05:19
raspberry pi 2에 osmc 빠른 세팅을 위한 개인 설정 기록

osmc 세팅

  • 빠른 세팅을 위한 개인 설정 기록
  • osmc rc3, raspberry pi 2 기준

한글화

스킨 한글화

  1. 폰트 설치
sudo apt-get install fonts-nanum
sudo cp /usr/share/fonts/truetype/nanum/NanumGothic.ttf /usr/share/kodi/addons/skin.osmc/fonts/
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 18, 2025 02:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@andreafalzetti
andreafalzetti / bot-script-example-hello.yml
Created December 14, 2016 22:42
Proof of concept for a YAML script for a Chat Bot
0:
messages:
- Hello!
- I'm a Bot!
next: 1
1:
messages:
- "What's your name?"
input:
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
@kkweon
kkweon / app.R
Created March 14, 2017 06:10
Top 포탈 키워드
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))
@leoluyi
leoluyi / tor.R
Created March 22, 2017 03:34
Using TOR in R
# 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")
@brandonrobertz
brandonrobertz / keras_fasttext_skipgram_embedding.py
Last active October 9, 2018 09:29
Keras Skipgram Embedding (using pretrained FastText vectors)
# 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

A Tour of PyTorch Internals (Part I)

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:

  1. How does PyTorch extend the Python interpreter to define a Tensor type that can be manipulated from Python code?
  2. How does PyTorch wrap the C libraries that actually define the Tensor's properties and methods?
  3. How does PyTorch cwrap work to generate code for Tensor methods?
  4. How does PyTorch's build system take all of these components to compile and generate a workable application?

Extending the Python Interpreter

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.