Skip to content

Instantly share code, notes, and snippets.

View infibrocco's full-sized avatar
💭
Existing

infibrocco

💭
Existing
  • Earth
View GitHub Profile
@infibrocco
infibrocco / name2chem.py
Created June 2, 2024 12:52
Converts a given name into chemical elements format (example: name2chem("calvin") -> "CaLvIn")
with open("ptable.json") as f:
elements = json.loads(f.read())
def name2chem(name: str):
"""Converts a given name into chemical elements"""
possible = [] # Initialize a list to store possible matches
contcount = 0 # Initialize a variable to keep track of continue count
# Iterate over the characters in the input name
@infibrocco
infibrocco / convert.sh
Created April 18, 2022 15:30 — forked from Lili1228/convert.sh
Convert Manjaro to Arch
#!/bin/bash
# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html, who cares
pamac install trizen
cat >/tmp/convert.sh <<EOF
pacman -Qq | grep pamac | xargs pacman -Rs --noconfirm manjaro-application-utility
pacman -Rdd manjaro-release bashrc-manjaro manjaro-keyring
pacman -U https://www.archlinux.org/packages/core/x86_64/pacman/download/ https://www.archlinux.org/packages/core/any/pacman-mirrorlist/download/ https://www.archlinux.org/packages/community/any/lsb-release/download/
mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
mv /etc/pacman.conf.pacnew /etc/pacman.conf
# following line enables multilib repository