Skip to content

Instantly share code, notes, and snippets.

View ttpro1995's full-sized avatar
💭
meowingful

Thai Thien ttpro1995

💭
meowingful
View GitHub Profile
https://we.tl/t-ydp5KkOhCm
@ttpro1995
ttpro1995 / calculate_padding.py
Created March 3, 2020 16:36
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
This file has been truncated, but you can view the full file.
{"train_id": "21223385", "original_doc": {"_id": "21223385", "_source": {"body": [{"content": "<strong>Video tổng hợp trận đấu:</strong>", "text": "Video tổng hợp trận đấu:", "type": "text"}, {"content": "Chelsea cần chiến thắng trước Stoke City ở Stamford Bridge để cân bằng kỷ lục 13 chiến thắng của Arsenal ở cuối mùa 2001/02. Cuối cùng, đoàn quân của HLV Conte đã hoàn thành nhiệm vụ này khi vượt qua đối thủ với tỷ số 4-2.", "text": "Chelsea cần chiến thắng trước Stoke City ở Stamford Bridge để cân bằng kỷ lục 13 chiến thắng của Arsenal ở cuối mùa 2001/02. Cuối cùng, đoàn quân của HLV Conte đã hoàn thành nhiệm vụ này khi vượt qua đối thủ với tỷ số 4-2.", "type": "text"}, {"content": "Ở trận đấu này, Stoke City đã cố gắng hết sức. Họ đã đặt Chelsea vào thế rượt đuổi tỷ số. Nhưng rồi, với đẳng cấp, The Blues đã vượt lên ở thời điểm quyết định.", "text": "Ở trận đấu này, Stoke City đã cố gắng hết sức. Họ đã đặt Chelsea vào thế rượt đuổi tỷ số. Nhưng rồi, với đẳng cấp, The Blues đã vượt lên ở thời điểm quyết địn
This file has been truncated, but you can view the full file.
{"train_id": "21223385", "original_doc": {"_id": "21223385", "_source": {"body": [{"content": "<strong>Video tổng hợp trận đấu:</strong>", "text": "Video tổng hợp trận đấu:", "type": "text"}, {"content": "Chelsea cần chiến thắng trước Stoke City ở Stamford Bridge để cân bằng kỷ lục 13 chiến thắng của Arsenal ở cuối mùa 2001/02. Cuối cùng, đoàn quân của HLV Conte đã hoàn thành nhiệm vụ này khi vượt qua đối thủ với tỷ số 4-2.", "text": "Chelsea cần chiến thắng trước Stoke City ở Stamford Bridge để cân bằng kỷ lục 13 chiến thắng của Arsenal ở cuối mùa 2001/02. Cuối cùng, đoàn quân của HLV Conte đã hoàn thành nhiệm vụ này khi vượt qua đối thủ với tỷ số 4-2.", "type": "text"}, {"content": "Ở trận đấu này, Stoke City đã cố gắng hết sức. Họ đã đặt Chelsea vào thế rượt đuổi tỷ số. Nhưng rồi, với đẳng cấp, The Blues đã vượt lên ở thời điểm quyết định.", "text": "Ở trận đấu này, Stoke City đã cố gắng hết sức. Họ đã đặt Chelsea vào thế rượt đuổi tỷ số. Nhưng rồi, với đẳng cấp, The Blues đã vượt lên ở thời điểm quyết địn
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
@ttpro1995
ttpro1995 / describe_category.py
Created April 4, 2021 03:06
describe_category with percentage
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)
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 / contracts...random_gen.sol
Created November 13, 2021 15:47
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=
// 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.
*/
@ttpro1995
ttpro1995 / contracts...random_gen.sol
Created November 13, 2021 16:24
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=
// 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 November 13, 2021 16:25
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=
// 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.
*/