Skip to content

Instantly share code, notes, and snippets.

import torch
from torch.nn import functional as F
from torch import nn
class MultiHeadAttention(nn.Module):
def __init__(self, num_heads: int, context_size: int, embedding_dim: int) -> None:
super().__init__()
self.head_size = embedding_dim // num_heads
self.heads = nn.ModuleList([
@PirosB3
PirosB3 / privacy-policy.md
Created February 3, 2026 18:26
Spark of Genius - Privacy Policy

Spark of Genius - Privacy Policy

Last updated: February 2026

What data we collect

Voice recordings: When you use the microphone feature, audio is recorded locally on your device and sent to a third-party transcription service (Avalon Voice API) for speech-to-text conversion. Audio files are stored temporarily on-device and are not retained after transcription.

Idea text: The text you type or that is transcribed from voice is sent to OpenAI's API for AI processing. This includes your input text and any previous revisions of the same idea, so the AI can refine its output.

@PirosB3
PirosB3 / documentation.md
Last active August 7, 2020 23:23
0xDoc Documentation

0x Doc

Links

0x Doc was created to serve technically-savvy users such as market-makers, 0x API integrators, and RFQ providers that want to gain more insight from the on-chain magic that happens in 0x.

How does it work?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PirosB3
PirosB3 / commitment.sol
Created May 18, 2018 05:43
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Commitment {
enum CommitmentState { OPEN, CLOSED }
mapping (address => bool) attendeesRegistered;
mapping (address => bool) attendeesRefunded;
uint totalDeposited;
uint totalGuests;
@PirosB3
PirosB3 / commitment.sol
Created May 18, 2018 05:28
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Commitment {
enum CommitmentState { OPEN, CLOSED }
mapping (address => bool) attendeesRegistered;
mapping (address => bool) attendeesRefunded;
uint totalDeposited;
uint totalGuests;
@PirosB3
PirosB3 / ballot.sol
Created May 18, 2018 05:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
from typing import Tuple, NamedTuple, List, Optional, Dict
class SpendResult(NamedTuple):
is_successful: bool
remaining_balance: int
class Bank(object):
{
"txid": "8608b1ee194cdacbd3b2d1728b4883afe11a76d4a60b3d8d1f36317ccc12d583",
"hash": "8608b1ee194cdacbd3b2d1728b4883afe11a76d4a60b3d8d1f36317ccc12d583",
"size": 224,
"vsize": 224,
"version": 2,
"locktime": 1488155936,
"vin": [
{
"txid": "a7681326607bbb94026fca9f21563b2c1418c22b8e39638f7910e338915ead46",
@PirosB3
PirosB3 / gist:ab7815fe5db951715aba7b0983a9ada7
Created September 27, 2016 07:54
My first raw transaction
{
"txid": "c15083d9593abad0e0ee35afa12ae7463497d34de0bc9a51e86b16634b5e9779",
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "592928d43a21294fce7592edac21060aa47cc22d9c368c544cdcdb8ef178900c",
"vout": 0,
"scriptSig": {
"asm": "304402200e5ea2c9944770d5f823316565a7a1bd1131caeb203c827b47aa5d14596f80c502203e2fd2b99b39127d6f0cc5f30791048f890e2fe03cdc5d0c10e4b542b7ff8d0f01 036613cf1e844edde97f89468ce453bb609d3270a986ca9fbb6dd29d90773bf67e",