teleren/devto huggingface dataset:
ConnectDome Week 1 Sprint
Tags: showdev, startup, productivity, discuss
Published: 2022-05-09 12:33:22

## **Summary**

What did we do at [ConnectDome](http://github.com/connectdome) during last week’s sprint?

- **Rust-Notify**:  A simple “open-source” service in Rust to announce new blogs on your Discord and send emails to your list via SendGrid.
    
    [https://github.com/connectdome/rust-notify](https://github.com/connectdome/rust-notify)
    
<hr>

💡 We are building this primarily for internal use but we think anyone can use it with a slight modification and fit their use case.
    
<hr>
    
💡 **Why?**
We host our blog on Vercel using Next.js to render our Notion blog. This means we are not able to send blog updates to subscribers automatically with this setup. So we needed something as a solution.
    
We were initially building this service using a webhook crate but after some issues with that crate, we rewrote the webhook from scratch.

<hr>
    
- **Migrated to Django 4.0.4** that spawned an error regarding pytz for some reason so-
- **Switched pytz → zoneinfo** and refactored our ML algorithms to reflect that change.
- **.ics** - .ics attachment should now be in emails for meetings scheduled on ConnectDome.
- **HTTP→ HTTPS:** We had an expired certificate for a while which we just updated.
- Switched **yapf → black**.
- An updated Docker setup.
    - Code running on Docker gets updated on local change.
- There was quite some work on the “product” involving talking to potential users, analyzing feedback, talking to potential investors, and other stuff but again, no biz-dev updates on here like we said on:

[16-week sprints](https://blog.connectdome.com/16-week-sprints)

---

We definitely could’ve done more and moved faster but-

It’s widely known that “moving faster” also means launching fast and launching whatever we have done so far because even our best attempt at a launch would probably not be as magical as we think.

> The product is not going to be perfect by any means but that’s a part of reiterating and working on a product.
> 

> So I’m sure once we launch, we’d be able to move at 10x current speed since the biggest current mental challenge (the “perfect launch”) would be past us.
> 

*Maybe I’ve watched too many YC videos lol but this is true, regardless.*

**Anyway, Week 2 pre-day is on and it involves doing stuff like- writing this update that would serve as a good archive when looked back upon.**

---

### **Current Product Milestone**

- SPA for developers on the waitlist
    - React-ifying the codebase.

### **Current Estimate of next product milestone**

- **May 25**: SPA release.

---

**Other**

- Marketing-quality demo video before releasing with a blog to get you acquainted.

Also, we’re now planning to have a backup deployment on AWS (our own config with EC2 instances and other services we’d manually choose) apart from the AWS Beanstalk production and dev environments that we currently use. 

Beanstalk is great but having an EC2 instance that’s not floating would be helpful too and can serve as a backup.
How To Migrate From Jenkins Pipeline To GitLab CI | GitLab Tutorial For Beginners | Part VI
Published: 2022-05-09 11:29:00

Learn how to use GitLab CI features to convert Jenkins Pipeline into GitLab CI pipeline.
Start FREE testing. [Start FREE Testing](https://accounts.lambdatest.com/register?utm_source=devto&utm_medium=organic&utm_campaign=may09_sb&utm_term=sb&utm_content=tutorial_video)!

Integrate GitLab with LambdaTest: [https://bit.ly/2Y3ke3R](https://bit.ly/2Y3ke3R)


In this part of GitLab Tutorial for Beginners, Moss(@tech_with_moss), an expert in DevOps and CI/CD tools, helps you understand how to migrate from Jenkins pipeline to the GitLab pipeline.. This video will also help you differentiate between the Jenkins pipeline, and the GitLab CI pipeline and walk you through how to use the GitLab pipeline to run tests on the LambdaTest Selenium Automation Grid. You would also know the prerequisites required and how to convert the Jenkins pipeline to GitLab CI and a detailed walkthrough of the Jenkins pipeline code. 

Also learn -:
🔸 What is difference between GitLab and Jenkins?
🔸 What is the difference between Jenkins pipeline and GitLab pipeline?
🔸 How to migrate to GitLab CI from Jenkins pipelines?
🔸 How to run test using GitLab pipeline?
Getting started with Data Analysis
Tags: python, productivity, beginners, programming
Published: 2022-05-09 11:19:57

Hello People, this is my first post. I'm going to start a Data/Business Analytics series where I'll be sharing with you all my learnings in a well organized and sequential format. Hope you like my content and it helps you grow in your career and helps me learn from you as well (I'm sure you're going to give feedback!)

I'd like to give you a roadmap that you can ponder upon.

We'll be covering the following topics in the same order as shown below:

1. Python for Data Analysis
2. SQL
3. Tableau
4. Power BI
5. Preparation Tips for Microsoft Exams:

- DP-900 (Azure Data Fundamentals)

- DP-203 (Azure Data Engineer)

- PL-300 (Power BI Data Analyst)


Looking forward to a great learning experience and I hope you look forward to the same. Stay tuned till then! 

Happy Learning :)
C# Extension Methods
Published: 2022-05-09 11:11:21

```cs
public static class MyExtensions
{
    public static int Reverse(this int num)
    {
        int result=0;
        
        while (num != 0) 
        {
        result = result*10 + num%10;
        num /= 10;
        }
        return result;
    }
}

public class Program
{
    public static void Main(string[] args)
    {
        int a = -12345;

        System.Console.WriteLine(a.Reverse());
    }
}
```

`Result`
```cs
-54321
```
C# Predicate
Tags: csharp, beginners, dotnet, 100daysofcode
Published: 2022-05-09 11:09:01

`Program.cs`

```cs
using Predicate;
public class Program
{
    public static void Main(string[] args)
    {
        var yoshlar = new int[] {16,21,13,41,15,27,23};

        var yosh = new List<int>();
        
        yoshlar.KottaBollar(KattaBola)
            .ToList()
            .ForEach(System.Console.WriteLine);
    }

    public static bool KattaBola(int age)
    {
        return age > 18;
    }

    public static bool ToqYokiJuft(int num)
    {
        return num % 2 != 0;
    }
}
```

`LinqExtensions.cs`

```cs
using System.Collections;
using System.Collections.Generic;

namespace Predicate;

public static class LinqExtansions
{
    public delegate bool Predicate<T1>(T1 arg1);

    public static IEnumerable<T1> KottaBollar<T1>(this IEnumerable<T1> bollar, Predicate<T1> callback)
    {
        // var result = new List<T1>();

        foreach(var item in bollar)
        {
            if(callback.Invoke(item))
            {
                // result.Add(item);

                yield return item;
            }
            
        }
        // return result;
    }
}
```

`Result`

> 18 - yoshdan kattalarni qaytaradi .
```cs
21
41
27
23
```
C# Action
Tags: csharp, beginners, dotnet, programming
Published: 2022-05-09 11:04:41

``Program.cs``

```cs
using ActionTask;

public class Program
{
    // Action yasab IEnumurable ga Extension qo'shishga misol
    public static void Main(string[] args)
    {
        var sonlar = new int[] {1,2,3,4,5};

        sonlar.Print(System.Console.WriteLine);
        
        
        var sonlarString = new [] {"1","2","3","4"};

        sonlarString.PrintF(File.WriteAllText);
    }
}
```

`LinqExtansions.cs`

```cs
namespace ActionTask;

public static class LinqExtansions
{

    // Action yasab IEnumurable ga Extension qo'shishga misol
    public static void Action<T1>(T1 arg1){ }

    public static void Print<T1>(this IEnumerable<T1> toplam, Action<T1> callback)
    { 
        foreach(var item in toplam)
        {
            callback?.Invoke(item);
        }
    }


    // File -----
    public static void Action<T1,T2>(T1 arg1, T2 arg2){ }

    public static void PrintF<T1>(this IEnumerable<T1> toplam, Action<string, T1> callback)
    {
        foreach(var item in toplam)
        {
            callback.Invoke($"{Guid.NewGuid()}.txt",item);
        }
    }
}
```

`Result`

> To’plamdagi har bir element uchun alohida FILE yaratadi
Lunes de música... ¿Qué estás escuchando? 🎵 (09-mayo)
Tags: music, spanish, discuss, monday
Published: 2022-05-09 11:04:08

> **"La música es el corazón de la vida. Por ella habla el amor; sin ella no hay bien posible y con ella todo es hermoso."**
_Franz Liszt_

La música es parte importante de la vida de la mayoría de las personas y una vida no basta para poder escuchar todas las canciones que quisiéramos o conocer a todos los artistas, solistas o bandas.

Últimamente mis gustos musicales han sido muy estáticos y siento que necesito abrir mis horizontes y poder conocer nueva música interesante. 

Este post es la tercera entrega de una serie semanal que lanzaré todos los lunes para que como comunidad podamos compartir y por qué no conocer nuevas melodías. 🎶

Puedes compartir tus sugerencias usando los *liquid tags* de Dev.to, por ejemplo:

* Para compartir un video desde youtube:
```js
{% youtube dQw4w9WgXcQ %} // dQw4w9WgXcQ es el id del video
```

* Para compartir una canción desde spotify:
```js
{% spotify https://open.spotify.com/track/7GBwTrOpTtsLdJN3Dc0U1C?si=ea737b51f47043b6 %} 
```

Mi sugerencia para esta semana es de una banda que me gusta mucho: **Franz Ferdinand**

{% spotify https://open.spotify.com/track/56oqz7vyezleFI1jymwtrQ?si=bef19c2a10854fef %} 

---

Este post no sería posible sin mi amigo @michaeltharrington y su post:

{% link https://dev.to/michaeltharrington/music-monday-what-are-you-listening-to-4g1o %}

Los respectivos créditos a él por ser tan buena onda. 

{% user michaeltharrington%}

Y dime, ¿qué estás escuchando ahora? Te leo en los comentarios.
C# Func
Published: 2022-05-09 10:57:46

`Program.cs`

```cs
using FancLinq;

public class Program
{
    public static void Main(string[] args)
    {
        var nums = new int[] {1,2,3,4,5,6,7};
        var str = nums.Select((value) => SelectMethod(value))
                .ToList();
            
        str.ForEach(System.Console.WriteLine);

        var str2 = nums.Select((value1, value2) => SelectMethod(value1, value2))
                .ToList();

        str2.ForEach(System.Console.WriteLine);

        // MY Select ------------------

        var str3 = nums.MySelect(SelectMethod)
                .ToList();
        str3.ForEach(System.Console.WriteLine);

    }


    public static string SelectMethod(int arg1)
    {
        return string.Format($"sonlar : {arg1}");
    }

    public static string SelectMethod(int arg1, int arg2)
    {
        return string.Format($"son : {arg1} index : {arg2}");
    }

}
```

`LinqExtensions.cs`

```cs
namespace FancLinq;

public static class LinqExtensions
{
    public static IEnumerable<TResult> MySelect<T1,TResult>(this IEnumerable<T1> collection, Func<T1,TResult> callback)
    {
        // var result = new List<TResult>();
        foreach(var num in collection)
        {
            // result.Add(callback.Invoke(num));
            yield return callback.Invoke(num);
        }
        // return result;
    }
}
```

`Result`

```cs
sonlar : 1
sonlar : 2
sonlar : 3
sonlar : 4
sonlar : 5
sonlar : 6
sonlar : 7
son : 1 index : 0
son : 2 index : 1
son : 3 index : 2
son : 4 index : 3
son : 5 index : 4
son : 6 index : 5
son : 7 index : 6
sonlar : 1
sonlar : 2
sonlar : 3
sonlar : 4
sonlar : 5
sonlar : 6
sonlar : 7
```
install scrapy via venv
Tags: scrapy, venv, python
Published: 2022-05-09 10:45:45

I read the installation of scrapy. For the ubuntu platform I am using, it says that after:

```
sudo apt update
```
The preparation is thus done. However, the following command line:

```
pip install scrapy
``` 

does not work for I see that :

> ERROR: Could not install packages due to an EnvironmentError: Missing dependencies for SOCKS support.

I checked that it is not the problem of sources of ubuntu, neither is that of missing prep packages.

Then, I realize that, since I am coding inside a venv, the complete error msg may not have been exposed, which misleads my thought. 

For example, the problem aroused by permission issue is not shown directly, which I later fixed by typing:

```
sudo pip install scrapy
```
What Tools Would You Choose to Create a Subscription Ecommerce Store?
Tags: discuss, opensource, watercooler, programming
Published: 2022-05-09 10:36:50

Subscription ecommerce stores are stores that sell products or services on a subscription bases. For example, the customer will receive a box with random products once a month. Another example is subscription to premium services provided by apps.

What tools do you think will help you achieve this type of model for an ecommerce store?

[Medusa](https://medusajs.com)'s headless commerce architecture makes it possible to integrate it with any third-party tool that can help you achieve the use case you have in mind. Alternatively, you are also capable of creating your own custom experience due to its open source nature and the good development experience it provides.
Writing Storybook Stories with TSX for Stencil
Tags: stenciljs, storybook, jsx
Published: 2022-05-09 10:34:01

Yes, you can! 

If you want to write your stencil stories for storybook using TSX (the Typescript version of JSX), this is actually possible. A bit of tweaking, and you should go to go. 
BUT - this is still a very preliminary work, and I expect it to suffer quite few  bumps in different scenarios. Nevertheless, I thought it it worth sharing, as I know people were looking for a solution. 

This is assuming you are using the html version of Storybook with Stencil. You can find a working version in my stencil-one [demo repo](https://github.com/Tallyb/stencil-one). (This is my demo repo for unit testing in Stencil, so feel free to look around). 

These are the main versions I worked with. I have no idea if it will be compatible with other versions. 
- Stencil: 2.15 
- Storybook: 6
- webpack: 5
- babel-loader: 8


## Step 1: Write your story
This is what a story should look like, using CSF3 (Component Story Format). Obviously, it should be in a file named `.tsx`, so it will go thru the right tooling. Also, change the path that looks for your stories to include .tsx files. (stories option in the main file). 

```
/** @jsx h */
/** @jsxRuntime classic */

import {h} from '@stencil/core';

export default {
  title: 'My Basic',
};

export const Default = {
  render: () => (<my-basic first="Millie" last="Brown"></my-basic>)
};
```
Note the `@jsx` directives. They seem to be necessary. 

## Step 2: Configure Webpack for jsx 

We are going to tweak `.storybook/main` so it will include the babel jsx transformer. In order to do that we will find the rule that handles tsx and add the `@babel/plugin-transform-react-jsx` as plugin with the `pragma: {'h'}`.


```
  webpackFinal: async (config) => {
    const tsxRule = config.module.rules.find(rule => 'a.tsx'.match(rule.test));
  
    if(tsxRule) {
        const options = tsxRule.use[0].options;
        options.plugins = [
          ['@babel/plugin-transform-react-jsx', {
            prgama: 'h'
          }],
          ...options.plugins
        ];
    }
    return config;
  }
```

## Step 3: Render the stories using Stencil's renderVDom

The last part is changes to the `storybook/preview` code. Create a function that will be used as a decorator and will render elements to the DOM. 

```
const stencilWrapper = (storyFn, context) => {
  const host = document.createElement('div');
  stencilClient.renderVdom(
    {
      $ancestorComponent$: undefined,
      $flags$: 0,
      $modeName$: undefined,
      $cmpMeta$: {
        $flags$: 0,
        $tagName$: 'div',  
      },
      $hostElement$: host,
    },
    storyFn(context)
  );
  return host.children[0];
}
``` 
And then activate it: 
`addDecorator(stencilWrapper);`

You will also need to make sure that you are calling the defineCustomElements (which you should, anyway) in the preview code or the preview-manager html file. 

As mentioned above, this is still prone to errors. If you have any suggestions, improvements, bugs fixes etc, please comment.
Giới thiệu về Immer - Phần 2
Tags: react, immer, immutation, beginners
Published: 2022-05-09 10:19:28

Bài dịch từ trang chủ của Immer:
https://immerjs.github.io/immer/

### Sử dụng produce

Immer sử dụng một chức năng mặc định thực hiện tất cả công việc.

` produce(baseState, recipe: (draftState) => void): nextState `

`produce` có baseState và một công thức (recipe) có thể được sử dụng để thực hiện tất cả các thay đổi trên `bản nháp` được chuyển vào. Điều thú vị về Immer là `baseState` sẽ không bị ảnh hưởng, nhưng `nextState` sẽ phản ánh tất cả các thay đổi được thực hiện đối với `draftState` .

Bên trong công thức (recipe), tất cả các API JavaScript tiêu chuẩn có thể được sử dụng trên đối tượng nháp, bao gồm các phép gán trường, thao tác xóa và thay đổi mảng, các thao tác Map và Set như `push`, `pop`, `splice`, `set`, `sort`, `remove`, v.v.

Bất kỳ sự thay đổi nào trong số đó không nhất thiết phải xảy ra ở gốc, nhưng nó được phép sửa đổi bất kỳ thứ gì ở bất kỳ đâu sâu bên trong bản nháp: `draft.todos[0].tags["urgent"].author.age = 56`

Lưu ý rằng bản thân hàm recipe thường không trả về bất kỳ thứ gì. Tuy nhiên, có thể trả về trong trường hợp bạn muốn thay thế toàn bộ đối tượng nháp bằng một đối tượng khác, để biết thêm chi tiết, hãy xem [trả về dữ liệu mới](https://immerjs.github.io/immer/return/).

```
import produce from "immer"

const baseState = [
    {
        title: "Learn TypeScript",
        done: true
    },
    {
        title: "Try Immer",
        done: false
    }
]

const nextState = produce(baseState, draftState => {
    draftState.push({title: "Tweet about it"})
    draftState[1].done = true
})
```

```
// the new item is only added to the next state,
// base state is unmodified
expect(baseState.length).toBe(2)
expect(nextState.length).toBe(3)

// same for the changed 'done' prop
expect(baseState[1].done).toBe(false)
expect(nextState[1].done).toBe(true)

// unchanged data is structurally shared
expect(nextState[0]).toBe(baseState[0])
// ...but changed data isn't.
expect(nextState[1]).not.toBe(baseState[1])
```
#### Thuật ngữ

- (base)state, the immutable state passed to produce
- recipe: the second argument of produce, that captures how the base state should be "mutated".
- draft: the first argument of any recipe, which is a proxy to the original base state that can be safely mutated.
- producer. A function that uses produce and is generally of the form (baseState, ...arguments) => resultState
Email Checker - Verify bulk email address online
Published: 2022-05-09 10:11:54

There will come a time when you ask whether this email address exists? And [Ychecker's email address](https://ychecker.com/) checking tool is the solution. Ychecker checks an email address with the following strict procedure.

Check email format correct
Check the domain name
Extract MX records from email address
Authenticate using SMTP
Check that the email address is disposable or not
In addition to the above features, Ychecker also has a special feature that can check whether a Gmail address exists or that gmail address requires confirmation of a phone number or not.
Self - Taught, Need Advice Please
Tags: html, css, javascript, webdev
Published: 2022-05-09 10:09:12

Hi

I'm teaching myself how to code. I'm working on a personal portfolio, to make it stand out, mobile responsive etc. Once I have completed it & I am confident that I can work using HTML, CSS & JS. Who & where do I upload it? - How do I get a recruiter to see my portfolio, so I can land my first Web Dev job?

Thank you :):):):)
Array Vs Linked List
Tags: linkedlist, array
Published: 2022-05-09 09:50:24

## 1. Time complexity of Accessing :

**Array** : Direct or random access of elements is possible with the help of index value. Accessing does not depend on the number of elements in the array and hence takes constant time i.e., order of **O(1)**.

**Linked List** : Sequential access is performed in the linked list to access any random element in the list.
Ex : In a linked list of 10 nodes to access the 8th node, you need to traverse all the previous seven nodes and then reach the 8th node hence, the access depends upon the number of nodes in the list and takes time complexity of order **n** i.e., **O(n)**.

## 2. Memory utilization efficiency :

**Array :** Because of static memory allocation(fixed size), the memory utilization is not efficient. 

**Linked List :** Because of dynamic memory allocation, memory utilization is efficient.

## 3. Memory usage :

**Array :** Less.

**Linked List :** High.

## 4. Time complexity of Insertion :

**Array :** 
- At initial - **O(n)** (worst case)  
- At ith position - **O(n)** (average case)
- At the end - **O(1)** (best case)

**Linked List :**
- At initial - **O(1)** (best case)  
- At ith position - **O(n)** (average case)
- At the end - **O(n)** (worst case)

## 5. Time complexity of Deletion :

**Array :** **O(n)** 


**Linked List :** **O(n)**

## 6. Search Techniques :

**Array :** Both Linear and Binary search techniques can be used. 
 
**Linked List :** Only Linear search technique can be used. 

I own a website www.coderlogs.com where in I write similar blogs so do visit this website for more such blog posts.
integrate Commerce.js with Shopify store
Published: 2022-05-09 09:42:12

Hello!
I need a dev who can integrate Commerce.js with my Shopify store (geometricgoods.com). Please find out the details here: https://docs.google.com/document/d/129UJAEsEliDlqsXLiLFlkOyC_c1elGWD06-Cy3-kQkg/edit
C# Delegates
Published: 2022-05-09 09:38:54

> `Deleget` larni funksiyalar qutisi yoki funksiyalarga link deb tushsak bo'ladi.

_sizda 2 ta yokim undan ortiq funksiya bor ular 2 ta sonni ko'paytirib yoki qo'shib natijani qaytaradi_
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6fjxmro1r34milr354w.png)
Analysis of an hacked (and scammer) twitter account
Tags: security, twitter
Published: 2022-06-10 10:10:46

---
title: Analysis of an hacked (and scammer) twitter account
published: true
date: 2022-05-09 09:25:21 UTC
tags: Security,twitter
canonical_url: https://daniele.tech/2022/05/analysis-of-an-hacked-and-scammer-twitter-account/
---

In this days of Twitter acquisition by Elon Musk I got a chat request on Twitter from a curious account. Curious because I get scammer chat request on telegram and I track them on Twitter itself since 2010: I had more telegram chat with spambot in the last weeks but I started doing screenshot just [...]

[Read More...](https://daniele.tech/2022/05/analysis-of-an-hacked-and-scammer-twitter-account/)

The post [Analysis of an hacked (and scammer) twitter account](https://daniele.tech/2022/05/analysis-of-an-hacked-and-scammer-twitter-account/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
Getting started with Lambda
Tags: serverless, aws, lambda, boto3
Published: 2022-05-09 09:18:58

Hi Everyone,

Recently I came across this beginner friendly course on boto3 and lambda.

You would be able to create lambda functions, create triggers and become a serverless pro. There are so many courses out there on multiple platform. I found this course economical and beginner friendly on udemy.

https://www.udemy.com/share/101Vx03@xfFx_n_sa1T4Df_M9C4cCG_wAGrE2VhvTX9LcaefejVXI5igtWwB3X-rlFQNbzWq/

P.S: Always bookmark / wishlist your course on udemy and buy it when there is a great discount. You could buy the same course at 1/10th of its price. 

If you have any other recommendations related to serverless courses please do post on the comment.

Catch you all soon on the next post.

Cheers!