Skip to content

Instantly share code, notes, and snippets.

View ghiliweld's full-sized avatar
🔮

Ghilia Weldesselasie ghiliweld

🔮
View GitHub Profile
@spalladino
spalladino / Loans.sol
Created March 20, 2021 16:57
Strawman for flashloans for flashbots
pragma solidity ^0.7.0;
// Each mining pool that intends to provide flash loans deploys a Loaner contract and transfers ETH to it
// When testing each bundle, the diff in balance in this contract is taking into account for calculating effective gas price
// The contract loans funds only on blocks mined by the miner and on zero-gasprice txs
contract Loaner {
address immutable owner;
constructor(address _owner) {
owner = _owner;
@AxiomOfChoices
AxiomOfChoices / Overall notes.md
Last active December 29, 2019 07:04
Notes on SOTA Super-resolution

Things to try for neural networks:

General adversary network:

https://arxiv.org/pdf/1609.04802v5.pdf
Tensorflow: models

Idea:

Current models are good at maximising MSE(mean squared error) of the image, however, this metric leads to more smoothing out of the noise and thus leads to loss of detail. A new method of using the 'feature maps' of the VGG(Pretrained loss function CNN) Their GAN architecture works by getting a model to train try and estimate original image and another one trying to descriminate between the the estimate and the original. These two networks train together, the generator being scored on a combination of the VGG mentioned above and the ability of the descriminator to tell the difference.

Enhanced adversarial network:

@VictorSanh
VictorSanh / kd.py
Last active July 3, 2024 07:12
Knowledge Distilation
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.optim import Optimizer
KD_loss = nn.KLDivLoss(reduction='batchmean')
def kd_step(teacher: nn.Module,
student: nn.Module,
temperature: float,
@sundowndev
sundowndev / GoogleDorking.md
Last active July 20, 2024 04:54
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@halfelf
halfelf / how_to_build_a_fast_limit_order_book.md
Created February 11, 2019 02:18
How to Build a Fast Limit Order Book

https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-to-build-a-fast-limit-order-book/

The response to my first few posts has been much larger than I’d imagined and I’d like to thank everyone for the encouragement.

If you’re interested in building a trading system I recommend first reading my previous post on general ideas to keep in mind.

My first really technical post will be on how to build a limit order book, probably the single most important component of a trading system. Because the data structure chosen to represent the limit order book will be the primary source of market information for trading models, it is important to make it both absolutely correct and extremely fast.

To give some idea of the data volumes, the Nasdaq TotalView ITCH feed, which is every event in every instrument traded on the Nasdaq, can have data rates of 20+ gigabytes/day with spikes of 3 megabytes/second or more. The individual messages average about 20 bytes each so this means handling

Off-Chain Contracts

Inspiration from the Mimo eContracts.

Current Solution:

Currently, eContracts have their business logic within their store. This mimics custom logic within the store. Following SOLID design principles, it seems like this approach can be limiting, with the

Composition Inheritance over Composition

Therefore, code would not extend the store i.e. Inheritance. Code could be called I.E. Composed.

package tictactoegame.ui;
import javax.swing.*;
import java.awt.*;
public class SwingTicTacToe extends JFrame {
/**
* The font used for the buttons.
*/