Skip to content

Instantly share code, notes, and snippets.

View 0xrushi's full-sized avatar

Rushi Chaudhari 0xrushi

View GitHub Profile
# Uses OPENAI API KEY
import time
import threading
import numpy as np
import sounddevice as sd
from queue import Queue
from rich.console import Console
from langchain.memory import ConversationBufferMemory
from langchain.chains import ConversationChain
@0xrushi
0xrushi / thinking siri animation.py
Created May 24, 2024 14:46
AI Thinking Animation with Transparent Background using PyQt5 (siri)
# AI Thinking Animation with Transparent Background using PyQt5
# This script demonstrates how to create a simple AI thinking animation with a transparent background using PyQt5. The player displays a GIF in a frameless window that stays on top of other windows and has a transparent background, simulating an AI assistant’s thinking process (like Siri).
# The GIF should be without any background and round cropped.
import sys
from PyQt5.QtWidgets import QApplication, QLabel, QMainWindow
from PyQt5.QtGui import QMovie, QPalette, QColor
from PyQt5.QtCore import Qt, QSize
class GIFPlayer(QMainWindow):
@0xrushi
0xrushi / no_code_quant_backtest_engine.py
Last active January 31, 2024 04:36
No Code Quantitative Backtest Engine for Machine Trading
'''
Defines a formulaic quant rule
prim
space: identifies a primitive from its primitive space
children = *[]
parent
is_terminal
size()

Anki Vector

Flash the official DDL IO Vector image 2.0

Vector Setup

Get the API certificates before installing wirepod

Vector SDK api registration and installation

This file has been truncated, but you can view the full file.
2517d.v.fwmrm.net
2975c.v.fwmrm.net
ad.doubleclick.net
adclick.g.doubleclick.net
adlog.com.com
adservices.google.com
bs.serving-sys.com
clk.pointroll.com
cnbc7.com
csi.gstatic.com
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@0xrushi
0xrushi / temp2
Last active January 12, 2020 22:53
import json
import random
import re
import string
from http.cookiejar import CookieJar
from time import sleep
from urllib import request
import requests
class Email:
@0xrushi
0xrushi / test.py
Last active January 12, 2020 20:20
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option('androidPackage', 'com.android.chrome')
driver = webdriver.Chrome('/data/data/com.termux/files/home/chromedriver', options=options)
driver.get('https://google.com')
driver.quit()
@0xrushi
0xrushi / forex.py
Last active January 9, 2020 03:33
A small script to fetch current HDFC bank forex rates, to reload their forex card. This makes checking rates everyday on our phones easier.
import tabula
from selenium import webdriver
url = 'https://v1.hdfcbank.com/assets/pdf/forex_rates/rates.pdf'
download_dir = "./" # for linux/*nix, download_dir="/usr/Public"
options = webdriver.ChromeOptions()
options.add_experimental_option('prefs', {
"download.default_directory": download_dir, #Change default directory for downloads
"download.prompt_for_download": False, #To auto download the file
@0xrushi
0xrushi / sshd_config
Created June 10, 2019 06:31
my_sshd_config
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the