Skip to content

Instantly share code, notes, and snippets.

View kprav33n's full-sized avatar

Praveen Kumar kprav33n

View GitHub Profile
#!/usr/bin/env python3
import functools
import string
import sys
import grapheme # pip install grapheme
from collections import defaultdict
@kprav33n
kprav33n / dir.rs
Last active December 7, 2022 23:24
use std::cell::{RefCell, RefMut};
use std::collections::HashMap;
use std::rc::{Rc, Weak};
#[derive(Debug)]
struct File {
name: String,
size: usize,
}
~
➜ yay -S wezterm-git
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] wezterm-git-20200517.122836.92c201c6.105.g5d508350-4
:: Downloaded PKGBUILD (1/1): wezterm-git
1 wezterm-git (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
@kprav33n
kprav33n / cobra.go
Last active December 17, 2020 00:00
package main
import (
"fmt"
"os"
"path"
"path/filepath"
"github.com/spf13/cobra"
)
> /home/praveen/omscs/ml4t/src/strategy_evaluation/grade_strategy_learner.py(213)test_strategy()
-> if not((in_trades_1 == in_trades_2).all()[0]):
(Pdb) in_trades_1
ML4T-220
Date
2008-01-02 1000
2008-01-03 0
2008-01-16 0
...
praveen on athena in ~ via 🐍 v3.8.2 (master) took 1m9s
❯ ~/.emacs.d/bin/doom doctor
The doctor will see you now...
> Checking your Emacs version...
> Checking for Emacs config conflicts...
> Checking for private config conflicts...
> Checking for stale elc files...
> Checking Doom Emacs...
✓ Initialized Doom Emacs 2.0.9
Process: Proctortrack [56330]
Path: /Applications/Proctortrack.app/Contents/MacOS/Proctortrack
Identifier: com.verificient.proctortrack
Version: 2.0.77.0325 (2.0.77.0325)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Proctortrack [56330]
User ID: 501
Date/Time: 2020-04-27 11:14:19.130 -0700
#!/bin/bash
usage() {
echo "Usage: $0 CONFIG"
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
➜ unzip -vl Praveen_Kumar_p1.zip
Archive: Praveen_Kumar_p1.zip
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
0 Stored 0 0% 2020-02-16 21:55 00000000 Praveen_Kumar_p1/
0 Stored 0 0% 2020-02-16 22:22 00000000 Praveen_Kumar_p1/memory/
19539 Defl:N 18807 4% 2020-02-16 22:22 bad952a3 Praveen_Kumar_p1/memory/README.pdf
9559 Defl:N 2809 71% 2020-02-16 21:56 e2fb086f Praveen_Kumar_p1/memory/memory_coordinator.c
3134 Defl:N 1291 59% 2020-02-16 22:18 f247495b Praveen_Kumar_p1/memory/README.md
76082 Defl:N 4554 94% 2020-02-16 21:56 04ec17b0 Praveen_Kumar_p1/memory/memory_coordinator2.log
$ CC=clang make
clang -Wall -Werror -g -lvirt -o memory_coordinator memory_coordinator.c
$ file memory_coordinator
memory_coordinator: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=3c7d8ae680abbe23b6b030479aee4c95a19dfbf6, for GNU/Linux 3.2.0, with debug_info, not stripped