Skip to content

Instantly share code, notes, and snippets.

View geocine's full-sized avatar
🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.

Aivan Monceller geocine

🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.
View GitHub Profile
@zer0TF
zer0TF / convert_to_safe.py
Created November 28, 2022 04:53
Convert all CKPT files to SAFETENSOR files in a directory
# Got a bunch of .ckpt files to convert?
# Here's a handy script to take care of all that for you!
# Original .ckpt files are not touched!
# Make sure you have enough disk space! You are going to DOUBLE the size of your models folder!
#
# First, run:
# pip install torch torchsde==0.2.5 safetensors==0.2.5
#
# Place this file in the **SAME DIRECTORY** as all of your .ckpt files, open a command prompt for that folder, and run:
# python convert_to_safe.py
@victorchall
victorchall / gist:67bc53472f86641aef1ebee1e154f5d1
Created October 11, 2022 18:50
Quick start on caption training with kanewallmann repo
Using this repo:
https://github.com/kanewallmann/Dreambooth-Stable-Diffusion
Folder structure, using a project name of "ff7r" for example but you can name it however you want
/reg/man/ (all your regularization images of men)
/training_samples/ff7r/man (all your images of men to train)
/reg/woman/ (all your regulaization images of women)
/training_samples/ff7r/woman (all your images of women to train)
@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active June 28, 2024 02:30
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

@lykn
lykn / selects_or_dropdowns.md
Last active July 5, 2024 18:39
A gist explaining the right way to make drop down menus/select menus/selects in discord.py v2(version 2.0.0a)

Note: Before we go any further. Let me make this real clear that the following gist uses the OFFICIAL discord.py library and not forks like discord_components, nextcord, etc... So when your using this code but a different library and fuck up don't comment something mean or go to a help channel in the server and say "this gist is misleading" or "bad gist who wrote this" when your at fault, trust me I'm going to fuck you up😅

Just a reminder^^

Related Links:

DPY's Docs

Discord's Docs

@SingletonSean
SingletonSean / main.md
Last active October 7, 2021 03:21
Call a function when the user changes a value via an input control, but not when I am updating the value of the control state?

Control State

Question

Call a function when the user changes a value via an input control, but not when I am updating the value of the control state? - geocine

Solution

Expose two entry points (ex: property or function) to control the state. The input control on the view could bind to one property, and your code (ex: a command or view model) could use a different property (or function!). Both entry points would control the same data.

@anoochit
anoochit / leanback_android_tv_flutter.md
Last active July 2, 2024 14:41
leanback android tv
  • Add software leanback feature in AndroidManifest
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
  • Add banner icon xhdpi 320x180 px for banner
@kentcdodds
kentcdodds / README.md
Last active March 30, 2024 11:39
user-package-stats

user-package-stats

I was poking around trying to figure out all the packages I have access to publish and got curious. So I write this little script to determine the download stats for all the packages I have publish access to.

Feel free to try it yourself. Just change the username passed to getUserDownloadStats.

By default, the stats are sorted by their average daily downloads (descending). That should give you an idea of the most "popular" package of a given user relative to how long that package has been around.

You can use it with npx like so:

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active July 6, 2024 04:18
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@tannerlinsley
tannerlinsley / README.md
Last active April 12, 2024 17:04
Replacing Create React App with the Next.js CLI

Replacing Create React App with the Next.js CLI

How dare you make a jab at Create React App!?

Firstly, Create React App is good. But it's a very rigid CLI, primarily designed for projects that require very little to no configuration. This makes it great for beginners and simple projects but unfortunately, this means that it's pretty non-extensible. Despite the involvement from big names and a ton of great devs, it has left me wanting a much better developer experience with a lot more polish when it comes to hot reloading, babel configuration, webpack configuration, etc. It's definitely simple and good, but not amazing.

Now, compare that experience to Next.js which for starters has a much larger team behind it provided by a world-class company (Vercel) who are all financially dedicated to making it the best DX you could imagine to build any React application. Next.js is the 💣-diggity. It has amazing docs, great support, can grow with your requirements into SSR or static site generation, etc.

So why

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.