Sunday, March 2, 2025

The Ramadan

 Assay from article: https://www.nationalgeographic.com/culture/article/ramadan


What is Ramadan?, And why is it so important to Muslims? To answer this we must to explore the origins of this observance. Ramadan is a sacred month in the Islamic calendar, marked by fasting, prayer, and reflection.


The roots of Ramadan trace back to A.D. 610 when the Archangel Gabriel appeared to the Prophet Muhammad, revealing the Quran - Islam's holy scripture. The Quran, composed of 114 chapters, contain the God's words or Allah. This was complemented with the Hadith which are some lessons from the Prophet. To honor the Quran revelations Muslims called this month Ramadan, it starts with the crescent moon, so is not a fixed date. During this month all Muslims fast from 6 am to 7 pm, before that they can have breakfast and after the dinner.


Ramadan is a time for piety and self reflection. When finished Ramadan Muslims interchange talks, meals, prays, pay respect for their loved ones who have passed away.

Sunday, February 2, 2025

Assay: Why having a hobby is good for your brain and body

 

-Hicks Wogan, nationalgeographic.com


Besides being fun, science supports how having a hobby can improve our health condition, help us to live a little longer, can boost our social skills and overall make us feel better not only physically but mentally. A paper of several combining findings from several surveys studied people aged 65 or older in Euro, USA, Japan and China, on how people who practice hobbies reported fewer symptoms of depression and better health.


From hobbies that involve moving your body like running and swimming have been reported benefits in metabolism, mood disorders and improving lung capacity. And tennis players add almost a decade to their life expectancies. Garden activities like growing veggies can help children’s mood, focus and have a link to better mental health in adulthood. Arts such as painting or playing music, reduce cortisol (the stress hormone) and release endorphins and dopamine. These activities helps patients improve concentration and alleviate pain or fatigue, and music assist infants in stabilizing their heart, respiratory rates, sleep patterns and weight gain.



Finally outdoor exercises, being among trees, birds and sunshine has benefits like reducing risks of mental illness and improving cognitive and memory performance. For example, you could take an evening or weekend walk in the woods or near a lake, then go home put some music and cook a meal.

Saturday, January 25, 2025

Assay:Sleepmaxxing is the newest wellness trend – but does it actually work?

 Froom NationalGeographi, By Alyssa Jaffer.


There is a new trend in TikTok called Sleepmaxxing, it is all about technics that suppose to help getting to sleep faster, deeper and longer. But how effective are those technics? And is there any scientific backing on those technics? Why is it a trend?


In nowadays people are realizing the importance of the sleep, how it affects the well being and how some people who have sleep trouble search for fast solutions. Sleepmaxxing is a trend where TikTokers offers several methods to help sleep better, the term came from Lookmaxxing that focus on tricks to improve appearance. Some of those methods include mouth-tapping, eat kiwi at night, mask white noise, magnesium mocktails and nostril expanders.


Some of those methods are backed by scientific research like eating kiwi which boost seratonin and melatonin improving sleeping and muscle recovery, in general studies reveal that treatment with melatonin had been shown to be effective. Using blocking blue light glasses, deep breathing meditation help with stress which promote relaxation and improve sleeping. It’s all about what is known as sleeping hygiene. But there are not evidence about magnesium supplements, white noise devices, that so called pineal gland meditation and mouth-tapping really works, in fact some of them can worsens the sleep condition.


If you have a sleep condition is better to see a physician and remember that the best sleepers are those who don’t think about it.


Original article: https://www.nationalgeographic.com/science/article/does-sleepmaxxing-work

Sunday, December 24, 2023

Functional Programming Scala - Coursera NonEmpty Union

 In the third week of Coursera course Functional Programming Principles in Scala, there a method in one of the examples that was really hard for me to understand. I will describe step by step how the method Union of the Lecture 3.1 - Class hierarchies works:


Given the following code: 


abstract class IntSet:
def incl(x: Int): IntSet
def contains(x: Int): Boolean
def union(s: IntSet): IntSet

class Empty() extends IntSet:
def contains(x: Int): Boolean = false
def incl(x: Int): NonEmpty(x, Empty(), Empty())
def union(s: IntSet): IntSet = s

class NonEmpty(elem: Int, left: IntSet, right: IntSet) extends IntSet:

def contains(x: Int): Boolean =
if x < elem then left.contains(x)
else if x > elem then right.contains(x)
else true

def incl(x: Int): InSet =
if x < elem then NonEmpty(elem, left.incl(x), right)
else if x > elem then NonEmpty(elem, left, right.incl(x))
else this
def union(s: IntSet): InSet =
left.union(right).union(s).incl(elem)


How the method union will resolve for Inset  A and B :


            A                        B
            5                        8
         /     \                   /      \
        3       7               6        10

The nature of the algorithm is recursive, we need to read it from left to right and solve it that way too.

Conventions

N = NonEmpty (class)
E = Empty (class)
Green = left (class member)
Blue = right (class member)

Steps:

1)
A.union(B)

2)
N(5, N(3, E, E), N(7, E, E)).union(B)

3) 
N(3, E, E).union(N(7, E, E)).union(B).incl(5)

4)
E.union.E.union(N(7, E, E)).incl(3).union(B).incl(5)

5)
E.union(N(7, E, E)).incl(3).union(B).incl(5)

6) 
N(7, E, E).incl(3).union(B).incl(5)

7)
N(7, N(3, E, E), E).union(B).incl(5)

8)
N(3, E, E).union(E).union(B).incl(5).incl(7)

9)
E.union(E).union(E).incl(3).union(B).incl(5).incl(7)

10)
N(3, E, E).union(B).incl(5).incl(7)

11)
E.union.E.union(B).incl(5).incl(7).incl(3)

12)
B.incl(5).incl(7).incl(3)

13)


                                      B
                                      8
                                   /      \
                                 6        10
                                /   \      
                               3     7
                                \ 
                                 5



What the algorithm does is:

  • Add every element of A into B
  • The order used for the insertion is first the most left element, then the most right element then the root, and repeat the cycle.


Friday, June 17, 2022

English Grammar Points - The Sorcerer's Stone

 Grammar Scrapbook Media Examples of The Sorcerer's Stone

Source: https://www.amazon.com/Harry-Potter-Sorcerers-Stone-MinaLima/dp/1338596705/ref=sr_1_1?crid=16KX7DZWRF2UH&keywords=sorcerer%27s+stone+minalima&qid=1655522095&s=books&sprefix=sorcerer%27s+stone+minalima%2Cstripbooks-intl-ship%2C111&sr=1-1


Images generated using Dall-E Mini project: https://huggingface.co/spaces/dalle-mini/dalle-mini


Grammar Point Media Example 


Article to refer to a noun, we use “a” when the next word starts with a sounding consonant and “an” when the word starts with a sounding vocal. For example “university” start with a sounding consonant “youniversity” so we use “a”, another example “hour” start with a sounding vocal “aour” the “h” is silent so with use “an”.


Examples: 


-He did have a very large mustache.

- Most of them had never seen an owl even at nighttime.



Present Perfect


 It is formed using subject + verb have/has + past participle, not can be added after the verb to indicate negation. It’s used to describe events that happened in the past and could be happening right now.


Examples: 

-It must have been a trick of the light.

- you’d have thought he’d just popped out of the ground.




Adjective Clauses





A sentence that describes a noun. It’s formed with main clause + adjective clause pronoun + adjective clause. In the main clause with have a noun and in the adjective clause, we have a verb. The adjective clause pronouns are: who, whom, which, that, and whose.


Example:


Mr. Dursley couldn’t bear people who dressed in funny clothes.




Adjective Clauses with prepositions



Sentence compose of the Main clause and Adjective clause, the former has a noun and the latter tells more information about the Main clause. It’s formed:


main clause + (preposition) + adjective clause pronouns + adjective clause.


The preposition can be placed before the adjective clause pronouns, in the middle of the adjective clause for example after the verb or it could be at the end.


Example:


Everyone in? shouted Hagrid, who had a boat to himself


Adjective clauses with subject



Are clauses that describe a noun or pronoun with a subject. Things can also be described by Adjective clauses with the subject. Form:



main clause + subject pronouns + adjective clause



Subject pronouns are who, that, and which.



Example:



A house for people who felt a bit queasy.




Comparatives


Transformations applied to adjectives to compare two things.  Are formed:


noun + (to be verb) + comparative adjective + than + noun


Rules: if the adjective has one or two syllables we add -er at the end of the word, for example: cheap, cheaper.

If the adjective has more than two syllables we can use “more” or “less”.


Example:


That man had to be older than he was.



Superlatives


Transformations are applied to adjectives to compare three or more things. Are formed:


noun + (to be) + the (superlative adjective)


Rules: if the adjective has one or two syllables we add -est to the end of the word, but if the adjective has three or more syllables we add “most” or “least”.


Examples: 


Perched on top of the rock was the most miserable little shack you could imagine.


Dudley was the biggest and stupidest of the lot, he was the leader.




Count/Noncount nouns




Count items that can be counted as with one, two, or them. Noncount items that aren’t practically possible to count like rice or water.


Rules: for the count noun in most cases if we need to make them plural add an “s” like ants or desks, if the word end with a vocal and “y” we add “s” if end with a constant and “y” we change “y” by “ies” like in libraries. If the word ends with “sh”, “ch”, “ss” or x, we add “es” like in boxes or buses. If the word ends with constant and “o” we add “es” like in heroes or potatoes.


Examples:


-Mrs. Dursley came into the living room carrying two cups of tea.

-with a lot of water in the bottom after the storm.




Indefinite Article “a”, “an”




Article to refer to a noun, we use “a” when the next word starts with a sounding consonant and “an” when the word starts with a sounding vocal. For example “university” start with a sounding consonant “youniversity” so we use “a”, another example “hour” start with a sounding vocal “aour” the “h” is silent so with use “an”.


Examples: 


-He did have a very large mustache.

- Most of them had never seen an owl even at nighttime.






Quantifiers




Expression of inexact quantity, those are “many”, “several”, “much”, “some”.


Rules: they go before nouns, for example here there are some points.


There are three types of quantifiers for only count nouns, non-count nouns, and for both. 


Example: 


She spent so much of her time craning over garden fences.




Past Participles




Forms of verbs in English that helps to form the present perfect and past perfect to indicate something that happens in the past.


Rules: it must follow another verb: “has caught”


Examples: 


bird-watchers everywhere have reported

He turned to smile at the tabby, but it had gone.



Present Perfect Questions





Questions that ask about an event of the past. They are answered with a yes or no.


Rules: Have/Has + subject + past participle


Examples:


how could he have forgotten?





Present Perfect Adverbs



The adverbs used in present perfect are: Ever, Never, Yet, and Already.


Rules: not and never cannot be in the same sentence. If the sentence is a question the adverb goes after the subject, if it is an answer it goes after the verb.


Example:


His aunt and uncle never spoke about them.

Monday, August 16, 2021

Deploy Docker App on Heroku


Heroku offers the option to host a docker application even on his free tier, the downside is it will take considerable time every time the app needs to be up. Once up it will work perfectly.
Steps:

1) You must have a Heroku account and install the Heroku command line.

2) Inside the root of your app folder execute:

 $ heroku login

3) After login into Heroku, execute the following command to login into the Heroku container service.

$ heroku container:login

4) The following command will create an app called "api-translator-esp-guc":

$ heroku create api-translator-esp-guc

Wednesday, July 29, 2020

Git Flow Guidelines

Git Flow Guidelines

Branch in git flow:

Started Commands:

1- Inside your folder project you can start the git flow with the following command:

git flow init

Then use Enter key to adhere to a standard thought you can change the prefix name if you need it.

2. Add your remote repository:

git remote add origin https://host.domain/user/yourepository

3- By default you are left in the Develop branch, you can create a feature branch with the following command:

git flow feature start my-name-branch

4- Add and commit your changes then you can push the feature branch

git add
git commit -m 'my well write comment'
git flow feature publish my-name-branch

5- To finish your changes(features) use the following command: 

git flow feature finish my-name-branch

Your feature branch will be deleted, but first will be merged into the develop branch.

Remember you had to push master and develop branch with the originals git commands:

git push origin master
git push origin develop

For more commands just visit these notes.

Advice: went thing don't work as we expected, we'll need to execute the raw git commands, for examples we may need to execute:

git merge release/0.0.1 --allow-unrelated-histories

Commands:

git flow / *(init) (feature/release/hotfix/bugfix)/(start/finish/publish/pull)/branch_name

Writing Commit Rules:

Rules for commit messages by Chris in his blog:
  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how
Useful git commands:

Reset just a folder: git checkout HEAD --

Reset a file to a previous commit:
git checkout c5f567~1 -- file1/to/restore

Taller de ingeniería de Big Data

Los siguientes procedimientos corresponden al material complementarío del taller de ingeniería de Big Data que será dado de forma presencial...