I hereby claim:
- I am aar3 on github.
- I am raa3 (https://keybase.io/raa3) on keybase.
- I have a public key ASCuIE6-nZyE8KDZZLRSZ6mJc3STl4lpvgTQf4egvYeA7go
To claim this, I am signing this object:
extern crate alloc; | |
use fuel_indexer_macros::indexer; | |
use fuel_indexer_plugin::prelude::*; | |
#[indexer(manifest = "tech_talk.manifest.yaml")] | |
pub mod tech_talk_index_mod { | |
fn tech_talk_handler(block_data: BlockData) { | |
Logger::info("Processing a block. (>'.')>"); |
When | |
[Case | |
(Deposit | |
(Role "escrow") | |
(Role "buyer") | |
(Token "" "") | |
(Constant 500) | |
) | |
(When | |
[Case |
I hereby claim:
To claim this, I am signing this object:
{ | |
"reason" : null, | |
"code" : 200, | |
"message" : "ok", | |
"data" : [ | |
{ | |
"id" : 1, | |
"type" : "messages", | |
"attributes" : { | |
"read_at" : null, |
from peewee_extensions import PeeweeExtensions | |
class BaseManager: | |
def __init__(self, name): | |
self.model_name = name | |
self.exts = PeeweeExtensions(self) | |
self.model = BaseManager.model_for(self.model_name) | |
self.relations = self.model._meta.relations | |
@staticmethod |
from peewee import ( | |
BaseModel, | |
ForeignKeyField, | |
TextField, | |
IntegerField, | |
DateTimeField, | |
CharField | |
) | |
from peewee_extensions import ( |
class Direct: | |
def __init__(self, native_key, foreign_key): | |
""" | |
Represents a direct relationship from one 'native' | |
model, to one 'foreign' model | |
""" | |
self.native_key = native_key | |
self.foreign_key = foreign_key | |
// app/core/model-builder.js | |
class ModelBuilder { | |
// still using a wrapper function over `defineAttribute`, that | |
// creates default options via instance chanining. this will | |
// reduce boiler plate in the model manager files | |
formAttribute(attr, options) { | |
return this.defineAttribute(attr, options) | |
.certifiable() |
Type | Timeit Iters | Tasks | Factor Range | Threads | Seconds | CPU Usage | |
---|---|---|---|---|---|---|---|
sequential | 1000 | 10 | 10e5 - 10e8 | 1 | 46 | 100% | |
concurrent | 1000 | 10 | 10e5 - 10e8 | 2 | 57 | 50% | |
sequential | 1000 | 20 | 10e10 - 10e12 | 1 | 816 | 100% | |
concurrent | 1000 | 20 | 10e10 - 10e12 | 2 | 391 | 7% |
import os | |
import sys | |
import random | |
from typing import * | |
N_TASKS = 20 | |
UPPER_BOUND = 10e12 | |
LOWER_BOUND = 10e10 | |
def sequential_factorization(): |