Skip to content

Instantly share code, notes, and snippets.

@ukaserge
ukaserge / cuda_11.7_installation_on_Ubuntu_22.04
Created August 22, 2023 02:04 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@ukaserge
ukaserge / key.md
Created March 4, 2023 17:44
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@ukaserge
ukaserge / bookmarklet.js
Created February 2, 2023 04:59 — forked from andyg2/bookmarklet.js
Bookmark-let to summarize a web page using GPT-3 - written by GPT-3
javascript: (function () {
var text = document.body.innerText;
var spl = text.split(" ");
if (spl.length > 3000) {
text = spl.slice(0, 3000).join(" ");
}
fetch('https://api.openai.com/v1/completions', {
method: 'POST',
headers: {
@ukaserge
ukaserge / convert_to_safe.py
Created January 12, 2023 09:45 — forked from zer0TF/convert_to_safe.py
Convert all CKPT files to SAFETENSOR files in a directory
# Got a bunch of .ckpt files to convert?
# Here's a handy script to take care of all that for you!
# Original .ckpt files are not touched!
# Make sure you have enough disk space! You are going to DOUBLE the size of your models folder!
#
# First, run:
# pip install torch torchsde==0.2.5 safetensors==0.2.5
#
# Place this file in the **SAME DIRECTORY** as all of your .ckpt files, open a command prompt for that folder, and run:
# python convert_to_safe.py
import datetime
import pandas as pd
from ib_insync import *
pd.set_option('display.max_rows', None)
ib = IB()
ib.connect('127.0.0.1', 7496, clientId=15)
contract = Stock('SPY', 'SMART', 'USD')
@ukaserge
ukaserge / 1-voice-synthesis.js
Created December 5, 2022 15:35 — forked from kesor/1-voice-synthesis.js
Making chat OpenAI use TTS
// paste this into your chrome dev console for Speech Synthesis
const originalFetch = window.fetch
const patchedFetch = (...args) => {
if (args[1].method == 'POST' && args[1].body.length > 0 && /moderations$/.test(args[0])) {
const aiResponse = JSON.parse(args[1].body)["input"].split("\n\n\n")
if (aiResponse.length > 1) {
const text = aiResponse.slice(1).join(". ").trim()
console.log(text)
@ukaserge
ukaserge / API's.md
Created December 3, 2022 13:13 — forked from Soheab/API's.md
See here some of the API's you can use in your discord bot or anything

Some API's for you.

See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.

A much bigger list of APIs can be found here


@ukaserge
ukaserge / how2twitter.avi
Created June 14, 2022 08:02 — forked from TheTechRobo/how2twitter.avi
How I archive twitter accounts and hashtags and how you can too
Hello!
======
Table of Contents;
The Fast Way
The Thorough Way
Wait, how do I read this file?
Archiving Twitter accounts and hashtags is easy. Here's how!
@ukaserge
ukaserge / list.md
Created January 16, 2022 15:29 — forked from ih2502mk/list.md
Quantopian Lectures Saved