Skip to content

Instantly share code, notes, and snippets.

View clamytoe's full-sized avatar
💭
Striving to learn something new each day.

Martin Uribe clamytoe

💭
Striving to learn something new each day.
View GitHub Profile
@clamytoe
clamytoe / buildOpenCV.zsh
Last active September 19, 2023 09:50
Script to build OpenCV 3.4.2 from source into an Anaconda virtual environment on a Linux Mint 19 machine.
#!/usr/bin/zsh
###############################################################################
# buildOpenCV.zsh - #
# #
# Script to build OpenCV 3.4.2 from source into an Anaconda virtual #
# environment on a Linux Mint 19 machine. #
###############################################################################
# Install requirements
sudo apt-get update
@clamytoe
clamytoe / pins.py
Last active April 15, 2023 14:54
Small script that generates all possible 4 number pin combinations.
"""pins.py
Small script that generates all possible 4 number
pin combinations. Inspired by @ThePracticalDev's tweet challenge:
https://twitter.com/thepracticaldev/status/1000191076106465281?s=21
Challenge Alert!!
Write a script that produces all possible 4-digit numbers (0000...9999),
then put them into a random order and save the output into a text file.
@clamytoe
clamytoe / cera_vid_extract.py
Last active July 9, 2022 14:03
This script will simplify the extracting of urls for recorded video sessions from any of the CareerERA tracks.
"""CareerERA Video Extractor
This script will simplify the extracting of urls for recorded video sessions from any
of the CareerERA tracks.
How to use:
1. Save this script to your computer.
2. Go to your dashboard and navigate to the "Live Virtual Class" section.
3. Click on the "View" link to the Day of the session that you want to get.
@clamytoe
clamytoe / mc-one_person_sleep.md
Last active February 20, 2022 16:39
Minecraft - One Person Sleep

Minecraft - One Person Sleep

It's always frustrating getting everyone on the server to go to sleep to prevent mobs from spawning and having to carry a "travel bed" takes up precious space when out gathering resources. With this setup only one person needs to sleep in order for the night cycle to be skipped.

Based on this video: Super Simple VANILLA MINECRAFT ONE PLAYER SLEEPING|1.13-1.14+

setup

@clamytoe
clamytoe / cleanup-yml.py
Last active August 11, 2021 13:36
Script to cleanup an Anaconda environment exported environment.yml file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
def clean_yaml(file: Path, skip: int = 5) -> str:
"""Cleans up an Anaconda environment file
The contents of the file are generated by issuing the following
command from within an activated Anaconda environment:
@clamytoe
clamytoe / Makefile
Created March 18, 2020 13:42 — forked from JnyJny/Makefile
Generate HTML, PDF, EPUB and MOBI from ASCIIDoctor Source
# Makefile - Generate HTML, PDF, EPUB, MOBI from ASC
# This is how you assign a string to a variable name in 'make'. The
# variable name doesn't have to be all caps and the equal doesn't have
# to be snugged up to the variable name; it's just how I write
# Makefiles
FILENAME= the_document
# $(IDENTIFIER) is how you reference a 'make' variable, you can use
@clamytoe
clamytoe / covid.py
Last active June 3, 2020 10:23
Daily COVID plot generator.
#!/usr/bin/env python3
from urllib.error import URLError
from pathlib import Path
import click
import matplotlib.pyplot as plt # type: ignore
import pandas as pd # type: ignore
import seaborn as sns # type: ignore
from us_state_abbrev import us_state_abbrev
@clamytoe
clamytoe / keywords.py
Created May 12, 2020 09:39
Small little script to retrieve the keywords from any web page.
#!/usr/bin/env python3
"""keywords.py
Small little script to retrieve the keywords from any web page.
You can either pass the url for the page as an argument or enter
it when prompted for it.
Example:
keywords.py https://www.youtube.com/watch?v=YrHlHbtiSM0
from copy import deepcopy
from functools import wraps
from random import sample
from time import time
from typing import List
DEBUG = False
def id_checker(func):
@clamytoe
clamytoe / check_kernels.sh
Last active November 7, 2019 13:04
Small script to check what kernels are installed with a note on how to remove unwanted ones.
#!/bin/bash
clear
echo "##################"
echo "# CURRENT KERNEL #"
echo "##################"
echo ""
uname -r
echo ""
echo "######################"
echo "# INSTRALLED KERNELS #"