teleren/devto huggingface dataset:
Loading a 600mb+ CSV file is faster in Python than in Go?
Published: 2022-10-12 14:23:06

---
title: Loading a 600mb+ CSV file is faster in Python than in Go?  
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Ever wondered how much time it takes for Go to load a CSV file in comparison with the slower Python language? 

I downloaded a relatively big csv file from the web (658 MB) to see which one wins.

Let's start with Python and the well known pandas package:
![Pandas6sec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fr3mmti28qmsfs9nlin.png)
Pretty bad isn't it? 6+ seconds! Tried with `engine="c"` flag, but got same result. It's still good enough, now we have available a lot of pandas goodness.

Let's see in Go:
![Go1.5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0w24u4h1tgbksas9emu.gif)
Nice! Finished in 1.5 seconds -> 21% faster! But, remember pandas offers a lot out of the box, with Go you need to write a lot of code to benefit from those extra goodies.

Is Python slow? Yes, but if the packages implementation you are mostly using are in C/Rust you won't feel it as much. 

Now, let's switch pandas with a newer alternative [polars](https://www.pola.rs/):
![polars700ms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c55ybu8bnndslmhfsu8u.png)
It's even faster than Go!(yes, because of Rust). We now have a lot of functionalities out of the box (not as much as pandas, but will get there).

Time to learn Rust I guess...
Set Static Outgoing IP for AWS Lambda
Tags: showdev, python, aws, tutorial
Published: 2022-10-12 14:20:34

Having a static outgoing IP for your AWS Lambda function (or any AWS instance) is a common use-case when the third-party you're trying to access data from imposes a restriction that they only accept requests from whitelisted IP addresses. By default, Lambda does not assign a static outgoing IP address and you can't simply assign an [AWS elastic IP address](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) to the Lambda function as you could for an AWS EC2 instance.

---

For Lambda, the process is a little more complex. You must:

1. Create an [AWS Virtual Private Cloud (VPC)](https://aws.amazon.com/vpc/)
2. Create public and private subnets within the VPC
3. Place your Lambda function in the private subnet, and a [NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) in the public subnet
4. **The NAT gateway is assigned the static Elastic IP**, which Lambda routes traffic too
5. The NAT gateway then routes traffic to the [Internet gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) which passes that traffic onto our third-party endpoint with a static outgoing IP

---

I walk through everything in my YouTube series, explaining how to create it manually and then automatically with [AWS Cloudformation](https://aws.amazon.com/cloudformation/), explaining each component and the values chosen along the way.

---

If you find the video helpful you can greatly help me by doing one or all of the following:

* [supporting me on Patreon](https://www.patreon.com/programmingwithalex)
* [subscribing to my YouTube channel](https://www.youtube.com/channel/UC4UApj67YtJq2a2PAzmbQAQ)
* liking and/or commenting on the video
* sharing the video or [channel](https://www.youtube.com/channel/UC4UApj67YtJq2a2PAzmbQAQ) on any platform ([reddit](https://old.reddit.com), [twitter](https://twitter.com/), [discord](https://discord.com/), etc.)
* [starring the GitHub repo](https://github.com/programmingwithalex/aws_lambda_static_ip_demo)
* [following me on GitHub](https://github.com/programmingwithalex)

---

Any questions or requests, just leave a comment.
nhà cái fun88
Tags: fun88kincom
Published: 2022-10-12 14:20:12


Nhà cái fun88kin.com là một nhà cái đang được rất nhiều cược thủ săn đón nhất hiện nay. Nhà cái fun88kin luôn mang lại cho anh em một trãi nghiệm tốt nhất, giao diện đẹp mắt cũng như độ uy tín nhất hiện nay
What is the weight of my custom apps...
Tags: businesscentral, powershell
Published: 2022-10-12 14:16:27

Question (from one of our customer): what is the weight of our custom/PTE apps compared to the standard/base app.

Let's [download](https://github.com/microsoft/BusinessCentralApps/tree/main/Layers/W1/BaseApp) the base app objects and script some powershell to get some quick insight :


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

Download script [here](https://drive.google.com/file/d/172iysQ1a5MfVFQ99P7EWgcIcSTJNMoRt/view?usp=sharing)
Jain Software Pvt Ltd.
Tags: javascript, programming, python, css
Published: 2022-10-12 14:15:49

Social Media
Creating and developing a website is enough for your business’s Digital Marketing
Strategy.If your business is online and you have not developed any Social Media
Marketing strategy or you have not created business accounts on social media
platforms, it may sound like, opening a business but not telling anyone about it.
Social Media Marketing is nothing but the use of Social Media platforms to promote a
business or the products and services. It is one of the digital marketing techniques used
to utilize social networking platforms to gain traffic and attract the targeted audience.
Social Media Marketing is perceived as the best marketing tool to advertise as it is cost
effective, time efficient and it directly appeals to the people present in any specific
community.
DIVING DEEP INTO THE BLOCK CHAIN TECHNOLOGY(Part 1)
Tags: beginners, programming, opensource, blockchain
Published: 2022-10-12 14:12:01

INTRODUCTION TO BLOCK CHAIN TECHNOLOGY

Block chain is a decentralized system where a list of records called blocks that store data publicly and in a sequential order without the involvement of third parties like banks, the government and other financial intermediaries during the transaction between a sender and receiver (i.e the users maintain the data and have democratic authority to approve transactions , even if one node or data on a user computer gets corrupted, the other participants will be alerted immediately, and they can rectify it as soon as possible, due to the fact every user has the same copy of the ledger).

The transactions are encrypted using cryptography inorder to protect the privacy of users and prevent data from being compromised.

How does it work?
Block chain is the combination of three important technologies: peer-to-peer network, a digital ledger and cryptography.

Peer-to-peer network is the interconnection of a large group of individuals who act as authorities to reach a consensus on transactions, among other things.

A digital ledger is where all transactions are stored, it works like a spreadsheet containing all the numerous nodes in a network and has the history of all purchases made by each node.

Cryptographic keys are two types - private key and public keys, the public key is just like your email it is used as your id while the private key is like your password only to be known by you.


The first ever blockchain protocol was proposed by David Chaum in 1982, in his Computer Systems Established, Maintained, and Trusted by Mutually Suspicious Groups.but was first popularized by Satoshi Nakamoto in 2008 and ever since then blockchain has become the to ensure the privacy of users.

On the next Episode we’ll dive deeper into the technology discussing the layers of the architecture. Thanks for reading, till then BYE😉.
Dependent: :Destroy to the Rescue!
Published: 2022-10-12 13:53:13

## Dependent: :Destroy
In Rails, Active Record associations can easily connect our models, allowing for common operations to be streamlined. (For more on Active Record associations, check out my blog post on them [here](https://dev.to/qsissler/associate-with-me-active-record-associations-4l5h)!) One option that can be added to these associations is the dependent destroy option. When an object is deleted from your database, dependent: :destroy will call destroy on all associated objects for you.

## Why use dependent destroy?
During Phase 3 of Bootcamp, my partner and I created a word game that asked the user to choose the word that matched the picture on the screen. Our User model has_many :games and each Game belongs_to :user. Our User was able to delete themselves from the database but every time we deleted a User, the rest of our application would break. We finally narrowed down our bug to having orphaned Game instances left in our database. Our orphaned Game instances no longer had an associated User, since that User was deleted. After solving this problem in a much more complicated way, our instructor introduced us to a much better and built-in option: dependent: :destroy.

## Dependent: :Destroy to the rescue!
Dependent: :Destroy is added to your has_many association declaration like so:
![Dependent Destroy Code Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzmq0kdnz9rorf04l49z.png)

With this option added, whenever a User is deleted all of the Game instances that are associated with that User are also deleted. Ensuring you leave no orphaned data behind is as simple as that.

## Where do I add Dependent: :Destroy?
The dependent: :destroy option should never be added to a belongs_to association that is connected to a has_many association of another class. Doing so can lead to orphaned data. The dependent: :destroy option should be added to the association that you want to also be deleted when you delete the "parent" instance. For example, in another project I had instances of Trips and each of those Trips has_many :items. When I deleted a Trip from the database, I wanted all Items associated with that Trip to be deleted as well. To ensure this, I added the dependent destroy option to my Trip class, on my has_many :items association: 

![Dependent Destroy Items Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h316b0gp9sgma90a98ge.png)

In summary, dependent: :destroy is a great and easily implemented option to ensure you leave no orphaned data behind.

Resources:
[Rails Guide: Active Record Associations](https://guides.rubyonrails.org/association_basics.html)
exercicio01-html
Tags: codepen
Published: 2022-10-12 13:46:28

<body>
   <h1>Arvores e Sua Impotância para o equilibrio do Planeta</h1>
  
  <div>
    <!-- setor 1 -->
    
    <!-- título da imagem -->
    <h2>Benefícios das Árvores</h2>
    <p>
      Uma das maiores maravilhas do planeta, as árvores além de um símbolo de vida, resiliência e resistência tem um grande fator positivo para todos. Sim, o nosso principal fornecedor de oxigênio são as algas, mas as árvores contribuem para vários outros benefícios. Conheça:</p>
    <ul>
      <li>Absorção de até 109 quilos de gases poluentes  por árvore.</li>

<li>Zonas urbanas arborizadas possuem média de 60% a menos de partículas como dióxido de enxofre, óxidos nitrosos e partículas poluentes vindas do diesel.</li>

<li>A temperatura é outro fator importante. Klaus Scoot, James Simpson e Gregory Mcpherson afirmam que a sombra das árvores pode reduzir a temperatura do asfaltado em até 2ºC, e do interior dos carros em até 8ºC. Além de refrescar o ambiente.</li>

<li>As árvores também são grande esponjas de água, conseguindo absorver até mais de três mil litros de água de chuva, isso ajuda a diminuir a contaminação dos lençóis freáticos e mananciais em 7%. Isso ajuda a diminuir os gastos com impostos de tratamento de água.</li>
  
</ul>

    <img src="http://planeta.macboot.com.br/wp-content/uploads/2020/05/capa-arvores.jpg" alt="Árvore com copa bem extensa, fotografada de baixo pra cima">
    
<p>Saiba mais sobre a hisória do <a href="http://planeta.macboot.com.br/dia-do-pau-brasil-historia-e-curiosidades-da-arvore-que-deu-origem-ao-nome-do-pais/">Pau-Brasil</a> árvore que deu nome ao nosso país </p>
  </div>
  
  <div>
    
    <h3>Árvores</h3>
    
    <img src="https://s2.glbimg.com/SFb_NuS-zQWCDGYqe87uaOIWSRM=/e.glbimg.com/og/ed/f/original/2022/02/01/niko-photos-tgtvxeor_rs-unsplash_HlsBODM.jpg" target= "_blank" alt="Arvore solitária e com folhagens verdes, com ramos espaçados e altos">
    <p> Mais Algumas informações úteis sobre a importância das árvores para o equilibrio do Planeta no site da <a href="https://www.embrapa.br/contando-ciencia/arvores/-/asset_publisher/Zd2bjD3HpAAC/content/broca-do-olho-do-coqueiro/1355746?inheritRedirect=false" target="_blank">Embrapa</a></p>
  </div>
  
</body>
15 Essential Affiliate Marketing Tools - adeptaffiliate
Tags: webdev, marketing, affiliate, productivity
Published: 2022-10-12 13:43:03

####   Original Tweet From  [@adeptaffiliate](https://twitter.com/adeptaffiliate)
{% embed https://twitter.com/adeptaffiliate/status/1577238894495539200 %}

1. Flippa →Buy and sell websites

2. ShareASale →Affiliate network

3. SEMRush →Keyword research tool

4. Yoast SEO →Advanced SEO functionality

5. Sumo →Email capture forms

AdSpace Here!!

6. Adsense →Revenue stream

7. AdThrive →Ad optimization 

8. WPEngine →Premium website hosting

9. Last Modified Timestamp →Change your content's
 published date

10. Shortcode Ultimate →Enhances blog article 
readability


AdSpace Here!!

11. WP-PostRatings →Adds rating system to your 
blog posts 

12. Image Attributes Pro →Adds alt text to a site's
 images

13. Imagify →Image compression

14. Hemingway →Simplify your writing

15. Grammarly →Eliminate grammar errors 

That's a wrap!

If you enjoyed this thread:

1. Follow me [@adeptaffiliate](https://twitter.com/adeptaffiliate) for more of these
2. RT the tweet below to share this thread with your audience {% embed https://twitter.com/adeptaffiliate/status/1577238894495539200 %} 



##### Click [Here](https://www.knowledge-twitter.com/?utm_source=dev.to)  For More Posts Like This [https://www.knowledge-twitter.com](https://www.knowledge-twitter.com/?utm_source=dev.to)
Pretty Print JSON
Tags: json, prettify, minify
Published: 2022-10-12 13:35:41

---
title: Pretty Print JSON
published: true
description: 
tags: json, prettify, minify
 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---


- For Pretty Print JSON
 
```js
JSON.stringify(JSON.parse(jsonStr), null, 2);
```

- For Minify JSON

```js
JSON.stringify(JSON.parse(jsonStr));
```


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




> Source: https://stackoverflow.com/a/65154264/10694425
Learn Web Development With These FREE Youtube Channels - csaba_kissi
Tags: webdev, beginners
Published: 2022-10-12 13:34:58

####   Original Tweet From  [@csaba_kissi](https://twitter.com/csaba_kissi)
{% embed https://twitter.com/csaba_kissi/status/1577551642399997954 %}
Learn Web Development With These FREE Youtube Channels.

✅ Dev Ed
✅ Fireship
✅ Sentdex
✅ Bitfumes
✅ Academind
✅ Derek Banas
✅ Kevin Powell
✅ CodeSTACKr
✅ Steve Griffith
✅ The Net Ninja
✅ Traversy Media
✅ FreeCodeCamp
✅ Web Dev Simplified
✅ Programming with Mosh 





##### Click [Here](https://www.knowledge-twitter.com/?utm_source=dev.to)  For More Posts Like This [https://www.knowledge-twitter.com](https://www.knowledge-twitter.com/?utm_source=dev.to)
Tailwindcss with react hooks
Tags: tailwindcss, react, webdev, showdev
Published: 2022-10-12 13:33:42

I like to use tailwindcss with react, but sometimes I feel lost with the amount of class on a single line, look.

```tsx
<button className="inline-flex items-center p-2.5 text-sm text-slate-600 hover:text-slate-700 dark:text-slate-300 dark:hover:text-slate-200 .....">button</button>
```

The first thing I thought to solve this "problem" was to create an object with these classes.

```ts
export const styles = {
  base: `
   inline-flex
   items-center

   p-2.5

   text-sm
   text-slate-600
   hover:text-slate-700
   dark:text-slate-300
   dark:hover:text-slate-200

   border
   rounded-lg

   bg-white
   hover:bg-gray-50
   dark:bg-gray-900
   dark:hover:bg-gray-800

   ease-in
   transition
   duration-150

   focus-visible:ring-1
   focus-visible:ring-blue-500
   focus-visible:border-blue-500
   focus-visible:outline-none
   dark:border-gray-800
   dark:focus-visible:border-blue-500
  `
}
```

More readable, and clean.

```tsx
import styles from './button.styles';

function Button(props) {
  return <button className={styles.base} {...props} />
}
```

So, how I manage other classes or merge? To do this, I created a hook to handling theses classes.

```ts
import clsx from 'clsx';

export function createStyles<Classes = string>(input: Classes) {
  let useStyles = () => ({
    cx: clsx,
    classes: input,
  });

  return useStyles;
}
```

Let's update our styles:

```ts
import { createStyles } from '@/utils/createStyles';

export const useStyles = createStyles({
  base: `
   inline-flex
   items-center

   p-2.5

   text-sm
   text-slate-600
   hover:text-slate-700
   dark:text-slate-300
   dark:hover:text-slate-200

   border
   rounded-lg

   bg-white
   hover:bg-gray-50
   dark:bg-gray-900
   dark:hover:bg-gray-800

   ease-in
   transition
   duration-150

   focus-visible:ring-1
   focus-visible:ring-blue-500
   focus-visible:border-blue-500
   focus-visible:outline-none
   dark:border-gray-800
   dark:focus-visible:border-blue-500
  `,
  appearances: {
    primary: 'bg-purple-600',
    success: 'bg-green-600',
  }
});
```

and our component:

```ts
import { useStyles } from './button.styles';

function Button(props) {
  let { appearance = 'primary' } = props;
  let { cx, classes } = useStyles();

  return <button className={cx(classes.base, classes.appearances[appearance])} {...props} />
}
```

With this approach, We keep each piece of the code with your responsibility, providing easy maintain.

Check the source:
https://github.com/mverissimo/react-tailwind-classnames
Here are 22 top life lessons for you from my career - TheAnkurTyagi
Tags: webdev, career, productivity
Published: 2022-10-12 13:33:36

####   Original Tweet From  [@TheAnkurTyagi](https://twitter.com/TheAnkurTyagi)
{% embed https://twitter.com/TheAnkurTyagi/status/1577345611137007616 %}
If you're starting a career in software engineering.

Here are 22 top life lessons for you from my career:



1. No one doesn't really care about you.
2. Nobody is your friend.
3. Find a healthy competitor, not a friend, so that you can grow.
4. Learn to say no, maximum fail here.
5. Build your knowledge, companies will follow you. 

6. 80 % just work for promotions.
7. Don't be that person in a team, who is always available.
8. Learn to leave the meeting if you are not contributing.
9. Don't check &amp; reply to emails in the first 1 hour of your day.
10. If it's really urgent, a person will call you. 

11. Don't believe in a verbal promise (99.99- FALSE).
12. Take everything in writing.
13. Ask for feedback if you are not getting it.
14. Set up 1-1 with your boss, don't wait for him.
15. Ask questions, no question is stupid. 
16. Discuss in year-end review fairly. 

17. Don't accept any change before the release date in prod.

18. You made a big change &amp; raised PR everything looks good but only a few team members know about this, bad move, and in such cases communicate effectively to all team members, and they will respect you more. 

19. Few leaders actually save you in appraisals discussion.
20. Appraisals are never fair, it's fact, so don't work for it.
21. Don't forget, you have a life outside the office.
22. Elevator pitch, learn this skill.

That's it for today, Hope this helps you.🙌 

If you like this thread, you should join my 2-1-1 career growth newsletter:

- No spam
- No bullshit

And more importantly, You can ask your questions 1-1 via email. 

Join here 👇

{% embed https://www.getrevue.co/profile/AnkurTyagi %} 



##### Click [Here](https://www.knowledge-twitter.com/?utm_source=dev.to)  For More Posts Like This [https://www.knowledge-twitter.com](https://www.knowledge-twitter.com/?utm_source=dev.to)
Mobile Responsiveness
Tags: react, css
Published: 2022-10-12 13:24:36

Hey, I'm developing a web application using React in the frontend with styled-components package. What is often best practise with mobile responsiveness? Currently I have been creating separate mobile components but I can already tell this might get a little bloated when I start implementing state logic. Here's a simple example:


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

What would be your methodology, especially as the app grows for custom components? Should I just implement all responsiveness in the css or is this okay?

Thanks.
Maximum Product of Three Numbers
Published: 2022-10-12 13:22:20

Given an integer array nums, find three numbers whose product is maximum and return the maximum product.

Example 1:

Input: nums = [1,2,3]
Output: 6
Example 2:

Input: nums = [1,2,3,4]
Output: 24
Example 3:

Input: nums = [-1,-2,-3]
Output: -6

```js
/**
 * @param {number[]} nums
 * @return {number}
 */
//only two possible cases can give max product if we have all positive then last 3 numbers & 
// if we have combination of positive negative then multiply first two & with last element 
// Reason if we have 2 negative it will turn out to be positive number
var maximumProduct = function (nums) {
  let sortedNums = [...nums].sort((a, b) => a - b);

  return Math.max(
    sortedNums[0] * sortedNums[1] * sortedNums[sortedNums.length - 1],
    sortedNums[sortedNums.length - 1] *
      sortedNums[sortedNums.length - 2] *
      sortedNums[sortedNums.length - 3]
  );
};

console.log(maximumProduct([1, 2, 3]));

console.log(maximumProduct([-100, -98, -1, 2, 3, 4]));

```
Fleet is here! 🥳
Tags: news, programming
Published: 2022-10-12 13:22:08

JetBrains Fleet is finally here and it is currently free for public use. Do checkout once.

The official link is right here: [https://www.jetbrains.com/fleet/](https://www.jetbrains.com/fleet/).

You have to download the Jetbrains Toolbox first..


If you want, then you can follow me on:
<br>
GitHub: [https://github.com/FahimFBA](https://github.com/FahimFBA
)
Twitter: [https://twitter.com/Fahim_FBA](https://twitter.com/Fahim_FBA)
LinkedIn: [https://www.linkedin.com/in/fahimfba/](https://www.linkedin.com/in/fahimfba/)
YouTube: 
 [https://www.youtube.com/channel/UCG97GCUifMS2Vm28tgXQi0Q](https://www.youtube.com/channel/UCG97GCUifMS2Vm28tgXQi0Q)
List file names one under the other from terminal
Tags: bash, linux, ls
Published: 2022-10-12 13:19:42

---
title: List file names one under the other from terminal
published: true
description: 
tags: bash, linux, ls
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hjl3ueyxou7pw8hja33.png
# Use a ratio of 100:42 for best results.
---



You can List file names one under the other from terminal

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


```bash
for n in *; do printf '%s\n' "$n"; done
```

> Source: https://unix.stackexchange.com/a/70618
Better CMD+R - Improved command line history using Atuin
Tags: commandline, cli, bash, shell
Published: 2022-10-12 12:52:31

Atuin is a command line utility that replaces your existing shell history with a SQLite database.

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

Atuin also integrates with your shell history keyboard shortcuts to quickly navigate in your command line history.

Atuin supports multiple different types of search, from prefixes to fuzzyFast.

It also provides optional and fully encrypted synchronization of your history between devices.

Check it out here: [https://atuin.sh](https://atuin.sh)


---


This post was first published on my personal blog: https://mfyz.com/better-cmdr-improved-command-line-history-using-atuin