Skip to content

Instantly share code, notes, and snippets.

View proofoftom's full-sized avatar
⛰️
Buidling the future of decentralized organizations

Tommy Cox proofoftom

⛰️
Buidling the future of decentralized organizations
View GitHub Profile
// Base Agent class that handles core functionality
class AIAgent {
constructor(userId, config = {}) {
this.userId = userId;
this.context = new Map();
this.config = {
modelName: config.modelName || 'default-model',
maxTokens: config.maxTokens || 1000,
temperature: config.temperature || 0.7
};
@proofoftom
proofoftom / semaphore-v4-ceremony_attestation.log
Created July 9, 2024 16:30
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm proofoftom-3009533 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 336
Contribution Hash: 104139d2 09a32cbf 7c5e2902 1d659d75
dec1d6ce f3da6bb3 a895b642 4229d9aa
a82c08ed 6608458c d113b497 c7470499
0c20aa0a 07145736 6a82bb53 41944e3f
@proofoftom
proofoftom / attestation.txt
Created September 2, 2021 23:02
Attestation
I contributed to the clr.fund Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: qvt32
Contributor # 10
Hash: 8dd4d6bd 4b108d9f 8074ab5f 8ee9b1ff
b09139df 97f04fda 968980a2 26a3a90c
6528736b dc9ef85b ea5213c7 84063ba8
b182f378 2e42af7a ffb32ba3 a002fbac
const { getNetworkClient } = require("@colony/colony-js-client");
const { open } = require("@colony/purser-software");
const { BN } = require("web3-utils");
(async () => {
// Get a wallet instance
const wallet = await open({
privateKey: process.env.PRIVATE_KEY
});
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreifvjkwicsolhioqqyq22mf6nxh4ji5644ipgxmrg3l5sl7ey6srem ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmZNPdVyX1YsQntry8TZDrNcU6nv52e3jDcTrthULDsrx9 ✅
Create your profile today to start building social connection and trust online at https://3Box.io/

Keybase proof

I hereby claim:

  • I am proofoftom on github.
  • I am proofoftom (https://keybase.io/proofoftom) on keybase.
  • I have a public key ASApmDelUVkjN7vWfFkKqH2l7btbuk-skDk6hB6XWiJvigo

To claim this, I am signing this object:

pragma solidity ^0.4.0; // Solidity version this contract was written against, for compatability purposes.
// A hyper funding of an outcome.
contract Play {
// Player data type.
struct Player {
uint amountStaked; // The amount a user is willing to stake for their play.
bool isStaked; // Is this user already staked on an outcome?
uint8 outcome; // The index of the Outcome staked against.
@proofoftom
proofoftom / CarryOperations.php
Last active January 19, 2018 22:25
Math helper to find the number of carry operations in an addition operation.
<?php
/**
* @file Math helper to find the number of carry operations in an addition operation.
*/
class CarryOperations
{
/**
* Counts the number of carry operations when adding two numbers.
*
@proofoftom
proofoftom / one_coupon_of_type_per_order.php
Created December 27, 2016 21:10
Limits a coupon type (i.e. Discount Coupons) to one per order, while allowing other types (i.e. Gift Cards) to have multiple applied to the order.
<?php // Required for gist code formatting.
/**
* Implements hook_commerce_coupon_condition_outcome_alter().
*/
function mymodule_custom_commerce_coupon_condition_outcome_alter(&$outcome, $context) {
$order_wrapper = entity_metadata_wrapper('commerce_order', $context['order']);
$order_coupons = $order_wrapper->commerce_coupons->value();
$coupon = $context['coupon']->value();