Skip to content

Instantly share code, notes, and snippets.

View mbohun's full-sized avatar
🙃
How do you do?

Martin Bohun Hormann mbohun

🙃
How do you do?
  • Canberra, ACT, Australia
View GitHub Profile
@mbohun
mbohun / APKBUILD
Created May 26, 2023 09:48 — forked from shtirlic/APKBUILD
APKBUILD for nvtop for alpine with ardeno gpu support
# Maintainer: Serg Podtynnyi <serg@podtynnyi.com>
pkgname=nvtop
pkgver=3.0.2
pkgrel=1
pkgdesc="GPUs process monitoring for AMD, Intel,NVIDIA and Adreno"
url="https://github.com/Syllo/nvtop"
arch="aarch64"
license="GPL3"
depends="
ncurses
@mbohun
mbohun / word_doc_to_docx.py
Last active April 20, 2023 05:48 — forked from davecoutts/word_doc_to_docx.py
Convert Word 'doc' files to 'docx', 'pdf', other format using win32com to automate Microsoft Word
# Convert Microsoft Word 'doc' files to 'docx' format by opening and
# saving Word files using win32com to automate Microsoft Word.
#
# The script walks a directory structure and converts all '.doc' files found.
# Original 'doc' and new 'docx' files are saved in the same directory.
#
# This Word automation method has been found to work where OFC.exe and
# wordconv.exe do not.
#
# Tested using Windows 7, Word 2013, python 2.7.10, pywin32-219.win-amd64-py2.7
@mbohun
mbohun / postgres-cheatsheet.md
Created September 10, 2018 07:02 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
#!/bin/bash
#--------------------------------------------------------------------------------------------------------------
# Add Permanent SWAP 8GB
# Create swap file
sudo fallocate -l 8G /swapfile
#Change Permissions
sudo chmod 600 /swapfile
#Mark the file as swap space
sudo mkswap /swapfile
#enable the swap file, allowing our system to start utilizing it
# at least in deb/untu
sudo apt-get install libpam-google-authenticator
# for each user
google-authenticator
from rdkit import Chem
from rdkit.Chem import AllChem
from itertools import islice
raw_smiles = ['NCCN']
smiles_list = ['NCCN']
rxn_smarts_list = ['[C:1][*:2][C:3]>>[C:1]1[*:2][C:3]1','[C:1][C:2]>>[C:1][C][C:2]']
molecules = []
mol = Chem.MolFromSmiles(smiles_list[0])
@mbohun
mbohun / 0_reuse_code.js
Created June 24, 2016 06:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console