Skip to content

Instantly share code, notes, and snippets.

View dexXxed's full-sized avatar
🐍
Nice to see you here

dexXxed

🐍
Nice to see you here
View GitHub Profile
@dexXxed
dexXxed / twine.cpp
Last active June 18, 2020 18:54
TWINE Cipher implementation, written on C++
#include <vector>
#include <iostream>
#include <cstring>
// Sbox шифра TWINE
int sbox[] = {0x0C, 0x00, 0x0F, 0x0A, 0x02, 0x0B, 0x09, 0x05, 0x08, 0x03, 0x0D, 0x07, 0x01, 0x0E, 0x06, 0x04};
int shuf[] = {5, 0, 1, 4, 7, 12, 3, 8, 13, 6, 9, 2, 15, 10, 11, 14};
int shufinv[] = {1, 2, 11, 6, 3, 0, 9, 4, 7, 10, 13, 14, 5, 8, 15, 12};
@dexXxed
dexXxed / katan.c
Created June 18, 2020 19:22 — forked from raullenchai/katan.c
The KATAN/KTANTAN Family of Block Ciphers
#include <stdio.h>
/*
Reference BITSLICED implementations of:
KATAN32, KATAN48, KATAN64, KTANTAN32, KTANTAN48 and KTANTAN64.
Each of the 64 slices corresponds to a distinct instance.
To work with a single instance, use values in {0,1}
(ie, only consider the least significant slice).
@dexXxed
dexXxed / solar.ipynb
Last active October 17, 2020 19:00
Solar.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dexXxed
dexXxed / setup.py
Created July 12, 2021 07:55
APEX FIXED
import torch
from torch.utils import cpp_extension
from setuptools import setup, find_packages
import subprocess
import sys
import warnings
import os
# ninja build does not work unless include_dirs are abs path
// File: @openzeppelin\contracts\utils\introspection\IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
@dexXxed
dexXxed / contracts...Ukraine_ERC1155.sol
Created April 1, 2022 12:57
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=false&runs=200&gist=
// File: @openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
@dexXxed
dexXxed / NFT_Initial_Ukraine_Seller_flat.sol
Created April 1, 2022 12:57
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=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
@dexXxed
dexXxed / contracts...collection_test.sol
Last active April 7, 2022 09: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Name_Test_Collection is ERC721A, Ownable { // to adjust
uint256 MAX_MINTS = 10;
uint256 MAX_SUPPLY = 3001;
@dexXxed
dexXxed / contracts...Ukraine_ERC1155.sol
Created April 12, 2022 08:49
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=false&runs=200&gist=
// File: @openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
@dexXxed
dexXxed / NFT_Initial_Ukraine_Seller_flat.sol
Created April 12, 2022 09:20
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=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the