Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
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
# Python OAuth example | |
import evernote.edam.userstore.constants as UserStoreConstants | |
import evernote.edam.type.ttypes as Types | |
from evernote.api.client import EvernoteClient | |
## | |
# Helper function to turn query string parameters into a | |
# Python dictionary | |
## |
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
def splitDataFrameList(df,target_column,separator): | |
''' df = dataframe to split, | |
target_column = the column containing the values to split | |
separator = the symbol used to perform the split | |
returns: a dataframe with each entry for the target column separated, with each element moved into a new row. | |
The values in the other columns are duplicated across the newly divided rows. | |
''' | |
def splitListToRows(row,row_accumulator,target_column,separator): | |
split_row = row[target_column].split(separator) |
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 math | |
import numpy | |
import random | |
import decimal | |
import scipy.linalg | |
import numpy.random as nrand | |
import matplotlib.pyplot as plt | |
""" | |
Note that this Gist uses the Model Parameters class found here - https://gist.github.com/StuartGordonReid/f01f479c783dd40cc21e |
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 sklearn.qda import QDA | |
#from sklearn.ensemble import RandomForestRegressor | |
from sklearn import preprocessing | |
import numpy as np | |
import pandas as pd | |
def initialize(context): | |
context.assets = sid(8554) # Trade SPY | |
context.model = QDA() | |
context.lookback = 5 # Look back |
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
"It's a reworked version of Problem 14 that you find here: http://interactivepython.org/runestone/static/pythonds/Recursion/pythondsProgrammingExercises.html" | |
dizio_1 = { (2,2): 1, (3,4): 2, (4,6): 3, (5,7): 4, (9,10): 5, (9,11): 6, (13,15): 7, (16,19): 8, \ | |
(25,37): 9, (35,45):10 } | |
def createTab ( _Dict ): #create the graphic tab | |
dizio = _Dict | |
print('','Item', 'Weight', 'Value','\n', sep=" " ) | |
for key in dizio: | |
spazio = " " |
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
/***************************************************************************** | |
* QuantCup 1: Price-Time Matching Engine | |
* | |
* Submitted by: voyager | |
* | |
* Design Overview: | |
* In this implementation, the limit order book is represented using | |
* a flat linear array (pricePoints), indexed by the numeric price value. | |
* Each entry in this array corresponds to a specific price point and holds | |
* an instance of struct pricePoint. This data structure maintains a list |
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 fastapi import FastAPI | |
from pydantic import BaseModel | |
import torchvision | |
from torchvision import transforms | |
import torch | |
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor | |
from PIL import Image | |
import numpy as np | |
import cv2 | |
import io, json |
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
{ | |
"workbench.colorTheme": "One Dark Pro Darker", | |
"workbench.editorAssociations": { | |
"*.ipynb": "jupyter-notebook", | |
"*.pyc": "default" | |
}, | |
"terminal.integrated.sendKeybindingsToShell": true, | |
"notebook.cellToolbarLocation": { | |
"default": "right", | |
"jupyter-notebook": "left" |
Prompt for AI Bot:
You are a data retrieval AI, equipped with the knowledge of Bloomberg Query Language (BQL). Your function is to parse natural language requests related to financial data and return the appropriate BQL formulas to retrieve that data. You have access to a comprehensive database of BQL function examples which you can search through to find the most relevant formula based on the user's request.
When you receive a request, you should:
- Identify the key elements of the request:
- The financial instrument (e.g., "AAPL US Equity")
- The data type needed (e.g., daily prices)
- The time frame (e.g., last year)
OlderNewer