Skip to content

Instantly share code, notes, and snippets.

View s-weigand's full-sized avatar
:octocat:

Sebastian Weigand s-weigand

:octocat:
View GitHub Profile
@s-weigand
s-weigand / python mock word formatting.py
Last active April 17, 2025 00:23
python mock word formatting
"".join(c.upper() if i % 2 != 0 else c.lower() for i, c in enumerate(input("This word doesn't work like this: ")))
@s-weigand
s-weigand / pygta-staging-schema.json
Created January 27, 2024 17:01
Json schema for pyglotaran schema files for the staging branch
{
"$defs": {
"BaselineElement": {
"additionalProperties": false,
"properties": {
"type": {
"const": "baseline",
"title": "Type"
},
"dimension": {
@s-weigand
s-weigand / model_test_schema.json
Last active November 17, 2023 16:24
model test schema
{
"$defs": {
"BaselineElement": {
"additionalProperties": false,
"properties": {
"type": {
"const": "baseline",
"title": "Type"
},
"dimension": {
@s-weigand
s-weigand / install-clamtk.sh
Created October 12, 2021 09:46
clamtk install skript
sudo apt update && sudo apt install clamav clamav-daemon -y
cd Download
wget https://github.com/dave-theunsub/clamtk/releases/download/v6.13/clamtk_6.13-1_all.deb
sudo dpkg -i clamtk_6.13-1_all.deb
sudo apt --fix-broken install
@s-weigand
s-weigand / win_allow_all_python_incomming_firewall_rule.bat
Created August 8, 2019 16:40
Sets Windows firewall rule for to allow all incoming connection for all python.exe in subfolders of the script dir
@echo off
REM BATCH FILE CREATED BY CHARLES DE HAVILLAND 20/02/2012
:: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
@s-weigand
s-weigand / code_generator.py
Last active December 18, 2019 17:48
Create tox env on Windows with conda
from __future__ import division, print_function
for vers in [27,35,36,37,38]:
print("conda create -p C:\python{} python={} -y".format(vers, vers/10))