teleren/devto huggingface dataset:
Save Your Functions to Cloud
Tags: cloud, python, database, beginners
Published: 2023-09-25 15:38:24

## Intro
In python you can use the KOT Cloud Free to save your functions, classes, objects and variables. With this you can access anything from any other python runtime.

## Let's Connect to Cloud 
Firstly, we will install the KOT library;
```console
pip install kot
```

Creating an cloud key;

```console
KOT cloud_key
```
> cloud-*********


## Sending to Cloud

```python
from kot import KOT_Cloud
cloud = KOT_Cloud("YOUR_CLOUD_KEY")
# -- CONNECTION --

@cloud.active
def get_address():
    return "Hello World I am from KOT Cloud"

price = 15.2
cloud.set("price", price)

```

## Getting from Cloud

```python
from kot import KOT_Cloud
cloud = KOT_Cloud("YOUR_CLOUD_KEY")
# -- CONNECTION --

print(cloud.get("get_address")())
print(cloud.get("price"))
```
> Hello World I am from KOT Cloud
> 15.2



For more you can read the [documentation](https://docs.kotdatabase.dev/).

https://kotdatabase.dev/
Online Marketing Software
Published: 2023-09-25 15:23:33

In today’s digital age, [online marketing software](https://digitechjournals.com/power-of-online-marketing-software/) has become the backbone of successful marketing campaigns. From small businesses to global corporations, the use of specialized software has revolutionized the way we reach and engage with our target audience. In this article, we’ll explore the world of online marketing software, its importance and benefits, and how to choose the right tools for your business.
Coca-Cola Use Artificial Intelligence Make Drink
Published: 2023-09-25 15:33:29

The [Coca-Cola Y3000](https://digitechjournals.com/coca-cola-y3000/)'s integration of artificial intelligence marks a groundbreaking leap into the future of beverage innovation. Harnessing cutting-edge AI technology, this revolutionary product transcends traditional boundaries, redefining the beverage experience. With AI at its core, the Y3000 offers personalized recommendations, tailoring flavors and preferences to individual tastes. It intuitively adapts, evolving with consumer preferences and trends, ensuring a delightful and customized refreshment every time. Embodying innovation and sophistication, Coca-Cola's Y3000 is set to revolutionize how we perceive and enjoy beverages, setting a new standard for AI-powered products in the industry.
Use Docker Compose Overrides for Multiple Environments
Tags: docker, devops, tutorial
Published: 2023-09-25 15:30:00

When working on a project with multiple environments (e.g., development, testing, production), Docker Compose overrides can simplify the management of environment-specific configurations. Docker Compose allows you to define a base `docker-compose.yml` file with common configurations and then use override files to specify environment-specific settings.

Here's how you can structure your Docker Compose files:

- Create a base `docker-compose.yml` file with shared services and configurations:

```yaml
version: '3'
services:
  webapp:
    image: my-webapp-image
    ports:
      - "80:80"
    environment:
      - DB_HOST=db
      - DB_PORT=5432
      - DB_USER=myuser
      - DB_PASSWORD=mypassword
```

- Create separate override files for each environment, such as `docker-compose.dev.yml`, `docker-compose.test.yml`, and `docker-compose.prod.yml`. In these override files, you can specify environment-specific configurations:

```yaml
# docker-compose.dev.yml
version: '3'
services:
  webapp:
    environment:
      - DEBUG=true
      - LOG_LEVEL=debug

# docker-compose.test.yml
version: '3'
services:
  webapp:
    environment:
      - DEBUG=false
      - LOG_LEVEL=info
```

- When you want to spin up your application in a specific environment, use the `-f` flag with `docker-compose` to specify the base file and one or more override files:

```bash
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
```

This command combines the configurations from `docker-compose.yml` and `docker-compose.dev.yml`, overriding all overlapping settings. This way, you can keep your base configuration clean and maintain environment-specific settings in separate files.

Using Docker Compose overrides helps streamline your Docker setup for different environments and makes it easier to manage variations in configurations, environment variables, and services between development, testing, and production environments.
Sync Microservices System Design in Nustshell
Tags: microservices, laravel, php, node
Published: 2023-09-25 15:27:09

When I first learned about the system we had to implement, it appeared deceptively simple and concise. However, the reality was far from straightforward. The organization's diverse branches had their databases, and this forced us to reconsider how we would approach the design and development of the system.

The challenge of integrating a legacy system with a modern one became evident, especially as we aimed to incorporate multi-tenancy. While multi-tenancy is suitable for databases sharing the same schema and location, our situation required a different approach. Consider a scenario where we execute a write command on database B - in the event of a bug, we need robust logging and monitoring. To address this concern, we decided to segment our services.

These services are internally composed and exposed via an API gateway, offering a clear separation of internal implementation details from other developers. This approach allows us to foster collaboration with junior team members while still maintaining control over the system's architecture.

To ensure the success of our system, we've applied various design patterns and techniques:

1. **Circuit Breaker** : Given the network's inherent unreliability, we've implemented circuit breakers to gracefully handle failures and disruptions.
2. **API Gateway** : We've established an API gateway to streamline and manage external communication with our services.
3. **Database per Service** : Each service has its dedicated database, ensuring data isolation and scalability.
4. **Schema per Service** : We've adopted a schema-per-service approach, allowing each service to manage its data structure independently.
5. **API Composition** : Our system leverages API composition to assemble complex functionalities from multiple services.
6. **Sync Communication** : Synchronous communication is utilized when needed, ensuring data consistency and reliability.
7. **Service per Team** : We've organized teams around specific services to enhance ownership and accountability.
8. **Remote Procedure Invocation (RPI)**: RPI enables seamless communication between services, enhancing system cohesion.
9. **Self-Registration** : Services self-register to simplify dynamic service discovery and orchestration.
10. **Routing** : We've implemented routing mechanisms to efficiently direct requests to the appropriate services.
11. **Service Discovery** : Dynamic service discovery ensures that services can locate and communicate with each other.
12. **Observability** : To monitor system health and performance, we've integrated observability tools and practices.
13. **Handling Failures and Latency** : Our system has robust strategies in place to deal with failures and mitigate latency issues.

These design patterns and techniques collectively empower our system to navigate the complex landscape of multi-tenancy, network unpredictability, and evolving requirements while maintaining flexibility, reliability, and manageability."
React Props vs State: What's the Difference?
Tags: react, learning, webdev, javascript
Published: 2023-09-25 15:13:03

When I was learning React, I found that understanding the difference between "props" and "state" can be a bit confusing for beginners. In this blog post, I want to share what I've learned in a way that's easy to grasp, with simple code examples, so that even beginners can begin to understand it.

**Props: Passing Data from Parent to Child**

Imagine a React component as a building block of your web application. Props (short for properties) are like the information or instructions you pass to each building block. They allow you to send data from a parent component to a child component. React's data flow between components is always uni-directional.

Here's an example of how data can be passed by using props:

```javascript
// Parent Component
function App() {
  return (
    <ChildComponent name="John" age={30} />
  );
}

// Child Component
function ChildComponent(props) {
  return (
    <div>
      <p>Name: {props.name}</p>
      <p>Age: {props.age}</p>
    </div>
  );
}
```
In the example above, the `App` component is the parent component, and it passes data to the `ChildComponent` component using props. The `ChildComponent` component receives the data as an object called `props`.

**State: Managing Component-Specific Data**

While props are used for passing data from parent to child, state is used to manage data that can change over time within a component. Unlike props, state is managed within the component itself.

Here's an example of how state can be used in a component:

```javascript
function Counter() {
  const [count, setCount] = useState(0);

  function handleClick() {
    setCount(count + 1);
  }

  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={handleClick}>Increment</button>
    </div>
  );
}
```

In the example above, the `Counter` component uses the `useState` hook to manage its own state. The `count` variable is initialized to 0, and the `setCount` function is used to update the `count` variable when the button is clicked.

**Differences Between Props and State**

Here are the key differences between props and state:

- **Ownership**: Props are owned by the parent component and passed down to child components, while state is owned and managed within the component itself.
- **Mutability**: Props are immutable, meaning they cannot be changed by the child component. State, on the other hand, can be changed using the `setState` function.
- **Usage**: Props are used to pass data from parent to child components, while state is used to manage data that can change over time within a component.

In summary, props and state are both important concepts in React. Props are used to pass data from parent to child components, while state is used to manage data that can change over time within a component. Understanding the differences between props and state is crucial for building React applications.
Caption This! 🤔💭
Tags: discuss, watercooler
Published: 2023-09-25 15:08:00

Think you've got what it takes to whip up the cleverest caption for this image? Give it a shot!


![Image of a robot on a computer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i9o8caurbko00v3hpycn.jpg)

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Meet Your Short Term Cross Browser Testing Needs
Tags: browser, testing, programming, beginners
Published: 2023-09-25 14:58:55

Short term projects can be painful when you have to perform cross browser testing and you have to struggle between free plans, monthly and annual subscription. Free plans sometimes fail to fulfil high use for short term projects and subscriptions add up to high opex.

To help you in this dilemma LambdaTest has come up with on demand Days Pass. With these days passes, you can now fulfil all your short term project needs.

## What all LambdaTest’s Days Pass has to Offer?

With our on-demand days pass, you can get a **full unlimited** access to our entire cross browser testing platform for complete 10 days along with your added team members.

You can opt for days pass by visiting our [pricing page](https://www.lambdatest.com/pricing?utm_source=devto&utm_medium=organic&utm_campaign=sept_25&utm_term=bw&utm_content=webpage) and selecting days pass while making payment.

When can you buy a day pass?

* When you are on a free plan

* When you are on a trial

When can not you buy a day pass?

* When you are on a paid plan

* When a day pass is already active

Please note:

* Day pass is not renewable and non-transferable. Once expired, you’ll have to buy a new day pass manually

* Once your day pass expires, you’ll be moved to a free plan automatically.

* You can also buy a paid subscription, if you are on a day pass. Once you move to subscription, your day pass will be automatically deactivated and you’ll be switched to a paid plan.

* If your day pass is expired, you can also opt for any paid plan.

* You’ll get 1 concurrent session and invite upto 5 of your team members.

***And you’ll get all of this at just $15!***

![](https://cdn-images-1.medium.com/max/2000/0*oBsDjJglr7Jg69_w.png)

So, if you’re a freelancer working on a client’s project or a big organization having a short term need for [cross browser testing](https://www.lambdatest.com/?utm_source=devto&utm_medium=organic&utm_campaign=sept_25&utm_term=bw&utm_content=webpage) you can go and opt for it now!

Let us know if you have any questions about our day pass or any of our pricing plan. Just chat with us using our in app chat or drop us an email at [support@lambdatest.com](mailto:support@lambdatest.com). We’ll get back to you right away!

Looking forward to see you on our platform fulfilling your cross browser testing requirements.

Happy Testing!
im getting an error :"401 not authorized, no token", when I try to make a put request
Tags: express, node, reactjsdevelopment, redux
Published: 2023-09-25 14:58:43

hello guys, 
im encounting a problem as mention above when I try to update my profile using a put request 
the token is stored in the local storage and I'm sending it along in the authorization header 
so when i send the request and inspect the network tab i can see that the authorization heaser is not present in the request headers, and i don't know why ,
please, could someone help me

here is my back end: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yg6qofkwfq6lro44ml6g.png)

and here is the middleware I'm using: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgea1v84u3971fkow9ts.png)
here is the front end :


and for state management I'm using redux :

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16n04q2so21jp1biar56.png)
¿Qué es la metodología Scrumban y cómo utilizarla?
Tags: scrumban, metodología
Published: 2023-09-25 14:35:10

En el mundo del desarrollo de software y la gestión de proyectos, la metodología ágil ha revolucionado la forma en que las empresas trabajan. Dentro de estas metodologías ágiles, Scrum y Kanban se destacan como dos de las más populares. Pero, ¿qué sucede si combinamos lo mejor de ambos mundos? La respuesta es Scrumban, una metodología híbrida que fusiona elementos de Scrum y Kanban.

## ¿Qué es Scrumban?

Scrumban nace de la combinación de Scrum y Kanban. Esta metodología aprovecha la estructura y las ceremonias de Scrum y la visualización y control de flujo de trabajo de Kanban.

Mientras que Scrum se centra en iteraciones fijas y entrega de resultados en cada sprint, Kanban pone énfasis en la entrega continua y en optimizar el flujo de trabajo. Scrumban, por su parte, busca ofrecer flexibilidad en la planificación y ejecución, adaptándose mejor a los cambios y priorizando la eficiencia.

## Características de Scrumban

**Tablero visual**: Al igual que Kanban, Scrumban utiliza un tablero para visualizar el flujo de trabajo. Esto ayuda a identificar cuellos de botella y a asegurar que el trabajo fluya de manera eficiente.

**Limitación del trabajo en curso (WIP)**: Se establece un límite en la cantidad de tareas que pueden estar en una fase específica del proceso al mismo tiempo. Esto asegura que el equipo no se sobrecargue y que el trabajo se complete con más eficacia.

**Planificación flexible**: A diferencia de Scrum, donde se tiene una planificación rígida al inicio del sprint, en Scrumban se permite reevaluar y reajustar el trabajo según sea necesario.

**Ceremonias de Scrum**: Aunque se permite una planificación flexible, Scrumban sigue manteniendo algunas ceremonias de Scrum, como reuniones diarias y revisiones de sprint.

## ¿Cómo usar la metodología Scrumban?

**Definir el flujo de trabajo**: Establece las distintas etapas del proceso, desde la concepción de una tarea hasta su finalización.

**Configurar un tablero Scrumban**: Puedes utilizar herramientas digitales o un tablero físico. Divide el tablero en las etapas definidas previamente.

**Establecer límites WIP**: Define cuántas tareas pueden estar en una etapa particular al mismo tiempo.

**Planificar con flexibilidad**: Prioriza las tareas, pero permítete ajustar según las necesidades del proyecto.

**Realiza reuniones diarias**: Al igual que en Scrum, esta reunión sirve para que el equipo comunique avances, obstáculos y prioridades.

**Monitorea y ajusta**: Usa métricas para medir la eficiencia, identifica cuellos de botella y busca continuamente formas de mejorar.

## Conclusión

Scrumban ofrece una solución intermedia entre Scrum y Kanban, brindando flexibilidad y optimización. Al combinar lo mejor de ambos enfoques, las empresas pueden adaptarse rápidamente a los cambios, mantener un flujo de trabajo eficiente y entregar resultados de alta calidad. Es una excelente opción para equipos que buscan mejorar su gestión de proyectos sin apegarse estrictamente a una sola metodología.
RDoc Markup Reference
Tags: ruby, markup, documentation, rdoc
Published: 2023-09-25 14:31:22

---
title: RDoc Markup Reference
published: true
description: 
tags: ruby, markup, documentation, rdoc

---

Last year I created a new markup reference for Ruby's RDoc module.  If you're an RDoc user, check it out:

- https://docs.ruby-lang.org/en/master/RDoc/MarkupReference.html
Challenge RE #21
Tags: reverseengineer, assembly, c
Published: 2023-09-25 14:29:38

[Challenge \#21](https://challenges.re/21/) description it's quite simple

> This is easy. What does the following code do?

We can assume this will be easy.

## Analysis

Here's the assembly code we need to analyze

```asm
f1:
        push    r12
        push    rbp
        mov     rbp, rdi
        push    rbx
        mov     rbx, rsi

        ;; strlen(rdi);
        call    strlen

        ;; strlen(rbx);
        mov     rdi, rbx
        mov     r12, rax
        call    strlen

        ;; size_1 -= size_2;
        sub     r12, rax

        mov     rsi, rbx
        lea     rdi, [rbp+0+r12]
        call    strcmp

        pop     rbx
        test    eax, eax
        pop     rbp
        sete    al
        pop     r12
        ret
```
)
We have two calls to [strlen](https://www.man7.org/linux/man-pages/man3/strlen.3.html) and one to [strcmp](https://man7.org/linux/man-pages/man3/strcmp.3.html). With this in mind we can assume we receive two strings as arguments of our function.

Right after the calls to `strlen` we have the following instruction

```asm
sub r12, rax
```

In `r12` we stored the result of our first call to `strlen`, so with this instruction we are computing the difference in length of these two strings.
The following three instructions perform a comparison in size of strings `rbx` and `[rbp+0+r12]`.

```asm
mov     rsi, rbx
lea     rdi, [rbp+0+r12]
call    strcmp
```

In `r12` we have the result of the difference, so if for `str1` we have `str1_size`, and for `str2` we have `str2_size`, then in `r12` we have `str1_size - str2_size`. Hence these three instructions can be expressed in this way

```C
size_t s1 = strlen(str1);
size_t s2 = strlen(str2);

strcmp((str1+(s1-s2)), str2);
```

Our last step it's quite simple also, in case our comparison with `strcmp` was **0** we return **1**, otherwise we return **0**.

**Formal description**

> The function takes two strings as arguments and return **1** if one string it's the suffix of the other, and **0** otherwise.

## Conclusion

Coming from the frustration with challenge \#19, making this one was quite easy.
Some suggestions on GitHub's Pull Request Settings to Think About
Tags: github, pullrequests
Published: 2023-09-25 14:26:23

GitHub offers different ways to merge pull requests into your repository. 

Depending on your project’s needs and preferences, you can choose which merge methods to enable or disable in your repository settings. Here are some suggestions of pull request settings on GitHub to consider/think about:

**“Allow Merge Commits:”** ❌

> This means that you cannot use the merge commit method to merge pull requests. [The merge commit method creates a new commit that combines the commits from the base branch and the head branch.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests)

**“Allow Squash Merging”** ❌

> This means that you cannot use the squash merge method to merge pull requests. [The squash merge method combines all the commits from the head branch into a single commit and adds it to the base branch.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests)

**“Allow Rebase Merging”** ✅

> This means that you can use the rebase merge method to merge pull requests. [The rebase merge method applies the commits from the head branch individually on top of the base branch.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests)

**“Always suggest updating pull request branches”** ✅

> This means that GitHub will suggest that you update the head branch of your pull request if there are new commits on the base branch. [This can help avoid merge conflicts and keep the commit history clean.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches)

**“Automatically delete head branches”** ✅

> This means that GitHub will automatically delete the head branch of your pull request after it is merged. [This can help keep your repository organized and avoid unnecessary branches.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches)

These are some of the pull request settings on GitHub that you can consider or think about for your project. 

By choosing the right merge methods and options, you can ensure that your pull requests are merged smoothly and efficiently, while maintaining a clear and consistent commit history.

You can also customize your pull request settings further by using branch protection rules, required reviews, status checks, and [more](https://docs.github.com/en/github/collaborating-with-pull-requests).