The following guide will show you how to connect a local model served with MLX to OpenCode for local coding.
1. Install OpenCode
curl -fsSL https://opencode.ai/install | bash
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| // ==UserScript== | |
| // @name Amazon Auto Checkout and No Thanks | |
| // @version 0.4 | |
| // @description Automatically clicks the "Continue to checkout" button on Amazon cart pages and "No Thanks" on product pages | |
| // @match https://www.amazon.com/cart/byc/ref=ox_sc_byg_proceed* | |
| // @match https://www.amazon.com/gp/product/* | |
| // @match https://www.amazon.com/dp/* | |
| // @match https://www.amazon.com/*/dp/* | |
| // @match https://www.amazon.com/cart/smart-wagon* | |
| // @namespace https://gist.github.com/AJolly |
| from pxr import Sdf, Usd | |
| LIST_ATTRS = ['addedItems', 'appendedItems', 'deletedItems', 'explicitItems', | |
| 'orderedItems', 'prependedItems'] | |
| def repath_properties(layer, old_path, new_path): | |
| """Re-path property relationship targets and attribute connections. | |
| This will replace any relationship or connections from old path |
If you're having trouble with the MayaPy extension in VS Code note that it still utilizes ptvsd, which Microsoft has deprecated as of 2020.
This tutorial will guide you through the process of setting up debugging with debugpy, the latest and improved Python debugger for VS Code.
Note: This tutorial is primarily intended for users of Python 3 and Maya 2022 (or later).
Note: You need to have the official Python extension installed in VS Code.
| #include "InputModeDetector.h" | |
| #include "Input/Events.h" | |
| FInputModeDetector::FInputModeDetector() | |
| { | |
| // 4 local players should be plenty usually (will expand if necessary) | |
| LastInputModeByPlayer.Init(EInputMode::Mouse, 4); | |
| } | |
| bool FInputModeDetector::HandleKeyDownEvent(FSlateApplication& SlateApp, const FKeyEvent& InKeyEvent) |
| """ | |
| This will iterate all modelPanels and remove the "CgAbBlastPanelOptChangeCallback" | |
| As such, after running this the following error should be fixed: | |
| // Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". // | |
| """ | |
| from maya import cmds | |
| for model_panel in cmds.getPanel(typ="modelPanel"): |
To support my open-source work, consider adding me on Patreon.
An easy to refer to document for regularly setting up macOS 10.14 Mojave.
The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.
| # I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor. | |
| # The unifi default port is 8443 running on localhost. | |
| # License: CC0 (Public Domain) | |
| server { | |
| # SSL configuration | |
| # | |
| listen 443 ssl default_server; | |
| listen [::]:443 ssl default_server; |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| // Written by Steve Streeting 2017 | |
| // License: CC0 Public Domain http://creativecommons.org/publicdomain/zero/1.0/ | |
| /// <summary> | |
| /// Component which will flicker a linked light while active by changing its | |
| /// intensity between the min and max values given. The flickering can be | |
| /// sharp or smoothed depending on the value of the smoothing parameter. |