This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # a short script to solve the following problem | |
| # https://bashgah.com/Question/140201013/%D8%B3%D9%88%D8%A7%D9%84%D8%A7%D8%AA-%D9%88%DB%8C%DA%98%D9%87-%D9%86%D9%88%D8%B1%D9%88%D8%B2-1402 | |
| # اگر شخصی از 1 بهمن 1400 و در اولین روز کاری هر ماه مبلغ 1میلیون تومان صندوق سرمایهگذاری با پشتوانه طلای زرین آگاه (با نماد مثقال) خریداری کرده باشد، در تاریخ 20 اسفند 1401 ارزش روز دارایی وی چقدر است؟ | |
| from itertools import pairwise | |
| import pandas as pd | |
| from jdatetime import date | |
| # download history from | |
| # http://www.tsetmc.com/loader.aspx?ParTree=151311&i=32469128621155736# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # بیشترین بازده درصدی فصلی برای بهار سال 1401 مربوط به کدام سبد دارایی زیر بوده است؟ | |
| # https://bashgah.com/Question/140201025/ | |
| from asyncio import run | |
| from tsetmc.instruments import Instrument | |
| from iranetf.sites import RayanHamafza | |
| from iranetf import Session as IranETFSession | |
| from tsetmc import Session | |
| from jdatetime import date | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # بیشترین بازده درصدی فصلی برای تابستان سال 1401 مربوط به کدام سبد دارایی زیر بوده است؟ | |
| # https://bashgah.com/Question/140201027/ | |
| from asyncio import run | |
| from tsetmc.instruments import Instrument | |
| from iranetf.sites import RayanHamafza | |
| from iranetf import Session as IranETFSession | |
| from tsetmc import Session | |
| from jdatetime import date | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # بیشترین بازده درصدی فصلی برای زمستان سال 1401 مربوط به کدام سبد دارایی زیر بوده است؟ | |
| # https://bashgah.com/Question/140201029/ | |
| from asyncio import run | |
| from tsetmc.instruments import Instrument | |
| from iranetf.sites import RayanHamafza | |
| from iranetf import Session as IranETFSession | |
| from tsetmc import Session | |
| from jdatetime import date | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from timeit import timeit | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| df = pd.DataFrame(range(10), columns=['A']) | |
| times = [] | |
| lengths = [] | |
| for i in range(26): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal EnableDelayedExpansion | |
| :: Check for admin privileges | |
| net session >nul 2>&1 | |
| if not %ERRORLEVEL%==0 ( | |
| :: Request admin elevation | |
| echo set UAC = CreateObject^("Shell.Application"^) > "%temp%\elevate.vbs" | |
| echo UAC.ShellExecute "cmd.exe", "/k %~s0", "", "runas", 1 >> "%temp%\elevate.vbs" | |
| cscript //nologo "%temp%\elevate.vbs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A fork of https://joekuan.wordpress.com/2015/09/23/list-of-qt-icons/ | |
| # Modified to work with PyQt6 and also avoids using a hardcoded list. | |
| # of icons. | |
| from PyQt6.QtWidgets import ( | |
| QApplication, | |
| QGridLayout, | |
| QPushButton, | |
| QStyle, | |
| QWidget, | |
| ) |
OlderNewer