Skip to content

Instantly share code, notes, and snippets.

View gducharme's full-sized avatar

Geoffrey Ducharme gducharme

  • New York
View GitHub Profile
@gducharme
gducharme / gpt.sh
Last active February 2, 2023 14:15
#export OPENAI_TOKEN=
# models can be expensive or cheap.
# text-davinci-003 is powerful and is 0.002 dollar per token
# Get a token from https://beta.openai.com/account/api-keys
curl https://api.openai.com/v1/completions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_TOKEN" \
-v \
#/bin/bash
gh auth login --with-token < token.txt
#AUTHOR is the github name
#JIRA_ID is on the tin
#GH_TOKEN
#JIRA_TOKEN
bash -cx "$(curl -fsSL https://gist.githubusercontent.com/gducharme/46e06c6d809919e0d32d30e9ceb69cbb/raw/10a4523f99422f91ec5115b0d8bf9ac808911cfb/setup_t2.sh)"
#!/bin/bash
# set -x # Use for debug mode
# settings
export name="fast-ai-p2"
export cidr="0.0.0.0/0"
# get the correct ami
export region=`aws configure get region`
if [ $region = "us-west-2" ]; then
#!/bin/bash
# set -x # Use for debug mode
# settings
export name="fast-ai-t2"
export cidr="0.0.0.0/0"
# get the correct ami
export region=`aws configure get region`
if [ $region = "us-west-2" ]; then
ExternalGroupRelation.create(group_source_cd: 'REGTYPE_RTEUHC', external_group_id: '904871', group_id: 10, state_cd: nil, external_group_type_cd: "{\"level\":\"individual\",\"match\":[\"deductible\",\"2400\"],\"product\":\"GENMEDICAL\"}")
ExternalGroupRelation.create(group_source_cd: 'REGTYPE_RTEUHC', external_group_id: '904871', group_id: 10, state_cd: nil, external_group_type_cd: "{\"level\":\"individual\",\"match\":[\"deductible\",\"2400\"],\"product\":\"DERM\"}")
ExternalGroupRelation.create(group_source_cd: 'REGTYPE_RTEUHC', external_group_id: '904871', group_id: 10, state_cd: nil, external_group_type_cd: "{\"level\":\"individual\",\"match\":[\"deductible\",\"2400\"],\"product\":\"BEHAVHEALTH\"}")
ExternalGroupRelation.create(group_source_cd: 'REGTYPE_RTEUHC', external_group_id: '904871', group_id: 15, state_cd: nil, external_group_type_cd: "{\"level\":\"individual\",\"set\":[\"copay\",\"10\"],\"match\":[\"deductible\",\"1150\"],\"product\":\"GENMEDICAL\"}")
ExternalGroupRelation.create(group_source_cd:
@gducharme
gducharme / gist:71d63f1e2499ee6507f67446e3b44ee4
Last active June 14, 2016 19:46 — forked from andrzejsliwa/gist:778535
list all available cucumber steps - (rake cucumber:steps)
# based on http://www.natontesting.com/2010/01/11/updated-script-to-list-all-cucumber-step-definitions/
#
desc 'List all defined steps'
task :steps do
require 'hirb'
require 'ostruct'
extend Hirb::Console
puts "CUCUMBER steps:"
puts ""
step_definition_dir = "features/step_definitions"
@gducharme
gducharme / gist:1809773
Last active September 30, 2015 14:47
Rvm error
-bash: /Users/gducharme/.rvm/scripts/base: line 58: syntax error near unexpected token `fi'
-bash: /Users/gducharme/.rvm/scripts/base: line 58: `fi'
Original installed RVM version:
rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]
Turning on auto mode.
Downloading RVM from wayneeseguin branch master
% Total % Received % Xferd Average Speed Time Time Time Current