teleren/devto huggingface dataset:
** or arguments unpacking in Python
Tags: python, beginners
Published: 2020-07-04 09:51:30

# How you could use arguments unpacking

_Photo by [Markus Spiske](https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](href="https://unsplash.com/s/photos/items?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)_

We all know `*args` and `**kwargs` in function parameters. It says that `args` are positional arguments however many you want to provide. And `kwargs` are keyword arguments, however many as well. We aren't limited to name them `args` and `kwargs`, it's just everyone do it and it's convenient to name them this way.

```python
def foo(a, b, *args, **kwargs):
    print(a)
    print(b)
    print([arg for arg in args])
    print([f'{k}: {v}' for k, v in kwargs.items()])

foo(1, 2, 3, 4, f=5, g=6)
1
2
[3, 4]
['f: 5', 'g: 6']
```

`1` and `2` are our required arguments. `3` and `4` would be our args. `f=5` and `g=6` are kwargs.

But the cool thing I started to implement not so long ago is arguments unpacking. Basically, you tell your function to get a list or dictionary of arguments and use values (or keys and values) as parameters.

```python
foo(*[1, 2])
1
2
[]
[]

foo(1, 2, **{'f': 3})
1
2
[]
['f: 3']
```

In some weird scenario you might need a bunch of arguments in your function. So instead of declaring all those parameters you could use `**kwargs`. And instead of writing every parameter on function call you could use arguments unpacking.

Also, you can use unpacking as a dictionary update.

```python
pets = {'cat': 1, 'dog': 1}
{'cat': 1, 'dog': 1}

animals = {'pig': 2, 'cow': 1, **pets}
{'pig': 2, 'cow': 1, 'cat': 1, 'dog': 1}
```

My use case for this was filtering a Django query. I had a bunch of filters but they all had a few common ones. So my code looked something like this:

```python
finished_filter = {
    'cakes__status': CakeStatus.FINISHED, #  much more like this
}
Store.objects.annotate(
    finished=Count('cakes', filter=Q(**finished_filter),
    ready_to_ship=Count('cakes', filter=Q(**finished_filter, cakes__ready_to_ship=True)
)
```

You get the idea.

I think it's a really powerful tool but as always, don't abuse that power.
Why Choose React Native for Mobile App Development?
Published: 2020-07-04 09:47:02

Cross-platform has become a great alternative for traditional native app development. This is because, you can separate the android and iOS applications by following cross platform approach which reduces your expenses and minimizes your most valuable time by using same code for both the platforms. Without doubt, React Native is the most preferred cross-platform framework for building android and iOS applications in these days. And presently, React Native app development services are utilized by millions of tech businesses all over the world.

Basically, react native is an open source framework developed by Facebook in 2015 for building application on android and iOS platforms respectively. React Native utilize less memory and keeps the app running efficiently without any performance lag.

**Why Choose React Native?**

React Native framework allows to build applications on iOS and android platforms simultaneously without any extra investments. This is the prime reason for the popularity of the React Native app development in these days. It is one of the most impressive benefits of React Native which makes huge impact on any business verticals.

**Benefits of React Native**

Excellent Performance
Code reusability and pre-build components
Optimal in UI and Animation
Instant Updates and Reloads
Supports Additional Plug-ins

**Final Thought**

As React Native is recognized as the future of the hybrid or cross-platform mobile apps, several entrepreneurs, small scale businesses and fortune companies turn towards the React Native app development. If you are one among them, then feel free to get connect to MacAndro, which is recognized as the best in offering custom [React Native app development services](https://www.macandro.com/react-native-app-development) for all the business verticals around the globe.
To the Newbie Programmer [Part I]
Tags: frontend, newbie, programming
Published: 2020-07-04 09:41:34

If you’re reading this, you’re most likely new to the programming world, so, WELCOME!!!!! We’re glad to have you here. 

Let me guess, it’s not as easy as you thought it was before you started, right? 😅
Well, that realization is essential in your coding journey, as it helps you really decide whether or not this is the path you want to take.

I’m certain that you have had challenges, ranging from simple ones to those challenges that made you shutdown your device to take a break. We all went through them, and we’re still going through them. So, brace up, challenges are not going away anytime soon, take solace in the fact that we’re all in this together 😁😁. 

Here are a few tips that should be of help to you:

- DO NOT COMPARE YOURSELF WITH ANYONE!! 

Many of the folks you may want to compare yourself with have been coding for years. So, except you’re some weird genius with god-like learning and retention abilities, do yourself a favor and learn at your own pace. Rather than being pressured, allow the progress of others inspire you. One day, someone will look up to you too.

- BE CONSISTENT!!

Do not,
I repeat,
Do not, for any reason, halt your learning process. 

Just like many other things in life, consistency is key in making progress as a programmer in any field at all. 

Practice daily!! 

Sometimes you really do not feel like sitting down to code, I know that all too well. 
In times like that, you have two options: 

a. Drag yourself to that laptop or desktop and keep practicing.

b. Read some articles that may be of help. In this field, reading is very essential. Many people have passed the stage you have found yourself in right now, so there’s a lot of wisdom available for you to feed on. You can’t walk this path alone, take advantage of the wealth of information online.

- USING GOOGLE IS NOT A CRIME!!

Pretty sure this is self explanatory. 
You cannot store everything in your head, so stop trying. Google is always there when you’re in need, Google always has your back, trust Google (LoL, sounds like an Ad for Google).

- CONSCIOUSLY APPRECIATE THE FACT THAT YOU’RE MAKING PROGRESS

Learn to celebrate the small wins. 
Sometime ago, you only knew “python” to be a snake, now you can use the “print” feature in the python language.

Until you started frontend web development, you had no idea what HTML or CSS were, but now you can use them to make good-looking web pages.

You’re making progress, so appreciate your own growth. Growth does not happen overnight, it takes time, and at the end it’ll be worth the time spent.

Keep practicing 
Keep learning from other people
Keep reading
Keep making progress
Bit by bit, you’re getting better!!
Getting instant feedback on your go code changes
Tags: productivity, go
Published: 2020-07-04 09:09:48

A typical workflow of a Go development is we add some code in the project, compile it and see if the results match our expectations. Some cautious developers choose to make very small change at a time and repeat the above cycle and this a again a personal preference. But steps like (1) compiling changed code, (2) Execution and (3) exiting the process is kind of exhaustive as you tend to repeat this monotonous cycle all the time.

What if you could see the results due to changes instantly without having to repeat the above cycle. The tool I am using extensively is called `go-watcher` which has increased my productivity

https://github.com/canthefason/go-watcher

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j0e92vk6rh1zvz7y5jps.png)

From the repository authors:

> Watcher is a command line tool inspired by fresh and used for watching .go file changes, and restarting the app in case of an update/delete/add operation.

The way it works is - It continuously watches your project directory and on any change in your code when saved, restart the app which means you can cut down the steps of binary building, execution and killing of the app.

To get this tool, do:

`go get github.com/canthefason/go-watcher`

After it's installed, you can go to terminal in the project directory and execute `watcher'

Hope this productivity tip has helped. 

Thanks for reading it. Happy to know what is your favorite productivity hack for #Go?
My Portfolio Site
Tags: webdev, html, css, javascript
Published: 2020-07-04 09:01:27

Link is in the bio..  or 👇👇👇👇

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gvsbw4w1k1b56eokayt3.png)

https://vishal035.github.io/Vishal-Version_1.0.1/
freeCodeCamp has Python Certifications
Tags: news, python, beginners, freecodecamp
Published: 2020-07-04 08:59:09

In addition to the JavaScript certifications offered, [freeCodeCamp](https://www.freecodecamp.org/) recently rolled out some Python certs to join in!

![Alt text of image](https://media.giphy.com/media/3ohryD06NMpRUCxsuQ/giphy.gif) 

# These are the 4 new certifications and the material they cover: 
 
## 1. Scientific Computing with Python
  
**Python for Everybody** 
An introduction to Python with some regEx, networking, web, database, and even data visualization material.
 
**Scientific Computing with Python Projects** 
Arithmetic Formatter, Time Calculator, Budget App, Polygon Area Calculator, and Probability Calculator

------------

## 2. Data Analysis with Python

**Data Analysis with Python Course** 
An introduction to data analysis, Jupyter Notebook, Numpy, Pandas, data cleaning, reading data, parsing data, and some more core Python.  


**Numpy** 
An overview of Numpy and its applications.

**Data Analysis with Python Projects**
Mean-Variance-Standard Deviation Calculator, Demographic Data Analyzer, Medical Data Visualizer, Page View Time Series Visualizer, and Sea Level Predictor 

--------------------

## 3. Information Security

**Information Security with HelmetJS** 
This is a bit of JS in the mix covering web security and hashing. 


**Python for Penetration Testing** 
Material on Sockets, TCP, and Developing an Nmap Scanner, Banner Grabber, and Port Scanner.

**Information Security Projects** 
Stock Price Checker, Anonymous Message Board, Port Scanner, SHA-1 Password Cracker, and a Secure Real-Time Multiplayer Game 

-------------------

## 4. Machine Learning with Python

**TensorFlow**
Material on TensorFlow, Machine Learning, Algorithms, Neural Networks, NLP, and Reinforcement Learning.

**How Neural Networks Work**
Material on Neural Networks, Deep Learning, and Convolutional Neural Networks. 

**Machine Learning with Python Projects**
Rock Paper Scissors, Cat and Dog Image Classifier, Book Recommendation Engine using KNN, Linear Regression Health Costs Calculator, and a Neural Network SMS Text Classifier. 


----------------

Note: A lot of this material is video-based while freeCodeCamp is building out the interactive content.  

You can read more about the certifications [here](https://www.freecodecamp.org/news/python-curriculum-is-live/), Quincy Larson talks about the update as well as some more info on the next release. 🙂✌🏾
Access file system like object
Tags: showdev, javascript, node, proxy
Published: 2020-07-04 08:48:49

---
title: Access file system like object
published: true
description: 
tags: showdev, javascript, nodejs, proxy
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/x4o7gsj3xaw5naieqfie.jpg

---

When you write small scripts in nodejs it is sometimes annoying to deal with the file system API. Wouldn't it be nice if you can access files and folders like you access any object and traverse them easily like you traverse an object in memory.

I came up really simple js proxy wrapper around the file system API so that allows you to treat as if it is an object.

you can install it using npm first
```
$ npm i node_file_object
```

and then use it as follows

```javascript
const createFileObject = require("node_file_object");

// Path is optional if it is not speficied '/' will be used
// path supplied here should be a folder path
const fileObject = createFileObject({ path: "/home/username" });

// List all files and folders in directory as strings
console.log(Object.keys(fileObject));

// List all files and folders as array of objects with additional attributes
console.log(fileObject.getChildren());

// READ the content of a given file
console.log(fileObject[".zshrc"].getContent());

// Walk through file system like you do on an object
// /home/username/Documents/notes.md
const documents = fileObject["Documents"];
console.log(documents["notes.md"].getContent());
```

Like everything in life this comes with its own downsides. Since it is meant to function like direct object access it uses synchronous file API's which might cause performance issues when used in large projects (since it has to wait for IO to complete). But this will prove useful for smaller scripts where this does not matter.

Here is the [source](https://github.com/Rafi993/file-object) PR's are welcomed!!
👇 Drop Links to Your Linkedin so We Can All Connect 💜
Tags: discuss, career
Published: 2020-07-04 08:33:32

---
title: 👇 Drop Links to Your Linkedin so We Can All Connect 💜  
published: true
description: A post to help devs connect on LinkedIn
tags: discuss, career
//cover_image: https://direct_url_to_image.jpg
---
Are you on LinkedIn? 

LinkedIn has still opened up more opportunities than any other platform so if you aren't, create an account! 

I've made friends, huge financial gains and a huge network of smart people by being a little active on there. Best time to start working on your profile there is when you don't need it. 🚀  

Connect with me 👇
https://linkedin.com/in/nialljoemaher/

Let's all connect on LinkedIn, drop your links below. 💜

---

[Follow me on Twitter](https://twitter.com/nialljoemaher)

Subscribe on [Codú Community](https://www.youtube.com/c/Cod%C3%BACommunity)
JavaScript Destructuring คืออะไร
Tags: javascript, thai, beginners
Published: 2020-07-04 08:31:41

Destructuring ในภาษา JavaScript เป็นการเขียนโค้ดแบบย่อสำหรับใช้กับ Array
*(การใช้กับ Object ก็จะคล้าย ๆ กัน)*
```js
[a,b] = ["A","B]
//เขียนบรรทัดเดียว เปรียบเสมือนว่า
a = "A"
b = "B"
```
**อีกตัวอย่าง**
```js
const num = [1,2,3]
[num1, num2] = num //จะได้ num1 = 1 ส่วน num2 = 2
```
```js
const num = [1,2,3]
[num1, ,num3] = num //จะได้ num1 = 1 ส่วน num3 = 3
//ค่า 2 จะไม่ถูกนำไปใช้เพราะ มีการเว้นไว้เพื่อข้ามไปตัวถัดไป
```
List comprehension in Python
Tags: python
Published: 2020-07-04 08:30:26

Sometimes we need a list with a serial integers, we can use the list comprehension syntax to generate a list with a serial integers like:

```
a = [ x for x in range(0,100) ]
# a = [0, 1, 2, ... 99]
```

If we need a list with some condition, like even numbers. We can also use the list comprehension syntax to generate a list with even numbers, like:

```
a = [ x for x in range(0, 100) if x % 2 == 0]
# a = [0, 2, 4, ... 98]
```

Another case we need a list with tuple like 2-dimension coordinate:

```
a = [ (x, y) for x in range(1, 6) for y in range(3, 6) ]
# a = [ (1, 3), (1, 4), (1, 5), (2, 3), (2, 4) ... ] 
## total 5 * 3 items 
```

But if we need the value pairs with both index with x, y move simultaneously, we can use zip:

```
a = [ x for x in zip(range(1, 6), range(3, 6)) ]
# a = [(1, 3), (2, 4), (3, 5)]
## total 3 items, because the range(3, 6)
```

The same usage with list comprehension, set and dictionary also has their comprehension.

# set comprehension:

```
s = { v for v in 'ABCDE' }
# s = {'D', 'C', 'A', 'B', 'E'}
```

## with some condition:

```
s = { v for v in 'ABCDE' if v not in 'BC' }
# {'D', 'E', 'A'}
```

# dictionary comprehension:

```
s = {key: val for key, val in enumerate('ABCDEF')}
# s = {0: 'A', 1: 'B', 2: 'C', 3: 'D', 4: 'E', 5: 'F'}
```

## with some condition:
```
s = {key: val for key, val in enumerate('ABCDEF') if val not in 'CD'}
# s = {0: 'A', 1: 'B', 4: 'E', 5: 'F'}
```

## with some condition (more complex):

```
s = {key: val for key, val in enumerate('ABCDEF') if (val not in 'CD') & (key != 0)}
# s = {1: 'B', 4: 'E', 5: 'F'}
```

After these example, we can understand the list comprehension to generate list and other types of data.

It's simple but important!

Happy coding!

Reference: https://en.wikipedia.org/wiki/List_comprehension
I Created a E-commerce Store Front page Using HTML, CSS, Tailwind Css, and JavaScript
Tags: html, css, javascript, webdev
Published: 2020-07-04 08:24:59

Tell me, what amazes you? 
Here is the link : https://muhammadtahseenurrehman.github.io/Ecommerce-website-via-TailwindCss

Your feedback will be very important to me. It will help to enhance my development skill.

Tailwindcss is an amazing tool (framework).
ES6 template Literals ... More control over dynamic strings
Tags: tutorial, javascript, webdev, career
Published: 2020-07-04 07:59:43

Before ES6 came out with template Strings in 2015. The strings in JS have very limited in its syntax but also very limited in its functionality.

To enable you to solve more complex problems and concatenate strings together in a smooth way. Not just String to Strings but String with data values.ES6 template literals provide the syntax that allows you to work with Strings in a safer and cleaner way.
Gone will be the hours of long suffer with long string concatenation!

### Basic usage
The syntax of template strings is very simple, just use backticks instead of single or double quotes.
```javascript
let msg = `A string`;
```
If we want to surround a special world with a single or double quotes we can do that simply .. because we have used a different character to define our string.

### Multiline strings
Template strings make multiline much simpler. we can simply add a line break where we want to, press enter and there it is.
```javascript
let msg = `Hi,

Good job.

Regards`;
```
so we can format our string to look like as we wish. 

### Expressions
Template literals provide an easy way to contain placeholders and expressions into strings.You do so by using the ${...}
```javascript
const name = 'Naya';
const msg = `Hi ${name}`;
```
Inside of the curly braces, it's often gonna be a variable, but it could be a whole JavaScript expression or mathematical expression. Can be a function call, it can even be a template literal inside of that expression if you need it to be.
* **Mathematical expression**
```javascript
const msg = `You have ${1+3} Dogs`;
```
* **function call**
```javascript
const msg = `Hi ${nameFn()}`;
console.log(msg);
function nameFn() {
  return "Naya";
}
```
***
***

>This is my first blog post and i'm happy to join in.
Comfortably Competent
Tags: 100daystooffload
Published: 2020-07-04 07:56:41

Recently I have been thinking about how my career has developed in the twelve-odd years I've been an engineer. It's often too easy to dismiss how much you have learnt when the job seems essentially the same during a long period of time. Every so often it's worth taking a step back and looking at your achievements.

The best way I can describe my current position is one of *comfortable competence*. Without being complacent, I feel quite capable in my abilities, whilst also knowing that I don't have all the answers, and wanting to develop further.

Feeling this way is still relatively novel for me. My early career was filled with a lot of doubt. I still did work I can be proud of, but my position felt very uncertain. I could do some work and be unsure about whether it would be received well or not. These days, having confidence in my abilities makes me more confident overall. Not only do I feel able to explain my views to my colleagues, but I can also respond quickly to my customers without doubting myself. Finally I feel naturally able to explain the way we do things to people who I am responsible for.

There is still so much more I want to learn and improve, but, taking a bit of a break from another week of living in uncertain times, it's great to reflect and acknowledge your abilities.

*I'm publishing this as part of 100 Days To Offload. You can join in yourself by visiting [https://100daystooffload.com](https://100daystooffload.com).*
Goopensource.dev has published ranking algorithm 
Tags: jobs, programming
Published: 2020-07-04 07:48:10

---
title: Goopensource.dev has published ranking algorithm 
published: true
description: 
tags: jobs, programming
cover_image: https://media-exp1.licdn.com/dms/image/C4E1BAQGtMhmjcOI4hQ/company-background_10000/0?e=1592290800&v=beta&t=Vq6Hh9Tx1ibKUMJqoA_wLOV2FeYOyT2U56ogx4VNWkY
---

## Goopensource.dev

https://www.goopensource.dev/

We’re happy to announce that our ranking algorithm and some other great improvements are officially available for everyone.

#### Show case of the ranking algorithm

{% youtube 8SplImNju1M %}

#### New Features

* Add a new ranking algorithm to sort companies by quality and appearance 
* Add new link to allow redirect to the careers page of the company

Any feedback is welcome!
Idea of how to learn to code (again 😪)
Tags: beginners, javascript, java, mevn
Published: 2020-07-04 07:08:59

First of all. Hi! How are you?
I hope you're doing well!

(I apologize if my english isn't good enough. 😊)

I have an idea of how to learn something new, I'm just writing 'cause feel good. And i want to share it with all of you as a blog. 

What happens when you don't know anything and feels like shame to ask? (Nah?, Only me)
Well you learn from the red by your own.

#Objectives
1. Learn to code fluid is a must everyone should have.
2. You will feel like a superhero with all that power.
(Write in the comments more od this, 👍)

#Steps of the Learning IDEA
* [ ] Code something from a YouTube video.
- [ ] Code the same something writing the GitHub of the video.
- [ ] More code of your old code in GitHub from versions of the two other steps.
- [ ] More code as you go coding reading through your coding files. (Everytime you open a file, read it from line 1 to the end line and leave ToDo comments for what you should Fix, Implements, Re-Factor in the previous code, thats how you would erase the ToDo's but upgrading the Package.JSON version 👍💚)

```javascript
if (visitor.isReading()) {
    console.log(
        `Thank's for reading: ${visitor.getName()}`
    );
}
```
Project Elpis #1
Published: 2020-07-04 06:58:52

---
title: Project Elpis #1
---

So......
This week, we added some basic things to our game. 

The basic movements that we have right now for our main character are run and jump. We also added a player camera, and the sprite sheets for the character. Personally, I like the idle one the most because it gives the game a windy effect. 

Additionally, we made three worlds and added “portals” that can transfer the character from one world to another. I’m not really satisfied with how the character enters the portal, so we will probably change it up later. 

Furthermore, we added our first enemy to the game - SLIMES. 
The states that they have are idle, wander, and chase. 

However, we faced a problem where when the “slimes” wander around, they would sometimes fall off the edge of the tiles and drop to another area. (Since the game is side-scrolling, the tiles are of different heights for players to jump around) We want each slime to be able to wander in their own specific area and also to stop chasing the player if it requires the slimes to jump down or up. 

So, I made another tile set, and set each cell to 4 * 4. (The world map tiles are 16 * 16) Using the mini tile set, I made boxes around each slime and assigned this tile set to the “barrier” layer, which only affects the enemies. Therefore, the slimes can’t leave the box because they would collide with the tiles, and the player can move around freely. I also made the tiles invisible so it doesn’t show in the game. Initially, I was going to make collision shapes on the edges to solve this problem, but then the tile set method worked much better. Now I can just draw tiles around enemies to limit their moving space, and the tile box size can be different for each enemy.

\- Katherine :)