Skip to content

Instantly share code, notes, and snippets.

View CoderCowMoo's full-sized avatar

Moumal Al-Saady CoderCowMoo

View GitHub Profile
@CoderCowMoo
CoderCowMoo / CompassSchoolDarkMode.js
Last active October 15, 2021 14:25
This userscript makes compass classes dark by changing their css to the colour without !important afterwards.
// ==UserScript==
// @name Make compass classes dark.
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Because the css of compasses classes listing has "!important" in the 'background-color:' DarkReader won't work. This changes that.
// @author CoderCowMoo
// @match https://*.compass.education/
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @icon https://www.google.com/s2/favicons?domain=compass.education
// @grant none
@CoderCowMoo
CoderCowMoo / .bashrc
Created April 12, 2022 06:44
A bash script to greet you depending on the time of day with your name included in it. Uses cowsay to display messages
# times to put in were gotten from Tabliss extension with messages @
# https://github.com/joelshepherd/tabliss/blob/main/src/plugins/widgets/greeting/messages.ts
h=`date +%H`
PREFNAME="Moo"
if [ $h -ge 0 -a $h -le 2 ]; then
echo Sleep well, $PREFNAME | cowsay
elif [ $h -ge 3 -a $h -le 5 ]; then
echo Rise and shine, $PREFNAME | cowsay
elif [ $h -ge 6 -a $h -le 9 ]; then
echo Good morning, $PREFNAME | cowsay
def main():
for i in range(1, 101):
if i % 15 == 0:
print("Fizzbuzz")
continue
if i % 5 == 0:
print("Buzz")
continue
if i % 3 == 0:
print("Fizz")
def main():
for i in range(1, 101):
if i % 15 == 0:
print("Fizzbuzz")
continue
if i % 5 == 0:
print("Buzz")
continue
if i % 3 == 0:
print("Fizz")
@CoderCowMoo
CoderCowMoo / real-time-speech-to-image.ipynb
Last active April 15, 2024 13:11
Real Time Speech to Imagev1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import torch
import transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
from PIL import Image
import warnings
# disable some warnings
transformers.logging.set_verbosity_error()
transformers.logging.disable_progress_bar()
warnings.filterwarnings('ignore')
import torch
import transformers
import gradio as gr
import PIL
from threading import Thread
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
import warnings
# disable some warnings
transformers.logging.set_verbosity_error()
import torch
import transformers
import gradio as gr
import PIL
from threading import Thread
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
import warnings
# disable some warnings
transformers.logging.set_verbosity_error()
# You take too many clips and its using up all your storage space?
# Don't know what to do?
# just save this file and make a .bat or shortcut file with the following content
# powershell.exe -NoExit -command "& 'C:\A path with spaces\watch_it.ps1' -filePath 'C:\Wherever you save videos'"
# you also have to edit below where the ffmpeg executable is.
# Geforce experience defaults to C:\Users\User\Videos
# This'll watch every directory there, and spawn a ffmpeg process for each video created,
param(
[Parameter(Mandatory=$true)][ValidateScript({ Test-Path -Path $_ })][string]$filePath
import argparse
import sys
import os.path as path
import torch
import torch.nn as nn
from PIL import Image
from transformers import (
AutoTokenizer,
LlamaForCausalLM,
BitsAndBytesConfig,