- You will first have to download the gist to a file and then upload it to S3 in a bucket of your choice.
- Using the AWS EMR Console create a cluster and choose advanced options.
- In Step 1 make sure you check the Spark x.x.x checkbox if you want to make use of the sparklyr library in RStudio. You can customize the Spark version by choosing a different emr Release version.
- In Step 3 you can configure your bootstraps. Choose to Configure and add a Custom action
- For the Name you can fill something like Install RStudio Server
- For the Script location you will need to point to where you have uploaded the gist (Eg.
s3://my-bucket/emr/bootstrap/install-rstudio-server.sh)
- You will first have to download the gist to a file and then upload it to S3 in a bucket of your choice.
- Using the AWS EMR Console create a cluster and choose advanced options.
- In Step 1 make sure you check the Spark x.x.x checkbox if you want to make use of the sparklyr library in RStudio. You can customize the Spark version by choosing a different emr Release version.
- In Step 3 you can configure your bootstraps. Choose to Configure and add a Custom action
- For the Name you can fill something like Install RStudio Server
- For the Script location you will need to point to where you have uploaded the gist (Eg.
s3://my-bucket/emr/bootstrap/install-rstudio-server.sh)
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 pandas as pd | |
| import numpy as np | |
| import re | |
| # ================================================ | |
| class option_parser: | |
| def __init__(self, symbol, response): | |
| self.symbol = symbol | |
| self.response = response | |
| # ------------------------------------------------ |
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 pandas as pd | |
| import numpy as np | |
| import re | |
| # ================================================ | |
| class option_parser: | |
| def __init__(self, symbol, response): | |
| self.symbol = symbol | |
| self.response = response | |
| # ------------------------------------------------ |
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 asyncio | |
| import aiohttp | |
| # ================================================ | |
| # for first run only | |
| class first_async_scraper: | |
| def __init__(self): | |
| pass | |
| async def _fetch(self, symbol, url, session, headers): |
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 os | |
| import sys | |
| import pandas as pd | |
| import pandas_datareader.data as web | |
| import numpy as np | |
| import time | |
| import asyncio | |
| from fake_useragent import UserAgent | |
| '''set path variables''' | |
| project_dir = "YOUR/PROJECT/DIR" |
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
| ''' | |
| Netfonds import 5 days of intraday data | |
| ''' | |
| import numpy as np | |
| import pandas as p | |
| from pandas.tseries.offsets import * | |
| import datetime as dt | |
| import matplotlib.pyplot as plt | |
| size = (14,10) |
#Example syntax for Secure Copy (scp)
##What is Secure Copy?
scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.
###Examples
Copy the file "foobar.txt" from a remote host to the local host
Please make sure you are using the latest version of R (current version is 3.4.1) - the final digit is the minor version number. The essential numbers are the first two. You can check the version of R you are running via
R.version.string
Please install the latest version of RStudio (https://www.rstudio.com/products/rstudio/download/).
OlderNewer