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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Team Member Evaluation</title> | |
<style> | |
body { | |
padding: 10%; |
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
import yfinance as yf | |
import pandas as pd | |
from datetime import datetime, timedelta | |
# Define the ticker symbol | |
ticker_symbol = "TSLA" | |
# Calculate the date from 3 years ago | |
end_date = datetime.today().strftime('%Y-%m-%d') | |
start_date = (datetime.today() - timedelta(days=3*365)).strftime('%Y-%m-%d') |
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
import pandas as pd | |
# Load the data from the CSV file | |
data = pd.read_csv("TSLA_3_years_data.csv") | |
# Initialize variables | |
total_shares = 0 | |
cumulative_cost = 0.0 | |
total_profit = 0.0 | |
data['Yesterday_Close'] = data['Close'].shift(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
from binance.client import Client | |
def get_binance_exchange_info(): | |
client = Client() | |
info = client.get_exchange_info() | |
for c in info['symbols']: | |
if c['quoteAsset']=='USDT' and c['status']=="TRADING": | |
print(c['symbol']) | |
if __name__ == "__main__": |
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
<VirtualHost *:80> | |
# Name for your virtualhost | |
ServerName mailhog.myawesomedomain.com | |
# Proxy config | |
ProxyPreserveHost On | |
ProxyRequests Off | |
# Websocket proxy needs to be defined first | |
ProxyPass "/api/v2/websocket" ws://localhost:8025/api/v2/websocket |
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
import readline; print('\n'.join([str(readline.get_history_item(i + 1)) for i in range(readline.get_current_history_length())])) |
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 selenium import webdriver | |
chromdriver_path='/path/to/chromedriver' | |
PROXY = "socks5://localhost:9050" | |
options = webdriver.ChromeOptions() | |
options.add_argument('--proxy-server=%s' % PROXY) | |
driver = webdriver.Chrome(chrome_options=options, executable_path=chromdriver_path) | |
driver.get("http://check.torproject.org") |
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
#Zend_Db_Statement_Pdo::_execute | |
public function _execute(array $params = null) | |
{ | |
try { | |
if ($params !== null) { | |
return $this->_stmt->execute($params); | |
} else { | |
return $this->_stmt->execute(); | |
} |
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
if [ -z "$1" ]; then | |
echo "Usage: $0 http://your.domain.com/url" | |
exit 0 | |
fi | |
#get this from Account section in Cloudflare | |
TOKEN="YOUR_TOKEN_HERE" | |
EMAIL="YOUR_EMAIL_HERE" | |
DOMAIN="YOUR_DOMAIN_HERE" | |
curl https://www.cloudflare.com/api_json.html \ |
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
#!/bin/bash | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
# install homebrew-dupes (required to install zlib, php54's dependency) | |
brew tap homebrew/dupes | |
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
brew install nginx mysql |
NewerOlder