Skip to content

Instantly share code, notes, and snippets.

View monsieurpablo's full-sized avatar

Pablo Arango monsieurpablo

  • Hoare Lea
  • London, UK
View GitHub Profile
import re
# Bold: Mathematical Sans-Serif Bold
def char_to_bold(c):
if 'a' <= c <= 'z':
return chr(0x1D5EE + (ord(c) - ord('a')))
elif 'A' <= c <= 'Z':
return chr(0x1D5D4 + (ord(c) - ord('A')))
elif '0' <= c <= '9':
return chr(0x1D7CE + (ord(c) - ord('0')))
*anydesk.com
*anydesk*
@monsieurpablo
monsieurpablo / openAI_ChatGPT3.py
Created January 18, 2023 17:45
Integrate open AI API using Iron Python (Can be used inside Grasshopper3D)
import urllib2
import json
# Set the endpoint URL and the prompt text
url = "https://api.openai.com/v1/completions"
# Set the API key and other parameters
data = json.dumps({ "model": "text-davinci-003", "prompt": prompt, "temperature": 0.5, "max_tokens": 1024})
headers = { "Content-Type": "application/json", "Authorization": "Bearer {0}".format(api_key) }
// Update to version 1
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,