Skip to content

Instantly share code, notes, and snippets.

View navinthenapster's full-sized avatar
💭
I may be slow to respond.

Navin Infant Raj navinthenapster

💭
I may be slow to respond.
View GitHub Profile
@navinthenapster
navinthenapster / pre_in.txt
Created October 11, 2021 17:13
pre_increment and post increment operation
++a * ++a = (a+2)^2
++a * a++ = (a+1)(a+2)
a++ * ++a = (a)(a+2)
a++ * a++ = (a)(a+1)
# credited karthikraja
@navinthenapster
navinthenapster / .vimrc
Created October 7, 2021 02:08
VIM personalized settings. include in ~/.vimrc or ~/.gvimrc
color peachpuff
set guifont=Monospace\ 12
#for backspace
set backspace=indent,eol,start
#for shortcut ctrl+c and ctrl+v and other
source $VIMRUNTIME/mswin.vim
behave mswin
@navinthenapster
navinthenapster / pandas_trick.py
Last active August 23, 2021 16:13
Tips and Tricks for pandas operation
# to read data
df_data=pd.read_csv("csvfile.csv")
#replace value in columns
df_data = df_data.replace({
'colname': {
'value': 'new_value'
}
})
@navinthenapster
navinthenapster / show_wifi_password.bat
Created August 23, 2021 15:33
To see saved wifi password in windows
# Windows
netsh wlan show profiles
netsh wlan show profile name=<wifi_name_ssid> key=clear
https://www.online-tech-tips.com/computer-tips/view-saved-wifi-passwords-windows/
#ubuntu
sudo cat /etc/NetworkManager/system-connections/<wiFi_name_ssid>.nmconnection
https://itsfoss.com/how-to-find-saved-wireless-wifi-passwords-ubuntu/
@navinthenapster
navinthenapster / GPU_instanation_guide.md
Last active August 25, 2021 11:53
To configure and connect GPU drivers to tensorflow

https://medium.com/@medasuryatej/install-tensorflow-gpu-2-0-f4e215438199

for libcupti problem

I have encountered this problem before. When you use CUDA 8.0,the file cupti64_80.dll lies in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\extras\CUPTI\libx64. I just fixed the problem by copying the dll into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin, and the file cupti.lib in the same location into C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64.

On Nvidia Control Panel, there is a Developer-Manage GPU Performance Counters section. Default toggle is to limit access to GPU preformance counters to admin users only. But you must select 'Allow acces to the GPU prformance counters to all users'. Once toggled, access permissions to the cupti dll are resolved.

@navinthenapster
navinthenapster / README_cadence.txt
Last active March 30, 2021 08:55
CADENCE tools README
================================================================================================================================================================================================================
_ ____ ___ ____ _ _ ____ ____ _ ____ _____ _ _ ____ _____
/ \ / ___|_ _/ ___| | / \ | __ ) / ___| / \ | _ \| ____| \ | |/ ___| ____|
/ _ \ \___ \| | | | | / _ \ | _ \ _____| | / _ \ | | | | _| | \| | | | _|
/ ___ \ ___) | | |___| |___ / ___ \| |_) |_____| |___ / ___ \| |_| | |___| |\ | |___| |___
/_/ \_\____/___\____|_____/_/ \_\____/ \____/_/ \_\____/|_____|_| \_|\____|_____|
===================================================================================================================================================================================================================
Snippet by Navin TheNapster
@navinthenapster
navinthenapster / responsive_view.html
Created March 12, 2020 11:51
Responsive Web Design Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navin - My Portifolo | Developer </title>
</head>
<style>
#web, #tablet, #mobile { display: none;}
@navinthenapster
navinthenapster / dateformatter.py
Created May 8, 2019 11:56
Date Format utils function Included the regular expression and the datetime utils function.
import re
from datetime import datetime, timedelta
datas=["01:48PM","Yesterday 06:31PM", "04/08 05:25PM","11/07/2018 05:12PM"]
def date_parse(data):
pattern1 = "(\d{2}):(\d{2})([AaPp][Mm])"
@navinthenapster
navinthenapster / Signal.py
Created May 8, 2019 11:54
Creating the signal in the python program for inter process communication
from pydispatch import dispatcher
SIGNAL = 'my-first-signal'
def handle_event( **kwargs ):
"""Simple event handler"""
print 'Signal was sent by', kwargs['message']
dispatcher.connect( handle_event, signal=SIGNAL, sender=dispatcher.Any )
first_sender = "sender"
second_sender = "sender"
@navinthenapster
navinthenapster / Loader.py
Created May 8, 2019 11:52
Loading script for printing the spinner in console
import sys
import time
def spinning_cursor():
while True:
for cursor in '|/-\\':
yield cursor
spinner = spinning_cursor()
for _ in range(50):