Skip to content

Instantly share code, notes, and snippets.

Daniel Pyrathon PirosB3

View GitHub Profile
View Interview (1).ipynb
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
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=
View commitment.sol
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
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=
View commitment.sol
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
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=
View ballot.sol
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
View pycharm_typing_tutorial.py
from typing import Tuple, NamedTuple, List, Optional, Dict
class SpendResult(NamedTuple):
is_successful: bool
remaining_balance: int
class Bank(object):
View gist:004745633f31d19c608c94be57315c10
{
"txid": "8608b1ee194cdacbd3b2d1728b4883afe11a76d4a60b3d8d1f36317ccc12d583",
"hash": "8608b1ee194cdacbd3b2d1728b4883afe11a76d4a60b3d8d1f36317ccc12d583",
"size": 224,
"vsize": 224,
"version": 2,
"locktime": 1488155936,
"vin": [
{
"txid": "a7681326607bbb94026fca9f21563b2c1418c22b8e39638f7910e338915ead46",
View gist:ab7815fe5db951715aba7b0983a9ada7
{
"txid": "c15083d9593abad0e0ee35afa12ae7463497d34de0bc9a51e86b16634b5e9779",
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "592928d43a21294fce7592edac21060aa47cc22d9c368c544cdcdb8ef178900c",
"vout": 0,
"scriptSig": {
"asm": "304402200e5ea2c9944770d5f823316565a7a1bd1131caeb203c827b47aa5d14596f80c502203e2fd2b99b39127d6f0cc5f30791048f890e2fe03cdc5d0c10e4b542b7ff8d0f01 036613cf1e844edde97f89468ce453bb609d3270a986ca9fbb6dd29d90773bf67e",
View hexagon.md

Hexagon: building a graph database on top of a key-value store

I've always been interested in how information is stored and retrieved. Inspired by a project of a friend (Levelgraph), I decided to research more about Hexastores and how they can be adapted to modern NoSQL databases such as LevelDB and Cassandra. Out of this fascination and curiosity I created Hexagon: a simple Python implementation of Hexastores backed by LevelDB.

In this talk I plan on giving a very simple and hands-on introduction to the subject, followed by a demonstration of how Python really allowed me to focus on the implementation thanks to its extremely intuitive syntax and features. I will show how generators, collections, and Test Driven Development allowed me to iterate fast and not get lost in (too many) bugs along the way.

The talk will start with an overview of what Hexagon is and the reason why I built it. The second step will consist in the explanation of the two main concepts behind Hexagon itself, namely LevelDB and the

View gist:d808741c9cf47864bba0
my_request = flask.make_response('asd', 200, {'Authorization': 'bearer xxxxxxx'})
View monotone.go
package main
import (
cryptorand "crypto/rand"
"math/rand"
"errors"
"sync"
"fmt"
"time"
)
You can’t perform that action at this time.