Skip to content

Instantly share code, notes, and snippets.

I'll help you build a 4x4 tic-tac-toe game in Python with a clean terminal interface. Let me create a comprehensive plan for this project.

Project Plan: 4x4 Tic-Tac-Toe Game

Core Components:

  1. Game Board Management

    • 4x4 grid representation using a 2D list
  • Clear board display with grid lines and position numbers
@santurini
santurini / deepspeed-ddp.md
Last active March 9, 2025 07:49
DeepSpeed Multi-node Training Setup

In this tutorial we assume to launch a distributed training on 2 nodes using DeepSpeed with the OpenMPI Launcher.

  1. First of all DeepSpeed needs a passwordless ssh connection with all the nodes, MASTER included:
# generate a public/private ssh key and make sure to NOT insert a passphrase

ssh-keygen -t rsa

# copy public key 'id_rsa' on the MASTER and SLAVE
@thuwarakeshm
thuwarakeshm / check_password.py
Last active May 1, 2025 06:38
Streamlit with Django
def check_password():
"""Returns `True` if the user had a correct password."""
def password_entered():
"""Checks whether a password entered by the user is correct."""
user = authenticate(
username=st.session_state['username'],
password=st.session_state['password']
)
@djfdyuruiry
djfdyuruiry / README.md
Last active October 8, 2024 04:54
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

@cvan
cvan / alt-production-mode-firebase-rules
Last active June 22, 2024 07:04
Firebase security rules for Test Mode and Production Mode (defaults) for https://console.firebase.google.com
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active November 17, 2025 11:44
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@PARC6502
PARC6502 / OpenSourceBaas.md
Last active November 14, 2025 03:16
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@treywelsh
treywelsh / main.go
Last active November 24, 2023 03:06
golang dynamic xml unmarshalling mixed with fixed tags
package main
import (
"encoding/xml"
"fmt"
pkg "xml_unparsed/xmlmap"
//pkg "xml_unparsed/xmlslice"
)
@AlinaNova21
AlinaNova21 / README.md
Last active June 22, 2021 21:01
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup