danyeric123 / dafyomiandmore Goto Github PK
View Code? Open in Web Editor NEWA small script that tells you what the Daf is for the day.
A small script that tells you what the Daf is for the day.
There are some problems with the current code:
`
def today_daf(daf_date=None) -> Tuple:
first_cycle = date(1923, 9, 23)
scheduling = mw.col.conf.get("rollover", 4)
delta = timedelta(hours=scheduling)
if daf_date is not None:
cur = daf_date
else:
if datetime.today().hour < delta.seconds // 3600:
cur = date.today() - timedelta(days=1)
else:
cur = date.today()
days_since = cur - first_cycle
days_since = days_since.days
total_dapim = sum(mesekhtot.values())
dapim_in_current_cycle = days_since % total_dapim
dapim_in_current_cycle += 63
dapim_in_current_cycle += 12
count = 0
for mesekhta, pages in mesekhtot.items():
count += 1
# print(count)
if dapim_in_current_cycle < pages:
if mesekhta == "קינים":
dapim_in_current_cycle += 21
if mesekhta == "תמיד":
dapim_in_current_cycle += 25
if mesekhta == "מדות":
dapim_in_current_cycle += 33
return (mesekhta, _num_to_str(dapim_in_current_cycle + 2, False))
# break
dapim_in_current_cycle = dapim_in_current_cycle - pages
return ("ברכות", _num_to_str(dapim_in_current_cycle + 2, False))
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.