teleren/devto huggingface dataset:
Community Bonding Period
Tags: gsoc
Published: 2023-06-01 03:11:02

## Brief
Hello everyone this is Sri Guru Datta P.(pupperemeritus). I am extremely excited to get started with my GSoC journey. It has been a dream come true for me.

Most of the progress in these weeks has been done on the fronts of

1. Re-adjusting the proposed schedule : Re-evaluating and taking a closer look at requirements
2. Gathering more information required to implement : Been provided reference implementation in MATLAB by Dr. Jeff Scargle himself. And validating the plan and research done during the period of creating the project proposal.
3. Had weekly meets to break the ice and communicate more directly through weekly meets with mentors.

## Environment setup

I had already completed my environment setup earlier in order to make pull requests to stingray. I just followed the documentation.
https://docs.stingray.science/install.html

## Codebase familiarity

I already had a bit of familiarity with powerspectrum, crossspectrum and bexvar modules as I had worked on various pull requests on them. My mentor advised me to look into multitaper, which I did. It gave me a few ideas on how I could implement this project.

## Coding

I had already started a few days early and went ahead and implemented the Lomb-Scargle Fourier Transform which will be the backbone of the power spectrum and cross spectrum. 2 days into the coding period and I also have started coding up the wrapper classes. It turns out to be a very tangled process in order to get every small nook and cranny of the class to work. But I have seemed to get the hang of it.
100 Days Coding Challenge - Day 12: FreeCodeCamp JavaScript Algorithms and Data Structures & AI Chatbot Python
Tags: javascript, programming, python, 100daysofcode
Published: 2023-06-01 03:04:12

## Day 12

I was progressing in JavaScript, slow but secure :D
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvaqcribx70r18sxw4xr.png)

and I finish the base of the AI 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kq1h122ojn4bo0eut52o.png)
“I have caused harm to the Chinese government, I have hurt the feelings of the Chinese people - I apologise sincerely for this.”
Published: 2023-06-01 01:44:06

“I have caused harm to the Chinese government, I have hurt the feelings of the Chinese people - I apologise sincerely for this.”
#Safeguard Defenders #Peter Dahlin
https://youtu.be/whbgVz4xKww

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


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bhs98ul9hd4chc5orqj.png)
7 differences you must know to decide between Web Development and Game development
Tags: webdev, gamedev, devjournal, programming
Published: 2023-06-01 01:32:00

Web development and game development may look similar but have vastly different worlds to explore.

Here are the 7 differences to decide which is right for you:


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


## 1. Purpose: 
Web development focuses on creating websites and web applications, while game development focuses on creating interactive and immersive video games.


## 2. Audience:
Web development caters to a wide range of audiences, while game development is generally geared towards a specific age group.


## 3. Platforms: 
Web development is primarily focused on web browsers and web servers, while game development can be found on various platforms such as desktop, mobile, and console.


## 4. Development Tools:
Web development typically uses tools such as HTML, CSS, JavaScript, and various web development frameworks, while game development uses specialized tools such as Unity, Unreal Engine, or GameMaker Studio.


## 5. Interactivity:
Web development focuses on creating static or dynamic web pages, while game development focuses on creating interactive and engaging experiences.


## 6. Career opportunities:
Web development has a wide range of career opportunities, from front-end to back-end, while game development has a more specific and niche set of career opportunities.


## 7. Skills required:
Web development requires a good understanding of web development languages and frameworks, while game development requires knowledge of game development engines, programming languages, and game design principles.


Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
Code Smell 215 - Deserializing Object Vulnerability
Tags: webdev, beginners, programming, security
Published: 2023-06-01 00:58:27

*Metaprogramming is always a problem*

> TL;DR: Don't allow remote code execution

# Problems

- Security

# Solutions

1. Validate and sanitize input

2. Avoid executing code. Input only data

3. Apply sandboxing or isolation

# Context

Deserializing objects from an untrusted source is indeed a security-sensitive operation. 

Suppose you have a web application that accepts serialized objects as input from user-submitted data, such as in an API endpoint or a file upload feature. 

The application deserializes these objects to reconstruct them into usable objects within the system.

If an attacker submits maliciously crafted serialized data to exploit vulnerabilities in the deserialization process. 

They might manipulate the serialized data to execute arbitrary code, escalate privileges, or perform unauthorized actions within the application or the underlying system. 

This type of attack is commonly known as "deserialization attacks" or "serialization vulnerabilities."

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/4b1c59db5f77bc9d29db5115c6516b46)
```python
import pickle  # Python's serialization module

def process_serialized_data(serialized_data):
    try:
        obj = pickle.loads(serialized_data)  
        # Deserialize the object
        # Process the deserialized object
        # ...

# User-submitted serialized data
user_data = b"\x80\x04\x95\x13\x00\x00\x00\x00\x00\x00\x00\x8c\x08os\nsystem\n\x8c\x06uptime\n\x86\x94."
# This code executes os.system("uptime") 

process_serialized_data(user_data)

```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/d6f86ea9959eb68e0604f6249afa8709)
```python
import json

def process_serialized_data(serialized_data):
    try:
        obj = json.loads(serialized_data)  
        # Deserialize the JSON object
        # Does not execute code
        # ...

user_data = '{"key": "value"}'

process_serialized_data(user_data)

```

# Detection

[X] Semi-Automatic 

Several linters warn about deserialization points.

# Tags

- Security

# Conclusion

Metaprogramming opens doors to abusers.

# Relations

{% post https://dev.to/mcsee/code-smell-189-not-sanitized-input-853 %}

# More Info

{% post https://dev.to/mcsee/laziness-i-meta-programming-32a9 %}

[Sonar Source](https://rules.sonarsource.com/php/RSPEC-4508)

# Disclaimer

Code Smells are my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Towfiqu barbhuiya](https://unsplash.com/@towfiqu999999) on [Unsplash](https://unsplash.com/photos/em5w9_xj3uU)
    
* * *

> Whenever possible, steal code.

_Tom Duff_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
3D Printed Clippy Powered by ChatGPT has won a Telly award
Tags: ai, chatgpt, clippy, video
Published: 2023-08-04 21:50:39

---
title: 3D Printed Clippy Powered by ChatGPT has won a Telly award
published: true
date: 2023-06-01 00:00:00 UTC
tags: ai,chatgpt,clippy,video
canonical_url: https://jimbobbennett.dev/blogs/telly-award/
---

This year is the 44th annual [Telly Awards](https://www.tellyawards.com). The Telly Awards honor excellence in video and television across all screens.

The Telly Awards was founded in 1979 to honor excellence in local, regional and cable television commercials with non-broadcast video and television programming added soon after. With the recent evolution and rise of digital video (web series, VR, 360 and beyond), the Telly Awards today also reflects and celebrates this exciting new era of the moving image on and offline.

The Telly Awards annually showcases the best work created within television and across video, for all screens. Receiving over 12,000 entries from all 50 states and 5 continents, Telly Award winners represent work from some of the most respected advertising agencies, television stations, production companies and publishers from around the world. The Telly Awards recognizes work that has been created on the behalf of a client, for a specific brand and/or company (including your own) or self-directed as a creative endeavor.

This year we entered the **Build a 3D Printed Clippy Powered by ChatGPT from OpenAI, Azure Cognitive Services** episode of Let’s get personal: computing, and we won a [Silver award in the online talk show/interview category](https://www.tellyawards.com/winners/2023/online/general-talk-show-interview)!

Check out the video here:

{% youtube 6OYGeOwd6RY %}
Announcing the Contentful + Contenda integration
Tags: announcement, integration, contentful, cms
Published: 2023-06-01 18:03:35

---
title: Announcing the Contentful + Contenda integration
published: true
date: 2023-06-01 00:00:00 UTC
tags: announcement, integration, contentful, cms
canonical_url: https://blog.brainstory.ai/contentful/
---

Contentful is the better way to build content. Assemble content and deliver digital experiences fast with a composable content platform. Now, with the Contenda integration, deliver your next tutorial or blog through Contentful in seconds. Partnering with Contentful means that our users no longer need to export markdown files and upload it back to Contentful— it’s all native in the Contentful platform!

![Contenda and Contentful graphic](https://contenda.co/blogimages/ContentfulContendaBanner.png)

## How do I get started?

Starting today, you can install the Contenda app in the Contentful Marketplace [here](https://www.contentful.com/marketplace/app/contenda)!

Then, set up the app following the steps found in the [documentation page](https://www.contentful.com/help/contenda/).

![Demo of Contenda App on Contentful Gif](https://contenda.co/blogimages/Contentful.gif)

That’s it! Unlike the tongue twister “Contenda creates content for Contentful,” that was painless and easy. Now, you’re ready to connect your AI-transformed content straight into your Contentful blog entries. 🚀
Rust中特别的“区间”概念
Published: 2023-05-31 23:52:32

- 1、半开区间，用下面的运算符表示
```
..
```
- 2、闭区间，用下面的运算符表示
```
..=
```

- 3、举个迭代区间元素的列子
```
// Rust
fn main() {
for i in 1..=5 {
    println!("{}",i);
}
}
```
```
# Python
for i in range(1,6):
    print(i)
```

- 4、含义：半开区间只包括区间起始值，不包括结束值；闭区间包括起始值和结束值
- 5、Python中并不存在这样的运算符来区分闭区间和半开区间，Python中只有半开的概念（不包括结束值）
- 6、学Rust后才明白对某个区间还能这么分，甚至写了好几年的Python都没听过“区间”这个词汇
Controle de fluxo com Python
Tags: python
Published: 2023-05-31 23:40:25

Na ciência da computação, estrutura de seleção (ou expressão condicional, ou construção condicional) é uma estrutura de desvio do fluxo de controle presente em linguagens de programação que realiza diferentes ações dependendo se a condição é verdadeira ou falsa, a expressão é processada e transformada em um valor booleano.

### Comando if

O controle de fluxo em Python é realizado por meio de estruturas condicionais, como o `if` e o `else`. Essas estruturas permitem que você execute diferentes blocos de código com base em condições específicas.

Aqui está um exemplo básico de controle de fluxo em Python usando `if` e `else`:
- A condição 3 é maior que 2, é verdadeira?
  - Se sim, imprima `Funciona!`
  - Se não, imprima `3 é maior que 2`

```python
if 3 > 2:
    print('Funciona!')
else:
    print('3 é maior que 2')
```

Perceba que existe uma edentação de quatro espaços do no print em relação ao `if`.

É possível utilizar o `elif` (abreviação de "else if") para verificar múltiplas condições em uma estrutura condicional. 

Veja um exemplo:

```python
idade = int(input("Digite sua idade: "))

if idade < 16:
    print("Voto não permitido!")
elif idade >= 16 and idade < 18 or idade < 65:
    print("Voto obrigatório!")
else:
    print("Voto opcional!")
```

Nesse exemplo, o Python espera que usuário entre com um valor que representa sua idade.
- Se, a idade for menor que 16.
  - Imprima, `Voto não permitido!`
- Senão, idade for maior ou igual a 16 e menos ou igual a 65 anos.
  - Imprima `Voto obrigatório!`
- Outro, se as condições `if` e `elfi` forem falsas.
  - Imprima, `Voto opcional!`
Learn NLP the dumb way
Tags: nlp, machinelearning, ai, deeplearning
Published: 2023-05-31 22:53:47

I am preparing for interviews for machine learning engineer positions.
So I am brushing up my skills in natural language and pytorch as well. It's been a while since I worked on intensive machine learning model development. 
The past few years have been mostly work on my own startup, doing fullstack engineering and platform development. 

My plan is to implement a series of classical NLP models in pytorch from scratch.
To make things more appealing, I would also find common datasets on kaggle and see how these models perform on them. 

To be more specific, here is a list of models I am considering to implement:
- MLP & logistic regression
- text classification tasks -- RNN, LSTM, biLSTM
- NER task -- biLSTM + CRF
- machine translation -- transformer based architectures
Typescript: Type Utilities for the goodness and reusability
Tags: typescript, webdev, javascript, beginners
Published: 2023-05-31 22:48:33

How to use Pick/Omit/Exclude/etc.. to do cool stuff..


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


The pick is a utility .. utility type that allows you to select specific properties from an object type and create a new type with only those properties .. cool?

```ts

// Define a User interface
interface User {
  name: string;
  age: number;
  address: string;
  email: string;
  single: boolean;
  job: string;
  degree: string;
}

// Now we r sliccccing 😀
type UserBasicInfo = Pick<User, 'name' | 'age'>;

const newUser: UserBasicInfo = {
  name: 'Taric Ov',
  age: 28
};

console.log(newUser); // { name: 'Taric Ov', age: 28 }
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pyy0r737d6rqeyd9u79.png)

```

In the above example:

1. We have an interface `User` that defines their properties.
2. We used the `Pick<User, 'name' | 'age'>` type to create a new type called `PersonBasicInfo` that only includes the `name` and `age` properties from the whole `User` interface.
3. We then created an object of the type `UserBasicInfo` called `newUser` with the selected properties.

got it? if yes? that sounds great cuz u know what? you now got Omit/Exclude as well 😮💪 congrats 😉

if still need more explanation? try it in code and follow the comments 😊

{% embed https://codesandbox.io/embed/typescript-type-utilities-b03y4r?fontsize=14&hidenavigation=1&theme=dark %}

So..

Omit is also a utility type that does the opposite of Pick. It allows you to exclude specific properties from an object type and create a new type without those properties.

— The terms “omit” and “exclude” can be used interchangeably in the context of utility types in TypeScript. Both `Omit` and `Exclude` are utility types that provide similar functionality but with slight differences.

```ts

// Omitting 
interface User {
  name: string;
  age: number;
  address: string;
}
type UserWithoutAddress = Omit<User, 'address'>;

//Excluding numbers from a literal
type Numbers = 1 | 2 | 3 | 4 | 5;
type ExcludedNumbers = Exclude<Numbers, 1 | 3 | 5>;
// ExcludedNumbers: 2 | 4

```
### What About the other utility types in TypeScript?


1. Partial<T>: This utility type creates a new type that makes all properties of the original type `T` 👉 optional.

2. Required<T>: This utility type creates a new type that makes all properties of the original type `T` 👉 required.

3. Readonly<T>: This utility type creates a new type that makes all properties of the original type `T` 👉 read-only.

4. Record<T,K>: This utility type creates a new type with keys of type `K` and values of type `T` 👉 It's often used to define dictionaries or mappings.

These utility types, along with `Omit` and `Exclude`, provide powerful ways to manipulate and transform types and even to do cool tricks in TypeScript.. and that's what we are to explore in the next tutorial.
till then.. keep ur types tight 💪

Next: Type Templates 🤘(…out the oven)
Documentação são seus pensamentos tornados permanentes.
Tags: devrel, beginners, documentation, learning
Published: 2023-05-31 22:26:56

"O código são seus pensamentos tornados visíveis, mas a documentação são seus pensamentos tornados permanentes."  - Naval Ravikant

No mundo do desenvolvimento de software, a documentação é frequentemente negligenciada e subestimada.  Muitos desenvolvedores veem isso como uma tarefa tediosa e demorada que consome muito tempo de codificação.  No entanto, a verdade é que a documentação desempenha um papel crucial no processo de desenvolvimento e pode poupar muito tempo e dores de cabeça a longo prazo.

Em primeiro lugar, a documentação serve como referência para futuros desenvolvedores que precisam entender a base de código.  Sem a documentação adequada, pode ser incrivelmente difícil para alguém novo no projeto se atualizar e fazer alterações sem quebrar as coisas.  Uma boa documentação também pode ajudar na manutenção do código, facilitando a correção de bugs e a adição de novos recursos.

A documentação também pode ser útil ao trabalhar em equipe.  Quando vários desenvolvedores estão trabalhando no mesmo projeto, é importante ter uma compreensão compartilhada da base de código.  A documentação pode ajudar a garantir que todos estejam na mesma página e trabalhando para os mesmos objetivos.

Finalmente, a documentação pode ser uma ferramenta valiosa para a comunicação com as partes interessadas.  Sejam outros desenvolvedores, gerentes ou clientes, a documentação pode ajudar a explicar os conceitos técnicos de uma maneira fácil de entender.  Isso pode ser especialmente importante ao trabalhar com partes interessadas não técnicas que podem não ter um entendimento profundo da base de código.

A documentação pode não ser a parte mais empolgante do desenvolvimento de software, mas certamente é uma das mais importantes.  

Investa tempo na criação de uma boa documentação.

#desenvolvimento #software #devrel #beginners
useDouble.com - Run prompts in bulk and with plugins using the GPT-4-32k API
Tags: ai, chatgpt, webscraping, automation
Published: 2023-05-31 22:20:04

Double is a no-code tool that lets you run thousands of prompts simultaneously in a familiar spreadsheet UI. Because the OpenAI API supports no plugins, we’ve built in Web Scraper and Google Search tools which you can easily add to create AI workflows.

Check it out [useDouble.com](https://www.usedouble.com) and let me know what you think! We only launched recently and are actively working on new features.
The Right Way to Put Your Script Tag <𝘴𝘤𝘳𝘪𝘱𝘵> ✔
Tags: webdev, javascript, beginners, programming
Published: 2023-05-31 22:06:07

When it comes to loading JavaScript files in a web application, it's essential to consider how to optimize the loading process to ensure a smooth user experience. One of the techniques to achieve this is by using the defer attribute, which allows the browser to parse the script while continuing to parse and render the HTML content. This can lead to better performance and faster load times. In this blog post, we will discuss the use of the defer attribute and explore different ways to load JavaScript asynchronously.

## The defer Attribute

The defer attribute is a simple and effective way to load JavaScript files without blocking the rendering of the HTML content. When a script tag includes the defer attribute, the browser will not execute the script until the HTML parsing is complete. This ensures that the page layout and other resources can be loaded without being blocked by the script execution.

The page layout and other resources can be loaded without being blocked by the script execution.

The browser can continue parsing and rendering the HTML content while the script is being loaded and parsed.

Here's an example of using the defer attribute in a script tag:
`<script src="script.js" defer></script>`

**However, the defer attribute also has some drawbacks:**

- The script will still be loaded and parsed, even if it's not needed for the initial rendering of the page.
- If the script has dependencies, they will also be loaded and parsed, even if they are not needed for the initial rendering.

## Using async

`<script src="script.js" async></script>`

The async attribute allows the browser to load the script asynchronously, which means that the script will be loaded and executed as soon as it's available, without blocking the HTML parsing.

**Using the async attribute has its advantages:**
- The script will be loaded as soon as it's available, potentially improving the page load time.
- The browser can continue parsing and rendering the HTML content while the script is being loaded and executed.

**However, there are some potential downsides to using the async attribute:**
- The script execution order is not guaranteed, which can lead to issues if the script depends on other scripts or resources.
- If the script has dependencies, they will also be loaded asynchronously, which can lead to complex dependency management.

##Conclusion

- Use the defer attribute when you want to load JavaScript files after the HTML parsing is complete, ensuring that the page layout and other resources are loaded without being blocked by the script execution.
- Use the async attribute when you want to load JavaScript files as soon as they're available, potentially improving the page load time. However, be aware of the potential issues with script execution order and dependency management.