Skip to content

Instantly share code, notes, and snippets.

View ssghost's full-sized avatar
🏠
Working from home

Stardustclub ssghost

🏠
Working from home
View GitHub Profile
# Description: comparison between FB Prophet and NeuralProphet
# Post: https://towardsdatascience.com/prophet-vs-neuralprophet-fc717ab7a9d8
# Author: Michael Berk
# Date created: 2022-12-08
import numpy as np
import pandas as pd
import plotly.express as px
import matplotlib.pyplot as plt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
## compiled with v0.1.0-beta.7 ##
DEPOSIT_CONTRACT_TREE_DEPTH: constant(uint256) = 32
TWO_TO_POWER_OF_TREE_DEPTH: constant(uint256) = 4294967296 # 2**32
SECONDS_PER_DAY: constant(uint256) = 86400
Deposit: event({previous_deposit_root: bytes32, data: bytes[2064], merkle_tree_index: bytes[8]})
ChainStart: event({deposit_root: bytes32, time: bytes[8]})
MIN_DEPOSIT_AMOUNT: uint256
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import QuantLib as ql
# Set the evaluation date
today = ql.Date(15, 1, 2023)
ql.Settings.instance().evaluationDate = today
# Define the option parameters
expiry = ql.Date(15, 7, 2023)
strike_price = 100
@ssghost
ssghost / omniparse_googlecolab.ipynb
Created July 4, 2024 12:46
OmniParse_GoogleColab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from itertools import combinations
from typing import List, Set
def brute_set_cover(universe: Set[int], setlist: List[Set[int]]) -> int, List[Set[int]]:
n = len(setlist)
res = []
for i in range(1, n+1):
for subset in combinations(setlist, i):
if set.union(*subset) == universe:
res.append(subset)
from typing import List, Dict
def sack_dp(items: List[Dict[str, int]], capacity: int) -> int, List[Dict[str,int]]:
n = len(items)
dp = [[0 for _ in range(capacity+1)] for _ in range(n+1)]
for i in range(1, n+1):
for w in range(1, capacity+1):
if items[i-1]['weight'] <= w:
dp[i][w] = max(items[i-1]['value']+dp[i-1][w+items[i-1]['weight']], dp[i-1][w])
@ssghost
ssghost / MD_BUTTONS_DOCS.md
Created May 18, 2024 04:07 — forked from cxmeel/MD_BUTTONS_DOCS.md
Documentation for markdown buttons.

Markdown Buttons

A collection of SVG buttons for displaying custom "buttons" in Markdown content. You are free to use these buttons wherever you like. All buttons were created in Figma, with (most) icons provided by the Iconify plugin.

Sponsor on GitHub View Itch.io Store

The SVG files can be found on this gist. They have been separated in order to reduce the amount of lag when loading this README file.

use std::fs::{File, remove_file};
use std::io::{Read, Write};
use orion::hazardous::{
aead::xchacha20poly1305::{seal, open, Nonce, SecretKey},
mac::poly1305::POLY1305_OUTSIZE,
stream::xchacha20::XCHACHA_NONCESIZE,
};
use orion::hazardous::stream::chacha20::CHACHA_KEYSIZE;