<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Paulo Mota</title>
    <description>The latest articles on DEV Community by Paulo Mota (@phmota).</description>
    <link>https://dev.to/phmota</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F758492%2Ff4a5aee6-2af8-478e-a45b-a6ca1271c26b.jpeg</url>
      <title>DEV Community: Paulo Mota</title>
      <link>https://dev.to/phmota</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/phmota"/>
    <language>en</language>
    <item>
      <title>Towards a Unified Ethical Framework for Responsible AI</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 05 Nov 2024 18:09:54 +0000</pubDate>
      <link>https://dev.to/phmota/towards-a-unified-ethical-framework-for-responsible-ai-24k3</link>
      <guid>https://dev.to/phmota/towards-a-unified-ethical-framework-for-responsible-ai-24k3</guid>
      <description>&lt;h2&gt;
  
  
  Synthesizing Principles for Societal Benefit
&lt;/h2&gt;

&lt;p&gt;This paper explores the creation of a unified ethical framework to promote socially responsible artificial intelligence (AI). It synthesizes key insights from six prominent initiatives that have shaped the ethical discourse surrounding AI, including the Asilomar AI Principles, the Montreal Declaration for Responsible AI, and the European Commission’s guidelines on AI ethics, among others. &lt;/p&gt;

&lt;p&gt;Together, these initiatives outline 47 ethical principles, which the paper distills into six core principles: beneficence, non-maleficence, autonomy, justice, explicability, and accountability. Each principle is explained through real-world examples, emphasizing the importance of ethical AI development and its role in advancing societal well-being.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five Principles for Ethical AI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Beneficence
&lt;/h3&gt;

&lt;p&gt;Promoting Well-being and Doing Good The principle of beneficence emphasizes that AI should be designed and used to promote the well-being of individuals and society. AI technologies should positively contribute to economic, social, and environmental welfare. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; AI systems in medical diagnostics, such as those that help detect cancer in early stages, are an example of beneficence. By improving diagnostic accuracy, these systems enhance patient outcomes and save lives, demonstrating how AI can be used to improve societal well-being.&lt;/p&gt;

&lt;h3&gt;
  
  
  Non-maleficence
&lt;/h3&gt;

&lt;p&gt;Avoiding Harm or Minimizing Negative Impacts Non-maleficence ensures that AI is designed to avoid harm and minimize potential negative consequences. Developers must anticipate and mitigate risks, ensuring that AI systems do not cause unintended harm. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; In autonomous driving, AI systems must prioritize safety and be designed to reduce the risk of accidents. For instance, an autonomous car should be able to recognize pedestrians and adjust its behavior to prevent collisions, even in complex scenarios such as unexpected pedestrian crossings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Autonomy
&lt;/h3&gt;

&lt;p&gt;Respecting Human Dignity and Informed Decision-making The principle of autonomy focuses on respecting individuals’ rights to make informed decisions about their interactions with AI. AI systems should empower people to maintain control over their personal data and decisions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; AI-powered recommendation systems, such as those used by streaming services or e-commerce platforms, should allow users to understand how their data is used to generate recommendations. Users should also have the ability to opt out of certain data collection practices or adjust privacy settings to maintain autonomy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Justice
&lt;/h3&gt;

&lt;p&gt;Fairness in AI Development and Distribution of Benefits Justice ensures that AI is developed and deployed in ways that promote fairness and prevent the deepening of social inequalities. AI systems should be free from biases and should distribute benefits equitably across all social groups. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; In recruitment, AI systems used to screen job applicants must be free from biases that may disproportionately affect certain demographic groups, such as women or ethnic minorities. Auditing these systems to detect and eliminate biased patterns is essential for ensuring fairness in hiring processes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explicability
&lt;/h3&gt;

&lt;p&gt;Ensuring Transparency, Intelligibility, and Accountability in AI Decisions Explicability combines the need for transparency, intelligibility, and accountability in AI decision making. This principle requires that AI systems provide clear, understandable explanations for their decisions and that human stakeholders remain accountable for the outcomes of these systems. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transparency&lt;/strong&gt; ensures that AI processes and decision-making pathways are open and available for scrutiny. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intelligibility&lt;/strong&gt; means that the explanations provided by AI systems should be comprehensible to non-experts. Users must be able to understand how and why a particular decision was made. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accountability (6th-ish)&lt;/strong&gt; ensures that the responsibility for AI decisions remains with the developers, operators, or organizations using the AI system, preventing a scenario where the AI is blamed for any negative outcomes. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; In criminal justice, AI systems used to assess recidivism risk must offer transparent reasoning behind their predictions. If an AI tool suggests a harsher sentence for a defendant based on a risk assessment, both the defendant and the court must understand the factors driving the AI’s decision. Furthermore, if the decision leads to negative outcomes, such as an unjust sentence, the system’s developers and users should be held accountable for the failure.&lt;/p&gt;

&lt;p&gt;By ensuring that AI decisions are both intelligible and traceable to human actors, explicability reinforces trust in AI and helps mitigate potential harms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;p&gt;Floridi, Luciano, and Josh Cowls. “A Unified Framework of Five Principles for AI in Society.” Harvard Data Science Review, vol. 1, no. 1, 23 June 2019, hdsr.mitpress.mit.edu/pub/l0jsh9d1/release/8, &lt;a href="https://doi.org/10.1162/99608f92.8cd550d1" rel="noopener noreferrer"&gt;https://doi.org/10.1162/99608f92.8cd550d1&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Convert HTML to Text in Mysql SELECT</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Sun, 13 Feb 2022 19:15:09 +0000</pubDate>
      <link>https://dev.to/phmota/convert-html-to-text-mysql-select-15fa</link>
      <guid>https://dev.to/phmota/convert-html-to-text-mysql-select-15fa</guid>
      <description>&lt;p&gt;It is very simple just include your field on this regex expression on your select query:&lt;br&gt;
&lt;code&gt;SELECT content,REGEXP_REPLACE (content, '&amp;lt;.+?&amp;gt;', '') as new_text_column FROM entity_news en limit 10;&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fypxbqhe6wbvu679f7b37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fypxbqhe6wbvu679f7b37.png" alt="Query Example" width="800" height="206"&gt;&lt;/a&gt;&lt;br&gt;
I really recommend DBever for manage mysql databases. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://dbeaver.io/" rel="noopener noreferrer"&gt;https://dbeaver.io/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good Hacking &lt;/p&gt;

</description>
      <category>mysql</category>
      <category>sql</category>
      <category>html</category>
      <category>text</category>
    </item>
    <item>
      <title>Funny meme about machine learning</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 28 Dec 2021 12:21:19 +0000</pubDate>
      <link>https://dev.to/phmota/funny-meme-about-machine-learning-3k07</link>
      <guid>https://dev.to/phmota/funny-meme-about-machine-learning-3k07</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9qz2q3gyz494rwz3i7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9qz2q3gyz494rwz3i7q.png" alt="Image description" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Trans people analysis using stack overflow survey dataset</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Sat, 18 Dec 2021 17:26:11 +0000</pubDate>
      <link>https://dev.to/phmota/trans-people-analysis-using-stack-overflow-survey-dataset-59jf</link>
      <guid>https://dev.to/phmota/trans-people-analysis-using-stack-overflow-survey-dataset-59jf</guid>
      <description>&lt;p&gt;A data-driven culture translates data into actions in the world. For data, I have chosen the dataset from Stack Overflow survey as provider. Also, I am using the trans community as my persona.&lt;/p&gt;

&lt;p&gt;I have used the &lt;a href="https://insights.stackoverflow.com/survey" rel="noopener noreferrer"&gt;Stack Overflow Survey Dataset&lt;/a&gt; to deeply analyze and bring insights about trans people in the IT community.&lt;/p&gt;

&lt;p&gt;I will answer these questions below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How has the number of trans people identified in the survey changed in the past three years?&lt;/li&gt;
&lt;li&gt;What are the top and bottom countries by the number of trans people?&lt;/li&gt;
&lt;li&gt;What is the current situation with programming skills by trans people?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have merged all datasets from 2019, 2020, and 2021 and created a new dataset with the common columns. After that I have separated the main columns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trans (Yes, No, Prefer not to say)&lt;/li&gt;
&lt;li&gt;Country (United States, Brazil, Netherlands, etc.)&lt;/li&gt;
&lt;li&gt;yearData (2019,2020 or 2021)&lt;/li&gt;
&lt;li&gt;mainBranch (Current situation with programming skills)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've developed an interesting to answer these questions. You can play with it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://public.tableau.com/app/profile/paulo.mota3585/viz/TransPeopleonStackOverflowSurvey/trans_dash" rel="noopener noreferrer"&gt;Tableau Dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How can we improve the number of trans poeple in IT community? &lt;/p&gt;

&lt;p&gt;I really would like to hear your suggestions! &lt;/p&gt;

&lt;p&gt;Let's discuss about it on comments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/paulowiz/trans_people_analysys_stack_overflow" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>tableau</category>
      <category>programming</category>
      <category>trans</category>
    </item>
    <item>
      <title>How to use Selenium on linux</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 30 Nov 2021 16:23:33 +0000</pubDate>
      <link>https://dev.to/phmota/how-to-use-selenium-on-linux-j16</link>
      <guid>https://dev.to/phmota/how-to-use-selenium-on-linux-j16</guid>
      <description>&lt;p&gt;Developers always are looking for ways to reuse their codes as well, for that, I'm gonna share with you a way to use your selenium code as well.&lt;/p&gt;

&lt;p&gt;First of all, you should install the libs in your project:&lt;/p&gt;

&lt;p&gt;pip install selenium &lt;br&gt;
I really like to use selenium, because there are many javascript on the web which most of the time you need to wait for the website to load completely for starting scrap.&lt;/p&gt;

&lt;p&gt;After that run these commands on Linux in the same folder of your project(.py file)!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip&lt;br&gt;
https://trendoceans.com/how-to-install-and-setup-selenium-with-google-chrome-on-ubuntu/&lt;br&gt;
unzip chromedriver_linux64.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will download the chrome web driver for Linux.&lt;/p&gt;

&lt;p&gt;Let's code!&lt;/p&gt;

&lt;p&gt;Imports&lt;/p&gt;

&lt;p&gt;lib that you allow to chose your browser &lt;br&gt;
&lt;code&gt;from selenium import webdriver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is very useful to do some time.sleep() and wait any seconds on page.&lt;br&gt;
&lt;code&gt;import time&lt;/code&gt;          &lt;/p&gt;

&lt;p&gt;Very nice to use to get information from html&lt;br&gt;&lt;br&gt;
&lt;code&gt;from bs4 import BeautifulSoup  &lt;br&gt;
&lt;/code&gt;&lt;br&gt;
I use to see the progressive bar in for loops &lt;br&gt;
&lt;code&gt;import tqdm&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Pandas I use to create dataframes and export my information scraped on csv &lt;br&gt;
&lt;code&gt;import pandas as pd&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can use this to wait a specific element load&lt;br&gt;
&lt;code&gt;from selenium.webdriver.support.ui import WebDriverWait  &lt;br&gt;
from selenium.webdriver.support import expected_conditions as EC &lt;br&gt;
from selenium.webdriver.common.by import By&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;manage drop down components on web &lt;br&gt;
&lt;code&gt;from selenium.webdriver.support.ui import Select&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;os system commands&lt;br&gt;
&lt;code&gt;import os&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Download the webdriver in your project automatic (Just for Windows) &lt;br&gt;
&lt;code&gt;import chromedriver_autoinstaller&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will use to check the operational system your bot is running( Windows or Linux )&lt;br&gt;
&lt;code&gt;import platform&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Implementation&lt;/p&gt;

&lt;p&gt;Check your operational system! &lt;br&gt;
&lt;code&gt;OP_SYSTEM = platform.system()&lt;br&gt;
print(OP_SYSTEM)&lt;br&gt;
if OP_SYSTEM.lower() == 'windows':&lt;br&gt;
    chromedriver_autoinstaller.install()&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Create a folder to recieve your donwloads&lt;br&gt;
&lt;code&gt;try:&lt;br&gt;
    os.mkdir(os.path.dirname(os.path.realpath(__file__)) + '//data')&lt;br&gt;
except:&lt;br&gt;
    pass&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;code&gt;folder = os.path.dirname(os.path.realpath(__file__)) + '/data'# Set Google Options &lt;br&gt;
options = webdriver.ChromeOptions()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Define donwload settings&lt;br&gt;
Set a specific folder to download files from selenium ( Default is download folder)&lt;br&gt;
&lt;code&gt;prefs = {&lt;br&gt;
         "download.default_directory": r"%s" % folder,&lt;br&gt;
         "download.prompt_for_download": False,&lt;br&gt;
         "download.directory_upgrade": True&lt;br&gt;
         }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;options.add_experimental_option('prefs', prefs)&lt;/code&gt;&lt;br&gt;
This option hide the browser... to see the browser comment this line below&lt;br&gt;
&lt;code&gt;options.add_argument("--headless")  &lt;br&gt;
options.add_argument("--no-sandbox")&lt;br&gt;
options.add_argument("--allow-running-insecure-content")&lt;br&gt;
options.add_argument("--window-size=1920,1080")&lt;br&gt;
options.add_argument("--disable-extensions")&lt;br&gt;
options.add_argument("--proxy-server='direct://'")&lt;br&gt;
options.add_argument("--proxy-bypass-list=*")&lt;br&gt;
options.add_argument("--start-maximized")&lt;br&gt;
options.add_argument('--disable-gpu')&lt;br&gt;
options.add_argument('--disable-dev-shm-usage')&lt;br&gt;
options.add_argument('--ignore-certificate-errors')&lt;br&gt;
options.add_experimental_option('excludeSwitches', ['enable-logging'])&lt;/code&gt;&lt;br&gt;
Remove selenium logs on console ( More clean! )&lt;br&gt;
&lt;code&gt;options.add_argument('--log-level=3')&lt;/code&gt;&lt;br&gt;
`&lt;br&gt;
Chose the webdriver according with your system &lt;br&gt;
Windows or Linux&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if OP_SYSTEM.lower() == 'windows':&lt;br&gt;
    driver = webdriver.Chrome(chrome_options=options)&lt;br&gt;
else:&lt;br&gt;
    driver = webdriver.Chrome(executable_path='chromedriver', chrome_options=options)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;driver.get("https://google.com")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your code to scrap start here , everything above I like as default in my codes!&lt;br&gt;
&lt;code&gt;search_box = driver.find_element_by_name('q')&lt;br&gt;
search_box.send_keys('What is Python?')&lt;br&gt;
search_click = driver.find_element_by_name('btnK')&lt;br&gt;
search_click.submit()&lt;br&gt;
time.sleep(2)&lt;br&gt;
tiles = driver.find_elements_by_tag_name('h3')&lt;br&gt;
for title in tiles:&lt;br&gt;
    print(title.text)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;good practice to kill the process, for dont speeding too much resources&lt;br&gt;
&lt;code&gt;driver.close()&lt;br&gt;
driver.quit()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Good Hacking!&lt;/p&gt;

&lt;p&gt;Add me on Linkedin!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/paulo-mota-955218a2/" rel="noopener noreferrer"&gt;'Reach me onLinkedin'&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>linux</category>
      <category>selenium</category>
      <category>bs4</category>
    </item>
    <item>
      <title>FOCO : A Softskill mais valiosa na era da informação</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 30 Nov 2021 16:17:14 +0000</pubDate>
      <link>https://dev.to/phmota/foco-a-softskill-mais-valiosa-na-era-da-informacao-1iag</link>
      <guid>https://dev.to/phmota/foco-a-softskill-mais-valiosa-na-era-da-informacao-1iag</guid>
      <description>&lt;p&gt;O foco é a capacidade de se concentrar em um objetivo e conquistá-lo , é a base de tudo que fazemos . Atualmente vivemos com probreza de atenção, e não porque nosso foco diminiu mas sim , pelo o aumento de coisas que puxam nossa atenção o tempo todo ( Internet, Eletrônicos,Apps entre outros) , assim nosso foco fica divido o tempo inteiro!&lt;/p&gt;

&lt;p&gt;Agora uma pergunta muito subjetiva:&lt;/p&gt;

&lt;p&gt;Qual foi sua ultima vez que você ficou em um estado de concentração ?&lt;/p&gt;

&lt;p&gt;Estado de concentração é quando focamos tanto em uma atividade que nem notamos o tempo passar .Deixa eu adivinhar , tem muito tempo né .... e estava fazendo algo que você gosta muito.Cocentrar nosso foco em uma atividade é algo estremamente dificil no tempo que vivemos e te respondo o porquê.&lt;/p&gt;

&lt;p&gt;O que mais nós impede de desenvolver o foco é a exaustão cognitiva, é quando realizamos uma atividade por muito tempo e chega um ponto que nada mais entra em nossa mente e a motivação para realizar aquilo é zero e não conseguimos mais concentrar naquilo .&lt;/p&gt;

&lt;p&gt;Para recuperar a concentração tirada pela exaustão cognitiva ,temos que literalmente esvaziar a mente , e não substituir por outra atividade.Segue algumas coisas que pode fazer:&lt;/p&gt;

&lt;p&gt;Meditação (Fechando os olhos respirando fundo e soltando devagar), assim você irá desligar o foco da sua mente para sua respiração e não vai pensar , naquela atividade.&lt;br&gt;
Dar uma volta perto da natureza , sabe aquele lugar na sua empresa ou casa que tem árvores e plantas ? E se não tiver o céu é muito bom também. Olhar a natureza te traz devaneios e alivia a tensão mental.&lt;br&gt;
O importante é fazer um break quando estiver fazendo uma atividade pois assim você não tera exaustão cognitiva e trazer atividades na sua rotina que te ajudem esvasiar a mente como Yoga, atividade fisica entre outras coisas).&lt;/p&gt;

&lt;p&gt;O foco é como um músculo e precisa ser treinado , a metodologia dos Mini Desafios vai te ajudar a desenvolver ele . Os mini desafios nada mais é você definir um curto periodo de tempo que vai ficar concentrado em uma atividade e cumpri- la. Começando com 10 min depois ir aumentando conforme sua mente aguente pois se você colocar mais tempo que aguente , você terá exaustão congnitiva e voltando a estaca zero , o segredo é se auto conhecer.&lt;/p&gt;

&lt;p&gt;A melhor forma de exercitar isso é ler livros, defina 15 paginas por dia e vai aumentando você verá o quanto é transformador . A leitura aumenta nosso foco e exercita mais a nossa mente do que você ver um video por exempo ,isso porque :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ENQUANTO LEMOS UM LIVRO CRIAMOS UM MAPA MENTAL PARA SUA COMPREENSÃO&lt;/p&gt;

&lt;p&gt;DEPOIS CONECTAMOS ESSE MAPA MENTAL COM UM UNIVERSO DE MAPAS MENTAIS SOBRE O MESMO ASSUNTO&lt;/p&gt;

&lt;p&gt;ESSA EXPANSÃO DESSA COMPREENSÃO É ONDE RESIDE O NÚCLEO DO CONHECIMENTO.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Vamos praticar o foco e ter sucesso em nossas vidas sem procastinação.&lt;/p&gt;

&lt;p&gt;Espero ter ajudado.&lt;/p&gt;

&lt;p&gt;Referência que usei foi do livro " &lt;a href="https://www.amazon.com.br/Foco-aten%C3%A7%C3%A3o-papel-fundamental-sucesso-ebook/dp/B00H2KX8W8" rel="noopener noreferrer"&gt;Foco: A atenção e seu papel fundamental para o sucesso&lt;/a&gt; " por Daniel Goleman&lt;/p&gt;

</description>
      <category>bussiness</category>
      <category>softskill</category>
      <category>career</category>
    </item>
    <item>
      <title>Configure and hosting MySQL Database in Ubuntu</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 30 Nov 2021 16:06:33 +0000</pubDate>
      <link>https://dev.to/phmota/configure-and-hosting-mysql-database-in-ubuntu-2f6g</link>
      <guid>https://dev.to/phmota/configure-and-hosting-mysql-database-in-ubuntu-2f6g</guid>
      <description>&lt;p&gt;After a lot of searching and headache with that, I decide to create this little tutorial to help you setup and host a MySQL database on ubuntu machine without stress.&lt;/p&gt;

&lt;p&gt;Install MySQL&lt;br&gt;
Install the MySQL server by using the Ubuntu operating system package manager:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt-get update&lt;br&gt;
sudo apt-get install mysql-server&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The installer installs MySQL and all dependencies.&lt;/p&gt;

&lt;p&gt;If the secure installation utility does not launch automatically after the installation completes, enter the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo mysql_secure_installation utility&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This utility prompts you to define the MySQL root password and other security-related options, including removing remote access to the root user and setting the root password.&lt;/p&gt;

&lt;p&gt;Allow remote access&lt;br&gt;
If you have iptables enabled and want to connect to the MySQL database from another machine, you must open a port in your server’s firewall (the default port is 3306). You don’t need to do this if the application that uses MySQL is running on the same server.&lt;/p&gt;

&lt;p&gt;Run the following command to enable remote access to the MySQL server:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw enable&lt;/code&gt;&lt;br&gt;
and this command to allow remote access&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw allow mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Start the MySQL service&lt;br&gt;
After the installation is complete, you can start the database service by running the following command. If the service is already started, a message informs you that the service is already running:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl start mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Launch at reboot&lt;br&gt;
To ensure that the database server launches after a reboot, run the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl enable mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Configure interfaces&lt;br&gt;
MySQL, by default is no longer bound to ( listening on ) any remotely accessible interfaces. Edit the “bind-address” using this command&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano /etc/mysql/mysql.conf.d/mysqld.cnf&lt;/code&gt;&lt;br&gt;
comment these lines on the &lt;strong&gt;file&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#bind-address = 0.0.0.0`&lt;br&gt;
`#mysqlx-bind-address = 0.0.0.0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart the MySQL service.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Start the &lt;strong&gt;MySQL&lt;/strong&gt; shell and create your user to login remotely&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/usr/bin/mysql -u root -p&lt;/code&gt;&lt;br&gt;
Now you can run the script bellow to create your user with remote access enabled:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CREATE USER 'demouser'@'%' IDENTIFIED BY 'Demopassword2021#';&lt;br&gt;
ALTER USER 'demouser'@'%' IDENTIFIED WITH mysql_native_password BY 'Demopassword2021#';&lt;br&gt;
GRANT ALL on *.* TO 'demouser'@'%' WITH GRANT OPTION;&lt;br&gt;
FLUSH PRIVILEGES;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Ps: The "%" means that user can connect from any IP. If you would like safer you can specify the you public IP.&lt;br&gt;
for you exit from the MySQL terminal just type the command bellow and press enter:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;exit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart the MySQL server&lt;br&gt;
&lt;code&gt;&lt;br&gt;
sudo systemctl start mysql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now your server is done!&lt;/p&gt;

&lt;p&gt;I recommend Workbench to connect on user machine.&lt;/p&gt;

&lt;p&gt;If you have any question, text me on LinkedIn or enter in our community group by this link&lt;/p&gt;

&lt;p&gt;Good Hacking!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1j3k71jt0zwdf8gxih8e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1j3k71jt0zwdf8gxih8e.gif" alt="Image description" width="500" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>ubuntu</category>
      <category>linux</category>
      <category>serverless</category>
    </item>
    <item>
      <title>How run background python scripts in Linux</title>
      <dc:creator>Paulo Mota</dc:creator>
      <pubDate>Tue, 30 Nov 2021 11:54:20 +0000</pubDate>
      <link>https://dev.to/phmota/how-run-background-python-scripts-in-linux-13e5</link>
      <guid>https://dev.to/phmota/how-run-background-python-scripts-in-linux-13e5</guid>
      <description>&lt;p&gt;Let a python script running in linux server with no worries&lt;/p&gt;

&lt;p&gt;It's simple just open your terminal in Linux and use the command and close the terminal&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nohup python3 -u yourpythonfile.py &amp;gt; out.out&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;the argument "&amp;gt; out.out" will create the log file in the same folder that you run that command and when you open the terminal again to check how is the script you can use this command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano out.out&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now if you are using Google Cloud or AWS virtual machines, and you would like to shut down the machine after the execution to &lt;strong&gt;avoid extra costs $$&lt;/strong&gt; you can use this command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nohup bash -c python3 -u yourpythonfile.py ; sudo shutdown -h now &amp;gt; out.out &amp;amp;﻿&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkydhp22w2v7qgj2h6hyl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkydhp22w2v7qgj2h6hyl.gif" alt="Image description" width="400" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>python</category>
      <category>aws</category>
      <category>googlecloud</category>
    </item>
  </channel>
</rss>
