Skip to content

Instantly share code, notes, and snippets.

View fritol's full-sized avatar
🚩
-

fri tol fritol

🚩
-
View GitHub Profile
@geerlingguy
geerlingguy / stable-diffusion-ubuntu-2004-amd.sh
Last active March 15, 2024 06:52
Install Stable Diffusion on an AMD GPU PC running Ubuntu 20.04
# Note: This will only work on Navi21 GPUs (6800/6900+).
# See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers)
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
# follow the prompts to install it, and run `conda` to make sure it's working.
# Install git and curl, and clone the stable-diffusion repo
sudo apt install -y git curl
@hahaschool
hahaschool / SimplePuffMonitor.py
Created November 22, 2021 18:23
SimplePuffMonitor
import web3
import time
import requests
import urllib.request, json
import os
def telegram_bot_sendtext(bot_message):
bot_token = '' # insert your tg bot key
bot_chatID = '' # https://medium.com/@ManHay_Hong/how-to-create-a-telegram-bot-and-send-messages-with-python-4cf314d9fa3e
@Demiu
Demiu / move_appdata_win10.md
Last active May 10, 2024 08:51
How to properly move AppData in Windows 10

Moving AppData folder on Windows 10

  1. Create a new user with administrator permissions
  2. Sign out of the current user and sign in as the newly created user
  3. Navigate to C:\Users in File Explorer
  4. Click into the account you want move AppData from
    • There could be a popup telling you that you need to allow yourself to access that user's data, do so
  5. Cut the AppData folder
    • If invisible, go to View and check Hidden Items
  6. Paste in the desired location
@rwev
rwev / BAW.py
Last active March 1, 2024 02:33
Python implementation of the Barone-Adesi And Whaley model for the valuation of American options and their greeks.
"""
BAW.PY
Implements the Barone-Adesi And Whaley model for the valuation of American options and their greeks.
"""
import numpy as _np
import cmath as _cm
# Option Styles
@massahud
massahud / Portable Node.js andNPM on windows.md
Last active April 30, 2024 17:47
Portable Node.js and NPM on windows
  1. Get node binary (node.exe) from http://nodejs.org/download/
  2. Create the folder where node will reside and move node.exe to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

@chrislkeller
chrislkeller / import_json_appsscript.js
Last active March 25, 2024 19:45
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();