Skip to content

Instantly share code, notes, and snippets.

View ZakyHermawan's full-sized avatar
🎯
Focusing

Zaky Hermawan ZakyHermawan

🎯
Focusing
View GitHub Profile
@ZakyHermawan
ZakyHermawan / finite_field_multiplication.vhd
Last active November 11, 2021 04:56
Operasi perkalian pada GF(128) dengan VHDL
-- mpand and mplier is multiplicand and multiplier
-- modulus is modulus
-- product is the remainder
-- clk is clock
-- ds for D selector
-- reset is to go back to first state
-- ready mean that the value is product is the remainder of operation (final value)
-- only take the value when ready is true
-- note: the modulus is not yet validated as primitive polynomial (todo)
@ZakyHermawan
ZakyHermawan / grain128a.cpp
Last active August 17, 2021 04:11
implementation of grain-128a
#include <iostream>
#include <bitset>
#include <vector>
#include <string>
using bits128 = std::bitset<128>;
using bits96 = std::bitset<96>;
using bits32 = std::bitset<32>;
using bits8 = std::bitset<8>;
using vBits8 = std::vector<bits8>;
@ZakyHermawan
ZakyHermawan / take_screenshot.py
Created June 10, 2021 21:08
take screenshot of chess board using pyautogui
def take_screenshot():
img = pyautogui.screenshot()
board_image = np.array(img)
board_image = board_image[:, :, ::-1].copy()
return board_image
@ZakyHermawan
ZakyHermawan / dota2_fight.cpp
Created May 25, 2019 09:20
OOP example with C++
#include <iostream>
#include <cstring>
#include <ctime>
using namespace std;
class Hero{
int maxAttack, maxBlock;
public:
string name;