Questions tagged [pendulum]

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).

67 questions
0
votes
1 answer

I am having trouble creating a 3-Dimensional Double Pendulum animation

I am having trouble and I assume it is with the equations of motion but I can't seem to get them right. The force also does not seem to be applying in the correct direction and I'm not sure how to fix it. Here is the code: import numpy as np import…
docyftw
  • 3
  • 2
0
votes
0 answers

Trying to animate a double pendulum in manim: Problems with keeping Mobjects where they should be on the screen

I have coded a program that provides a numerical solution for the motion of a double pendulum in python. Now I want to animate this motion using ManimCE. I do that by animating it frame by frame and rotating rod1 and rod2 by the numerically…
0
votes
0 answers

Error installing apache-airflow. Fails at installing pendulum

I am trying to install apache-airflow in vscode (windows OS). I have the following versions installed. Python 3.11.1 pip 23.0.1 I am trying to install with the following command pip --proxy 'proxy address' install apache-airflow I get the…
sk8
  • 170
  • 1
  • 9
0
votes
0 answers

How to get Pendulum to output diff for humans as ago

I have been staring at the official documentation for a while but cannot figure out how to get it to output ago - it always says < time> before How do I get the following code to output a few seconds ago import pendulum import time d =…
Bill
  • 618
  • 6
  • 15
0
votes
1 answer

How to check if time is between two time intervals

I'm currently trying to figure out how I can make a duration between 1 AM to 7 AM (01:00-07:00) using Pendulum - I have been trying to read the documentation and the closests thing I could find was using duration however I was not able to see how I…
PythonNewbie
  • 1,031
  • 1
  • 15
  • 33
0
votes
1 answer

Nested while patterns in Python

I'm a Python beginner trying to write a script for a Raspberry Pi Zero. The idea is to turn the lights on at dawn and off at dusk, keeping in mind those times change every day. So what i'm after (i guess) is something that will run 24/7 and evaluate…
Gé Fa
  • 96
  • 1
  • 7
0
votes
0 answers

Pendulum datetime python library is not handling ok datetimeobjects when change of time

I have a datetime object in chilean hour that I traslate to UTC: from 2022-09-04 00:00:00 to 2022-09-04 01:00:00-04:00 I do the translation by using the pytz library. The library first was not doing ok its job because in chile they change the time…
0
votes
0 answers

timezone is not being handled ok by the pendulum library

I have a 2 datetimes from "America/Santiago" timezone: 2022-09-04 00:00:00 2022-09-04 01:00:00 In "America/Santiago" they usually change the hour on the 4th Sept. This is at 2022-09-04 00h they say it is 2022-09-04 01:00:00. But this year because…
0
votes
0 answers

Pendulum returning different utcoffset after upgrade (python)

I have upgraded from Pendulum 1.4.4 to 2.1.2. After executing the following code, I'm getting different UTC offset from the same datetime. Note: Python version is 3.7 in both case. Pendulum 1 import pendulum base = pendulum.datetime(2020, 10, 25, 1,…
Shaurya
  • 1
  • 1
0
votes
0 answers

why is my double pendulum programm isn't working in p5js?

var angle1 = 45; var angle2 = 0; var L1 = 200;var L2 = 200; var m1 = 1; var m2 = 1; var angleV1 = 0; var angleV2 = 0; var g = 1; var angleA1 = ((-g * (2 * m1 + m2) * sin(angle1) - m2 * g * sin(angle1 - angle2) - 2…
0
votes
0 answers

why do datetime.datetime and pendulum.datetime produce different results

Why datetime and pendulum produce different results in that code snippet? What am I missing? from pytz import timezone from pendulum import datetime as pendulum_datetime from datetime import datetime as datetime_datetime tz =…
govordovsky
  • 359
  • 2
  • 17
0
votes
1 answer

Encountering a problem while using ngrok link for simulations

I recently started encountering an error with the ngrok link used for simulation. I usually use the function: meshcat = StartMeshcat() for simulation the models in deepnote. But recently I started getting a security error sometimes and other times…
0
votes
1 answer

Matlab mass pendulum simulation

I have tried to simulate a mass pendulum on my own to train my matlab skills. I have coded a function that shows no errors, but however it does not do what it is supposed to do. I wanted to iterate it for every time step. My idea was to calculate…
0
votes
2 answers

How to Solve for the Motion of a Double Pendulum

I want to plot the motion of a double pendulum with a spring in python. I need to plot the theta1, theta2, r, and their first derivatives. I have found my equations for the motion, which are second-order ODEs so I then converted them to first-order…
0
votes
1 answer

Installing python packages locally doesn't always work

I'm creating a python 3.9 program and want to install packages locally. So the way my project is set up is this: __main__.py test.py requirements.txt lib/ __init__.py In my requirements.txt file I have 3…
u84six
  • 4,604
  • 6
  • 38
  • 65