Skip to content

Instantly share code, notes, and snippets.

View iamvee's full-sized avatar
🐝
let it 🐝

Vahid Naeini iamvee

🐝
let it 🐝
View GitHub Profile
@iamvee
iamvee / dectiles.py
Created July 28, 2024 10:12
Iran Income Distribution with Monthly and Yearly, Toman and USD Equivalents
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
# source: https://asriran.com/fa/news/922435
income_max_values = [30, 64, 92, 116, 141, 165, 192, 225, 280, 429, 450]
percentiles = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 99, 100]
conversion_rate = 58850
monthly_income_max_values = [value / 12 for value in income_max_values]
usd_monthly_income_max_values = [(value * 1_000_000) / 12 / conversion_rate for value in income_max_values]
@iamvee
iamvee / readme.md
Last active July 18, 2024 15:24
dali

png file added to comments here

@iamvee
iamvee / xmlrpc_numpy_server.py
Created October 27, 2022 14:20
Serialize matrix computations to another machine or python instance which using numpy.
#!/usr/bin/env python
@iamvee
iamvee / README.md
Created October 21, 2022 07:21 — forked from mahmoud-eskandari/README.md
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

برای شروع میتوانید یک دایرکتوری در سرور خارجی ایجاد کنید و وارد آن شوید.

mkdir vmess
cd vmess
import random
def miller_rabin(n, k):
if n == 2:
return True
if n % 2 == 0:
return False
@iamvee
iamvee / main.py
Last active October 30, 2021 15:22
import re
from urllib.request import urlopen
url = "https://raw.githubusercontent.com/shahind/Persian-Words-Database/master/distinct_words.txt"
with urlopen(url) as f:
words = f.read().decode('utf-8').split('\n')
output = lambda w: f"به {w[:2]} نگو {w[2:]}، {w} تو نیست{'ی' if w[:2]=='ما' else ''}م"
@iamvee
iamvee / notebook.ipynb
Last active October 29, 2021 07:08
repr and str and repr_html
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iamvee
iamvee / config
Last active June 29, 2021 12:01
copy ssh key
# sample ssh config file
# $HOME/.ssh/config
Host folan-computer-e-remote
HostName 123.45.67.89
Port 12345
User mammad
@iamvee
iamvee / template.ipynb
Last active January 31, 2021 21:51
tweets
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.