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
test_string = " test string for TUTORIAL " | |
test_string_2 = "this is second string" | |
test_string_3 = "this-is-test-sting-for-splitting" | |
# How to change all words to uppercase | |
print(test_string.upper()) | |
# How to change all words to lowercase | |
print(test_string.lower()) | |
# How to make first letter capital |
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
from bs4 import BeautifulSoup | |
test_html = ''' | |
<div class="col-md-4 menuFootNote"> | |
<div class="content"> | |
<a href="https://www.example.com/option-chain"> | |
<figure> | |
<img src="https://static.example.com/s3fs-public/2019-07/option-chain_0.png" alt="Option Chain"> | |
</figure> | |
<h4>Option Chain</h4> |
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
from bs4 import BeautifulSoup | |
test_html = ''' | |
<div class="col-md-4 menuFootNote"> | |
<div class="content"> | |
<a href="https://www.example.com/option-chain"> | |
<figure> | |
<img src="https://static.example.com/s3fs-public/2019-07/option-chain_0.png" alt="Option Chain"> | |
</figure> | |
<h4>Option Chain</h4> | |
<p>View Option chain for the exchange</p> |
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
from bs4 import BeautifulSoup | |
test_html = ''' | |
<div class="col-md-4 menuFootNote"> | |
<div class="content"> | |
<a href="https://www.example.com/option-chain"> | |
<figure> | |
<img src="https://static.example.com/s3fs-public/2019-07/option-chain_0.png" alt="Option Chain"> | |
</figure> | |
<h4>Option Chain</h4> |
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
from bs4 import BeautifulSoup | |
test_html = ''' | |
<div class="col-md-4 menuFootNote"> | |
<div class="content"> | |
<a href="https://www.example.com/option-chain"> | |
<figure> | |
<img src="https://static.example.com/s3fs-public/2019-07/option-chain_0.png" alt="Option Chain"> | |
</figure> | |
<h4>Option Chain</h4> |
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
# install libraries | |
import tensorflow as tf | |
import numpy as np | |
print(tf.__version__) | |
#Generate sample data | |
X = tf.constant(value = np.linspace(0,2,1000), dtype = tf.float32) | |
Y = 5* X + 30 | |
# create variables for weight and bias |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>{{ title }}</title> | |
<link | |
href="https://cdnjs.cloudflare.com/ajax/libs/bokeh/1.2.0/bokeh.min.css" | |
rel="stylesheet" type="text/css"> |
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 numpy as np | |
from flask import Flask, request, render_template, abort, Response | |
from bokeh.plotting import figure | |
from bokeh.embed import components | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
x = np.arange(2, 50, step=.5) |
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 psycopg2 | |
def load_data_into_table(query): | |
dbname = "test_db" | |
username = "test_user" | |
pwd = "test_pwd" | |
conn = psycopg2.connect(user=username, password=pwd, host="localhost", | |
port="5432", database=dbname) | |
curr = conn.cursor() | |
curr.execute(query) |
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 psycopg2 | |
def create_test_tables(table): | |
dbname = "test_db" | |
username = "test_user" | |
pwd = "test_pwd" | |
conn = psycopg2.connect(user=username, password=pwd, host="localhost", | |
port="5432", database=dbname) | |
curr = conn.cursor() | |
create_table = f""" CREATE TABLE IF NOT EXISTS {table} |
NewerOlder