Skip to content

Instantly share code, notes, and snippets.

Avatar

Navin Mohan navin-mohan

View GitHub Profile
@navin-mohan
navin-mohan / newton.cpp
Last active Jun 14, 2019
Newton-Raphson Method
View newton.cpp
/*
* ------------------------
* | Newton-Raphson Method |
* ------------------------
*
* Author: Navin Mohan
* Website: https://nvnmo.github.io
*
* MIT License
*
@navin-mohan
navin-mohan / hack.js
Last active May 19, 2019
resnet50 visualization
View hack.js
/*
** HOW TO USE
** --------------
** Go to http://alexlenail.me/NN-SVG/AlexNet.html
** Open console (Ctrl + Shift + J on Chrome)
** Paste this script and hit enter
*/
document.getElementsByClassName('btn btn-primary btn-add input-group-prepend')[0].classList.add('add-layer-btn')
View addition.asm
ORG 0000
CLR C
MOV DPTR,#0100
MOVX A,@DPTR
MOV R0,A
INC DPTR
MOVX A,@DPTR
ADD A,R0
INC DPTR
MOVX @DPTR,A
@navin-mohan
navin-mohan / concat.c
Created Apr 11, 2018
concat and remove
View concat.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <pthread.h>
#include <string.h>
#include <stdlib.h>
// gcc -pthread concat.c -o concat
View A.c
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
int main(){
int n,i,a,fd1;
View tlp.sh
#!/bin/bash
sudo pacman -S tlp --noconfirm
sudo systemctl enable tlp.service
sudo systemctl enable tlp-sleep.service
sudo systemctl mask systemd-rfkill.service
sudo systemctl mask systemd-rfkill.socket
sudo systemctl start tlp.service
sudo systemctl start tlp-sleep.service
View parser.py
from html.parser import HTMLParser
class TextExtractionParser(HTMLParser):
'''
Custom HTML Parser that extracts
textual data from HTML
'''
def __init__(self,*args,**kwargs):
super().__init__(*args,**kwargs)
self.word_list = []
View lr.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pass1.c
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define TAB_SIZE 100
#define SYMBOL_SIZE 30
#define OPCODE_SIZE 10
@navin-mohan
navin-mohan / symtab.c
Last active Nov 14, 2017
symtab complete
View symtab.c
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define SYMTAB_SIZE 100
#define SYMBOL_SIZE 30
typedef unsigned int uint;