Skip to content

Instantly share code, notes, and snippets.

View monk1337's full-sized avatar
🌱
It's a long hard fight / But I'll always live for tomorrow.

Aaditya Ura monk1337

🌱
It's a long hard fight / But I'll always live for tomorrow.
View GitHub Profile
import tiktoken
from typing import Dict, List, Optional, Tuple, Union
class OpenAIProcessor:
def __init__(self, model: str = "text-davinci-003", token_limit: int = 4, api_key: str = None):
self._openai = openai
self.api_key = api_key
self._openai.api_key = api_key
from abc import ABC, abstractmethod
from typing import List, Optional, Union, Dict
import openai
class Model(metaclass=ABCMeta):
name = ""
description = ""
def __init__(self, api_key: str, model: str, **kwargs):
{'Study Title': 'CLINICAL TRIAL PROTOCOL',
'Sub-Title': 'A Phase II, Randomized, Double-blind, Placebo-controlled Study to Evaluate \nthe Safety and Efficacy of TJ301 (FE 999301) Administered Intravenously in \nPatients with Active Ulcerative Colitis ',
'Protocol Number': 'CTJ301UC201',
'Investigational Medicinal Product': 'TJ301 (solution for injection), also referred to as FE 999301 and Olamkicept',
'Indication': 'Active Ulcerative Colitis',
'Phase': 2,
'Investigators': 'Multicenter, international, across Mainland China, Taiwan, Republic of Korea and Australia',
'Coordinating Investigator': 'Prof. Dr. Minhu Chen Chair, Department of Gastroenterology and Hepatology Vice President The First Affiliated Hospital, Sun Yat-sen University 58 Zhongshan Road, Guangzhou, China',
'Expert committee': 'Prof. Dr. Stefan Schreiber Institute for Clinical Molecular Biology University Hospital Schleswig-Holstein Schittenhelmstrasse 12, 24105 Kiel, Germany',
'Name and Address of Sponsor': 'Leading Biopharm Limited
Section: Inclusion/Exclusion Criteria
Study Title: "A Phase III Study of New Drug A in Patients with Condition B"
Study Type: "Randomized, Double-blind, Placebo-controlled"
Intervention: "Drug A"
Target Population: "Patients with Condition B"
Duration of Study (in Months): "12"
Section: Background and Rationale
from operator import itemgetter
import itertools
import ast
import re
import json
class Parser:
import ast
import re
class Parser(object):
def __init__(self):
pass
def verify_python_object(self, data):
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['Label', 'Score'],
const fs = require("fs");
const regex = require("regex");
const download = require("./utils").download;
const bpe_file = { filename: "vocab.bpe", link: "https://github.com/syonfox/GPT-3-Encoder/raw/master/vocab.bpe" };
const encoder_file = { filename: "encoder.json", link: "https://github.com/syonfox/GPT-3-Encoder/raw/master/encoder.json" };
const bytesToUnicode = () => {
let bs = [
...Array.from(Array(ord("~") + 1 - ord("!")).keys()).map((x) => x + ord("!")),
---
- title: ML4H
year: 2022
id: ml4h22
link: https://ml4health.github.io/2022/
deadline: '2022-09-01 23:59:00'
abstract_deadline: '2022-09-01 23:59:00'
timezone: UTC-12
place: Hybrid (New Orleans, Louisiana)
date: Nov 28, 2022
#Use global flag
pip install gensim config --global http.sslVerify false
#on conda, disable the ssl
conda config --set ssl_verify False
conda update conda
# while downloading anything
import ssl