Skip to content

Instantly share code, notes, and snippets.

@JujuDel
JujuDel / coinMarketCapRTD.py
Last active January 24, 2022 10:30
Using python, get real time crypto prices and conversion rates in excel
from pyxll import xl_func, RTD
import threading
import time
import requests
from bs4 import BeautifulSoup
'''
Date: 19-April-2021
coin_rtd(crypto: str):
@JujuDel
JujuDel / .gitconfig
Last active November 1, 2024 08:50
Some git aliases taken on other gists, or created/adapted
[user]
name = JujuDel
email = [email protected]
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[alias]
@JujuDel
JujuDel / help.png
Last active June 23, 2022 06:19
Colorfull argparse formatter
help.png
@JujuDel
JujuDel / pretty_nvidia_smi.py
Last active September 11, 2022 13:06
Exact same thing as running 'watch -t -c -n 1 nvidia-smi' but with some colors
import argparse
import os
import re
import subprocess
import time
# User-friendly console display colors
# In case of f-formating alignment, str.rjust, str.ljust or str.center,
# be aware of their len even if you won't see then while printing
@JujuDel
JujuDel / utils.py
Last active December 10, 2022 15:37
Some helpers function for competitive programming
"""LuckyJ.: Utils scripts for CP"""
from __future__ import annotations
import subprocess
import string
from heapq import heappop, heappush
from queue import Queue
from queue import LifoQueue as Stack
@JujuDel
JujuDel / crackRAR.py
Created October 8, 2023 13:21
Open a password protected RAR file from a RegEx pattern. The RegEx serves as hint to provide a list of password to try
"""
Brute force a password protected rar file with a RegEx pattern hint.
This is not meant to be used with malicious intent.
I have made this script only because I had a protected rar file for which I forget
the pwd but remembered partially what it was. Writing a RegEx helped to reduce the
pwd candidates to something I could easily fastly recover :)
Pre-requisites:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JujuDel
JujuDel / .bashrc
Last active November 1, 2024 08:52
Some minor stuff I usually add in my bashrc. Can share whatever's specific to previous jobs thought
######################
## JULIEN - START ##
######################
export PATH=/usr/src/tensorrt/bin:/usr/local/cuda-12/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
# COLORS
@JujuDel
JujuDel / trtexec_v11.sh
Last active November 1, 2024 09:01
Run trtexec on yolo v11 model variations.
# sudo apt-get install -y cuda-toolkit-<major>-<minor>
# sudo apt-get install -y tensorrt nvidia-tensorrt-dev
# sudo nvpmodel -m 0
# sudo jetson_clocks
out_file="/home/user/yolo11_trtexec.txt"
rm ${out_file}
variants=("yolo11n" "yolo11s" "yolo11m" "yolo11l" "yolo11x")
image_sizes=("320" "384" "416" "512" "608" "640")
@JujuDel
JujuDel / prepare_labels_COCO_CrowdHuman.sh
Created November 1, 2024 09:05
Copy CrowdHuman dataset with `person head` label changed to 80
#!/bin/bash
# Copies the dataset
# Changes the person head label of the CrowdHuman to 80.
# Initial CrowdHuman dataset can be obtained from
# - https://gist.github.com/adujardin/62653118466962264aa0c6339c3e9cf5#file-crowdhuman_to_yolo-py-L144
datasets="/home/user/code/datasets"
newFolder="NewCrowdHuman"