on Algorithmic Trading
Python & Historical Tick Data
Dr. Yves J. Hilpisch | The Python Quants GmbH
Online, 24. October 2017
| import sys | |
| import os | |
| import pyperclip | |
| class GrammarCorrector: | |
| def __init__(self, api_key): | |
| self.api_key = api_key | |
| def correct_grammar(self, text): | |
| raise NotImplementedError("This method should be implemented by subclasses.") |
| import csv | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.service import Service | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.by import By | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| def read_fund_ids_from_csv(file_path): | |
| fund_ids = [] |
| #!/bin/bash | |
| # Ensure we're in the right directory | |
| if [ ! -d "./lib" ]; then | |
| echo "This script should be run from the root of your Flutter project!" | |
| exit 1 | |
| fi | |
| # Create core directories and files | |
| mkdir -p core/constants |
| # This script will fetch the notifier data from unstructured CSV data | |
| # and convert that into structured and store the same into MongoDB | |
| # This converted structured data is used to visualize in charts | |
| import pdb | |
| import os | |
| import csv | |
| import pandas as pd | |
| import numpy as np | |
| from datetime import datetime |
| import argparse | |
| import sys | |
| import tempfile | |
| from time import time | |
| import random | |
| from os import listdir | |
| from os.path import isfile, join | |
| import pandas |
| """ | |
| 1. Launch Kafka: | |
| - $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties | |
| - $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties | |
| run via faust -A <filename> worker -l info | |
| 2. Faust library: | |
| faust.App.agent: - main processing actor in Faust App | |
| """ |
| <?php | |
| /** | |
| * Encrypts a string using Rijndael with a 256-bit (32 character) salt. | |
| * | |
| * @param string $text The text to encrypt. | |
| * @param string $key The encryption key to use. | |
| * @param string $iv The optional initialization vector to use. | |
| * | |
| * @return string Base64 encoded encrypted text. | |
| */ |
| import twitter | |
| # initialize api instance | |
| twitter_api = twitter.Api(consumer_key='YOUR_CONSUMER_KEY', | |
| consumer_secret='YOUR_CONSUMER_SECRET', | |
| access_token_key='YOUR_ACCESS_TOKEN_KEY', | |
| access_token_secret='YOUR_ACCESS_TOKEN_SECRET') | |
| # test authentication | |
| print(twitter_api.VerifyCredentials()) |