teleren/devto huggingface dataset:
The 60th Day of the 100 Days of Code challenge
Published: 2023-08-18 21:15:59

Hey everyone!

Today, I worked some more on the personal assistant project. Since there's no working prototype yet, I figured that using Langchain at this point where it has no obvious benefit adds unnecessary testing tax and complications. I also figured that it'd be much better to use it when it's the best solution in sight, that'd be the best way to learn its real-world usages.

I've been testing using a telephony server that makes outbounds calls using Twilio, but since that also adds unnecessary testing tax (the assistant's functionality hasn't been completed yet), I moved to a local solution that mimicks the telephony server's behavior (maintained the application's flow).

Organized the codebase a bit to make sure the flow is clear and that I don't get lost in the files. Explored some options to reduce latency and hoping to experiment with them soon. Also worked on enginnering some prompts for the assistant's functionality.

That's it for today. Happy coding!
Deployar en una subcarpeta React con React-Router-Dom en servidor Nginx con Vite
Tags: nginx, reactrouter, react
Published: 2023-08-18 21:12:26

##Hola a todos##

En esta ocasión les traigo un nuevo tutorial para poder deployar su aplicación en una subcarpeta


###NGINX###

Dentro de Nginx debemos de configurar nuestro servidor de la siguiente manera 

```
        location /[AQUÍ VA EL NOMBRE DE LA SUBCARPETA]{
            try_files $uri $uri/ /[SUBCARPETA]/index.html?$args;
        }
```

Dentro del location tendremos que poner el nombre de la subcarpeta para cuando accedan ahí cargue los archivos necesarios accediendo a   Nombre de la subcarpeta/index.html y que cargue el archivo html.

Con esto garantizamos que se carguen los archivos que queremos al momento de acceder a una ruta de la subcarpeta



### vite.config.js ###

Si no existe el archivo de configuración lo creamos 


```
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  base: 'https://[RUTA DEL SERVIDOR]/[Nombre de la subcarpeta]/',
  plugins: [react()],
})

```

Nota: La ruta del servidor es ejemplo: rodrigo.hgo.mx



### main.jsx ###

En el main.jsx de nuestra aplicacion debemos de definir el publicPath para todas nuestras rutas

```
const publicPath = '/[NOMBRE DE TU SUBCARPETA]/';

const router = createBrowserRouter([
  {
    path: publicPath,
    element: <Root/>,
    errorElement: <ErrorPage />, 
  },
  {
    path: `${publicPath}encuesta`,
    element: <Contact />,
  },

]);



// AQUI EN EL ROUTER PROVIDER DEBEMOS DE PONER EL BASENAME 

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <RouterProvider router={router} basename="/[NOMBRE DE TU SUBCARPETA]">
    </RouterProvider>
  </React.StrictMode>,
)


```
Step by step guide to becoming a Data Scientist in 2023
Published: 2023-08-18 21:09:36

## AI and Data Science Roadmap

I have noticed a consistent demand from our dear learners for some sort of roadmap that can assist them in their learning journey. In response to this, i recognize the importance of providing a clear and comprehensive guide to aid learners in achieving their educational goals.

## The Learning Sea
Navigating the path of learning can often be a daunting task, especially in today's fast-paced world where information is abundant and diverse. With so many options available, it's understandable that learners seek a structured approach to their learning process. I think that a roadmap serves as a valuable tool, offering a step-by-step plan that outlines the key milestones and resources needed to progress efficiently.

## Keep going
Furthermore, a roadmap serves as a source of accountability. As learners check off milestones and achievements, they experience a sense of accomplishment that propels them forward. In moments of uncertainty, the roadmap acts as a guiding light, reminding learners of their purpose and encouraging them to persevere.

## A testimony
At the beginning of my learning journey I felt very lost, and I didn't know how to organize my studies in order to feel some progress in my learning, that's when I found a roadmap platform. Today they released a roadmap dedicated to data science and strongly recommending DeepLearning.AI


Keep in mind that it is a tool just like the other one, so, do not take this platform as a dogma in your learning, instead keep yourself updated and exploring new horizons

[Data Science Roadmap](https://roadmap.sh/ai-data-scientist)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f99y8vyhut4ixyq3w7hv.jpg)
Photo by <a href="https://unsplash.com/@sambalye?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Sam Balye</a> on <a href="https://unsplash.com/photos/w1FwDvIreZU?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  


  

I Hope this roadmap help you in your journey.

Best regards
How does Avast's decryptor function in recovering data from Akira ransomware?
Tags: cybersecurity, akira, avast, decryptor
Published: 2023-08-18 20:41:14

🛡️ **Understanding Akira Ransomware: Navigating the Threat Landscape**


🌐 Hello Everyone,

Today, I'd like to share a significant piece of information that sheds light on a critical digital challenge. Let me emphasize that this isn't a promotional post, but rather an opportunity to understand an evolving issue.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j54itcmt5z1bx1otdrp.png)

In our interconnected world, ransomware has emerged as a persistent concern. "Akira" ransomware, is a digital adversary that came into the spotlight in March 2023. Its tactics involve encrypting data using **RSA-4096 encryption** and **ChaCha 2008** methods, appending the ".akira" extension to affected files.

However, amidst these challenges, there's a glimmer of hope. Avast's decryptor stands as a sentinel against the complexities of ransomware, especially on Windows systems. Even more promising, Avast is actively engaged in crafting a solution for Linux users, showcasing a proactive stance in cybersecurity.

Creating these solutions requires a symphony of programming languages. Avast's decryptor employs C++ and harnesses libraries like Boost and Crypto++ to counteract ransomware's grip.
In the ever-evolving digital landscape, it's essential to grasp the significance of these advancements. 

If you're eager to dive deeper into this topic, I encourage you to explore the complete article:

👉 [How does Avast's decryptor function in recovering data from Akira ransomware?](https://www.thedecentshub.tech/2023/08/akira-ransomware-recovery-avast-decryptor.html)

Let's empower ourselves with knowledge and navigate the digital realm with resilience.

**#Cybersecurity #RansomwareThreats #DataProtection #DigitalResilience #AkiraRansom**
PowerShell: find all matches in a string from array and count
Tags: powershell, stringmanipulation, array, matching
Published: 2023-08-18 20:07:45

PowerShell: Find All Matches in a String from Array and Count
-------------------------------------------------------------

As a software developer, you often come across scenarios where you need to search for specific patterns within a string and count the number of occurrences. PowerShell, with its powerful string manipulation capabilities, provides an elegant solution to this problem. In this article, we will explore how to find all matches in a string from an array and count them using PowerShell.

Let's say you have a string and an array of words, and you want to find all matches of the words from the array in the given string. Here's a simple example:

    $string = "The quick brown fox jumps over the lazy dog."
    $words = @("quick", "fox", "lazy")
    
    $matches = $string | Select-String -Pattern ($words -join "|")
    
    $matchCount = $matches.Matches.Count

In the above code snippet, we define a string variable named `$string` and an array variable named `$words`. We then use the `Select-String` cmdlet to search for all matches of the words in the string. The `-Pattern` parameter accepts a regular expression pattern, which we construct by joining the words from the array with the `|` (pipe) character. The result is stored in the `$matches` variable.

To count the number of matches, we access the `Matches` property of the `$matches` variable and retrieve its `Count` property. The final count is stored in the `$matchCount` variable.

Now, let's test our code with some funny phrases:

    $string = "I scream, you scream, we all scream for ice cream!"
    $words = @("scream", "ice cream", "banana")
    
    $matches = $string | Select-String -Pattern ($words -join "|")
    
    $matchCount = $matches.Matches.Count
    
    Write-Host "Number of matches found: $matchCount"

In this example, we search for the words "scream", "ice cream", and "banana" in the given string. Since "scream" and "ice cream" appear in the string, the count of matches will be 2. The output will be:

    Number of matches found: 2

PowerShell's `Select-String` cmdlet provides a flexible and efficient way to find all matches in a string from an array and count them. By leveraging regular expressions, you can search for complex patterns and achieve accurate results.

### References:

*   Microsoft Docs: [Select-String](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-string)
Beneficios de la IA en la Programación
Tags: ai, programming, productivity
Published: 2023-08-18 20:00:00

Introducción
En el mundo dinámico de la programación, los desarrolladores buscan constantemente formas de agilizar sus procesos y aumentar su productividad. La Inteligencia Artificial (IA) emerge como una fuerza revolucionaria que está transformando la forma en que los programadores trabajan. En este artículo, exploraremos los beneficios de la IA en la programación y cómo puede potenciar el desarrollo de software.

Tabla de Contenidos
1. El Auge de la IA en la Programación
2. Optimización de Código
3. Automatización de Tareas Repetitivas
4. Integración de Blackbox: Potenciando la Creatividad
5. Colaboración entre Humanos e IA
6. Moldeando el Futuro de la Programación

El Auge de la IA en la Programación
Con el avance de la tecnología, la presencia de la IA en la programación se vuelve cada vez más prominente. Desde asistir en la generación de código hasta sugerir optimizaciones, herramientas de IA como Blackbox están cambiando la forma en que los desarrolladores abordan los desafíos de la codificación.

Optimización de Código
Las herramientas impulsadas por IA ofrecen formas novedosas de abordar problemas de programación complejos. Al analizar grandes cantidades de datos y patrones, la IA puede proporcionar ideas que conduzcan a soluciones innovadoras y prácticas de codificación más eficientes.

Automatización de Tareas Repetitivas
Las tareas repetitivas pueden ser tediosas y consumir mucho tiempo. La IA destaca en la automatización de estas tareas, permitiendo que los desarrolladores se concentren en aspectos de mayor nivel de sus proyectos y aceleren el proceso de desarrollo.

Integración de Blackbox: Potenciando la Creatividad
Blackbox, un compañero de codificación impulsado por IA, se integra perfectamente con el flujo de trabajo de desarrollo. Al ofrecer sugerencias de código, identificar posibles errores y mejorar la calidad del código, Blackbox se convierte en un valioso aliado en la travesía de la codificación.

Colaboración entre Humanos e IA
Trabajar junto a la IA plantea preguntas sobre el papel de los desarrolladores en este panorama en evolución. Los desarrolladores y la IA se complementan mutuamente, con la IA manejando tareas rutinarias y sugiriendo optimizaciones, mientras que los desarrolladores aportan su creatividad y habilidades para resolver problemas.

Moldeando el Futuro de la Programación
El potencial de la IA para transformar la programación es innegable. Al adoptar herramientas de IA como Blackbox, los desarrolladores se sitúan a la vanguardia de una revolución tecnológica que promete mejorar la eficiencia de la codificación y desbloquear nuevas posibilidades.

Eleva tu Experiencia con la IA
Descubre más sobre el mundo de la Inteligencia Artificial con mis artículos, aprende a ser un mejor desarrollador, ¡Programa más rápido y mejor con estos secretos!
IAs: The Ultimate Coding Companion?
Tags: programming, ai, productivity
Published: 2023-08-18 20:00:00

Introduction
In the fast-paced world of coding, developers are constantly seeking ways to streamline their processes and enhance their productivity. Enter Artificial Intelligence (AI), a game-changing force that has started to revolutionize the way programmers work. In this article, we will explore the potential of AI as a coding companion and how it can reshape the landscape of software development.

Content Table
1. The Rise of AI in Programming
2. Enhancing Problem Solving
3. Automating Repetitive Tasks
4. Blackbox Integration: A Boost of Creativity
5. Navigating the Human-AI Collaboration
6. Shaping the Future of Programming

The Rise of AI in Programming
As technology advances, AI's presence in the programming sphere becomes increasingly prominent. From assisting in code generation to suggesting optimizations, AI tools like Blackbox are changing the way developers approach coding challenges.

Enhancing Problem Solving
AI-powered tools offer novel ways to tackle complex programming issues. By analyzing vast amounts of data and patterns, AI can provide insights that lead to innovative solutions and more efficient coding practices.

Automating Repetitive Tasks
Repetitive tasks can be time-consuming and monotonous. AI excels at automating such tasks, allowing developers to focus on higher-level aspects of their projects and accelerate the development process.

Blackbox Integration: A Boost of Creativity
Blackbox, an AI-powered coding companion, seamlessly integrates with the development workflow. By offering code suggestions, identifying potential errors, and enhancing code quality, Blackbox serves as a valuable partner in the coding journey.

Navigating the Human-AI Collaboration
Working alongside AI raises questions about the role of developers in this evolving landscape. Developers and AI complement each other, with AI handling routine tasks and suggesting optimizations, while developers bring their creativity and problem-solving skills to the table.

Shaping the Future of Programming
The potential of AI to transform programming is undeniable. As developers embrace AI tools like Blackbox, they stand at the forefront of a technological revolution that promises to enhance coding efficiency and unlock new possibilities.

Discover the power of AI
Elevate your coding experience with a seamless blend of human ingenuity and AI assistance. Embrace the future of coding with AI by reading my articles!
🐛 O bug que "quebrou" o Whatsapp 🐛
Tags: braziliandevs, webdev, github, bug
Published: 2023-08-18 19:39:20

Vocês ficaram sabendo do bug que "quebrou" o WhatsApp?

Ta bom, quebrar é uma palavra meio forte, é mais uma questão de ser inconveniente. 

Quem utiliza o WhatsAppWeb pelo Firefox essa semana (14/08/23) percebeu que simplesmente não dava para colar mensagens no chat dependendo de onde o texto inicial se encontrava. 

Fiz um gif para demonstrar o bug.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfv3jmkkn3p0jah3k80n.gif)


Uma [issue](https://github.com/webcompat/web-bugs/issues/125920) foi aberta no github faz uns dois dias relatando sobre o problema. 



Segundo os comentários o erro já foi encontrado, o fix foi feito e o deploy será realizado segunda-feira. Aparentemente o problema era com com o garbage collection do Firefox, embora em comentários mais recentes há questionamentos se realmente é esse o problema.



Vocês tinham percebido esse bug? Concordam com a justificativa?
Deploying Nodejs App To Heroku
Tags: node, heroku
Published: 2023-08-18 18:51:19

In this blog we will learn how we can deploy our nodejs app on heroku.

**Goals**
We will try to deploy our nodejs app.

**Prerequisites**
You just need to have a heroku account.

Deployment is one of the difficult part for developer.But, heroku made it very easy just few commands and your app deployed.In this blog i will teach you how we can easily deployed our nodejs app on heroku.

## **How To Deploy On Heroku.**
- First of all login to your heroku account and create an app.
- While creating app heroku will ask for buildpack which use to build your nodejs app code for nodejs we can select nodejs.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tkop64gdv9hus5u77dku.png)
- Now donwload heroku-cli for your system.You can download from here https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli
- Initialize your repo with nodejs app.
- After downloading heroku-cli login to your heroku account.For that you can use this command.
```
heroku login
```
It will take you to browser to login your account.

- After login add heroku origin.Be remember heroku also uses a git repo on their linux system/machine inorder to store your code after storing into it's repo it will use buildpack to build your code and generate minimized and more compressed version of your code to make it more efficient and faster than make it available to all over the world.You can find heroku remote origin on settings tab.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fd1jhdvsu3kux7m0d1zd.png)
You can add heroku origin by using this command.
```
git add remote heroku https://git.heroku.com/<your_app_name>.git
```
Here i set heroku origin name as heroku you can also provide any intended name to your heroku origin.

- After adding heroku origin add your files to staging area and  commit your files and than push to heroku origin using this command.
```
git push heroku <your_branch_name>:main
```
Above command will not push code to your vcs repo but only heroku's repo.
After that you can also push code to you git repo as well.

- Once code pushed successfully on heroku origin heroku will start building your app and than deploy your app at the end of logs you will get a deployed url.You can use this url inorder to check whether you app deployed successfully or not.

- To see logs you can use this command.
```
heroku logs --tail
```
**NOTE:-**
       Heroku by default uses main branch to deploy your code from where it should copy code you specifiy like in below command 
```
git push heroku <branch_from_where_to_copy_code>:main
```

For more detail you can visit https://devcenter.heroku.com/articles/git

That's it, happy coding😉.
PHP'de Türkçe Karakterli Dizileri Doğru Sıralama
Published: 2023-08-18 18:42:48

PHP'de `strcmp()` fonksiyonu kullanılarak yapılan sıralama işlemleri, Türkçe karakterlerin farklı ASCII değerleri nedeniyle istenmeyen sonuçlara yol açıyor. Bu makalede, Türkçe karakterleri doğru bir şekilde sıralamak için nasıl bir yaklaşım izleyebileceğimizi ele alacağız.

## Sorunun Tanımı

Örnek bir PHP kodu düşünelim:

```php
$isimler = array("Zeynep", "Mehmet", "Ayşe", "Ahmet", "İsmail");

usort($isimler, function ($a, $b) {
    return strcmp($a, $b);
});

print_r($isimler);
```

```
Array
(
    [0] => Ahmet
    [1] => Ayşe
    [2] => Mehmet
    [3] => Zeynep
    [4] => İsmail
)

```


Yukarıdaki kodda, bir dizi içerisinde farklı isimler bulunmaktadır. `usort()` fonksiyonu ile diziyi sıralarken `strcmp()` fonksiyonu kullanılmıştır. Ancak, Türkçe karakterlerin ASCII değerlerinden kaynaklanan farklılıklar nedeniyle "İsmail" ismi diğer kelimelerin sonuna yerleşmektedir.

## Çözüm: `strcoll()` Fonksiyonu ve `setlocale()`

Türkçe karakterlerin doğru bir şekilde sıralanabilmesi için `strcoll()` fonksiyonunu kullanabiliriz. Aynı zamanda, yerel ayarları (locale) doğru bir şekilde ayarlamak da önemlidir. İşte düzeltilmiş kod:

```php
$isimler = array("Zeynep", "Mehmet", "Ayşe", "Ahmet", "İsmail");
setlocale(LC_COLLATE, 'tr_TR.UTF-8'); // Türkçe sıralama için gerekli ayar

usort($isimler, function ($a, $b) {
    return strcoll($a, $b); // Türkçe'ye uygun karşılaştırma fonksiyonu
});

print_r($isimler);
```

```
Array
(
    [0] => Ahmet
    [1] => Ayşe
    [2] => İsmail
    [3] => Mehmet
    [4] => Zeynep
)

```

Yukarıdaki kodda, `setlocale()` fonksiyonuyla Türkçe sıralama için gerekli yerel ayarlar yapılmıştır. Ardından, `strcoll()` fonksiyonu ile Türkçe karakterlere uygun bir şekilde sıralama gerçekleştirilmiştir. Sonuç olarak, "İsmail" kelimesi diğer kelimelerle uygun bir şekilde sıralanacaktır.

## Sonuç
`strcoll()` fonksiyonunu kullanarak ve yerel ayarları düzgün bir şekilde ayarlayarak, Türkçe karakterlerin doğru sıralanması sağlanabilir. Bu sayede, daha tutarlı ve beklenen sonuçlar elde edilebilir.
Bootcamp Prework and Week 1
Tags: beginners, html
Published: 2023-08-18 17:28:02

# Bootcamp Prework and Week 1

## Prework:

I finished the Prework last week, I just forgot to make a post about my progress with this, so I wanted to recap myself and tell what I learned!

## What I learned in the prework:

- How to create a git repository using SSH keys
- How to generate an SSH key
- I have known HTML previously, however I learned a little more about how HTML works and got a better understanding of my existing HTML knowledge
- I learned very basic CSS commands
- I learned very basic Javascript paths: for, if, else if, variables, and arrays
- I learned how to deploy a website

## Some troubles along the way:

- When deploying my website, it would not deploy. For some reason, it took more than two days of waiting for it to deploy, and still hadn't on the third day. To debug, I looked up my issue on google and discovered that sometimes I needed to add a jekyll file, regardless of if I needed jekyll. I added a .nojekyll file to my repo and it uploaded immediately.

## Week 1:

I've made it past the first week! This was mostly review from the prework that I completed before class began, though there were some new things that I learned.

## What I've learned this week:

- I learned the difference between class and ID attributes
- I learned how to create a repo using git init commands
- I learned some simpler CSS stylings, like selectors, display properties, units, and fonts