Skip to content

Instantly share code, notes, and snippets.

View markub3327's full-sized avatar
🐢
Slowly but surely to the goals.

Martin Kubovčík markub3327

🐢
Slowly but surely to the goals.
  • University of Ss. Cyril and Methodius in Trnava
  • Slovakia
  • X @markub3327
View GitHub Profile
(base) ➜  prog-ml.github.io git:(main) ✗ pip install black[jupyter]
zsh: no matches found: black[jupyter]
(base) ➜  prog-ml.github.io git:(main) ✗ black notebooks/introduction/simpson.ipynb 
Skipping .ipynb files as Jupyter dependencies are not installed.
You can fix this by running ``pip install black[jupyter]``
No Python files are present to be formatted. Nothing to do 😴
(base) ➜  prog-ml.github.io git:(main) ✗ which black
/Users/nipun/miniconda3/bin/black
(base) ➜  prog-ml.github.io git:(main) ✗ pip install 'black[jupyter]'              
@jirihnidek
jirihnidek / sub-sub-command.py
Last active February 17, 2024 14:18
Python example of using argparse sub-parser, sub-commands and sub-sub-commands
"""
Example of using sub-parser, sub-commands and sub-sub-commands :-)
"""
import argparse
def main(args):
"""
Just do something
@teddziuba
teddziuba / osx_extract_hash.py
Last active May 1, 2024 16:53
Extract a Mac OSX Catalina user's password hash as a hashcat-compatible string
#!/usr/bin/env python3
"""
Mac OSX Catalina User Password Hash Extractor
Extracts a user's password hash as a hashcat-compatible string.
Mac OSX Catalina (10.15) uses a salted SHA-512 PBKDF2 for storing user passwords
(hashcat type 7100), and it's saved in an annoying binary-plist-nested-inside-xml-plist
format, so previously reported methods for extracting the hash don't work.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwatake2222
iwatake2222 / detection_PC.py
Last active October 10, 2023 21:58
Object detection using MobileNet SSD with tensorflow lite (with and without Edge TPU)
# -*- coding: utf-8 -*-
import cv2
import tensorflow as tf
import numpy as np
# https://www.tensorflow.org/lite/guide/hosted_models
# http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
def detect_from_camera():
@meyerjo
meyerjo / iou.py
Last active December 5, 2023 17:13
Python code to compute the intersection of two boundingboxes
def bb_intersection_over_union(boxA, boxB):
# determine the (x, y)-coordinates of the intersection rectangle
xA = max(boxA[0], boxB[0])
yA = max(boxA[1], boxB[1])
xB = min(boxA[2], boxB[2])
yB = min(boxA[3], boxB[3])
# compute the area of intersection rectangle
interArea = abs(max((xB - xA, 0)) * max((yB - yA), 0))
if interArea == 0:
@danijar
danijar / gru.py
Last active July 25, 2021 18:00
Gated Recurrent Unit with Layer norm and Xavier initializer
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
class GRU(tf.contrib.rnn.RNNCell):
@electronut
electronut / ldr.py
Created May 4, 2014 06:14
Display analog data from Arduino using Python (matplotlib animation)
"""
ldr.py
Display analog data from Arduino using Python (matplotlib)
Author: Mahesh Venkitachalam
Website: electronut.in
"""
import sys, serial, argparse
@electronut
electronut / analog-plot.ino
Created May 24, 2013 07:45
Read analog values from A0 and A1 and print them to serial port.
// analog-plot
//
// Read analog values from A0 and A1 and print them to serial port.
//
// electronut.in
#include "Arduino.h"
void setup()
{