Skip to content

Instantly share code, notes, and snippets.

Avatar
🔘
I don't even know what I don't know.

Dat Adithya dat-adi

🔘
I don't even know what I don't know.
View GitHub Profile
@dat-adi
dat-adi / PermissionManagement.md
Created Dec 22, 2021
Notes taken on Permission Management in Linux.
View PermissionManagement.md

Introduction

Before we get started, it is important to execute a command that shows us what we are working with.

ls -l

Executing it on a system's home directory, with a particular file gives us the following response,

-rwxr-x-r-x 1 dat-adi users 2048 Dec 6 12:56 example.sh
@dat-adi
dat-adi / recent-activity.txt
Last active May 28, 2022
⚡️ GitHub Feed
View recent-activity.txt
🎉 Merged PR #9 in dat-adi/MedEx
💪 Opened PR #9 in dat-adi/MedEx
🎉 Merged PR #96 in forgeflux-org/interface
🎉 Merged PR #97 in forgeflux-org/interface
🎉 Merged PR #95 in forgeflux-org/interface
@dat-adi
dat-adi / tkinter_classes.py
Created Jan 24, 2021
Here's an implementation of working with Classes in Tkinter.
View tkinter_classes.py
import tkinter as tk
from tkinter import ttk
class windows(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
# Adding a title to the window
self.wm_title("Test Application")
@dat-adi
dat-adi / google-auth-test.py
Created Jan 23, 2021
Working with the `google-auth` module
View google-auth-test.py
import gspread
from google.oauth2 import service_account
from pprint import pprint
# used to retrieve credentials from the *creds.json* file
creds = service_account.Credentials.from_service_account_file("creds.json")
scoped_credentials = creds.with_scopes(
[
"https://spreadsheets.google.com/feeds",
'https://www.googleapis.com/auth/spreadsheets',
@dat-adi
dat-adi / test_sheet.py
Last active Jan 17, 2021
A small snippet of code to exhibit the functionality of Google Sheets in Python.
View test_sheet.py
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from pprint import pprint
#sheet access
scope = ["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive"]
# used to retrieve credentials from the *creds.json* file
creds = ServiceAccountCredentials.from_json_keyfile_name("creds.json", scope)
client = gspread.authorize(creds)
@dat-adi
dat-adi / psutil-system-demo.py
Last active Dec 19, 2021
A compilation of functions of the `psutil` module.
View psutil-system-demo.py
# Askpython.com, JournalDev.
# G V Datta Adithya
# Importing the module before utilization
import psutil
# Retrieving information regarding the CPU
## Returns the system CPU times as a named tuple
print(psutil.cpu_times())
View what-a-gist.py
print("You might question as to what a gist is.")
print("Well, I hate to break it to ya, but, i'm asking the same question.")