Skip to content

Instantly share code, notes, and snippets.

View FLAK-ZOSO's full-sized avatar
🇪🇪
studying in Estonia

Mattia Marchese FLAK-ZOSO

🇪🇪
studying in Estonia
View GitHub Profile
with open('file.txt', 'r') as file:
lines = file.read().split('\n') # lines is a list of the lines of the file
dictionary: dict = {}
for index, line in enumerate(lines):
line = line.split(' ')
dictionary[str(index)] = {
"white": line[0],
"black": line[1],
"white score": line[2],
"black score": line[4]
@FLAK-ZOSO
FLAK-ZOSO / Color.cpp
Created March 3, 2022 13:29
Colours in C++ with windows.h
#include <iostream>
#include <stdlib.h>
#include <windows.h>
using namespace std;
void SetColor(short Color) {
HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon,Color);
}
#pragma once
#include <queue> // std::queue, std::priority_queue
#include <algorithm> // std::sort
#include "field.hpp" // Field, Pawn
struct Path { // Path struct - begin and end Coordinates of a path
static int current_priority; // current_priority - priority of the current Path [counter]
int priority; // priority - priority of the Path (used in operator<)
#include <chrono>
#include <thread>
#include "include/sista/sista.hpp"
// g++ swapTest.cpp -o swapTest -std=c++17 -Wall
int main() {
sista::SwappableField field(10, 10);
std::vector<sista::Pawn*> pawns = {
new sista::Pawn(
@FLAK-ZOSO
FLAK-ZOSO / linux-uploader.py
Created September 22, 2023 18:23
Uploader.py - The customizable script for uploading to PyPI and GitHub
#!\usr\bin\env python3
if __name__ == '__main__':
import sys, os
version = sys.argv[1]
os.system(f"python3 setup.py sdist")
os.system(f"python3 -m twine upload dist/* --verbose")
os.system(f"python3 -m pip install classeviva.py=={version}")
os.system(f"python3 -m pip install classeviva.py=={version}")
os.system(f"git add .")

Keybase proof

I hereby claim:

  • I am flak-zoso on github.
  • I am flak_zoso (https://keybase.io/flak_zoso) on keybase.
  • I have a public key ASA9e94W2UQFRZCrDq_W_DdYqLeCL7tSRh2GRarqKPgk1Qo

To claim this, I am signing this object: