Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Seems like I constantly need some kind of date functions that aren't found (or aren't found easily enough anyway) in the standard library or in 3rd party packages that I use regularly. This library attempts to remedy that so I know where to add the functions when I build them and know where to look for them when I need them.
There are no dependancies to install. You just need to::
pip install datefns
or::
git clone git@github.com:ktr/datefns.git
cd datefns
python setup.py install
Once installed, you can iterate through the entire file without using much memory by doing the following::
import datefns, datetime
d1 = datetime.date(2018, 7, 10)
d2 = datetime.date(2018, 12, 31)
we = datefns.week_ending(d1, week_ends_on='Sun')
ds = datefns.date_table(d1, d2)
me = datefns.eomonth(d1, 5) # datetime.date(2018, 12, 31)
ts = datefns.time_table()
datefns.date_table_to_csv(ds, '/path/to/date-file.csv', overwrite=True)
datefns.time_table_to_csv(ts, '/path/to/time-file.csv', overwrite=True)
import sqlite3
conn = sqlite3.connect(':memory:')
datefns.load_date_table(conn, datefns.date_table(start_date=d1, end_date=d2))
datefns.load_time_table(conn, ts)
ds = datefns.date_range(d1, d2, datefns.by_month)
To run tests::
python -m tests.test_datefns
The project is licensed under the MIT License - see the LICENSE.md_ file for details
.. _license.md: /LICENSE.txt
FAQs
A module providing some useful date functions
We found that datefns demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.