Show newer

(as )

```
2. Generalizing the function for any number of days:

```
function allgifts2(days)
dg = [] # daily gifts storage
for d in 1:days
d = sum(1:d) # daily gifts from day 1 to days
push!(dg, d) # storing each day gifts
end
print(sum(dg)) # showing total number of gifts in storage
end

# There are actually 13 days from 25 Dec to 6 Jan
# Let's add to the list Thirteen puzzlers puzzling
# > allgifts(13)
# 455
```
```

Did The Wise Men (Magi) Arrive 12 Days After Jesus’ Birth?
reasonsforhopejesus.com/did-th

**Happy Three Kings Day**

Show thread

"C'est la guerre qui fait fleurir les appliquées dans toutes sortes de domaines et y convertit provisoirement la quasi totalité des disponibles : ondes de choc, « surface waves in water of variable depth », calculs "hydrodynamiques" pour les bombes atomiques, dynamique des gaz, optimisation statistique des bombardements aériens, tir contre avions, recherche opérationnelle, etc. Certains mathématiciens de l'industrie commencent à dire (Thornton C. Fry, Bell Labs, 1941) que lesmathématiques "pures" ou "supérieures" ne sont, après tout, que des branches des mathématiques appliquées qui n'ont pas encore trouvé un vaste champ d'applications « and hence have not as yet, so to speak, emerged from obscurity » (12).
...
On fait alors appel, pour le Japon, aux services d'une équipe dirigée par un de Berkeley, Jerzy Neyman, qui applique à ce problème et à d'autres des méthodes qui le rendront célèbre après la guerre (13). En 1943, Richard Courant, s'appuyant sur la méthode d'approximation qu'il a utilisée en 1928 avec Friedrichs et Lewy pour établir l'existence de solutions d'équations aux dérivées partielles, explique à Hans Bethe, chef de la théorique à Los Alamos, comment calculer numériquement le comportement d'une sphère de comprimée par une onde de choc convergente (Nagasaki) ; de cette technique fortement poussée par von Neumann sortira l'intérêt de celui-ci pour le premier qu'il rencontrera l'année suivante , l'; c'est pour ce calcul que l'on a déjà commandé en 1943 des machines IBM à cartes perforées incomparablement moins rapides. ..."

, , armement by Roger Godement (pdf)
rogergodement.com/gallery/extr

...
Care for a ?

If a plain just isn't doing enough for you, Banks does have another hack up her sleeve, one that will be especially exciting for enthusiasts.

"One of our team published a paper last year on the 'nappuccino'," she tells ScienceAlert. "It's basically having a coffee before you have a nap."

Why does this work? Along with other physical effects, blocks a compound called adenosine from accumulating in our brains. Adenosine reduces the brain's firing rate, and helps us get to sleep; then, once we do sleep, it's whisked away to start the day (or afternoon) afresh.

So, coffee and sleep together makes you wake up even more refreshed than either alone. Banks loves coffee, and sees it as the easiest sleep hack we all have access to.

"It's a little bit boring in terms of a hack, but there are ways to more strategically use caffeine," she says.

"The average person has a big cortisol spike – a stress hormone – in the morning to get us going. That's a very normal thing. So, we actually don't need to have coffee first thing in the morning, but people want to have it because they feel a little bit sluggish."

Instead, having caffeine in the late morning would help you get through the afternoon, without keeping you awake throughout the night.

As with many other variable traits within our species, some people also just get lucky with their genetic sleep lottery.

"There is a big range – some people need more and some need less. There are some people who naturally can get by with a much shorter amount of sleep," says Banks. You can think of it like a spectrum, similar to normal ranges in height or weight.

"Now, those politicians that say they could get by on just a couple of hours sleep, I don't believe them. I think that maybe they're catching up on their sleep through naps or maybe being asleep in Parliament."

Again it all comes down to naps... even while making decisions for the nation.

Of course, getting less sleep and chugging coffee aren't just about maximizing productivity. Some people have insomnia or anxiety around sleep, and knowing that your health is incurring damage without the right number of hours is unlikely to help quieten the voices in one's head.

So it's reassuring to know that once you do get back to a normal sleep schedule, the brain has a surprising ability to bounce back – and many of the problems associated with sleep deprivation do actually get better.

"To follow up all that doom and gloom, when we change our sleep habits and get more sleep again, we also see that some of those mental and physiological effects go away," says Banks.

Edison, for what it's worth, would fall asleep under his desk or in meetings – sometimes he'd just pass out wherever he was. His wife installed a cot in the corner of his office so he'd at least have somewhere to lie down.

So, the next time you feel like a nap might be a waste of time, remember it's just the opposite. If you can get it, there's truly no better productivity hack than a quick nap.
___

The of a Good Nap
sciencealert.com/the-cult-of-t

mc ☕ boosted

Holà !

J'aurais besoin de l'avis d'un statisticien.

Est-ce qu'on peut dire que connaître la variance d'une série de valeurs est inutile en tant que telle si on connaît son écart type ?

Je suis entrain de tester la fiabilité de la méthode de génération de nombres aléatoires du langage Rust (pour le fun), et je cherche des valeurs à calculer pour renseigner de l’homogénéité des valeurs générées.
Existe-t-il un calcul à effectuer pour caractériser cette homogénéité ?

#statistic #math

mc ☕ boosted

@be well, #coding is my hobby and job, and I have more than enough #projects (though a few are indeed #music-related). Playing music on the other hand, despite both being #creative activities, provides a relaxing #antidote to my brain.

I also enjoy #composing, but since it stains my music time with screen time it rarely gets enough attention to produce something of value.

Okay. Just found the for the . (You must start by writing correctly the names of the .)

formula:
ALFA + BETA + GAMA = DELTA

results:
5305 + 2475 + 6595 = 14375
5305 + 2485 + 6595 = 14385
5395 + 2475 + 6505 = 14375
5395 + 2485 + 6505 = 14385
5705 + 2435 + 6595 = 14735
5705 + 2485 + 6595 = 14785
5795 + 2435 + 6505 = 14735
5795 + 2485 + 6505 = 14785
5805 + 2435 + 6595 = 14835
5805 + 2475 + 6595 = 14875
5895 + 2435 + 6505 = 14835
5895 + 2475 + 6505 = 14875
5305 + 6475 + 2595 = 14375
5305 + 6485 + 2595 = 14385
5395 + 6475 + 2505 = 14375
5395 + 6485 + 2505 = 14385
5705 + 6435 + 2595 = 14735
5705 + 6485 + 2595 = 14785
5795 + 6435 + 2505 = 14735
5795 + 6485 + 2505 = 14785
5805 + 6435 + 2595 = 14835
5805 + 6475 + 2595 = 14875
5895 + 6435 + 2505 = 14835
5895 + 6475 + 2505 = 14875

## Calling all programmers
Code a puzzle 4 Xmas

_[The Twelve Days of Christmas](en.wikipedia.org/wiki/Twelve_D)_

_According to the traditional song, on the first day of Christmas (25th December), my true love sent to me:_

* _A partridge in a pear tree_

_On the second day of Christmas (26th December), my true love sent to me THREE presents:_

* _Two turtle doves_
* _A partridge in a pear tree_

_On the third day of Christmas (27th December and so on) my true love sent to me SIX presents:_

* _Three French hens_
* _Two turtle doves_
* _A partridge in a pear tree_

_This carries on until the the twelfth day of Christmas, when my true love sends me:_

* _Twelve drummers drumming_
* _Eleven pipers piping_
* _Ten lords a-leaping_
* _Nine ladies dancing_
* _Eight maids a-milking_
* _Seven swans a-swimming_
* _Six geese a-laying_
* _Five gold rings_
* _Four calling birds_
* _Three French hens_
* _Two turtle doves_
* _A partridge in a pear tree_

_Puzzle Author: Stephen Froggatt_

1. Strict, hard coded, solution:
```
function allgifts()
dg = [] # daily gifts storage
for d in 1:12
d = sum(1:d) # daily gifts from day 1 to 12
push!(dg, d) # storing each day gifts
end
print(sum(dg)) # showing total number of gifts in storage
end

# > allgifts()
# 364
```
2. Generalizing the function for any number of days:
```
# I'll put here my solution (in Julia) on the twelfth day
```
**Meanwhile, I invite you all to post in the comments some solution coded in the programming language of your choice**

Joy to the World is one of the most played - if not the most played - during this season for the last 50 years.

Most people when asked can only repeat the first verse of the lyrics. If you ask them who do they think is the mentioned there you may get some hilarious answers.

Have you ever noticed how profoundly are those lyrics?

> Joy to the world! the Lord is come;
Let Earth receive her King;
Let every heart prepare him room,
And heaven and nature sing,
And heaven and nature sing,
And heaven, and heaven, and nature sing.

> Joy to the world! the Saviour reigns;
Let men their songs employ;
While fields and floods, rocks, hills, and plains
Repeat the sounding joy,
Repeat the sounding joy,
Repeat, repeat the sounding joy.

> No more let sins and sorrows grow,
Nor thorns infest the ground;
He comes to make His blessings flow
Far as the curse is found,
Far as the curse is found,
Far as, far as, the curse is found.

> He rules the world with truth and grace,
And makes the nations prove
The glories of His righteousness,
And wonders of His love,
And wonders of His love,
And wonders, wonders, of His love.

Gingle bells, gingle bells...

<svg width="200" height="200" viewBox="-100 -100 200 200">
<g stroke="black" stroke-width="2">
<circle cx="0" cy="-45" r="7" fill="" />
<circle cx="0" cy="50" r="10" fill="" />
<path
d="
M -50 40
L -50 50
L 50 50
L 50 40
Q 40 40 40 10
C 40 -60 -40 -60 -40 10
Q -40 40 -50 40"
fill=""
/>
</g>
</svg>

A Christmas tree for thee.

<html>
<svg width="200" height="200" viewBox="-100 -100 200 200">
<polygon points="0,0 80,120 -80,120" fill="#234236" />
<polygon points="0,-40 60,60 -60,60" fill="" />
<polygon points="0,-80 40,0 -40,0" fill="" />
<rect x="-20" y="120" width="40" height="30" fill="brown" />
</svg>
</html>

mc ☕ boosted

RT @IgorBrigadir@twitter.com

This is the most incredible exploit i've seen so far.. they used a fake gif to force a PDF parser to use an old black and white compression library for printers to create logic gates and built a virtual CPU to execute code on 🥴 twitter.com/i41nbeer/status/14

🐦🔗: twitter.com/IgorBrigadir/statu

mc ☕ boosted
mc ☕ boosted
mc ☕ boosted
waon - Wave-to-Notes transcriber, written in C. it takes wav input and converts it to midi.

I found it here github.com/fidergo-stephane-go… (the original code is on SourceForge and there's a link to it in Readme.md. on GitHub there're instructions how to build it. I patched it a little and built (the Makefile offers also variant with jack).

well, I tested it a little: recorded some singing from simple in-built mic and converted to midi. it works. I didn't play with parameters yet, by default it's very sensitive and bubbling of aquarium in my room adds extra high-frequency notes to the record. I think if I can get some filter for the input it may work out.

#software #music #midi #C

> AHHH is an inspired by the all-consuming dread induced by programming. ...

> The language is pretty simple and is heavily based on COW. ...

Screaming into the Void but make it Turing complete

github.com/KyleM73/AHHH

mc ☕ boosted
mc ☕ boosted

> According to , every should leave an indelible on the structure of space-time. It should permanently strain space, displacing the mirrors of a gravitational wave detector even after the wave has passed.
Since that first detection almost six years ago, physicists have been trying to figure out how to measure this so-called “memory effect.”

> First consider what happens when a gravitational wave passes by a gravitational wave detector. The Laser Interferometer Gravitational-Wave Observatory (LIGO) has two arms positioned in an L shape. If you imagine a circle circumscribing the arms, with the center of the circle at the arms’ intersection, a gravitational wave will periodically distort the circle, squeezing it vertically, then horizontally, alternating until the wave has passed. The difference in length between the two arms will oscillate — behavior that reveals the distortion of the circle, and the passing of the gravitational wave.
According to the , after the passing of the wave, the circle should remain permanently deformed by a tiny amount.

quantamagazine.org/gravitation

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.