Pendulum is a Python package to ease datetimes manipulation. It provides classes that are drop-in replacements for the native ones (they inherit from them).
Questions tagged [pendulum]
67 questions
16
votes
5 answers
How to convert pendulum to datetime.datetime type?
In current part of system pendulum v1.4 is used, but with croniter it causing error described in https://github.com/sdispater/pendulum/issues/214
This works fine with datetime.datetime type and i still have to stay with pendulum v1.4.
So i am…

esugei
- 181
- 1
- 1
- 8
15
votes
1 answer
Making Pandas work with Pendulum
I've recently stumbled upon a new awesome pendulum library for easier work with datetimes.
In pandas, there is this handy to_datetime() method allowing to convert series and other objects to datetimes:
raw_data['Mycol'] =…

alecxe
- 462,703
- 120
- 1,088
- 1,195
5
votes
1 answer
Not able to install pendulum on python3.7-alpine docker image
I'm trying to install pendulum 2.0.5 in a python37-alpine based docker image but it gives me the below error:
Installing dependencies from Pipfile.lock (0157fa)…
An error occurred while installing pendulum==2.0.5…

Anil Kumar
- 459
- 6
- 16
4
votes
2 answers
airflow initdb: cannot import name 'Pendulum' from 'pendulum'
I installed airflow within one of my Anaconda envs named engdados. When I execute the command airflow initdb I'm getting the following error: airflow initdb: cannot import name 'Pendulum' from 'pendulum'. The full trace back is shown…

Guilherme Noronha
- 516
- 5
- 20
3
votes
0 answers
did I just program a pendulum, or something that just *looks* like a pendulum?
i've spent some time trying to figure out how to simulate the motion of a pendulum, and i've got something that looks like its a pendulum, but i know that doesn't mean it is a pendulum! i realise the code isn't as clean as it could be but i'm fairly…

PumpkinBug
- 31
- 2
3
votes
1 answer
URDF model keeps disappearing whenever I add intertial properties to a link? How can I resolve this issue?
I am trying to simulate a simple pendulum using pydrake and am having a couple of issues creating the urdf file to creat the model for the pendulum. I have no background knowledge on urdf or drake and am open to any suggestions to resolve this…

Raviverma Chamarti
- 63
- 3
3
votes
1 answer
Oscillating Spring with Pymunk
I am trying to create a pendulum with oscillating string and mass which is expected to oscillate for a period of time and then stop. From what I wrote, the mass could not stop oscillating. Kindly help me out.
import pyglet
import pymunk
…

TAYO
- 77
- 3
2
votes
1 answer
Terminal Set and Terminal Cost using Gekko Library
I have a NMPC controller written in python using Gekko library for a nonlinear model of inverted pendulum mounted on the cart. I want to add terminal set and terminal cost using Gekko Library.
This is how I defined the objective function in…

user2002
- 21
- 1
2
votes
2 answers
Python pendulum module returning wrong week number
The way iam trying to get the week number
import pendulum
from datetime import date
dt = pendulum.parse(str(date.today()))
week = dt.week_of_month
print(dt)
print(week)
Result
2023-01-19T00:00:00+00:00
-48
The week number is -48 here, please…

kalesh cv
- 33
- 4
2
votes
3 answers
How to make pendulum swing due to gravity in Drake
I have been trying to simulate a simple pendulum that can swing due to gravity after setting the initial angle. I am now able to create the urdf, and create a slider that will set the angle of the pendulum arm. But I am still facing trouble when…

Raviverma Chamarti
- 63
- 3
2
votes
1 answer
Scheduling Airflow DAGs to run exclusively Monday through Friday i.e only weekdays
I have a DAG executing a Python script which takes a date argument (the current date). I'm scheduling the DAG to run at 6:00 AM Monday through Friday i.e weekdays Eastern Standard Time. The DAG has to run the Python script on Monday with Mondays…

comet
- 65
- 2
- 8
2
votes
2 answers
Plotting pendulum motion in python using trapezoid rule
I'm trying to plot how the angle θ and angular velocity ω vary with respect to time t for a linear and non-linear pendulum using the trapezoid rule to solve for the differential equations, but I'm having trouble generating the actual plot.
This is…

Aran G
- 135
- 7
1
vote
1 answer
OpenModelica inconsistent initial condistions for DAEs
I'm trying to use openmodelica to solve simple DAEs like for a planar pendulum. I am running into a simple problem that I don't now how to solve. I am imposing an initial condition for the x and y coordinate of the pendulum. x0 = 0.5 and y0 = 0…

Kas Visser
- 11
- 1
1
vote
1 answer
Issues while running tutorials of Drake programs, in Underactuated Robotics document, in Deepnote?
I am trying to build and simulate a pendulum in drake. I have created a urdf file(still don't know how to add the inertia tags) and am trying to simulate it, but I don't know how to? So, I was looking at the simple pendulum tutorial in…

Raviverma Chamarti
- 63
- 3
1
vote
0 answers
Airflow - Wrong timestamp inside DAG default_args
Airflow version 2.1.0 / Python version 3.6
Hello.
I've realized whenever I try to create and schedule a DAG to run at a specific time in the day, the timestamp value is reset to UTC.
I've noticed a strange behavior between the default_args and the…

Hilário Ferreira
- 11
- 1