Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
meowingful

Thai Thien ttpro1995

💭
meowingful
View GitHub Profile
@ttpro1995
ttpro1995 / contracts...random_gen.sol
Created Nov 13, 2021
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.8.10+commit.fc410830.js&optimize=true&runs=200&gist=
View contracts...random_gen.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
/**
* THIS IS AN EXAMPLE CONTRACT WHICH USES HARDCODED VALUES FOR CLARITY.
* PLEASE DO NOT USE THIS CODE IN PRODUCTION.
*/
@ttpro1995
ttpro1995 / contracts...random_gen.sol
Created Nov 13, 2021
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.8.10+commit.fc410830.js&optimize=true&runs=200&gist=
View contracts...random_gen.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
/**
* THIS IS AN EXAMPLE CONTRACT WHICH USES HARDCODED VALUES FOR CLARITY.
* PLEASE DO NOT USE THIS CODE IN PRODUCTION.
*/
@ttpro1995
ttpro1995 / contracts...random_gen.sol
Created Nov 13, 2021
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.8.7+commit.e28d00a7.js&optimize=true&runs=200&gist=
View contracts...random_gen.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";
/**
* THIS IS AN EXAMPLE CONTRACT WHICH USES HARDCODED VALUES FOR CLARITY.
* PLEASE DO NOT USE THIS CODE IN PRODUCTION.
*/
View gist:baa39126c6f89d300702039f0134db72
5e books:
5e<dot>tools/books.html
Big archives:
the-eye<dot>eu/public/Books/rpg.rem.uz/
rebrand<dot>ly/ShareThread
Other bits and pieces:
General TTRG Trove:
mediafire<dot>com/folder/hu1a1vr7jsze0//Tabletop%20RPGs
@ttpro1995
ttpro1995 / describe_category.py
Created Apr 4, 2021
describe_category with percentage
View describe_category.py
def describe_category(dataframe, column_name):
"""
plot describe category with percentage
"""
value_count = dataframe[column_name].value_counts().sort_index()
df_value_count = pd.DataFrame({column_name: value_count.index, "count": value_count.values})
sum_class = df_value_count["count"].sum()
df_value_count["percentage"] = df_value_count["count"]/sum_class*100
display(df_value_count)
View gist:b8d7058c44e9482bb7e179d83f1b0c4f
Roma Aeronautica (Steam Empire Chronicles #0.5)
Set in the world of Daniel Ottalini's Steam Empire Chronicles, Roma Aeronautica follows Rufius Tiberius Alexandros as he takes his first steps in becoming a master airship captain. Readers familiar with the Steam Empire Chronicles will love the additional background and new revelations about Alexandros, while those new to the series will discover a fascinating world of Roman Steampunk. Can Alexandros surpass the obstacles facing him, and prove to be the hero his family and friends believe him to be?
Brass Legionnaire (Steam Empire Chronicles #1)
Welcome to a world where Rome never fell. Now the leader in a worldwide industrial revolution, Rome's might has allowed it to prosper for centuries, while the steam powered warmachines of the Imperial legions keep hostile neighbors at bay. Seeking to escape the endless toil of the factory, a young man joins the army. His commander works to prove himself, away from the power and corrupting influence of his rich and might
View calculate_padding.py
def calculate_padding(kernel_size, dilation):
"""
https://discuss.pytorch.org/t/how-to-keep-the-shape-of-input-and-output-same-when-dilation-conv/14338
o = output
p = padding
k = kernel_size
s = stride
d = dilation