This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher64EntriesTwoChoices: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher64EntriesOneChoice: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher32EntriesTwoChoices: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher32EntriesOneChoice: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher16EntriesTwoChoices: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher16EntriesOneChoice: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a word-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher8EntriesTwoChoices: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a byte-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy | |
class BinHasher8EntriesOneChoice: | |
def __init__(self, size_exp: int) -> None: | |
# each bin is represented by a byte-size bitvector | |
self.size_exp: int = size_exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "atomik.hpp" | |
void increment_balance(const char* account_name, int32 amount) | |
{ | |
atomik::do_atomically( | |
[]() { | |
atomik::var<Account> account_var = atomik::get_var_by_key(account_name); | |
auto account = account_var.get(); | |
account.balance += amount; | |
account_var.set(account); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import sys | |
import numpy as np | |
import pandas as pd | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import warnings; warnings.filterwarnings(action='once') |
NewerOlder