Skip to content

Instantly share code, notes, and snippets.

View sleepingcat4's full-sized avatar
👾
geometric thinking

tawsif sleepingcat4

👾
geometric thinking
View GitHub Profile

We have to change the following files:

  1. Navigator/Subtopic_Query_Expansion.py
  2. Navigator/get_paper_embeddings.py
  3. Navigator/google_scholar_api.py
  4. Navigator/outline_creation.py
  5. Navigator/run_full_subtopic_expansion_process.py
  6. Navigator/search_api.py
  7. Navigator/subtopic_aspect_generation.py
import numpy as np
from scipy.misc import derivative
def path(x):
return a * x**2 + b * x + c
a = float(input())
b = float(input())
c = float(input())
d = float(input())
from sklearn import svm
# Create an SVM classifier
classifier = svm.SVC()
## X Being the Energy
### Y Being the Pressure (Particle Beam Pressure)
classifier.fit(X, Y)
import pandas as pd
import matplotlib.pyplot as plt
# Read the CSV file
df = pd.read_csv('your_file.csv')
# Extract the columns
X = df.iloc[:, 0] # Column 1
Y = df.iloc[:, 1] # Column 2
@sleepingcat4
sleepingcat4 / param_counter.py
Created November 24, 2023 12:56
we're counting params using torchscale
total_params = sum(p.numel() for p in model.parameters())
print(f"Total parameters in the model: {total_params}")
@sleepingcat4
sleepingcat4 / main_body.py
Created November 24, 2023 12:47
main body code (4 lines)
from torchscale.architecture.config import EncoderConfig
from torchscale.architecture.encoder import Encoder
config = EncoderConfig(
vocab_size=64000,
hidden_size=1000,
num_layers=10
)
model = Encoder(config)
@sleepingcat4
sleepingcat4 / torchscale_library
Created November 24, 2023 12:42
installing library
pip install torchscale