Skip to content

Instantly share code, notes, and snippets.

@lainq
lainq / pg.go
Last active November 28, 2021 16:26
Count the lines and files in ur directory
package main
import (
"fmt"
gitignore "github.com/sabhiram/go-gitignore"
"io/ioutil"
"os"
"path"
"strings"
)
@lainq
lainq / trackr.py
Created November 12, 2021 04:39
A simple time tracker(deps:psutil, prettytable, plyer)
import platform
import time
import os
import json
import sys
import datetime
import psutil
import prettytable
@lainq
lainq / tracker.py
Last active June 30, 2021 10:12
time tracker
import time
import os
import psutil
import win32gui
import win32process
import json
import sys
import prettytable
import winsound
@lainq
lainq / encoder.py
Last active June 28, 2021 15:36
An encoder that I made
import string
import sys
class Encoder(object):
__characters = string.printable
class __EncoderError(Exception):
def __init__(self, text, allowed_characters):
message_string = (
{
"ABAP": "#E8274B",
"ActionScript": "#882B0F",
"Ada": "#02f88c",
"Agda": "#315665",
"AGS Script": "#B9D9FF",
"Alloy": "#64C800",
"AMPL": "#E6EFBB",
"ANTLR": "#9DC3FF",
"API Blueprint": "#2ACCA8",