Skip to content

Instantly share code, notes, and snippets.

Write a Python program that shows 20 balls bouncing inside a spinning heptagon:
- All balls have the same radius.
- All balls have a number on it from 1 to 20.
- All balls drop from the heptagon center when starting.
- Colors are: #f8b862, #f6ad49, #f39800, #f08300, #ec6d51, #ee7948, #ed6d3d, #ec6800, #ec6800, #ee7800, #eb6238, #ea5506, #ea5506, #eb6101, #e49e61, #e45e32, #e17b34, #dd7a56, #db8449, #d66a35
- The balls should be affected by gravity and friction, and they must bounce off the rotating walls realistically. There should also be collisions between balls.
- The material of all the balls determines that their impact bounce height will not exceed the radius of the heptagon, but higher than ball radius.
- All balls rotate with friction, the numbers on the ball can be used to indicate the spin of the ball.
- The heptagon is spinning around its center, and the speed of spinning is 360 degrees per 5 seconds.
- The heptagon size should be large enough to contain all the balls.
@sycomix
sycomix / fixfail.sh
Last active February 11, 2025 05:23
fail2ban unfucker
#!/bin/bash
# Comprehensive Fail2Ban Configuration Check and Repair Script
# Version: 2.2
# Date: 2025-02-10
# Strict error handling
set -Eeo pipefail
# Color codes for output
import os
import autogen
import memgpt.autogen.memgpt_agent as memgpt_autogen
import memgpt.autogen.interface as autogen_interface
import memgpt.agent as agent
import memgpt.system as system
import memgpt.utils as utils
import memgpt.presets as presets
import memgpt.constants as constants
import memgpt.personas.personas as personas
did:3:kjzl6cwe1jw149av3zw5x0ufasiqr2e3lmmb30hzvf0pfneoe5ocxhw0hvxa91m
@sycomix
sycomix / .. MediaCreationTool.bat ..md
Created February 2, 2022 08:28 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction

  • new update introducing no 11 setup checks on boot in VirtualBox

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 10 / 11 deployment automation tool as well!

configure via set vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat
recommended windows setup options with the least amount of issues on upgrades set via auto.cmd

sudo nvram "recovery-boot-mode=unused"
sudo reboot
nvram -d recovery-boot-mode
INSTFLD="/private/var/folders/13/pdzbf4p10vqgy4thw26lb_lm0000gn/C/com.apple.dt.Instruments"
find $INSTFLD -type d -atime +30 -mindepth 1 -maxdepth 1 -exec rm -rf {} \;
@sycomix
sycomix / cleanup.sh
Created January 6, 2021 19:29
fixes crap os err macos
This is a copy from another gist
https://raw.githubusercontent.com/Wyvern/macos/master/macOS
does crash crapos err macos 11 atr this time i am testing and fixing as i go.
so far fixes apps that wont bloody install
(thanks apple for telling me what i can and can't run on my GD machine that cost as much as a used car)
@sycomix
sycomix / gist:f063dc4bf0cdb5b13af85e233bebd289
Created October 11, 2020 00:03
Screw apple app verify...
xattr -d com.apple.quarantine \path\to\app
@sycomix
sycomix / minerquickdeploy.sh
Last active August 11, 2019 12:42
Mining for SBC, GPU, CPU, ASIC, and FPGA
#! /bin/bash
apt install wget git -y
git clone https://github.com/ilikenwf/apt-fast.git
cd apt-fast && ./quick-install.sh
cd ..
apt-fast install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ git libgmp-dev opencl-headers libncurses5-dev libtool cgminer bfgminer