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
| """ | |
| Amaranth implementation of the bit operation synthesizer for FPGA. | |
| This module implements the same bit operations (identity, not, shift_left, shift_right) | |
| as the Python version, but in synthesizable Amaranth HDL for FPGA deployment. | |
| """ | |
| from amaranth import * | |
| from amaranth.sim import Simulator, Tick, Delay |
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
| # amaranth_sygus_pbe_demo.py | |
| # | |
| # Minimal Amaranth demo for a SyGuS-style PBE bitvector task on FPGA-like hardware. | |
| # It enumerates a tiny fixed-shape program: y = op2( op1(x, c0), c1 ) | |
| # over 4-bit values, and checks each candidate against example IO pairs stored in ROM. | |
| # A candidate that satisfies all examples is reported as a solution. | |
| # | |
| # This is a hardware-accelerated-friendly shape: the checker is a small pipeline; the | |
| # enumerator steps through configuration space (op1, op2, c0, c1). On real FPGA you would | |
| # replicate the checker and/or feed batches; here we simulate with Amaranth's Simulator. |
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
| """ | |
| Agentic sampling loop that calls the Anthropic API and local implementation of anthropic-defined computer use tools. | |
| basically the same as https://github.com/anthropics/anthropic-quickstarts/blob/8f734fd08c425c6ec91ddd613af04ff87d70c5a0/computer-use-demo/computer_use_demo/loop.py | |
| just with a few changes to reduce overhead | |
| """ | |
| import platform | |
| from collections.abc import Callable | |
| from datetime import datetime | |
| from enum import StrEnum |
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
| //this code will show you the battery charge left on the screen | |
| //and dim the screen (to conserve power) | |
| //and go to sleep when you press the left builtin button | |
| //to wake it up again, just hit the reset button on the side | |
| //download as zip and add to libraries folder in Arduino folder https://github.com/pangodream/18650CL | |
| #include <Pangodream_18650_CL.h> | |
| #define ADC_PIN 34 |
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://youtu.be/9nT23gPfEb8 | |
| import bpy | |
| import math | |
| #delete all objects | |
| bpy.ops.object.select_all(action='SELECT') | |
| bpy.ops.object.delete() | |
| #delete all materials | |
| for m in bpy.data.materials: |
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 bpy | |
| import random | |
| #delete all objects | |
| bpy.ops.object.select_all(action='SELECT') | |
| bpy.ops.object.delete() | |
| #delete all materials | |
| for m in bpy.data.materials: | |
| bpy.data.materials.remove(m) | |
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 bpy | |
| #delete all objects | |
| bpy.ops.object.select_all(action='SELECT') | |
| bpy.ops.object.delete() | |
| #delete all materials | |
| for m in bpy.data.materials: | |
| bpy.data.materials.remove(m) | |
| #create a new material |
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 bpy | |
| #delete all objects | |
| bpy.ops.object.select_all(action='SELECT') | |
| bpy.ops.object.delete() | |
| #delete all materials | |
| for m in bpy.data.materials: | |
| bpy.data.materials.remove(m) | |
| #create a new material |
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
| const musicMachine = Machine( | |
| { | |
| id: 'music', | |
| initial: '0', | |
| states: { | |
| 0 : { | |
| on: { | |
| t11: | |
| {description: 'not((inCave passage)) and not((inMarket passage)) and not((inTown passage))', |
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 bpy | |
| import random | |
| bpy.ops.object.select_all(action='SELECT') | |
| bpy.ops.object.delete() | |
| from math import sin, pi | |
| bpy.ops.object.empty_add() | |
| cameraPath = bpy.context.active_object | |
| cameraPath.keyframe_insert("location", frame=1) |
NewerOlder