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
/** | |
* Write a description of class Permutations here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class Permutations | |
{ | |
// instance variables - replace the example below with your own |
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
--- | |
title: "cind110_Assignment_02" | |
author: "Write your name here" | |
due: "March 13, 2020" | |
output: | |
html_document: | |
df_print: paged | |
pdf_document: default | |
word_document: default | |
--- |
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
CREATE DATABASE IF NOT EXISTS `LibraryDB` /*!40100 DEFAULT CHARACTER SET latin1 */; | |
USE `LibraryDB`; | |
-- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64) | |
-- | |
-- Host: localhost Database: LibraryDB | |
-- ------------------------------------------------------ | |
-- Server version 5.7.17 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
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
CREATE DATABASE IF NOT EXISTS `LibraryDB` /*!40100 DEFAULT CHARACTER SET latin1 */; | |
USE `LibraryDB`; | |
-- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64) | |
-- | |
-- Host: localhost Database: LibraryDB | |
-- ------------------------------------------------------ | |
-- Server version 5.7.17 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
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
!J INC:0001438823: | |
#1 A LIFESAFER HOLDINGS, INC.:0001509607: | |
#1 ARIZONA DISCOUNT PROPERTIES LLC:0001457512: | |
#1 PAINTBALL CORP:0001433777: | |
$ LLC:0001427189: | |
ZZX, LLC:0001691924: | |
ZZYZX ZZAZX ZZOZX INC:0001184274: | |
ZZZ MEDIA HOLDINGS, INC.:0001755250: |
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
// this is a sync-demo | |
fs = require('fs') | |
data = fs.readdirSync('c:/') | |
console.log(data) | |
console.log('this is the data') | |
// this is a async-demo | |
fs = require('fs') |
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 request | |
import numpy as np | |
import time | |
import json | |
todaysdate = time.strftime("%Y-%m-%d-%H-%M") | |
lat_list = list(np.arange(43.639613, 43.726960, 0.01)) | |
lng_list = list(np.arange(-79.343137, -79.458181, -0.01)) | |
data = dict() | |
for lat in lat_list: |
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 requests as r | |
import config | |
def find_bikes(lat,lng): | |
result = dict() | |
endpoint = "https://dropbikeadminapi.herokuapp.com/v1/bikes_nearby" | |
data = {"lat":lat,"lng":lng} | |
headers = {"Authorization":config.drop_bike_token,'Content-Type':'application/json','User-Agent':'dropbike/1.9.5 (iPhone; iOS 11.2; Scale/2.00)','Accept-Encoding': 'br, gzip, deflate','X-Dropbike-Platform':'iOS','X-Dropbike-Version':'1.9.5'} | |
# if SSLError: ("bad handshake: Error([('SSL routines', 'SSL23_GET_SERVER_HELLO', 'sslv3 alert handshake failure')],)",) occurs | |
# uncomment the following line |
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 | |
# import json | |
import aiofiles | |
import config | |
async def store_json_2(symbol): | |
print(f'============downloading {symbol} json data ============') | |
payload = { | |
'function': 'TIME_SERIES_DAILY_ADJUSTED', |
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 | |
import json | |
# import aiofiles | |
import config | |
# ============== async function 1 =============== | |
async def store_json_1(symbol): | |
print(f'============downloading {symbol} json data ============') | |
payload = { |
NewerOlder