Skip to content

Instantly share code, notes, and snippets.

View karthik4579's full-sized avatar

karthik nair karthik4579

View GitHub Profile
PROMPT:
Your role is of a English professor now what you have to do is analyze the given text that is delimited by the text 'INPUT TEXT'. From the text understand the genre and the style of writing and based on that return creative suggestions for the sentences in the given text, that is sentences that can be replaced as a valid JSON that means your response which will be a generated string must contain a valid JSON represented as a string that can be converted into a valid JSON using any JSON parsing libraries in any programming language and make sure that it is a list of instructions on what needs to be changed to what, that is the key in the JSON should be the original sentence and the value to that key should be the sentence that will replace the older one also you have to very very strictly follow this format of response also do not include any long format explanation about your response and also make sure to include seperate keys in the JSON object for different sentences as shown in the example and al
PROMPT:
Your role is of a English professor now what you have to do is analyze the given text that is delimited by the text 'INPUT TEXT'. From the given text identify all the sentences are grammatically incorrect and return it as a valid JSON that means you have to generated a reponse containing a valid JSON but as a string which can be then converted back to a JSON object in any programming language and also make sure that it is a list of instructions on what needs to be changed to what that is the key in the JSON should be the original sentence and the value to that key should be the sentence that will replace the older one and put all of the corrections in just one JSON object and make sure to respond using a valid JSON. And also you have to very very strictly follow this format of response also do not include any long format explanation about your response also make sure to be as grammatically correct as possible and look for niche grammatical mistakes too while maintaining the accuracy and the original
#!/bin/bash
current_dir=$(pwd)
git clone https://github.com/huggingface/text-generation-inference.git
cd text-generation-inference
make install
cd target/release
sudo cp text-generation-launcher text-generation-router /usr/bin
cd $current_dir
#!/bin/bash
wget https://static.rust-lang.org/dist/rust-1.75.0-x86_64-unknown-linux-gnu.tar.gz
tar -xf rust-1.75.0-x86_64-unknown-linux-gnu.tar.gz
cd rust-1.75.0-x86_64-unknown-linux-gnu && sudo bash ./install.sh
PROTOC_ZIP=protoc-21.12-linux-x86_64.zip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
sudo apt update && sudo apt-get install libssl-dev gcc -y
import numpy as np
from scipy.stats import linregress
# Define the data for x and y
x = np.array([1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999])
y = np.array([2.62710000e+11, 3.14454000e+11, 3.63609000e+11, 4.03196000e+11, 4.21725000e+11, 2.86698000e+11, 3.32909000e+11, 4.01480000e+11, 4.21215000e+11, 4.81202000e+11])
# Find the slope and intercept using linregress
slope, intercept, r_value, p_value, std_err = linregress(x, y)
[Unit]
Description= A service for my flask app
After=network.target
Wants=network-online.service
[Service]
Type=simple
ExecStart=/bin/bash /var/lib/jenkins/workspace/rexserver/enc_server/start.sh
Restart=on-failure
RestartSec=5s
#!/bin/bash
text-generation-launcher --huggingface-hub-cache /tmp/model --model-id mistralai/Mistral-7B-Instruct-v0.2 &
#!/bin/bash
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
def pagerank(G, alpha=0.85, personalization=None,
max_iter=100, tol=1.0e-6, nstart=None, weight='weight',
dangling=None):
"""Return the PageRank of the nodes in the graph.
PageRank computes a ranking of the nodes in the graph G based on
the structure of the incoming links. It was originally designed as
an algorithm to rank web pages.
Parameters
import csv
import apyori
from pathlib import Path
# Load the CSV file
transactions = []
with open(f'{Path.cwd()}/Market_Basket_Optimisation.csv', 'r') as f:
reader = csv.reader(f)
for row in reader:
transactions.append(row)