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 the applet class with the main method | |
| // Accompanying files are class files: | |
| // - Manager.pde: do some initial setup | |
| // - Player.pde: Player object class | |
| // - Dart.pde: Dart object class | |
| // - Game assets (images, sound) are contained in the data/ folder | |
| boolean collision; | |
| int state, tmpOrientation, nextDart; | |
| int dartWidth, dartHeight, playerWidth, playerHeight, dartSpeed; |
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
| // glyphicon component that emits change event | |
| import { Component, Input, Output, EventEmitter } from '@angular/core'; | |
| @Component({ | |
| selector: 'favorite', | |
| template: ` | |
| <i [class]="isFavorite ? 'glyphicon glyphicon-star' : 'glyphicon glyphicon-star-empty'" (click)="onClick()"></i> | |
| ` | |
| }) |
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
| Node Version Manager | |
| https://github.com/nvm-sh/nvm | |
| Nodemailer | |
| npmjs: https://www.npmjs.com/package/nodemailer | |
| site: https://nodemailer.com/about/ | |
| AWS SDK | |
| Homepage: https://aws.amazon.com/sdk-for-node-js/ | |
| Docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html |
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
| var crypto = require("crypto"); | |
| var hashedPassword = Buffer.from( | |
| "AQAAAAEAACcQAAAAEPSiQdZVf3bivGCbaXPnuhozdt8k4cCphxfuc25NBGIioJV9deDyFK9awIow1HfR2A==", | |
| "base64", | |
| ); | |
| var password = Buffer.from("Admin888`"); | |
| const getPBKDF2Algorithm = prf => { | |
| switch (prf) { |
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 | |
| from bs4 import BeautifulSoup | |
| import time | |
| CNN_URL="https://money.cnn.com/data/markets/russell?page=" | |
| def scrape_russell_2000(): | |
| page_exists = True | |
| page_num = 1 |
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 re | |
| import sqlite3 | |
| import russell_scraper | |
| conn = sqlite3.connect('quotes.sqlite') | |
| cur = conn.cursor() | |
| def create_table(headers): | |
| sql = '''CREATE TABLE "Russell2000" ( |
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 sqlite3 | |
| import pandas as pd | |
| import termtables as tt | |
| import estimates | |
| conn = sqlite3.connect('quotes.sqlite') | |
| # Helper functions | |
| def dict_factory(cursor, row): |
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 requests | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| API_KEY = os.getenv('FINNHUB_KEY') | |
| API_V1 = os.getenv('FINNHUB_API_V1') | |
| def get_stock_estimates(ticker, exchange='US'): |
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
| ┌────────┬─────────────────────────┬───────┬───────────┬─────┬──────┬──────┬─────────────┬─────────────┬────────────┬─────────────────────┐ | |
| │ Symbol │ Company │ Price │ YTDchange │ Buy │ Hold │ Sell │ Target High │ Target Mean │ Target Low │ Last Updated │ | |
| ╞════════╪═════════════════════════╪═══════╪═══════════╪═════╪══════╪══════╪═════════════╪═════════════╪════════════╪═════════════════════╡ | |
| │ AHT │ ASHFORD HOSPITALITY │ 1.53 │ -94.52 │ 7 │ 3 │ 1 │ 2 │ 1.51 │ 0.75 │ 2020-07-21 00:00:00 │ | |
| ├────────┼─────────────────────────┼───────┼───────────┼─────┼──────┼──────┼─────────────┼─────────────┼────────────┼─────────────────────┤ | |
| │ PEI │ PENNSYLVANIA REAL ESTAT │ 0.53 │ -90.1 │ 0 │ 8 │ 6 │ 1 │ 0.9 │ 0.7 │ 2020-09-21 00:00:00 │ | |
| ├────────┼─────────────────────────┼───────┼───────────┼─────┼──────┼──────┼─────────────┼─────────────┼────────────┼─────────────────────┤ | |
| │ CPE │ CALLON PETROLEUM CO │ 4.89 │ |
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
| conn = sqlite3.connect('quotes.sqlite') | |
| # Helper functions | |
| def dict_factory(cursor, row): | |
| """Create a custom factory for generating dictionaries from table rows""" | |
| d = {} | |
| for idx, col in enumerate(cursor.description): | |
| d[col[0]] = row[idx] | |
| return d |
OlderNewer