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 python | |
# -*- coding: utf-8; py-indent-offset:4 -*- | |
############################################################################### | |
# | |
# Copyright (C) 2021 Emmanuel Katchy | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @author Tobe:) | |
* @title BasicStorage | |
* @dev Store & retrieve unsigned integer | |
*/ | |
contract HelloWorld { |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Ballot | |
* @dev Implements voting process along with vote delegation | |
*/ | |
contract Ballot { | |
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
# ./main.py | |
# ----------------------------------- | |
# new imports | |
import aiohttp | |
import asyncio | |
import async_api | |
import sync_api | |
from timeit import default_timer as timer |
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
""" | |
Vignere (Keyword) Cipher implementation in Python | |
""" | |
import string | |
def generate_key(keyword: str, keyletter: str = "A") -> str: | |
""" | |
Generate a polyalphabetic cipher key |
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
from django.db import models | |
from django.utils.translation import gettext_lazy as _ | |
class Person(models.Model): | |
""" | |
Store data about people in a school | |
""" | |
name = models.CharField(max_length=100) |
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
""" | |
A cleaner approach to temporarily creating unmanaged model db tables for tests | |
""" | |
from unittest import TestCase | |
from django.db import connections, models | |
class create_unmanaged_model_tables: | |
""" |
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
/* | |
Author: Tobe :) | |
ZKP Circuits for a Game of Battleship | |
Circom: https://github.com/iden3/circom | |
3rd-Party circuits gotten from: https://github.com/iden3/circomlib | |
*/ | |
pragma circom 2.1.5; |
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
#!/bin/bash | |
# Written by ChatGPT with some human help 🙂 | |
# Loop through all apps in your project | |
for app in $(python manage.py showmigrations -l | grep -v '^\[ \]'); do | |
echo "Deleting migration files for $app..." | |
# Delete all migration files except __init__.py | |
find "$app/migrations" -name '00*.py' -not -name '__init__.py' -exec rm {} \; |
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
import os | |
import string | |
from collections import defaultdict | |
from django.core.management.base import BaseCommand, CommandError | |
from django.db import migrations | |
from django.db.migrations.writer import MigrationWriter | |
from django.db.models import Model | |
MIGRATION_FILE_NAME = "searchvectortrigger" |