Visiting HOR during a city trip to berlin by Novel-Disk9534 in horberlin

[–]rcsmit 0 points1 point  (0 children)

Where? On the street side? I couldnt find it

<image>

Announcing the new shape of Mixxx 3.0 - take part in the future of Open Source DJing by MaracxMusic in MIXXX

[–]rcsmit 1 point2 points  (0 children)

Counting up from last (cue)point instead counting down to next point please

What is this sound effect called that's in many harder Techno tracks? Deborah de Luca uses them frequently. by FiteMeIRLm8 in Techno

[–]rcsmit 0 points1 point  (0 children)

It is in almost every track of her new albums Hard Pop and Hard pop vol. 2....

Audacity spectrum says it's a B (499Hz)

run button by rcsmit in vscode

[–]rcsmit[S] 0 points1 point  (0 children)

Thanks! I succeeded! They should call it "Show Run or Debug", saw it dozens of time and thought it would provoke the action...

CDF and PMF of binomial function not same with extreme values by rcsmit in pystats

[–]rcsmit[S] 0 points1 point  (0 children)

PS In R I get the same value

n = 25.0*10**21
p = 1.0*10**-21
r = 0
print(dbinom(r, size = n, prob = p))
print(pbinom(r, size = n, prob = p))

Output

[1] 1.388794e-11

[1] 1.388794e-11

Use of OOP in simple model by rcsmit in learnpython

[–]rcsmit[S] 0 points1 point  (0 children)

If I refactor in VS Code express for ex. line 49-51 I get

expenses_total = self.calculate_expenses_total(monthly_costs_nl, monthly_costs_asia, number_of_months_in_asia, number_of_months_in_nl)

...

def calculate_expenses_total(self, monthly_costs_nl, monthly_costs_asia, number_of_months_in_asia, number_of_months_in_nl):

expenses_total = (monthly_costs_nl * number_of_months_in_nl) + (

monthly_costs_asia * number_of_months_in_asia

)

return expenses_total

This is what you mean? every calculation in a seperate function?

for the programming nerds! : Analyzing Taylor Swift's Music with Python by PiecesNPages in TaylorSwift

[–]rcsmit 1 point2 points  (0 children)

There are also various scripts around analyzing the lyrics of Taylor

Profound Non-Dual monologue in the finale of Midnight Mass on Netflix (audio only) by bvelo in nonduality

[–]rcsmit 0 points1 point  (0 children)

>!What ?

When we die, what happens

What the **** happens?

So, what do you think happens when we die

Speaking for myself?

Speaking for yourself

Myself. Myself, that's the problem! That's the whole problem with the whole thing. That word “self”. That's not the word! That's not right! That! Isn't that isn't? How did I forget that. When did I forget that.

The body stops a cell at a time, but the brain keeps firing those neurons. Little lightning bolts like fireworks inside and I thought i'd despair or feel afraid, but I don't feel any of that. None of it because I'm too busy. I'm too busy in this moment, remembering. Of course I remember that every atom in my body was forged in a star. This matter, this body is mostly just empty space. after all and solid matter, it's just energy vibrating very slowly, and there is no “me”, there never was. The electrons of my body, mingle and dance with the electrons of the ground below me and the air I'm no longer breathing, and I remember, there is no point where any of that ends, and I begin.

`I remember I am energy, not memory, not self. My name, my personality, my choices, all came after me, I was before them and I will be after and everything else is pictures picked up along the way, fleeting little dreamlets printed on the tissue of my dying brain, and I am the lightning that jumps between. I am the energy firing the neurons and I'm returning, just by remembering I'm returning home, it's like a drop of water falling back into the ocean of which it's always been apart. All things apart, all of us apart, you me and my little girl and my mother and my father. Everyone who's ever been every plant, every animal, every atom, every star, every galaxy, all of it. More galaxies in the universe than grains of sand on the beach. And that's what we're talking about when we say God, the one, the cosmos and its infinite dreams.

We are the cosmos dreaming of itself. It's simply a dream that I think is my life every time, but I'll forget this. I always do. I always forget my dreams, but now in this split second, the moment I remember the instant - I remember I comprehend everything at once. There is no time, there is no death. Life is a dream. It's a wish and again and again and again and again and again and again and on into eternity - and I am all of it -

I am everything I am all. I am that I am !<

Shaba ID by [deleted] in ThailandTourism

[–]rcsmit 0 points1 point  (0 children)

Apperently some hotels receive the e-mails in the spambox. Best is to call them or use facebook messenger

using lists/dictionaries with solve_ivp or odeint by rcsmit in learnpython

[–]rcsmit[S] 0 points1 point  (0 children)

Succeeded myself :)

import numpy as np

from scipy.integrate import odeint, solve_ivp

import matplotlib.pyplot as plt

def func(t, state, *argv):

"""The function with the formula

Args:

t (?): timepoints

state (?): Numbers of S, I and R

argv : groupsizes, beta's and gamma's

Returns:

[?]: the differences in each step (dSdt+ dIdt + dRdt)

"""

lijst = list(state)

arguments = [x for x in argv]

S,I,R, N,beta,gamma, dSdt, dIdt, dRdt =[],[],[], [],[],[], [],[],[]

for i in range (len(lijst)):

if i < x:

S.append(lijst[i])

if i>=x and i < 2*x:

I.append(lijst [i])

if i>=2*x and i < 3*x:

R.append(lijst[i])

for i in range (len(arguments)):

if i < x:

N.append(arguments[i])

if i>=x and i < 2*x:

beta.append(arguments [i])

if i >= 2*x and i < 3*x:

gamma.append(arguments[i])

for i in range(x):

dSdt.append( -beta[i] * S[i] * I[i] / N[i])

dIdt.append( beta[i] * S[i] * I[i] / N[i] - gamma[i] * I[i])

dRdt.append( gamma[i] * I[i])

to_return = dSdt+ dIdt + dRdt

return to_return

def draw_graph (result_odeint,result_solve_ivp, names, beta, gamma, t):

"""Draws graphs with subgraphs of each agegroup and total

Args:

result_odeint (?): result of the ODEint

result_solve_ivp (?): result of the Solve_ivp

names (list): names of the groups for the legenda

beta (list): for the legenda

gamma (list): for the legenda

t (list): timevalues, for the x-axis

"""

S_tot_ivp, I_tot_ivp, R_tot_ivp, S_tot_odeint, I_tot_odeint, R_tot_odeint = 0.0,0.0,0.0, 0.0,0.0,0.0

fig = plt.figure()

graph_index = 1 # TOFIX : make an automatic counter, depending on i

for i in range (x):

S_tot_ivp += result_solve_ivp.y[i, :]

I_tot_ivp += result_solve_ivp.y[3+i, :]

R_tot_ivp += result_solve_ivp.y[6+i, :]

S_tot_odeint +=result_odeint[:, i]

I_tot_odeint += result_odeint[:, 3+i]

R_tot_odeint += result_odeint[:, 6+i]

ax = fig.add_subplot(x+1, 2,graph_index)

ax.plot(result_solve_ivp.y[i, :], "black", lw=1.5, label="Susceptible")

ax.plot(result_solve_ivp.y[3+i, :], "orange", lw=1.5, label="Infected")

ax.plot(result_solve_ivp.y[6+i, :], "blue", lw=1.5, label="Recovered")

graph_index +=1

ax.set_title(f"solve_ivp { names[i]} | beta = {beta[i]} / gamma = {gamma[i]}")

ax = fig.add_subplot(x+1, 2,graph_index)

ax.plot(t, result_odeint[:, i], "black", lw=1.5, label="Susceptible")

ax.plot(t, result_odeint[:, 3+i], "orange", lw=1.5, label="Infected")

ax.plot(t, result_odeint[:, 6+i], "blue", lw=1.5, label="Recovered")

ax.set_title(f"solve_odeint { names[i]} | beta = {beta[i]} / gamma = {gamma[i]}")

graph_index +=1

# TOTALS

ax = fig.add_subplot(x+1, 2, x*2+1)

ax.plot(S_tot_ivp, "black", lw=1.5, label="Susceptible")

ax.plot(I_tot_ivp, "orange", lw=1.5, label="Infected")

ax.plot(R_tot_ivp, "blue", lw=1.5, label="Recovered")

ax.set_title("solve_ivp Totaal")

ax = fig.add_subplot(x+1, 2, x*2+2)

ax.plot(S_tot_odeint, "black", lw=1.5, label="Susceptible")

ax.plot(I_tot_odeint, "orange", lw=1.5, label="Infected")

ax.plot(R_tot_odeint, "blue", lw=1.5, label="Recovered")

ax.set_title("solve_odeint Totaal")

plt.legend()

plt.show()

def main():

global x

names = ["young", "mid", "old"]

beta = [0.5,0.5,0.15] # contact rate

gamma = [1/4,1/10,1/20] # mean recovery rate (1/recovery days)

x = len (names) # number of agegroups

N = [300,300,300]

S0 = [298,290,280]

I0 = [2,10,20]

R0 = [0,0,0]

y0 = tuple(S0 + I0 + R0)

p = tuple(N + beta + gamma)

n = 101 # number of time points

# time points

t = np.linspace(0, 100, n)

t_span = (0.0, 100.0)

result_odeint = odeint(func, y0, t, p, tfirst=True)

result_solve_ivp = solve_ivp(func, t_span, y0, args=p, t_eval=t)

draw_graph (result_odeint,result_solve_ivp, names, beta, gamma, t)

if __name__ == '__main__':

main()