I hereby claim:
- I am sumanmichael on github.
- I am sumanmichael (https://keybase.io/sumanmichael) on keybase.
- I have a public key ASD1wzElG_voZQBacUCrvmz0gEUa9UKDfZdBaM3ISl-HxAo
To claim this, I am signing this object:
import os | |
os.environ["OPENAI_API_KEY"] = "Set-Your-Key" | |
# For retriving the data from the website | |
import bs4 | |
from bs4 import BeautifulSoup as Soup | |
from langchain.document_loaders.recursive_url_loader import RecursiveUrlLoader | |
# For accessing the database | |
from langchain.vectorstores.pgvector import PGVector | |
# For Embedding and accessing LLM Model |
dnf -y update | |
dnf -y install oracle-database-preinstall-19c.aarch64 | |
mkdir -p /u01/app/oracle | |
chown -r oracle:oinstall /u01/app | |
systemctl stop firewalld | |
# Optional: | |
passwd oracle |
# Tested with oracle_fdw 2.5.0, PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg22.04+1), Oracle client 21.8.0.0.0 | |
# user: root | |
apt update | |
apt install -y wget unzip | |
# change the postgres version here (15) | |
# also make sure you've configured postgres repository and installed this way: https://www.postgresql.org/download/linux/ubuntu/ | |
apt install -y build-essential libaio1 postgresql-server-dev-15 |
import torch | |
from torch import nn | |
import numpy as np | |
# Get pytorch LSTM weights (w_ih, w_hh, b_ih, b_hh) from tensorflow LSTM weights (kernel, bias) | |
def get_pytorch_lstm_weights_from_tensorflow(kernel, bias, INPUT_SIZE, HIDDEN_SIZE): | |
def reorder_lstm_gates(w): | |
# The split order of gates are different in pytorch and tensorflow | |
# i = input_gate, j = new_input, f = forget_gate, o = output_gate |
class BatchNorm2d(nn.Module): | |
# `num_features`: the number of output channels for a convolutional layer. | |
def __init__(self, num_features): | |
super().__init__() | |
shape = (1, num_features, 1, 1) | |
self.weight = nn.Parameter(torch.ones(shape)) | |
self.bias = nn.Parameter(torch.zeros(shape)) | |
self.moving_mean = torch.zeros(shape) |
import tensorflow as tf | |
import torch | |
from torch import nn | |
import numpy as np | |
from functools import reduce | |
from operator import __add__ | |
class Conv2dSamePadding(nn.Conv2d): |
I hereby claim:
To claim this, I am signing this object: