teleren/devto huggingface dataset:
Como leer datos desde Google Sheets usando Sheetson
Published: 2022-12-30 13:20:12

## Introducción
Para leer datos en Google Sheets se puede utilizar la API de Google [Aqui](https://developers.google.com/sheets/api/guides/concepts).

También puedes utilizar un servicio que simplifica nuestro trabajo de autentificación y es ideal para realizar testeo de una APP : Sheetson, este servicio simplifica el trabajo de desarrollo especialmente de la autenticación en Google que puede resultar complicada y tomar largo tiempo, por lo que este servicio es ideal para desarrollar prototipos y testar de forma rápida y efectiva.

El servicio funciona de la siguiente manera, ofrece una versión free que funciona bien y de pago por 10 USD por mes, yo utilize la version free y me funciono bien.

## Descripción

Para comenzar anda a la página web del  servicio [Sheetson](https://sheetson.com) , registrate con tu cuenta google en el botón “Get Started” bajo la cuenta free.

![Get Started](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rquosaq0kmk3to80nmgt.png)

Una vez que estés registrado presiona el botón “go to console” que está en la parte superior derecha de la página.


![console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfzqndi8g2hap7hl9d94.png)

Aquí podrás ver tu nombre, tu email y tu API Key, también puedes generar una API KEY solo para lectura.

Listo ahora puedes ver la página ”Examples” allí encontrarás ejemplos detallados en CURL y Javascript, por ejemplo para leer datos puedes ver la página: 

[Crear filas](https://docs.sheetson.com/manage-data/create-rows/)


![crear filas ejemplo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q789xesxs7n0neah1dnc.png)

Los ejemplos son simples y bien detallados por lo que no te tomará mucho tiempo entender la API.

En mi caso lo utilicé para realizar una llamada GET API y este se conecta a la planilla Google Sheets con la información de los nuevos usuarios de my APP en SwiftUI que me mostró la data de manera correcta.

Diagrama:

![App diagrama](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv1z7rkhifhwfdygp1qk.png)

En mi App


![customer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2jpetmcvfu179ajh4u6.jpg)

Bueno espero haber motivado para utilizar este servicio, ya que en mi caso me ayudó a terminar mi prototipo de manera rápida y visualizar la información en mi app de manera correcta.
Network Traffic Analysis
Tags: cybersecurity, socanalyst, paloalto, tech
Published: 2022-12-31 05:30:42

{% embed https://youtu.be/YAC1T7Dwvy8 %}
In this lab, I: 
**• Configured log forwarding on the firewall appliance**
**• Generate traffic**
able to prepopulate the Firewall with log entries and usernames that can be observable and investigated.
using an Xfce terminal, able to capture traffic packets to the Palo Alto Networks Firewall using **sh /tg/traffic.sh**. 
Pushing malware packet captures to the Firewall using **sh /tg/malware.sh**. 
**• Test log forwarding**
The firewall's log forwarding profile will also forward the log traffic to the DMZ server's syslog server for permanent storage and for further analysis to possibly include machine learning analysis (MLA).
**• Export the firewall appliances' traffic log as a csv file**
able to forward my firewall's threat log to my DMZ server running syslog. Syslog is a standard log transport mechanism that enables the aggregation of log data from different network devices - such as routers, firewalls, printers- from different vendors into a central repository for archiving, analysis, and reporting. 

**• Perform data analysis on the exported traffic csv file**
Fix Duplicate identifier IteratorResult
Tags: typescript, javascript, compilation, errors
Published: 2022-12-31 05:02:43

## Troubleshooting TypeScript: Resolving the 'Duplicate Identifier IteratorResult' Error

---

### Summary

If you are encountering errors like the following
```console
node_modules/@types/node/index.d.ts:166:11 - error TS2300: Duplicate identifier 'IteratorResult'.
```

![node_modules/@types/node/index.d.ts:166:11 - error TS2300: Duplicate identifier 'IteratorResult'](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qp4088wwy4wckyyxnfjr.png)


### Why am I receiving it now?

This issue can arise after bumping `tslint` package or any related packages that, upon upgrade, might cause such conflicts.

### How can I fix it?

If you encounter these errors, you are probably missing some TypeScript type definitions. Typically, you can resolve this by installing the corresponding [NodeJS TypeScript types](https://www.npmjs.com/package/@types/node) with either `npm install --save-dev @types/node` if you are using NPM or `yarn add -D @types/node` if you are using Yarn.


After installation, re-run your Node.js project, and the errors should be resolved. 🤠

Happy coding!
My jorney to Cloud: day 1
Tags: cloud, linux, googlecloud, beginners
Published: 2022-12-31 04:33:50

Today is the first day of many. I'm starting a new journey: The Journey to Cloud!

I'm a beginner developer with some knowledge in python, trying to get a new job as a cloud engineer, now focused on Google's cloud platform (GCP for friends). My objective is to follow the steps created by the cloud-influence (Idk if this is a thing) GPS, namely Gwen, and land a job as a freelancer in the area.

## My first day
The truth is today isn't my first day because I'm studying some concepts around cloud computing for a while, learning Linux, Python, and the basics of GCP. So, following the book Linux For Hackers, I've been understanding the usages of Linux in the day-by-day activities, some of the then listed below:

* Move between folders, create files, editing them via the terminal;
* Adding and removing software from the system;
* Finding and making terminal-based text searches with commands like cat, grep, find, sed, and so on;
* Managing permissions and ownership on files and folders using chown for ownership and chmod for permissions to Read, Write and execute;
* And, for now, manipulating running services with the commandctl, to know if they are running, stopped, and so forth.

The links for my studies items are below for documentation:
* The Learn To Cloud guide, made by GPS: https://learntocloud.guide/#/
* The Learn To Cloud "boot camp" is a fast-paced step-by-step based on the notion page above: https://madebygps-notes.notion.site/GPS-s-6-Month-Cloud-Self-Study-Bootcamp-c7a31376b8e046b990d3785ab99dc1eb

That's it, my diary from my first day of cloud Studying! I hope to accomplish my goals in the year 2023.
Fix: Flutter doctor が java.lang.NoClassDefFoundError で失敗
Tags: flutter, java, androidstudio, troubleshooting
Published: 2022-12-31 04:21:54

## 問題

[Arch Linux](http://archlinux.org/) にインストールしていた [Flutter](https://flutter.dev/) のバージョンを今日 2.2.0 に更新しました。
その後のことですが、初めて `flutter doctor` を実行すると "Android license status unknown." と言うエラーが出ました。これは奇妙なことでした。なぜならオプション付きの `flutter doctor --android-licenses` というコマンドは過去に実施済だったからです。ともかく再実行するしか方法はありませんでした。結果は以下の通りでした:

![Console error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfbhle21hc6ndh6u7baz.png)

上のように "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema" が出ていました。困惑しました。

## 解決方法

[Android Studio](https://developer.android.com/studio) の設定画面から、“Android SDK Command-line Tools” をインストールすることで解決できました。

Android Studio を起動します。
メインメニューで \[ File \] -> \[ Settings \] と進みます。

![Android Studio main menus](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rb9c1sl7yh9z68n9getg.png)

設定画面で \[ Appearance & Behavior \] -> \[ System Settings \] -> \[ Android SDK \] と進みます。
__"SDK tools"__ をアクティブにします。
"Android SDK Command-line Tools" にチェックを入れて、"OK" を押します。

![Android Studio Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afqj6plygjnc70x6lg7y.png)

進みます。

![Android Studio Android SDK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s07zvvc6d5m1tctxmmxr.png)

command-line tools がインストールされます。

![Confirmation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u41pjx95rqstffrotdhs.png)

Finish ボタンがアクティブになったら完了です。

### 謝辞

[Github](https://github.com/) の [Flutter](https://github.com/flutter/flutter) イシューに助けられました。([51670](https://github.com/flutter/flutter/issues/51670) / [56778](https://github.com/flutter/flutter/issues/56778))。それから [ぶるー](https://zenn.dev/captain_blue) さんの [zenn.dev の記事](https://zenn.dev/captain_blue/articles/flutter-android-licenses-classnotfound) に。感謝申し上げます。

## 結果

`flutter doctor --android-licenses` が以下のように出力して無事成功しました。

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

`flutter doctor` も 🙂

![flutter doctor completed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6e5mf6f1ia9w82e5x0yt.png)
Fix: Flutter doctor が permission denied で失敗 (Linux)
Tags: flutter, java, androidstudio, troubleshooting
Published: 2022-12-31 04:19:28

## 問題

[Flutter](https://flutter.dev/) 2 を [Linux](https://linux.org/) にインストールした時のことです。[`flutter doctor` の実行が必要](https://flutter.dev/docs/get-started/install/linux#run-flutter-doctor)でした。

しかしながら実行すると、以下のような "Permission denied" エラーになりました。

```console
$ flutter doctor
touch: cannot touch '/opt/flutter/bin/cache/.dartignore': Permission denied
```

root すなわちスーパーユーザーで実行することが必要なのでしょうか ? いいえ。それは推奨されません:

```console
$ sudo flutter doctor
   Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
```

## Solution

使っているユーザーを "__flutterusers__" グループに加えてあげましょう。
[Arch Linux](https://archlinux.org/) での実行例です。こちらのコマンドを実行します:

```console
$ sudo usermod -a -G flutterusers <your-user>
$ # alternatively:
$ #sudo gpasswd -a <your-user> flutterusers
```

ログアウトして、ログインします。
ふたたび `flutter doctor` を実行しましょう。

```console
$ flutter doctor
   Building flutter tool...
```

成功です 🙂

### 補足: 別の方法 (非推奨)

違う方法もあります。`/opt/flutter` のパーミッションを変更することでも解決できるかもしれません。しかし上記の方法の方が推奨されるでしょう。

```console
$ sudo chown -R <your-user>: /opt/flutter 
```
Fix: Android Studio で Flutter メニューが見付からない
Tags: flutter, androidstudio, ide, troubleshooting
Published: 2022-12-31 04:16:42

## 問題

[Flutter](https://flutter.dev/) 2 の開発環境を [Arch Linux](https://archlinux.org/) 上の [Android Studio](https://developer.android.com/studio) に構築しようと悪戦苦闘していた時のことです。Flutter メニューが見付けられないということが時々ありました。
[pacman](https://wiki.archlinux.org/title/pacman) を用いて Flutter と [Dart](https://dart.dev/) をインストールして、さらに Android Studio の設定画面で "Plugins" としてもインストールしました。しかし Android Studio を起動しても開始画面に Flutter メニューは表示されませんでした。

![Problem 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15aleudkg3jkkq63j85m.png)

[Android](https://developer.android.com/) プロジェクトしかつくれない状態でした 🤕

![Problem 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhp32hb2i6fq8eqylezy.png)

## 解決方法

### Case 1. 隠れていただけ

Android Studio 開始画面のウィンドウは拡大できます。リサイズしてみましょう:

![Solution 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hrqfodebd84xqvgk0lw.png)

### Case 2. 設定ファイルが壊れている

Flutter の設定を完了させる前に Android Studio に何かしらの設定変更を加えることで、このようなことが起こるかもしれません。デフォルトの設定に戻してみましょう:

![Solution 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnyyj5uzdelzdz9u6ecb.png)

... Flutter メニューが現れてくれるかもしれません 🙂

![Solved](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kw4h3i2ybczrnxgklc0m.png)
A few notes…
Published: 2022-12-31 03:39:55

```bash
$ systemctl enable efdev --now
```

So, I guess some kind of intro post could nice and useful. I actually have (had) a blog I could write on, _but…_ I hit a few road bumps a couple of years ago, including my computer broke down,  plus a lot of other s****y things (I won't go into here). And my computer broke down in the middle of switching blog tools. I was going to move from Octopress to Pelican. Hopefully, in a couple of three months or so, I'll be able to fix all that again.

Meanwhile… Still need a place to express myself, or write stuff I need to post of share. Been looking at “dev.to” for a long time, and it seems like a great place to be, and to write som stuff at.

I guess when my site/blog is up and running again - I'll use this space to write shorter stuff. Like quick-tips, short notes, &/or maybe as compliment to a tweet. I don't know. We'll see.

- - -

Since it's the last day of the year…

“Happy New 2023” to you all.🎆🥂 Let's hope next year will be a good one.🤞👍

· Eric
How to optimize your JavaScript by reducing the number of function calls
Tags: javascript, webdev, programming, beginners
Published: 2022-12-31 03:27:15

Reducing the number of function calls in JavaScript can help improve the performance of your code, especially in cases where functions are called frequently. Here are a few strategies for reducing the number of function calls in JavaScript:

1. **Avoid nesting functions**: Nested functions can increase the number of function calls, as each inner function must be called by the outer function. Instead of nesting functions, consider using a single function or breaking the logic into smaller, independent functions.

2. **Use function arguments instead of accessing global variables**: If you need to pass data to a function, consider using function arguments instead of accessing global variables. Accessing global variables can be slower than passing data as an argument, and it can also make your code less modular and more difficult to maintain.

3. **Avoid using function calls as conditionals**: Function calls can be slow, especially if the function performs a lot of work. Instead of using function calls as conditionals, consider using a simple comparison or Boolean expression.

4. **Use memoization**: Memoization is a technique that involves storing the results of expensive function calls in a cache. By using memoization, you can avoid calling the same function multiple times with the same input, which can improve the performance of your code.

5. **Use function composition**: Function composition is a technique that involves combining multiple functions into a single function. By using function composition, you can avoid calling multiple functions and instead use a single function that performs all the necessary operations.

---

## Conclusion

By following these strategies, you can reduce the number of function calls in your JavaScript code and improve its performance. It's important to note that these techniques may not be applicable in all cases, and the best approach will depend on the specific needs of your application.
Using efficient data structures and algorithms to optimize your JavaScript
Tags: javascript, webdev, programming, tutorial
Published: 2022-12-31 03:16:38

Using efficient data structures and algorithms can have a significant impact on the performance of JavaScript code. Choosing the right data structure or algorithm for a given task can make the difference between code that runs quickly and code that is slow and resource-intensive. Here are a few tips for using efficient data structures and algorithms in JavaScript:

1. **Choose the right data structure**: Different data structures are better suited to different tasks. For example, arrays are a good choice for storing lists of items, while objects are a good choice for storing key-value pairs. Choosing the right data structure can make it easier to access and manipulate data, and can also improve the performance of your code.

2. **Use built-in array methods**: JavaScript provides a range of built-in array methods that can be used to perform common tasks, such as sorting, filtering, and mapping. These methods can be more efficient than writing your own algorithms to perform the same tasks.

3. **Use sorting algorithms appropriately**: Different sorting algorithms are better suited to different situations. For example, bubble sort is a simple algorithm that is easy to understand, but it is not very efficient for large lists. On the other hand, quicksort is a more efficient algorithm, but it can be more difficult to implement. Choosing the right sorting algorithm for a given task can improve the performance of your code.

4. **Use search algorithms appropriately**: Like sorting algorithms, different search algorithms are better suited to different situations. For example, linear search is a simple algorithm that can be used to search an unsorted list, but it is not very efficient. On the other hand, binary search is a more efficient algorithm, but it can only be used on sorted lists. Choosing the right search algorithm for a given task can improve the performance of your code.

5. **Use hashing appropriately**: Hashing is a technique that can be used to store and retrieve data efficiently. By using a hash function to map data to a specific location in a hash table, you can perform searches and inserts in constant time. However, hash tables can be more complex to implement than other data structures, and they may not be the best choice for all tasks.

By following these tips, you can choose the most appropriate data structures and algorithms for your tasks, which can improve the performance of your JavaScript code. It's important to note that these techniques may not be applicable in all cases, and the best approach will depend on the specific needs of your application.
"ConnectionError [SequelizeConnectionError]: no pg_hba.conf entry for host..." in Heroku Postgresql using Sequelize
Tags: heroku, postgres, sequelize
Published: 2022-12-31 03:15:47

The code I was using while I got this error was:

```typescript
sequelize = new Sequelize(process.env.DATABASE_URL);
```

Now, Heroku requires SSL to be enabled according to this quote from [Heroku's Help Site](https://help.heroku.com/DR0TTWWD/seeing-fatal-no-pg_hba-conf-entry-errors-in-postgres)

> The authentication failed because the connection didn't use SSL encryption: (SSL off). All Heroku Postgres production databases require using SSL connections to ensure that communications between applications and the database remain secure. If your client is not using SSL to connect to your database, you would see these errors even if you're using the right credentials to connect to it.

My code changed accordingly to solve the error and now looks like this:

```typescript
    sequelize = new Sequelize(process.env.DATABASE_URL, {
      dialectOptions: {
        ssl: {
          require: true,
          rejectUnauthorized: false,
        },
      },
    });
```
Using ChatGPT to Solve Programming Errors
Published: 2023-01-01 15:46:27

---
title: Using ChatGPT to Solve Programming Errors
published: true
date: 2022-12-31 03:10:09 UTC
tags: 
canonical_url: https://adithyana.hashnode.dev/using-chatgpt-to-solve-programming-errors
---

As a programmer, you are bound to encounter errors and bugs in your code at some point. Debugging and fixing these errors can be a time-consuming and frustrating process, especially if you are not sure where to start.

Fortunately, ChatGPT, an open-source chatbot framework that uses the power of GPT-3, can help you solve programming errors faster and more effectively.

In this blog post, we will learn how ChatGPT can assist you in debugging your code and fixing errors.

## Prerequisites

To use ChatGPT for debugging, you will need the following:

- A machine with Python 3.6 or above installed

- An API key for GPT-3 from OpenAI

- The `openai` and `chatgpt` Python libraries, which you can install using `pip install openai chatgpt`

## Setting Up ChatGPT

To get started with ChatGPT, you will need to create a `ChatGPT` object and pass it your API key and the model ID of the GPT-3 model that you want to use:

```python
import openai
import chatgpt

# Set the API key
openai.api_key = YOUR_API_KEY

# Set the model ID of the GPT-3 model you want to use
model_id = 'text-davinci-002'

# Create a ChatGPT object
chatbot = chatgpt.ChatGPT(model_id)

```

## Using ChatGPT to Debug Your Code

Now that you have set up ChatGPT, you can use it to help you debug your code. Here is an example of how you can use ChatGPT to troubleshoot a simple Python program that calculates the average of a list of numbers:

```python
def average(numbers):
    return sum(numbers) / len(numbers)

numbers = [1, 2, 3, 4, 5]

# Run the average function
try:
    result = average(numbers)
    print(f'The average of {numbers} is {result}')
except ZeroDivisionError:
    print('Cannot calculate the average of an empty list')

# If the function raises a ZeroDivisionError, ChatGPT can help you troubleshoot the problem
error = chatbot.get_response('I am getting a ZeroDivisionError when trying to calculate the average of a list of numbers')
print(error)

```

In this example, if the `average` function is called with an empty list, it will raise a `ZeroDivisionError` because it is trying to divide by the length of an empty list. In this case, ChatGPT can help you troubleshoot the problem by suggesting possible solutions or explaining the cause of the error.

## Conclusion

In this blog post, we learned how ChatGPT can assist you in debugging your code and fixing errors. By leveraging the natural language processing capabilities of GPT-3, ChatGPT can help you troubleshoot programming errors faster and more effectively.

I hope you found this blog post useful.
Gnarly News December 2022
Published: 2022-12-30 22:21:21

The software development landscape is constantly changing. As a software consultancy, it’s our responsibility to keep our finger on the pulse of the industry. Here are some headlines that caught our attention recently. 


## [Ruby 3.2.0 RC 1 Released](https://www.ruby-lang.org/en/news/2022/12/06/ruby-3-2-0-rc1-released/)

We’re all eagerly awaiting the seasonal gift of a new Ruby version; this year it’s 3.2. Earlier in the month, the first release candidate launched and is looking really promising. Some interesting features include the improved Regexp matching algorithm, new debugging tools, and a few updates to small classes like `Struct`, whose initializer no longer requires the presence of `keyword_init: true `to use keyword args. Small victories, folks.


## [The React.js Documentary to Launch in Early 2023](https://www.youtube.com/watch?v=gmp0istg5xo)

Apparently, they make movies about programming frameworks. Who knew? The React.js Documentary, produced by the folks over at Honeypot, is set to launch in February of 2023 and the trailer was recently released (linked above). This project is said to cover the origins of React, highlighting the resistance it was met with at its inception. Everyone loves an underdog.


## [Shopify Adopts Rust for Systems Programming](https://shopify.engineering/shopify-rust-systems-programming)

[Last month](https://www.thegnar.com/blog/gnarly-news-november-2022), we covered the announcement of a $1M investment in the Rails Foundation. Shopify was one of the major contributors to that pledge. After adopting Rust as their Systems Programming language (for things like high-performance network servers or extending Ruby), they followed suit and [joined the Rust foundation](https://foundation.rust-lang.org/news/welcoming-shopify-as-our-inaugural-gold-member/) as their first gold-level member. 


## Contributors



* [Ethan Fertsch ](https://github.com/efertsch)

_Learn more about how The Gnar [builds software](https://www.thegnar.com/software-development)._