rnn notes
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
| /* | |
| <div class="checkbox-wrapper"> | |
| <!-- <input type="checkbox" name="apply-background" checked=checked> --> | |
| <input type="checkbox" class="switch" name="apply-background" checked="checked"> | |
| </div> | |
| */ | |
| .checkbox-wrapper .switch { | |
| appearance: none; | |
| background-color: #080808; | |
| border-radius: 3em; |
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
| """An example of caching tiktoken data, so I can count tokens offline. | |
| """ | |
| import tiktoken | |
| import hashlib | |
| from pathlib import Path | |
| import shutil | |
| import os | |
| # from tiktoken_ext |
The does not correctly post when pressing "Add to basket" on any product form page.
When hit, the form does perform a POST, with the expected data, however the cart is not updated and the page refeshes to the origin page.
A given speculative reason may have been due to the apache server hosting the wordpress, incorrectly receiving form POSTs - and mangling the body data before usage.
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
| """I saw on StackOverflow _It isn't possible_ - then I asked GPT, and it parroted the stack overflow answer. | |
| In this example we wish to create a ready-to-use Enum extended class. | |
| class Cooked(Enum): | |
| POP = 'pop' | |
| FOO = 'foo' | |
| This, with the ability to append new enums members. | |
| Understandably this cannot be done _after_ the Enum is defined, |
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
| # my C:\Users\username\.pypirc *absolutely exists* and has the correct entry from here: | |
| # https://packaging.python.org/en/latest/guides/using-testpypi/#setting-up-testpypi-in-pypirc | |
| (env-django-4-0) >cat C:\Users\username\.pypirc | |
| [distutils] | |
| index-servers=pypi | |
| [testpypi] | |
| repository = https://test.pypi.org/legacy/ | |
| username=__token__ | |
| password=pypi-bigstring |
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
| <canvas id="canvas"></canvas> |
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
| https://youtube.com/playlist?list=PLpUr6KatSNB-PTpiEgWHhfoV_kvyDHgwB |
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
| """A module level getter/setter | |
| >>> import vmod | |
| >>> vmod.Woof | |
| Getting Woof... | |
| <class 'vmod.Woof'> | |
| >>> vmod.Woof | |
| Getting Woof... | |
| <class 'vmod.Woof'> |
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
| """Create complex functional or class-based decorators without effort. | |
| + Capture the class of a method: `owner_class` | |
| + Accept arguments at create, decorate or execution | |
| + functional based drop-in replacement for `functools.wraps` | |
| + Alternative work with a class-based setup | |
| + no dependecies | |
| + | |
| A class-based decorator provides methods to override the given function. |
NewerOlder