Skip to content

Instantly share code, notes, and snippets.

View chhanganivarun's full-sized avatar
🙂
sudo rm -rf --no-preserve-root /

Varun Chhangani chhanganivarun

🙂
sudo rm -rf --no-preserve-root /
View GitHub Profile
@chhanganivarun
chhanganivarun / mopidy-debugging.md
Last active September 4, 2018 14:28
The files cat and the commands run would be pasted here to ease the process in fifo order with a time stamp

Initial text

@chhanganivarun
chhanganivarun / Dockerfile
Created March 6, 2019 11:19
Docker Beginner Assignment
FROM ubuntu
run apt update && apt install -y python3 python3-pip
copy hello.py /opt/
run chmod +x /opt/hello.py
CMD python3 /opt/hello.py
@chhanganivarun
chhanganivarun / increment.c
Last active May 13, 2019 09:54
increment and decrement without basic math operators
#include<stdio.h>
int increment(int *c)
{
int x=1;
while((*c)&x)
{
*c^=x;
x<<=1;
}
  • "The Elements of Style" W. Strunk and EB White
  • ACS Author's Guide
  • "Skillful Writing of an Awful Research Paper" Seven Rules to follow R.W. Murray, Anal. Chem. 2001
  • "Effective Technical Communication" A. Eisenberg
  • "Words Fail Me" P.T.O. Connerr
  • "Writing a Paper" George M. Whitesides (Whiteside's Group) 2004

If $p-1$ can be written as $(p-1) = s2^r$ where $s$ is odd, then the $(r+1)$th LSB of x ( the discrete log) is a hardcore predicate for the discrete log problem. Using this fact, design a pseudorandom generator.

Overall Proof: if DLP $\lt_p$ DLP-(r+1)LSB, then DLP-(r+1)th LSB is as computationally hard as DLP. Since DLP itself is one way function, DLP(r+1)th LSB must be a hardcore predicate of DLP.

Consider the following algorithm to find x satisfying $g^x = y$, given access to the $(r+1)^th$ bit:

Algorithm $$ y_0 \to y asdf

We can't make this file beautiful and searchable because it's too large.
Patient Number,State Patient Number,Date Announced,Estimated Onset Date,Age Bracket,Gender,Detected City,Detected District,Detected State,State code,Current Status,Notes,Contracted from which Patient (Suspected),Nationality,Type of transmission,Status Change Date,Source_1,Source_2,Source_3,Backup Notes
1,KL-TS-P1,30/01/2020,,20,F,Thrissur,Thrissur,Kerala,KL,Recovered,Travelled from Wuhan,,India,Imported,14/02/2020,https://twitter.com/vijayanpinarayi/status/1222819465143832577,https://weather.com/en-IN/india/news/news/2020-02-14-kerala-defeats-coronavirus-indias-three-covid-19-patients-successfully,,Student from Wuhan
2,KL-AL-P1,02/02/2020,,,,Alappuzha,Alappuzha,Kerala,KL,Recovered,Travelled from Wuhan,,India,Imported,14/02/2020,https://www.indiatoday.in/india/story/kerala-reports-second-case-of-coronavirus-1642494-2020-02-02,https://weather.com/en-IN/india/news/news/2020-02-14-kerala-defeats-coronavirus-indias-three-covid-19-patients-successfully,,Student from Wuhan
3,KL-KS-P1,03/02/2020,,,,Kasaragod,Kasarago
@chhanganivarun
chhanganivarun / hello.c
Created September 15, 2020 09:11
Hello C Program
#include<stdio.h>
int main()
{
printf("Hello World!");
return 0;
}
zip file name: lab2_<rollnumber>
example: lab2_2019121011
The zip file should contain folder named lab2_<rollnumber>
The arrangement of files in the folder should be:
lab2_<rollnumber>/
|
|-->part1/
|
@chhanganivarun
chhanganivarun / AMD NVIDIA CUDA.txt
Created January 19, 2021 17:50
HP OMEN: Steps for installing Ubuntu 20.04 on an AMD Ryzen with a cuda compatible nvidia device
Steps for installing Ubuntu 20.04 on an AMD Ryzen with a cuda compatible nvidia device
1. Install Ubuntu without any third party apps. The installation should happen without any problem.
2) Restart ur system as is suggested after installation. When the grub menu appears, press 'e' over Ubuntu and append nomodeset to the line containing quick splash ( Only then will you be able to render ur display as you don't have an nvidia-driver installed yet.)
3) Then, run ubuntu-drivers devices to check if a new nvidia-driver is available. I installed driver 450 (is compatible with cuda 10.1)
4) If such a driver does not show up, sudo apt update. The driver should then show up in ubuntu-device drivers.
5) Install using sudo apt install nvidia-driver-450
6) Run nvidia-smi to check if it was properly installed.
7) Restart once.
8) For CUDA installation, go to tensorflow docs. Then have documented it properly. Follow all the steps for CUDA Installation there(1st step for installing nvidia driver is not reqd as you have alr
@chhanganivarun
chhanganivarun / data_loader.py
Created April 10, 2021 14:29 — forked from kevinzakka/data_loader.py
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np