Skip to content

Instantly share code, notes, and snippets.

View imneonizer's full-sized avatar
:octocat:
Developing for the python community!

Nitin Rai imneonizer

:octocat:
Developing for the python community!
  • SmartCow.ai
  • Delhi, India
  • 11:29 (UTC +05:30)
  • X @imneonizer
View GitHub Profile
@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

#!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
@imneonizer
imneonizer / detect_medimtx_stream_availability.js
Created March 8, 2024 08:17
Check if the stream served by mediamtx is available (paste it in the console window in browser for that stream)
// Find the video element that is supposed to play the stream
const videoElement = document.querySelector('video');
if (videoElement) {
const stream = videoElement.srcObject;
// Check if the stream is available and active
if (stream instanceof MediaStream && stream.active) {
// Get video tracks from the stream
const videoTracks = stream.getVideoTracks();

Install Docker Compose via Python PIP

These are all commands you need to install Docker Compose on a freshly installed NVIDIA Jetson.

# step 1, install Python PIP
$ sudo apt-get update -y
$ sudo apt-get install python3-pip

# step 2, install Docker Compose build dependencies for Ubuntu 18.04 on aarch64
$ sudo apt-get install -y libffi-dev libssl-dev python-openssl
@imneonizer
imneonizer / content.md
Created October 31, 2023 04:23
AI Application Development Specialisation in Computer Vision

AI Application Development Specialisation in Computer Vision

This course navigates students through the exciting realm of AI, spotlighting Computer Vision applications. Starting from Python programming and Git, it smoothly transitions into developing AI applications using Docker and OpenCV. Assignments each week provide hands-on experience, cementing the key learnings.

Week 1: Grasping the Basics- Python and Git

Topics

  • Python Programming: Understand syntax, variables, loops, conditionals, lists, tuples, and dictionaries
  • Starting with Git: Learn to clone, commit, branch, and merge
@imneonizer
imneonizer / .vscode_settings.json
Created May 7, 2023 17:35
Python black formatter vs code settings
{
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": "<path-to-black-formatter>"
}
@imneonizer
imneonizer / docker-compose-test-gpu.yml
Last active May 7, 2023 15:02
Nvidia GPU test using docker-compose
version: "3.8"
services:
app:
image: nvidia/cuda:11.6.2-base-ubuntu20.04
command: nvidia-smi
deploy:
resources:
reservations:
devices:
@imneonizer
imneonizer / OpenCVMedia.py
Created April 18, 2023 14:52 — forked from kueblert/OpenCVMedia.py
aiortc opencv webcam stream
import asyncio
import fractions
import logging
import threading
import time
from typing import Optional, Set, Tuple
import av
from av import AudioFrame, VideoFrame
from aiortc.mediastreams import AUDIO_PTIME, MediaStreamError, MediaStreamTrack

Install aria2c:

sudo apt install aria2 -y

Use below command to utilize full bandwidth:

aria2c --file-allocation=none -c -x 10 -s 10 -d "mydir" URL --check-certificate=false

-c allows continuation of download if it gets interrupted, -x 10 and -s 10 allow up to 10 connections per server, and -d "mydir" outputs file to directory mydir.

@imneonizer
imneonizer / ipwebcam.sh
Last active January 3, 2023 04:12
Using Android as HD webcam
#!/bin/bash
export ANDROID_SERIAL=`adb devices -l | grep -i oneplus | awk '{print $1}'`
export HOST_PORT=8080
export IPWEBCAM_PORT=8080
export V4L2_DEVICE=/dev/video0
function start_screen_mirror(){
if [ ! `pgrep scrcpy` ];then