The computer driven markets for instruments like stocks and exchange traded stock options, have transformed finance and the flow of capital. These markets are enabled by order matching engines (and the infrastructure that supports this software). Before computer trading networks and matching engines, stocks where traded on cavernous exchange floors and transaction costs where high. When electronic trading fully matured, floor traders were a fading anachronism and transaction costs had been reduced to pennies a share in many cases. Electronic trading could not exist without advanced network infrastructure, but without the software matching engines no shares would change hands. The computer trading networks, the matching engine software has also created a concentrated nexus of potential failure. Failures in these systems have increased as the frequency and volume on the electronic networks has increased. The position of order matching engines in the trading infrastructure makes these systems o
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
// ==UserScript== | |
// @name trekGPT | |
// @namespace https://gist.github.com/dgnsrekt | |
// @version 0.6 | |
// @description Use chat GPT like the Star Trek TNG LCARS OS. Has TTS & STT. Plus common TNG sound effects. | |
// @author dgnsrekt | |
// @match https://chat.openai.com/chat | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com | |
// @grant none | |
// @license MIT |
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
let lastSentences = []; | |
let listening = false; | |
let voiceResponse = true; | |
const inChat = window.location.hostname === "chat.openai.com"; | |
const targetNode = document.getElementsByTagName("main")[0]; | |
const observer = new MutationObserver(onMutation); | |
const textArea = document.getElementsByTagName("textarea")[0]; | |
const synth = window.speechSynthesis; | |
const WAKE_WORD = "computer"; |
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
let lastSentences = []; | |
const targetNode = document.getElementsByTagName("main")[0]; | |
const observer = new MutationObserver(onMutation); | |
const textArea = document.getElementsByTagName('textarea')[0]; | |
let listening = false; | |
function readOutWords(words) { | |
const utterance = new SpeechSynthesisUtterance(words); | |
utterance.rate = 1; | |
utterance.pitch = 0.85; |
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
function readOutWords(words) { | |
var utterance = new SpeechSynthesisUtterance(words) | |
utterance.rate = 1; | |
utterance.pitch = 0.85; | |
window.speechSynthesis.speak(utterance); | |
} | |
let lastSentences = []; | |
function readSentence(string) { |
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 requests_html import HTMLSession | |
import pydantic | |
class WineModel(pydantic.BaseModel): | |
name: str | |
price: str | |
varietal: str | |
description: str |
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
""" | |
x Coverages = [100000, 150000, 200000, 250000, 300000, 350000] | |
y Factors = [0.971, 1.104, 1.314, 1.471, 1.579, 1.761] | |
Write a function that takes x2 (coverage selected by customer), a list of coverages (x) and a list of factors (y) and returns y2 (interpolated factor) | |
Performance is important. Build a solution for a list with 1000 elements. The Coverages list will always be sorted. | |
linear interpolation formula: | |
y2 = (x2 - x1) (y3 - y1) / (x3 - x1) + y1 |
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
ROMAN_DICTIONARY = { | |
"I": 1, | |
"II": 2, | |
"III": 3, | |
"V": 5, | |
"X": 10, | |
"L": 50, | |
"C": 100, | |
"D": 500, | |
"M": 1000, |
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 requests_html import HTMLSession | |
from pprint import pprint | |
from urllib.parse import urlparse | |
import re | |
import time | |
URL = "https://www.twitter.com/" | |
session = HTMLSession() |
NewerOlder