Skip to content

Instantly share code, notes, and snippets.

View jean-airoldie's full-sized avatar

jean-airoldie

View GitHub Profile
@jean-airoldie
jean-airoldie / ok.py
Last active July 11, 2018 02:45
fuck you
import requests
r = requests.get('https://api.bitfinex.com/v1/symbols_details')
json_bitfinex = r.json()
r = requests.get('https://api.coinmarketcap.com/v2/listings/')
json_coinmarketcap = r.json()
symbols = set()
for currency in json_bitfinex:
symbols.add(currency["pair"][0:3])
@jean-airoldie
jean-airoldie / foo_bar_generated.h
Created September 13, 2018 00:10
foo_bar.fbs generated cpp code
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_FOOBAR_FOO__BAR_H_
#define FLATBUFFERS_GENERATED_FOOBAR_FOO__BAR_H_
#include "flatbuffers/flatbuffers.h"
namespace Foo {
namespace Bar {
@jean-airoldie
jean-airoldie / foo_bar.fbs
Created September 13, 2018 00:11
foo_bar schema file
namespace Foo.Bar;
struct Foo {
bar:float;
}
namespace Foo_Bar;
struct Foo {
bar:float;
extern crate serde; // 1.0.80
use serde::{Deserialize, Deserializer, Serialize, Serializer};
// Used to deserialize a struct as a tuple.
extern crate serde; // 1.0.80
use serde::{Deserialize, Deserializer, Serialize, Serializer};
// Used to deserialize a struct as a tuple.
macro_rules! as_serde_tuple {
($(#[$smeta:meta])*
// automatically generated by the FlatBuffers compiler, do not modify
#![allow(dead_code)]
#![allow(unused_imports)]
extern crate flatbuffers;
// struct Message, aligned to 4
#[repr(C, align(4))]
#[derive(Clone, Copy, Debug, PartialEq)]
// automatically generated by the FlatBuffers compiler, do not modify
#![allow(dead_code)]
#![allow(unused_imports)]
extern crate flatbuffers;
pub mod endian {
#![allow(dead_code)]
#![allow(unused_imports)]