(as #promised)
```
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?
https://reasonsforhopejesus.com/did-the-wise-men-arrive-12-days-after-jesus-birth-or-much-later/
**Happy Three Kings Day**
"C'est la guerre qui fait fleurir les #mathématiques appliquées dans toutes sortes de domaines et y convertit provisoirement la quasi totalité des #mathématiciens 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 #statisticien 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 #physique théorique à Los Alamos, comment calculer numériquement le comportement d'une sphère de #plutonium 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 #calculateur #électronique qu'il rencontrera l'année suivante , l'#ENIAC; c'est pour ce calcul que l'on a déjà commandé en 1943 des machines IBM à cartes perforées incomparablement moins rapides. ..."
#Science, #technologie, armement by Roger Godement (pdf)
https://rogergodement.com/gallery/extraits%20de%20la%20pr%C3%A9face%20&%20postface%20int%C3%A9grale%20issues%20de%20analyse%20math%C3%A9matique%20(1997).pdf
...
Care for a #nappuccino?
If a plain #nap just isn't doing enough for you, Banks does have another hack up her sleeve, one that will be especially exciting for #coffee 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, #caffeine 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 #Science of a Good Nap
https://www.sciencealert.com/the-cult-of-the-sleepless
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é ?
@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 #algebra for the #virus #mutations . (You must start by writing correctly the names of the #Greek #letters.)
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](https://en.wikipedia.org/wiki/Twelve_Days_of_Christmas)_
_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**
#math #puzzle #invitation #teaser #programmers #programming #code #christmas #days
Joy to the World is one of the most played #Christmas #Carols - 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 #Lord mentioned there you may get some hilarious answers.
Have you ever noticed how profoundly #Christian 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="#4F6D7A" />
<circle cx="0" cy="50" r="10" fill="#F79257" />
<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="#FDEA96"
/>
</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="#0C5C4C" />
<polygon points="0,-80 40,0 -40,0" fill="#38755B" />
<rect x="-20" y="120" width="40" height="30" fill="brown" />
</svg>
</html>
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 🥴 https://twitter.com/i41nbeer/status/1471163195679252484
🐦🔗: https://twitter.com/IgorBrigadir/status/1471257658133037071
Web 3 Is Going Great! https://web3isgoinggreat.com
> AHHH is an #esoteric #programming #language inspired by the all-consuming dread induced by programming. ...
#programminglanguage
> The language is pretty simple and is heavily based on COW. ...
Screaming into the Void but make it Turing complete #turingcomplete
> According to #general #relativity, every #gravitational #wave should leave an indelible #imprint 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 #memory #effect, after the passing of the wave, the circle should remain permanently deformed by a tiny amount.
https://www.quantamagazine.org/gravitational-waves-should-permanently-distort-space-time-20211208/
Describe myself in 5 tag words:
#mathfolk #programmer #reader #traveller #researcher
header: Cobalt Mirror (Lake Louise), photo by Paul Zizka