All Questions
7,210 questions
0
votes
2
answers
67
views
Math CAPTCHA don't work with dividing - how to fix? [closed]
I’m writing a Selenium script to auto-fill a contact form, like this one, and yeah, obviously the main site is different — cornerstonesalina.com/elements/contact-form/, there’s a math captcha like &...
2
votes
1
answer
85
views
NumPy generate a 2d linear array using multiple values
So I'm trying to generate a map for a personal project using opensimplex noise, multiple layers etc.
My problem is that I want to recreate the equator to combine with a temperature map to obviously ...
2
votes
1
answer
130
views
What does <string>:2(__init__) have to do with mathematical computations?
I'm in the process of writing some mathematical operations. Here's a sample program to give you an idea of what kind of thing I could be doing:
from dataclasses import dataclass
import random
@...
2
votes
0
answers
59
views
Having problems computing PDE Residuals
I'm computing PDE residuals for The_Well datasets (e.g. turbulent_radiative_layer_2D and shear_flow) using finite differences, but the residuals are much larger than I expect. The data are generated ...
3
votes
1
answer
74
views
How can I shortcut the unlimited-time SymPy expansion of all (a + b*z**k) given some z(n)?
Let me put some context first.
You see, I have a theory that multiplying all (a + b*z**k), for a determined z based on n, and some exponents k, it could return a**n+b**n. This is my brand new Cori ...
8
votes
3
answers
305
views
How to find the longest elementary path in a graph?
The problem is to find the longest sequence of numbers from 1 to 100 such that each number is either multiple or divisor or the previous, and with no repetition. For example, 50 25 5 35 7 63 21 is a ...
0
votes
0
answers
92
views
Strange black borders on count changes with cmath on my python fractal render
I recently wrote a program which renders the mandelbrot set and encountered some irrelevent issues, which some helpful users solved for me. One user reccommended I change an aspect of my code for ...
-4
votes
1
answer
113
views
Pygame image not facing the mouse [duplicate]
Here is my rotating code:
pos = pygame.mouse.get_pos()
x_dist = pos[0] - self.rect.centerx
y_dist = -(pos[1] - self.rect.centery)
self.angle = math.degrees(math.atan2(y_dist, x_dist))
self.image = ...
-2
votes
1
answer
236
views
Solve a 2 equations systems of quadratic equations with 2 unknows [closed]
I would like to solve this system of equation for X and Y :
Do you know if their exist a mathematical solution to this system ? And how to solve it ? Or a numerical solution ?
If yes, do you think ...
6
votes
1
answer
137
views
What is wrong with my block GMRES implementation?
I'm trying to implement a block GMRES procedure (i.e., GMRES to solve Ax=b, but with b that is not a vector but a n x r matrix, where r << n). My goal is to have a first implementation in Python ...
3
votes
1
answer
99
views
How large of an integer can Python 3 support on a 64-bit system with N gigabytes of RAM?
I know that Python 3 supports arbitrary precision arithmetic and so the common answer in all the materials that I have ever seen regarding this topic has been: "The only constraint is the ...
3
votes
1
answer
196
views
Average distance of any point of a disk to its boundary
I was wondering what was the average distance "d" of any point in a ball to its boundary (not specifically the closest point). I made a simple monte carlo computation using Muller's method ...
0
votes
2
answers
127
views
Solve_Bvp with acceleration in scipy
i have this code, that should calculate the speed and distance with given acceleration. The boundrary condition says that the speed in the beginning or and in the end has to be zero. but i cant get it ...
0
votes
1
answer
201
views
Sunset/rise calculation
I'm using the suntime class that is based on: "Calculate sunrise and sunset times for a given GPS coordinate within PostgreSQL".
I'm struggling with the following:
At the end of the ...
0
votes
0
answers
70
views
Using lattice estimator with Sage
I'm looking to use the lattice-estimator here: https://github.com/malb/lattice-estimator?tab=readme-ov-file which depends on SageMath.
I have installed SageMath here:
john@sage:~/Downloads/sage-10.6$ ...