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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "AWS CloudFormation Sample Template vpc_multiple_subnets.template: Sample template showing how to create a VPC with multiple subnets. The first subnet is public and contains the load balancer, the second subnet is private and contains an EC2 instance behind the load balancer. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters": { | |
"NetCIDR": { | |
"Description": "VPC Subnet, like 10.0.0.0/16", | |
"Type": "String", | |
"Default": "10.0.0.0/16" | |
}, | |
"PublicSubnetCIDR": { |
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
from dateutil import rrule | |
import datetime | |
# Generate ruleset for holiday observances on the NYSE | |
def NYSE_holidays(a=datetime.date.today(), b=datetime.date.today()+datetime.timedelta(days=365)): | |
rs = rrule.rruleset() | |
# Include all potential holiday observances | |
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth=12, bymonthday=31, byweekday=rrule.FR)) # New Years Day |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Template: This template installs a single-instance with dev environment for elastic beanstalk as well as Jenkins server. This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"EC2Tag" : { | |
"Description" : "EC2 tag name", | |
"Type" : "String" | |
}, |
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
from setuptools import setup | |
setup( | |
name='flask_yahoo_finance', | |
version='0.1', | |
long_description=__doc__, | |
packages=['flask_yahoo_finance'], | |
include_package_data=True, | |
zip_safe=False, | |
install_requires=['yahoo-finance'] |
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
$ pip install yahoo-finance |
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
. | |
├── LICENSE | |
├── README.md | |
├── flask_yahoo_finance | |
│ └── __init__.py | |
├── setup.py | |
└── tests | |
└── __init__.py |
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
foo, bar, masayang, steve, nakamura, ryoma, corbert | |
bar, foo, chibi, loki, ichikawa | |
masayang, foo, steve, loki, corbert, ichikawa, moraimon, sada, matsuno | |
steve, bar, nakamura, micky, samuel, chibi, ryoma, moses, anko, moraimon | |
nakamura, foo, bar, masayang, steve, wendy, ryoma, ichikawa, moraimon, matsuno | |
micky, steve, loki, corbert, ichikawa, regan, moraimon, sada | |
samuel, bar, chester, loki, regan | |
wendy, foo, bar, samuel, chibi, ryoma, loki, moses, matsuno | |
chester, foo, samuel, loki, regan, sada | |
chibi, masayang, steve, anko |
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
W, A, B, C | |
X, A, B, C, D, Z | |
Y, A, B, E | |
Z, A, B, D, E |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from mrjob.job import MRJob | |
class MRWordCounter(MRJob): | |
def mapper(self, key, line): | |
for word in line.split(): | |
yield word, 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
# 設置手順 | |
source virtualenvwrapper.sh | |
mkvirtualenv mrjob | |
pip install mrjob | |
# MrJob環境の開放 | |
deactivate | |
#MrJob環境への切り替え | |
workon mrjob |
NewerOlder