Skip to content

Instantly share code, notes, and snippets.

View cha-ku's full-sized avatar

Chaitanya Kukde cha-ku

View GitHub Profile
@cha-ku
cha-ku / tmux.conf
Created April 10, 2021 22:32 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@cha-ku
cha-ku / longest-substring-atleast-k.cpp
Created February 19, 2020 17:10
atleast k repeating characters
class Solution {
public:
int longestSubstring(string s, int k) {
unordered_map<char, pair<int, pair<int, int>>> charCount;
for (int i = 0; i < s.length(); i++)
{
if (charCount.find(s[i]) != charCount.end())
{
charCount[s[i]].first++;
charCount[s[i]].second.second = i;
def get_trx_id(strt, nd, file_log):
trx_id = []
chk_error = "Card Declined"
while True:
line = file_log.readlines()
if chk_error in line:
trx_id.append([line.split("|")[6]]) # This gets the unique ID of the entire transaction
return trx_id