Skip to content

Instantly share code, notes, and snippets.

View newtoallofthis123's full-sized avatar
👓
Woop woop

Ishan Joshi newtoallofthis123

👓
Woop woop
View GitHub Profile
@newtoallofthis123
newtoallofthis123 / main.go
Created January 12, 2024 12:10
User Password Auth
package main
import (
"database/sql"
"fmt"
"os"
_ "github.com/lib/pq"
"golang.org/x/crypto/bcrypt"
)
@newtoallofthis123
newtoallofthis123 / manual_logistic_regression.py
Created October 2, 2023 06:04
Logistic Regression Manually
import numpy as np
from sklearn.model_selection import train_test_split
import pandas as pd
df = pd.read_csv(
'https://raw.githubusercontent.com/johnmyleswhite/ML_for_Hackers/master/02-Exploration/data/01_heights_weights_genders.csv')
df.head()
BinaryGenders = np.zeros(len(df))
:set number
:set relativenumber
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a
:set guicursor=n-v-c-i:ver1
:set termguicolors
@newtoallofthis123
newtoallofthis123 / atomice_weigth_cal.py
Created May 10, 2023 06:22
One of my first python programs
import json
import re
import argparse
int_to_str_seperator = re.compile("([a-zA-Z]+)([0-9]+)")
parser = argparse.ArgumentParser()
parser.add_argument("molecular_formula",help="Give the molecular formula in the syntax 'C12|H12|OH1'")
args = parser.parse_args()
@newtoallofthis123
newtoallofthis123 / structs.c
Created March 21, 2023 17:10
C program for Struct
#include <stdio.h>
#include <string.h>
struct Student {
char name[100];
int marks;
int roll;
float grade;
};
@newtoallofthis123
newtoallofthis123 / time.c
Created January 13, 2023 07:50
C calculator for Hashnode Article
#include <stdio.h>
int main(int argc, char const *argv[])
{
int seconds, minutes, hours;
scanf("%d", &seconds);
hours = seconds / 3600;
minutes = (seconds % 3600) / 60;
seconds = (seconds % 3600) % 60;
printf("%d:%d:%d", hours, minutes, seconds);
@newtoallofthis123
newtoallofthis123 / shortpaw.py
Created July 26, 2022 09:03
A Simple CLI for shortpaw
from rich.console import Console
from rich.panel import Panel
from rich.progress import Progress
from rich.columns import Columns
from rich.markdown import Markdown
from rich.table import Table
from rich import print
from rich.text import Text
from rich.json import JSON
from rich.prompt import Prompt, Confirm