Skip to content

Instantly share code, notes, and snippets.

View Atreyagaurav's full-sized avatar
💭
I have so much to learn there is no time for studying.

Zero Atreyagaurav

💭
I have so much to learn there is no time for studying.
  • University of Cincinnati
  • Cincinnati, Ohio
View GitHub Profile
@Atreyagaurav
Atreyagaurav / picom-oklab-shader.gsgl
Last active April 3, 2023 23:45
Oklab Lightness inversion shader for Picom
#version 430
uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;
in vec2 texcoord; // texture coordinate of the fragment
const float pow_cbrt = 1./3;
vec3 rgb2oklab(vec3 rgb) {
vec3 srgb = rgb / 12.92;
for (int i = 0; i < 3; i++) {
@Atreyagaurav
Atreyagaurav / menu.json
Created February 1, 2021 08:00
dmenu based scripts execution
{
"bgcolor": "black",
"scripts": {
"next-chapter": {
"name": "Next Chapter",
"script": "/home/gaurav/scripts/next_episode.py",
"tooltip": "While in firefox, change the address to next chapter or episode"
},
"log-anime": {
"name": "Animes/Series Log",
@Atreyagaurav
Atreyagaurav / basic-rep.json
Last active January 23, 2021 10:15
Automated Translation ffrom jp to en
{
"「":"\"",
"」":"\"",
"『":"\"",
"』":"\"",
"―":"-"
}
// Build with: gcc -o plugin.so plugin.c `pkg-config --cflags mpv` -shared -fPIC
// Warning: do not link against libmpv.so! Read:
// https://mpv.io/manual/master/#linkage-to-libmpv
// The pkg-config call is for adding the proper client.h include path.
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@Atreyagaurav
Atreyagaurav / menu.py
Last active November 27, 2020 09:47
script which shows menu for most used scripts configurable in json.
from PyQt5 import QtGui, QtWidgets, QtCore
from PyQt5.QtDBus import QDBusConnection, QDBusMessage
import sys
import json
import subprocess
import os
def exe_script(name,all_action_dict):
action = all_action_dict[name.text()]
if action == 'exit':
@Atreyagaurav
Atreyagaurav / gogoanime.py
Last active June 29, 2023 16:18
Downloads as well as checks anime episodes from gogoanime.
#!/usr/bin/env python
import json
import os
import sys
from string import Template
from urllib.parse import urljoin
import subprocess
import time
import pycurl
# use the following lines in your conky .conf
# important to use execpi to get the colors from the scripts right
# ${color e43526}COVID-19 UPDATE:${color}
# ${execpi 60 python ~/scripts/corona.py}
import requests
import re
from bs4 import BeautifulSoup
COLORS = {
@Atreyagaurav
Atreyagaurav / rope_problem
Created January 30, 2020 12:03
visualization for 2 rope problem
import math
import random
import time
def fun(x,a1=100,a2=50,a3=0):
y= math.fabs(x*(a2-x)*(a1-x)/(x+1) +random.random()*x*x*(100-x)/(x*x+2*x+1))
return y
def get_xy(num,a,b,c):
x=list(range(num))
@Atreyagaurav
Atreyagaurav / myCADcommands.lsp
Created July 23, 2019 09:10
CAD custom commands made to call VBA subroutines.
(defun c:LoadMyVBAs()
(vl-vbaload "F:/Gaurav/civil3D/DrawEquation.dvb")
(vl-vbaload "F:/Gaurav/civil3D/Area_multiple.dvb")
)
(defun c:SlimLayers()
(vl-vbarun "SlimLayers")
)
(defun c:DrawEquation()
(vl-vbarun "drawEquation")
)
@Atreyagaurav
Atreyagaurav / SeekMeaning
Created July 22, 2019 14:57
VBA code to find meaning of the phrase/word in active cell
Public Sub SeekMeaning()
Dim appIE As Object
Set appIE = CreateObject("internetexplorer.application")
On Error GoTo en
Dim seStr As String
seStr = Replace(ActiveCell.Value, " ", "-")
With appIE
.Navigate "https://www.dictionary.com/browse/" + seStr
.Visible = False
End With