- 데이터 출처: https://gist.github.com/cornchz/eb495322b97bd69362a2#file-lotteria-csv
- 주의사항
- 같은 위경도를 가지는 두 점이 있으면 voronoi가 깨짐
- 그래서
screen.py
로 중복되는 점들 filtering함
- 그래서
- 같은 위경도를 가지는 두 점이 있으면 voronoi가 깨짐
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
## Load library: | |
library("exams") | |
## exam questions: | |
myexamlist<-list("pnorm1","sesamplesize1multiplechoice") | |
## output directory | |
## create new test dir if one does not exist: | |
files.list<-system("ls",intern=TRUE) |
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
#' The single-file, 'source'-able version of https://github.com/hrbrmstr/zellingenach | |
#' More info here: http://bit.ly/zellingenach | |
#' By @hrbrmstr (2016) | |
#' MIT LICENSE | |
# NOTE THAT YOU NEED INTERNET ACCESS TO RUN THIS SCRIPT | |
# it pulls the three necessary files (only once) from my web site | |
library(V8) | |
library(dplyr) |
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
#Load library mass and set seed | |
library(MASS) | |
set.seed(100) | |
# We are going to use 3 random variables | |
m <- 3 | |
# Number of samples to be drawn | |
n <- 2000 |
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 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
belief | y2015 | y2014 | |
---|---|---|---|
Improves the security posture of my organization | 0.75 | 0.71 | |
Improves the security posture of the nations critical infrastructure | 0.63 | 0.64 | |
Reduces the cost of detecting and preventing cyber attacks | 0.22 | 0.21 | |
Improves situational awareness | 0.60 | 0.54 | |
Fosters collaboration among peers and industry groups | 0.48 | 0.51 | |
Enhances the timeliness of threat data | 0.11 | 0.16 | |
Makes threat data more actionable | 0.21 | 0.24 |
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 | |
# http://blog.yhathq.com/static/misc/data/WineKMC.xlsx | |
df_offers = pd.read_excel("./WineKMC.xlsx", sheetname=0) | |
df_offers.columns = ["offer_id", "campaign", "varietal", "min_qty", "discount", "origin", "past_peak"] | |
df_offers.head() | |
df_transactions = pd.read_excel("./WineKMC.xlsx", sheetname=1) | |
df_transactions.columns = ["customer_name", "offer_id"] | |
df_transactions['n'] = 1 | |
df_transactions.head() |
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
require "rubygems" | |
require "bundler" | |
require_relative "lib/importer" | |
Bundler.setup | |
desc "Import from Trello board" | |
task :import do | |
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"] | |
end |
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
# Drawing a scatter plot of raster images | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("png", "sna") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Go to https://www.gosquared.com/resources/2400-flags, download the ZIP, | |
# and put the 64 x 64 files into a directory of your choosing. | |
# Then setwd() to that directory: | |
setwd("C:/Dropbox/isDotR_Files/flagIcons") |
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(rgdal) | |
library(rgeos) | |
library(ggplot2) | |
library(readr) | |
library(tidyr) | |
library(dplyr) | |
library(grid) | |
us <- readOGR("us_states_hexgrid.geojson", "OGRGeoJSON") |