Skip to content

Instantly share code, notes, and snippets.

5shekel / check4jupy.ps1
Created September 24, 2023 06:08
sample script you can use in PowerShell to iterate over all Conda environments and check if Jupyter and PyTorch are installed:
View check4jupy.ps1
$condaenvs = (conda env list | Out-String) -split "`n"
foreach ($condaenv in $condaenvs) {
$name = $condaenv.Split(' ')[0]
if ($name -ne "" -and $name -ne "#") {
Write-Output "================================================================"
Write-Output "Environment: $name"
Write-Output "`nChecking for Jupyter:"
& cmd /c "call activate $name && jupyter --version"
# an LLM attempt at an
import streamlit as st
import numpy as np
from pydub import AudioSegment
from pydub.playback import play
import tempfile
def generate_sine_wave(frequency, amplitude, phase, duration, sample_rate):
t = np.linspace(0, duration, int(sample_rate * duration), endpoint=False)
5shekel /
Last active September 3, 2023 23:30
demo controlnet dwpose
import streamlit as st
import json
import base64
import requests
from PIL import Image
import os, io
output_folder = "../output"
if not os.path.exists(output_folder):


we will build an index for an academic book . attached is an excel with the terms

follow this guideline between the three ### lines


5shekel /
Created June 9, 2023 16:07 — forked from genekogan/
scraping full size images from Google Images
from bs4 import BeautifulSoup
import requests
import re
import urllib2
import os
import argparse
import sys
import json
# adapted from
5shekel /
Last active May 13, 2023 07:50
by greg's request, mass scene ripper

User - postmortem (TLDR)

ok we are done, this is the powershell script.
written and tested on tami ubuntu machine.
powershell is a modern, cross platfrom shell

# adapt input directory and output directory, fit your operating system
# sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
# wget -P /tmp
# bash /tmp/
# conda create --name opencv -c conda-forge opencv
# conda activate opencv
# pip install opencv-contrib-python
# python
5shekel /
Created April 25, 2019 19:12
multi-spectral imaging system
from __future__ import division
import time
import Adafruit_PCA9685
from pyueye import ueye
import ctypes
import datetime
pwm = Adafruit_PCA9685.PCA9685(address = 0x40) #1st
pwm1 = Adafruit_PCA9685.PCA9685(address = 0x41) #2nd
5shekel /
Created February 23, 2019 11:45 — forked from satomacoto/
Extract youtube video id from html
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# extract YouTube videoids from html
import re
import json
import urllib2
from BeautifulSoup import BeautifulSoup
def get_videoids(url):
5shekel /
Last active October 27, 2023 11:07 — forked from Mygod/
Export your Windows Bluetooth LE keys into Linux!
Export your Windows Bluetooth LE keys into Linux! (arch edition)
Thanks to:
discussed here:
$ ./ <args>
$ sudo bash -c 'cp -r ./bluetooth /var/lib'