(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]'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example of using sub-parser, sub-commands and sub-sub-commands :-) | |
""" | |
import argparse | |
def main(args): | |
""" | |
Just do something |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
Helvetica is the standard font for scientific plots. However, the default for matplotlib
is not helvetica. You can use the following tutorial for making the change.
[Update in 2022/11/11]
Just have the following line in the beginning of a notebook will take care of the problem.
%config InlineBackend.figure_format='svg'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
ldr.py | |
Display analog data from Arduino using Python (matplotlib) | |
Author: Mahesh Venkitachalam | |
Website: electronut.in | |
""" | |
import sys, serial, argparse |
NewerOlder