teleren/devto huggingface dataset:
Learn Python A 6-Hour Basic Course For Absolute Beginners
Tags: python, programming, python3, developer
Published: 2023-04-04 13:06:00

{%youtube DKOwZ2FbPbs%}

In this 6-hour tutorial, I will guide you through the basics of Python programming, even if you have zero prior experience. You'll learn the fundamentals of Python, including syntax, data types, control structures, functions, and more. We'll also walk you through some practical examples to give you a better understanding of how Python works. By the end of the course, you'll be able to write basic Python programs and be ready to tackle more advanced concepts.
How Email Drives Higher Omnichannel Marketing ROI
Tags: email, marketing
Published: 2023-04-04 12:56:55

**Email Importance Today and in Five Years**

In 2022, 333.2 billion emails per day were sent and received worldwide, according to Statista's email research. By 2025, their total amount is anticipated to reach 376 billion.

Email marketing initiatives aid companies in boosting the ROI of their content strategies by increasing traffic and revenue.

**Email and The Omnichannel Marketing Strategy**

Due to major production improvements made by many email marketing providers over the past few years, email marketing campaigns have significantly decreased in cost. Emails can generate a sizable return on investment in a brief amount of time when they are strategically targeted. You cannot, however, depend on a single channel to drive your go-to-market strategy in the cutthroat environment of today. More choices are what customers are looking for. The use of an omnichannel marketing plan is pertinent in this situation.

**Benefits of Omnichannel Marketing**

Because it requires resources, intricate planning, and the capacity to create an efficient operational model to produce everything on time and within budget, omnichannel marketing strategies can be challenging to put into practice.

     1. Higher Brand Visibility, Faster
     2. Higher Engagement Numbers Across a Wider Audience
     3. Improved User Experiences and Higher ROI
     4. More Sales
     5. Optimized content strategy
     6. Faster Customer Growth 
     7. Improved Personalization

**Using Email To Optimize Omnichannel Marketing Impact**

   1. Personalization is the key to maximizing sales. 

Businesses can create detailed customer profiles that are enhanced each time a user interacts with a marketing platform thanks to omnichannel marketing data and analytics. These profiles can be used to personalize messages and even develop behavioral prediction models.

   2. A few examples of triggers used to auto-generate emails

-A customer opens a support ticket and gives the support agent a poor rating after visiting your tradeshow exhibit. 
-A customer visits a store and uses a QR code in an email to receive a discount.

   3. Great Personalized Email Use Examples To Learn From
        1. Uber
        2. Netflix
        3. Starbucks

**Conclusion**

Email marketing is here to stay, and in the years to come, the desire for it will only grow. All phases of the customer journey can be optimized by including email in your [omnichannel marketing plan.](https://www.campaigntrackly.com/how-email-drives-higher-omnichannel-marketing-roi/)
Survey: Deep Structural Causal Models for Tractable Counterfactual Inference
Tags: deeplearning, datascience, computervision
Published: 2023-04-04 12:50:41

## 選定理由

ICLの研究、Causal Machine Learning × Computer Visionなので調査してみた。NIPS2020なので読んでみるとかなり基礎理論寄りな印象

Paper: https://arxiv.org/pdf/2006.06485.pdf
Code: https://github.com/biomedia-mira/deepscm

[[Liu2022](https://arxiv.org/pdf/2108.12043.pdf)]でも引用されている。

## 概要

[社会課題]あらゆる科学の問いはその因果構造を明らかにすることにある。因果推論は経済学や解析疫学に適用されてきたが、CV分野への適用は未だ不十分である。
[技術課題]機械学習モデルを因果モデルに統合する手法は提案されておらず、因果モデルは画像や音声などの低レベル信号を統合的に扱うことができない。
[従来技術]関連研究としてCausalGAN[Kocaoglu2018], causal attribution　[Parafita2019]があるがabuduction（[abductionは科学的推論一般として、演繹(deduction)、帰納(induction)に対する第三の推論であり、帰納のある発展型である。[引用](https://www.jstage.jst.go.jp/article/pbsj/47/0/47_10/_pdf/-char/ja)]）は考慮しておらず、画像生成モデルが因果推論に含まれていない（=つまり因果モデルから統一的なアプローチで画像生成ができない）。結果として学習データに対する外挿ができない。（従来の潜在変数やGAN等生成モデルで生成できるのはあくまで内挿のみである）
[提案][因果の梯子](https://qiita.com/naosugi1987/items/c3168b68b05f83d0985c#%E5%9B%A0%E6%9E%9C%E3%81%AE%E3%81%AF%E3%81%97%E3%81%94)の3つのレベルすべてにおいて、高次元データの学習・推論を可能にする初の手法であるDSCMを提案。（ただし、交絡因子が可観測であるという制約は受ける）
[効果]MNISTをベースに生成した合成データ Morpho-MNIST　と実際の脳のMRIスキャン画像のデータセットを用いて複数の評価メトリクスにて実データの再現性評価にて従来手法を上回っている(=よく表現できている)ことを示した。

## DSCM (Deep Structural Causal Models)

![2.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3e6duyxf1mbbclnm5397.png)

Actionは因果推論におけるいわゆる介入操作であり、因果モデルに修正を加えることで交絡因子の影響を断ち切った修正因果モデルを作成する。最後のpredictionはいわゆるモデルパラメータが推論され、事後分布が確定したのちの生成モデルとしての出力処理であり、MCMC等様々なアプローチを用いることができる。

## 実験

画像因果モデルの効果を検証するために合成データを作成した。

![fig.2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hm70g0yqiz18ygnb02t.png)

図２(c)のような因果モデルを仮定する。ここでtはストロークのthickness, iはintensityを表す。thicknessは交絡因子で、出力画像とintensityの両方に影響を及ぼす。

![table.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4cvij617x37k1m2toea.png)

確率モデルと変分モデルの差（[ELBO:Evidence Lower Bound](https://en.wikipedia.org/wiki/Evidence_lower_bound))、対数尤度、再構成誤差（[MAE](https://en.wikipedia.org/wiki/Mean_absolute_error)）で評価した結果は表１であり、DSCM(Full)が最も良くデータを表現できていることがわかる。

![fig.4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etz1o1hlyql2g2u6k3cy.png)

パラメータに対して介入操作を行ったうえで画像生成したサンプルは図４である。ストロークや太さが変化しているのが観察できる。

![fig.5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0incvf7d1j67ccfy8lb.png)

図５の年齢の増加に伴い脳室がわずかに大きくなり、一方で全体的な脳の体積が減少することを示している（最初の列）。対照的に、脳の体積を直接変更すると、年齢を変更する場合とは逆の効果が脳室に生じる（2番目の列）。脳室の体積に介入すると、より局所的な効果が生じる（3番目の列）一方、生物学的な性別のカテゴリ変数に介入するとより拡散した効果が生じる。各介入後に解剖学的な「アイデンティティ」（例えば、皮質の折り畳みなど）がよく保存されていることに注目。

正しい反実仮想サンプルを生成する能力は、さまざまな応用に大きな恩恵をもたらす可能性がある。例えば、観測データと反実仮想データの差異から、結果の因果的説明が示唆されるため、説明可能性において役立つことがある。また、反実仮想サンプルは、属性の新しい組み合わせなど、観測データの範囲を超えて外挿することができるため、データ拡張にも役立つ。さらに、因果モデルにデータのソースを示す変数を含めることで、対象ドメインに関連した反実仮想例を生成できるため、ドメイン適応にも応用できる。
How to clean up useEffect's code
Tags: webdev, react, javascript, frontend
Published: 2023-04-04 12:41:54

## What is useEffect?

| "useEffect is a React Hook that lets you synchronize a component with an external system." - [react.dev](https://react.dev/reference/react/useEffect)

So, whenever there is something on screen we want to update when another variable changes, we can use `useEffect`. But be careful, [always think twice before using it](https://react.dev/reference/react/useEffect#caveats).

## How to clean it up

- you can return a function inside `useEffect's` first parameter, so it runs after the main code is executed
- this was really useful for me when I was coding a pomodoro-like app to know wether to _update_ or _interrupt_ the amounts of seconds past

```ts
useEffect(() => {
  if (activeCycle) {
    const interval = setInterval(() => {
      const secondsDifference = differenceInSeconds(
        new Date(),
        activeCycle.startedAt
      );

      if (secondsDifference >= totalSeconds) {
        // interrupt the cycle code
        // ...

        clearInterval(interval);
      } else {
        // update the amount of seconds past in the current cycle
        // ...
      }
    }, 1000);
  }
}, [activeCycle, totalSeconds]);
```

- in this example, I needed a way to close the intervals, since `useEffect` created a new interval each time it executed and this interval kept executing every time
  - so the timer was basically not working as it should.
- for it to work, I needed to clean up every execution
- that's the result:

```ts
useEffect(() => {
  let interval: number;

  if (activeCycle) {
    interval = setInterval(() => {
      const secondsDifference = differenceInSeconds(
        new Date(),
        activeCycle.startedAt
      );

      if (secondsDifference >= totalSeconds) {
        // interrupt the cycle code
        // ...

        clearInterval(interval);
      } else {
        // update the amount of seconds past in the current cycle
        // ...
      }
    }, 1000);
  }
  return () => {
    clearInterval(interval);
  };
}, [activeCycle, totalSeconds]);
```

- I declared interval before, so I could clear it on the [setup function](https://react.dev/reference/react/useEffect#useeffect)

## Reference
- [react.dev](https://react.dev/)
- Cover image from <a href="https://unsplash.com/@juanjodev02?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Juanjo Jaramillo</a> on <a href="https://unsplash.com/pt-br/fotografias/mZnx9429i94?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  

---


If you have any doubts or advice, feel free to leave a comment or ping me on Twitter
TOP 10 Advantages of Computer Networking
Tags: computerscience, network
Published: 2023-04-04 12:29:16

Computer networking is the practice of connecting different computers and devices together to create a network, allowing them to communicate and share resources. A network can be set up in a variety of ways, including wired or wireless connections, and can range from a small home network to a large enterprise network spanning multiple locations.

The main benefits of computer networking include [Benefits of the Network Model](https://thenewstack.io/networking/) such as the ability to share files, printers, and other resources between different computers, as well as the ability to communicate and collaborate more easily. Networking can also increase productivity, reduce costs, and improve security by implementing measures such as firewalls and antivirus software.

Here are 10 advantages of computer networking:

## File sharing

With computer networking, it's easy to share files and resources between different computers and devices on the same network.

## Resource sharing

Computer networking allows for the sharing of hardware resources such as printers, scanners, and storage devices, which can save money and increase efficiency.

Collaboration: Computer networking enables collaboration among team members, allowing them to share information, work on projects together, and communicate more easily.

## Remote access

Computer networking allows users to access files and resources from any location, which can be especially useful for remote workers or those who need to work from home.

## Centralized data storage

With computer networking, data can be stored on a centralized server, making it easier to manage and back up data.

Cost-effective: Networking can help businesses save money by sharing resources and reducing the need for multiple devices and equipment.

## Increased productivity

Networking can increase productivity by enabling faster communication and access to information, which can help workers complete tasks more efficiently.

## Improved security

With computer networking, it's easier to implement security measures such as firewalls, antivirus software, and user authentication, which can help protect sensitive data.

## Scalability

Computer networking can be easily scaled up or down depending on the needs of the organization, making it a flexible and adaptable solution.

## Improved customer service

Networking can enable businesses to respond more quickly to customer inquiries and requests, improving overall customer service.
Being a Developer Advocate: Week 27
Tags: devrel, learninpublic
Published: 2023-04-04 11:47:39

After all the hackathon rush the last week was great having fewer meetings and time to process what happened.

We actually did a fun retro in our team of three where we talked about our superpowers and lifted each other up.

We also planned everything we want to achieve this quarter. One of the things we try to incorporate is that we attach a clear goal for every activity and try to measure how it turned out!

Other than that we shipped an update to our API docs that should make them easier to use. Now everything is on a single page: [Check them out here!](https://docs.askui.com/docs/next/api/API/table-of-contents)

We also reworked our Terminology/Glossar/Domain Model to get a solid grip across the whole company on how we talk about the different components. In my opinion this is essential for clear communication with our users and also internally.

Another thing I always wanted to have is a page in our docs where we go into the details of how our product works. But we had to get clear on the terminology first. Once that was out of the way we consulted engineering to write the best thing we can write. It will serve us well in the long term 🦄 ([Read it here 😋](https://docs.askui.com/docs/general/Guides/guide-how-askui-works)
ux designer what is it
Tags: design, ux, designpatterns
Published: 2023-04-04 11:53:18

 A UX designer, also known as a User Experience designer, is a professional who focuses on creating digital products and services that are easy to use, enjoyable, and meet the needs of their intended users.


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


The primary goal of a UX designer is to ensure that the user's experience with a product or service is as positive as possible. This involves conducting research to understand the user's needs, designing intuitive and user-friendly interfaces, and testing the product to identify any areas for improvement.

[for more](https://www.programsnow.com/2023/04/ux-designer-what-is-it.html)
Use Multiple AWS profiles - AWS-CLI
Tags: cli, aws, webdev, beginners
Published: 2023-04-04 11:38:49


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

To use multiple AWS profiles with the AWS CLI, you can follow these steps:

- 1. Create AWS IAM users and credentials: You'll need to create IAM users for each of your AWS accounts with the appropriate permissions and generate an access key and secret access key for each user.
- 2. Install AWS CLI: You can install AWS CLI on your machine by following the instructions on the official [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
- 3. Configure AWS profiles: You can configure AWS profiles by running the following command:





```
aws configure --profile new_profile
```

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

Replace "new_profile" with the name of the profile you want to create. This will prompt you to enter the access key and secret access key for the IAM user you created in step 1.

- 4. Use AWS profiles: You can use AWS profiles by running the following command:

```
aws s3 ls --profile new_profile
```

This will execute the "ls" command on your S3 bucket associated with the "new_profile" profile.

You can repeat steps 3-4 for each profile you want to create. To switch between profiles, you can use the "AWS_PROFILE" environment variable. For example, to switch to the "new_profile" profile, you can run:

```
setx AWS_PROFILE new_profile

# Linux or macOS
export AWS_PROFILE=new_profile

# Make sure to restart your CLI after setting env.
```

This will set the "AWS_PROFILE" environment variable to "new_profile", which will cause the AWS CLI to use the credentials associated with that profile for subsequent commands.

If you want to view the list of profiles you have configured, you can run the following command:

```
aws configure list-profiles
```

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

This will display a list of all the profiles you have configured.

You can also manually add new profiles to your AWS configuration files located in the "~/.aws/" directory on Linux or macOS and "C:\Users\YOUR_USER.aws" directory on Windows. You can add the profiles in the "config" and "credentials" files respectively.


References: 
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

I hope this provides more comprehensive information on using multiple AWS profiles with the AWS CLI. Leave a comment if you have any further questions or concerns.
How to detect iPadOS with Swift
Tags: swift, ios, ipados
Published: 2023-04-04 11:37:20

---
title: How to detect iPadOS with Swift
published: true
description: "iPadOS is an operating system based on iOS and this short post will show you how to detect iPadOS with Swift."
tags: ["Swift", "iOS", "iPadOS"]
cover_image: https://aptabase.com/blogcover/how-to-detect-ipados-with-swift.png
canonical_url: https://aptabase.com/blog/how-to-detect-ipados-with-swift
---

The iPadOS was first introduced in 2019 and it is an operating system based on iOS. In some cases you might want to add some extra functionality to your app when running on iPadOS, or maybe you want to show a different UI. This short post will show you how to detect iPadOS with Swift.

The `UIUserInterfaceIdiom` enum is what you want to use to detect the user interface idiom, which can be accessed via the `userInterfaceIdiom` property on the `UIDevice` class. The `UIUserInterfaceIdiom` enum has a `pad` option which you can use to detect if the device is an iPad.

```swift
if UIDevice.current.userInterfaceIdiom == .pad {
    print("This is an iPad!")
}
```

But wait, there is more! Just because it's an iPad doesn't mean it's running iPadOS. Its only since the iOS 13 release that the iPad has been able to run iPadOS. So if you want to detect iPadOS specifically you can use the `systemVersion` property on the `UIDevice` class to check if the version is greater than or equal to 13.

```swift
if #available(iOS 13.0, *) {
    if UIDevice.current.userInterfaceIdiom == .pad {
        print("This is an iPad, and it's running iPadOS!")
    }
}
```

### What about the `UIDevice.current.systemName`?

This property returns the name of the operating system. As of 2023, this property correctly returns `iPadOS` for iPad devices running iPadOS. But this was not always the case, up until iPadOS 15 this property would return `iOS`.

If you're targeting iOS 15 or later you can use this property to detect iPadOS. But if you're targeting iOS 14 or earlier you should use the method described above.
Comment Publier Rapidement un Projet sur GitHub
Tags: github, phpstorm, webdev, git
Published: 2023-04-04 11:28:59

# Comment Publier Rapidement un Projet sur GitHub ?

[Retrouvez cet article en format video sur youtube](https://www.youtube.com/shorts/w4KHTdvWg1U)

GitHub est une plateforme de collaboration et de partage de code largement utilisée par les développeurs du monde entier. Dans cet article, nous allons vous montrer comment publier rapidement un projet sur GitHub en quelques étapes simples.

## Créer un _repo_ rapidement depuis Github.com:
Tout d'abord, assurez-vous d'avoir un compte GitHub. 

Si vous n'en avez pas encore, rendez-vous sur https://github.com/join pour en créer un gratuitement.

**Pro Tips** : 

Une fois connecté à votre compte GitHub, vous pouvez utiliser le raccourci https://github.com/new pour accéder directement à la page de création d'un nouveau dépôt. 

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

Ensuite il ne vous reste plus qu'à initialiser voter projet via le terminal en suivant les instructions

```md
echo "# [VOTRE_PROJET]" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:[USER]/[VOTRE_PROJET].git
git push -u origin main
```

## Créer un _repo_ rapidement depuis un IDE IDEA:

Si vous utilisez un [IDE IDEA](https://www.jetbrains.com/) - IntelliJ, WebStorm, ou [PHPStorm](https://www.jetbrains.com/phpstorm/) comme moi - , vous pouvez alors créer un _repo_ et publier un projet en littéralement 3 clics:

1. Votre projet ouvert, ouvrez un nouveau terminal (`⌥ F12`) et **assurez-vous d'avoir initialisé Git** (Sinon la fenêtre Git n'apparaîtra pas.)
```bash
git init
```

2. Rendez-vous dans le menu `Git` > `GitHub` > `Share Project on GitHub`. 

- Une fenêtre va s'ouvrir. Entrez le nom de votre _repo_
- cliquez sur `Share` et sélectionnez les fichiers qui doivent être envoyés sur le repo Github.
- Validez.
- 💥 C'est tout !

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

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

Maxime Tamburrini
yt/@maxwebstudio
github/maxiim3
Flutterwave vs JavaScript
Published: 2023-04-04 11:27:49

 ADVANTAGES OF FLUTTERWAVE OVER JAVASCRIPT 

Flutterwave vs JavaScript: Why the former is becoming businesses’ go-to payment gateway.

In today's digital age, online transactions are becoming increasingly popular. As a result, more and more businesses are looking for reliable payment gateways to help them process these transactions. Flutterwave and JavaScript are two of the most popular payment gateways on the market today. While JavaScript has been the go-to payment gateway for many businesses, Flutterwave is quickly becoming the preferred choice. In this post, we will explore the reasons why Flutterwave is emerging as the go-to payment gateway for businesses worldwide. From its user-friendly interface and seamless integration to its high level of security and ease of use, we will examine the features that make Flutterwave stand out from the competition. By the end of this post, you'll have a better understanding of why Flutterwave is quickly becoming the go-to payment gateway for businesses of all sizes.