Skip to content

Instantly share code, notes, and snippets.

// tambo.ts
/**
* components
*
* This array contains all the Tambo components that are registered for use within the application.
* Each component is defined with its name, description, and expected props. The components
* can be controlled by AI to dynamically render UI elements based on user interactions.
*/
export const components: TamboComponent[] = [
@michaelmagan
michaelmagan / macsetup.sh
Last active July 4, 2024 21:01
Setup script for new macbooks
user='michaelmagan'
echo "Changing Saving Screenshots from Desktop to Pictures"
screenshots_file="/Users/${user}/Pictures/Screenshots"
mkdir $screenshots_file
defaults write com.apple.screencapture location $screenshots_file
echo "Installing xcode CLI"
xcode-select --install
import argparse
import math
parser = argparse.ArgumentParser(
description='Calculate time till free healthcare.'
)
parser.add_argument('--monthly_premium', default=40,
help='Monthly Premium (default: 40)')
parser.add_argument('--deductible', default=2000,
from __future__ import print_function
import itertools
def isprime(num):
if num == 4:
return False
for i in range(2, int(num/2)):
if num % i == 0:
return False
else:
import urllib2
from bs4 import BeautifulSoup
fortune_500 = 'http://fortune.com/fortune500/'
page = urllib2.urlopen(fortune_500)
soup = BeautifulSoup(page)
print soup.prettify()
#!/bin/bash
clear
echo "Creating Directory Structure"
counter=1
while [ $counter -le 9 ]; do
echo "Creating Unit $counter Folder"
folder="unit_$counter"
mkdir -p $folder
echo "copying unit $counter from mit to your folders"
if [$counter -eq 1 ]; then
### Bank Account
import random
class BankAccount(object):
"""Creates Bank Account and Functions"""
account_names = []
account_numbers = []
def __init__(self, name, balance = 0):
n = random.randint(1000,9999)