flowchart LR
A[If I] --> B{could};
B -- Yes --> C[I would];
C --> D[Let it go, Surrender, Dislocate];
This file contains 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
export default function(originalPromise, delay = 750) { | |
return Promise.all([ | |
originalPromise, | |
new Promise(resolve => { | |
setTimeout(() => resolve(), delay) | |
}), | |
]).then(result => result[0]) | |
} | |
// Usage |
This file contains 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 tensorflow as tf #We need tensorflow 2.x | |
import numpy as np | |
#The hashlength in bits | |
hashLength = 256 | |
def buildModel(): | |
#we can set the seed to simulate the fact that this network is known and doesn't change between runs | |
#tf.random.set_seed(42) | |
model = tf.keras.Sequential() |
This file contains 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
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class MigrateToJetstream extends Migration | |
{ | |
public function up() | |
{ |
This file contains 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 { Inertia } from '@inertiajs/inertia' | |
document.addEventListener('click', (event) => { | |
if ( | |
event.target.tagName.toLowerCase() === 'a' && | |
event.target.hasAttribute('inertia') && | |
!event.target.isContentEditable && | |
!event.defaultPrevented && | |
!event.shiftKey && | |
!event.ctrlKey && |
This file contains 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
export default defineConfig({ | |
plugins: [ | |
laravel(['resources/js/app.js']), | |
{ | |
name: 'ziggy', | |
enforce: 'post', | |
handleHotUpdate({ server, file }) { | |
if (file.includes('/routes/') && file.endsWith('.php')) { | |
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`)) | |
} |
This file contains 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
// This code allows you to render a page as Googlebot with puppeter (headless Chrome). | |
// It even renders elements with the lazy-load implemented through IntersectionObserver. | |
// Copy and paste it here: https://try-puppeteer.appspot.com/ | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Descriptors for other mobile devices: https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | |
const mobile = { | |
name: 'Nexus 5X', |
This file contains 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
// Discord all events! | |
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
// Learn from this, do not just copy it mofo! | |
// | |
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
/* | |
koad-was-here |
This file contains 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
// This list comes from Wikipedia deprecated timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
const deprecatedList = [ | |
{ old: 'Australia/ACT', new: 'Australia/Sydney' }, | |
{ old: 'Australia/LHI', new: 'Australia/Lord_Howe' }, | |
{ old: 'Australia/North', new: 'Australia/Darwin' }, | |
{ old: 'Australia/NSW', new: 'Australia/Sydney' }, | |
{ old: 'Australia/Queensland', new: 'Australia/Brisbane' }, | |
{ old: 'Australia/South', new: 'Australia/Adelaide' }, | |
{ old: 'Australia/Tasmania', new: 'Australia/Hobart' }, | |
{ old: 'Australia/Victoria', new: 'Australia/Melbourne' }, |
How to get oobabooga/text-generation-webui running on Windows or Linux with LLaMa-30b 4bit mode via GPTQ-for-LLaMa on an RTX 3090 start to finish.
This guide actually works well for linux too. Just don't bother with the powershell envs
-
Download prerequisites
- Download and install miniconda
- (Windows Only) Download and install Visual Studio 2019 Build Tools
- Click on the latest BuildTools link, Select Desktop Environment with C++ when installing)
-
(Windows Only) Open the Conda Powershell.
OlderNewer