Skip to content

Instantly share code, notes, and snippets.

View GreatBahram's full-sized avatar
🚀
No STATUS!

Bahram Aghaei GreatBahram

🚀
No STATUS!
View GitHub Profile
@GreatBahram
GreatBahram / tmux.conf.local
Last active June 11, 2020 06:00
Make https://github.com/gpakosz/.tmux compatible with vim key bindings
# My changes
# Change pane control to be Alt+vim arrow keys
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
#
# Change window control
bind-key l next-window
bind-key h previous-window
@GreatBahram
GreatBahram / proxy.conf
Created May 12, 2020 05:01
docker-proxy-configuration
# /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=socks5://127.0.0.1:12345"
@GreatBahram
GreatBahram / fourinarow.py
Last active December 24, 2020 10:02
Beyond the basic stuff with Python - Hanoi
"""Four-in-a-Row, by Al Sweigart [email protected] A tile-dropping game to get four-in-a-row, similar to Connect Four."""
import sys
from enum import Enum
from textwrap import dedent
class Cell(str, Enum):
EMPTY = "."
PLAYER_X = "X"
PLAYER_O = "O"
@GreatBahram
GreatBahram / readme.md
Created July 7, 2021 08:53
markdown image scaling image

``

@GreatBahram
GreatBahram / max_prefix.py
Last active October 8, 2021 19:20
Max Prefix value evaluation problem
from __future__ import annotations
from itertools import product
from typing import Generator
OPERATORS: tuple[str, ...] = ("*", "+", "-", "/")
def iter_variables(
variables: dict[str, tuple[int]]
@GreatBahram
GreatBahram / cooccurence.py
Created October 20, 2021 17:14
CoOccurence words
from abc import ABC, abstractmethod
class CoOccurence(ABC):
def __init__(self) -> None:
self._container = None
@abstractmethod
def update(self, line: str) -> None:
...
@GreatBahram
GreatBahram / province_city_national_code_prefix.csv
Last active November 13, 2021 19:45
Here, you can find iranian national code prefix with their corresponding province and city name
prefix province city
169 آذربایجان شرقی آذرشهر
170 آذربایجان شرقی اسکو
149 آذربایجان شرقی اهر
150 آذربایجان شرقی اهر
171 آذربایجان شرقی بستان آباد
168 آذربایجان شرقی بناب
136 آذربایجان شرقی تبریز
137 آذربایجان شرقی تبریز
138 آذربایجان شرقی تبریز