This file contains 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 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 |
This file contains 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
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): |
This file contains 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
{'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 |
This file contains 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
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 |
This file contains 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
from operator import itemgetter | |
import itertools | |
import ast | |
import re | |
import json | |
class Parser: |
This file contains 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 ast | |
import re | |
class Parser(object): | |
def __init__(self): | |
pass | |
def verify_python_object(self, data): | |
This file contains 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
<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'], |
This file contains 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
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("!")), |
This file contains 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
--- | |
- 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 |
This file contains 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
#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 |