This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
import os | |
def download_req(url, name): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <file> <amount>" | |
exit 1 | |
fi | |
if [ "$2" -lt 0 ]; then | |
echo "Amount must be positive" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## NOTES | |
# | |
# - You will need to change your drive settings to make this work for you | |
# - You will need OVMF somewhere (https://github.com/tianocore/tianocore.github.io/wiki/OVMF) | |
# - You will need a OSK key from TIM APPLE so it boots (see https://sive.host/index.php/knowledgebase/388/Installing-macOS-12-Monterey-on-Proxmox-7.html) | |
qemu-system-x86_64 \ | |
-enable-kvm \ | |
-machine q35 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Control.Monad (when) | |
import Control.Monad.State (StateT, execStateT, get, put, modify, gets, lift) | |
import Data.List (intercalate, find, sortBy) | |
import System.Environment (getArgs) | |
import System.IO (hSetEcho, hSetBuffering, stdin, stdout, BufferMode(NoBuffering), hFlush) | |
import System.Random (randomRIO) | |
import System.Exit (exitSuccess) | |
import Data.Maybe (isJust) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- -*- lua -*- | |
-- We use Packer for package management | |
local function bootstrap_pckr() | |
local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim" | |
if not vim.uv.fs_stat(pckr_path) then | |
vim.fn.system({ | |
'git', | |
'clone', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"backcolor": "#dbd3d3" | |
}, | |
[ | |
{ | |
"c": "#0073a2", | |
"t": "#CCCCB7", | |
"p": "SA", | |
"a": 7, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name YOUR_SERVER_LOCATION; | |
listen 443 ssl http; | |
#listen [::]:443 ssl http; | |
client_max_body_size 20M; | |
resolver 127.0.0.1 valid=30; | |
ssl_certificate /etc/letsencrypt/live/YOUR_VALUE_HERE/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/YOUR_VALUE_HERE/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env/bin python | |
# -*- coding: utf-8 -*- | |
''' | |
Description: This code demonstrates the following: | |
- Pythonic loops are slow | |
- List comprehensions are faster | |
- vectorized operations like numpy are faster than list comprehensions | |
- parallel computing is faster than vectorized operations for large datasets | |
- Just-In-Time (JIT) compilation can speed up Python code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
# /etc/init.d/webp-daemon | |
name="WebP Conversion Daemon" | |
description="Monitors and converts WebP files in home directory" | |
supervisor="supervise-daemon" | |
command="/usr/local/bin/webp-daemon.sh" | |
command_user="${RC_SVCNAME##*.}" | |
: ${command_user:=nobody} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify, send_file | |
from flask_cors import CORS | |
from rdkit import Chem | |
from rdkit.Chem import Draw, AllChem | |
from PIL import Image | |
import io | |
import base64 | |
import logging | |
import json | |
import os |
OlderNewer