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 anthropic | |
client = anthropic.Anthropic() | |
message = client.messages.create( | |
model="claude-3-5-sonnet-20241022", | |
max_tokens=1000, | |
temperature=0, | |
system="Always respond in JSON.", | |
messages=[ |
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
{"usage":{"num_pages":3},"result":{"type":"full","chunks":[{"content":"# Jazz Pharmaceuticals (JAZZ)\n\nRating: OUTPERFORM* Price (9 May 14, US$): 129.45 Target Price (US$): 170.00 52-Week Price Range: 55.28-174.98 Market Cap. (US$ m): 8,196.0 Enterprise Value (US$ m): 9,089.5\n\n*Target Price is for 12 months.\n\nResearch Analysts: Peter Sullivan, Ph.D. Seth Davis, M.D. John Tuld, M.D.\n\nFigure 1 JAZZ Stock Price Performance\n\nACCUMMULATE RECOMMENDATION/COMPANY UPDATE\n\n## Strong Q1 FY14 & Multiple Catalysts Ahead\n\n- Q1 Results: Jazz Pharmaceuticals reported strong Q1 results on Thursday, with revenue of $247 million vs. $196 million in Q1 of FY 13, representing 26% YoY growth. The GAAP Net Loss was $93 million vs. GAAP Net Income of $43 million in Q1 of FY 13, but $127 million of that was due to an upfront license fee and milestone payment for JZP-110. Adjusted Net Income was $101 million vs. $84 million in Q1 of FY 13. These figures were slightly ahead of Goldman Stanley estimates of $240 million in r |
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
{ | |
"usage": { | |
"num_pages": 63, | |
"num_fields": 1098 | |
}, | |
"result": [ | |
{ | |
"companyName": "MetLife", | |
"effectiveDate": null, | |
"benefitPlans": [ |
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 requests | |
import os.path | |
from pdf2image.pdf2image import convert_from_path | |
from PIL import ImageDraw | |
pdf_path = os.path.expanduser("~/Downloads/research-highlight.pdf") | |
upload_form = requests.post("https://v1.api.reducto.ai/upload").json() | |
requests.put(upload_form["presigned_url"], data=open(pdf_path, "rb")) | |
response = requests.post( |
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
{ | |
"$ref": "#/definitions/extension", | |
"definitions": { | |
"extension": { | |
"type": "object", | |
"properties": { | |
"$schema": { | |
"type": "string" | |
}, | |
"name": { |
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
# Setup OpenAI GPT API | |
import openai | |
import textwrap | |
# Set the GPT-3 API key | |
openai.api_key = "YOUR_API_KEY" | |
def get_gpt_response(prompt, max_tokens=2048, temperature=0.7, n=1): | |
response = openai.Completion.create( |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" | |
xsi:type="ContentApp"> | |
<Id>03648872-fa1f-4c2d-b9aa-29ce4d0a2bbc</Id> | |
<Version>1.0.0.0</Version> | |
<ProviderName>Contoso</ProviderName> | |
<DefaultLocale>en-US</DefaultLocale> | |
<DisplayName DefaultValue="Oloren PPT Visualize"/> |
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
‰PNG | |
IHDR Ì Ú¦!m sRGB ®Îé gAMA ±üa úPLTE / L N !P "Q #S #U $V %X &Z &[ '] (_ (a )c *d *f +h ,j -l -m .n .o /o 0o 1o 2n 3n 4n5n6n | |
7m7m8m9m9m:l;l<l <l"=l$>l&>l'?l)@k+Ak,Ak.Bk/Ck1Dk2Dk3Ek5Fk6Fk7Gk8Hk:Ik;Ik<Jk=Kk>Kk@LkAMkBNkCNkDOkEPkFPkGQkHRkISkJSkKTkLUkMUkNVkOWlPXlQXlRYlSZlTZlU[lV\lW]mX]mY^mZ_m[_m\`m]an^bn_bn_cn`dnaeobeocfodgoegofhpgiphjpikqjlqkmqlmrmnrnorooropspqsqrsrrtsstttuuuuvvvwwvxxvyxwzyw{zw{{x|{x}|x~}x~x€~xx‚€xƒx„x…‚x†ƒx‡„xˆ…x‰…xІx‹‡xŒˆxˆxމxŠx‹x‘Œx’Œx“x”Žx•x–w—w˜‘w™’wš“w›“wœ”w•wž–vŸ—v ˜v¡˜v¢™v£šu¤›u¥œu¦œu§u¨žt©Ÿtª t«¡t¬¡s¢s®£s¯¤s°¥r±¦r²¦r´§qµ¨q¶©q·ªp¸«p¹«pº¬o»o¼®n½¯n¾°n¿±mÀ±mÁ²l³lôlŵkƶkÇ·jȸjɸiʹi˺hÌ»hͼgνgоfÑ¿fÒÀeÓÀeÔÁdÕÂcÖÃc×ÄbØÅaÙÆaÛÇ`ÜÈ`ÝÉ_ÞÊ^ßË]àË]áÌ\ãÍ[äÎ[åÏZæÐYçÑXèÒWéÓVëÔVìÕUíÖTî×SïØRðÙQñÚPóÛOôÜNõÝMöÞL÷ßKùàIúàHûáGüâFýãEÿäCÿåBÿæBÿçCÿèDÿéEŸ‘+Û€rU pHYs à ÃÇo¨d HIDATx^íÔåÒ.€A8‚H7Ò!twww | |
J# ÝÝÝ%Jw(¤”bJwIKfx†ï½þ²{;ð=6â°aÃ~‘2rFɨùaFËèùQÆÈ3fÆÊØ'ãf¼ŒŸ 2a&ÊÄ“dÒÉò“L>0E¦ÌT™:ÓdÚL—é3C~š3SfÎ,™5³eöÌ‘ŸeÎÌ•¹3OæÍ|™?dÁ,”… |
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 sqlite3 | |
import numpy as np | |
import datetime | |
secret_key = 0.10721210370764633 | |
db_path = '/var/jail/home/raunakc/lab08a/server.db' | |
def request_handler(request): | |
if request['method'] == 'GET': |
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
{ | |
"Beef": [ | |
357.0, | |
224.0, | |
312.0, | |
281.0, | |
185.0, | |
185.0, | |
540.0, | |
432.0, |
NewerOlder