teleren/devto huggingface dataset:
Returning an Array from a Bash Function
Tags: bash, linux, devops
Published: 2020-09-09 18:34:13

At first glance it may seem that returning an array from a **Bash** function is not possible. This is not strictly true; taking a cue from the way C/C++ programmers might do this, you can pass the result array to the function by reference. This approach allows the function itself to remain free of any global variable references. Here is a simple example:
```
#!/bin/bash

# Example of how to return an array from a function
# using pass-by-reference.

# Halt on error, no globbing, no undeclared vars
set -efu

function getFnames
####################################################
# Load all filenames into an array. 
# Arguments:
#    $1 = name of return array (must be global)
#    $2 = first path for 'find' command to search
#    ...  other paths for 'find' to search
#
{
   # store the name of the global array for return.
   local h_rtnArr=$1
   # discard first argument in argv
   shift

   # mapfile does heavy lifting.  See: help mapfile
   mapfile $h_rtnArr < <(find $@ -type f)

   # TODO: return error code
}

# Global array
declare -a FnameArr

# Pass FnameArr by reference
getFnames FnameArr /boot

# List results to stdout
arrSz=${#FnameArr[@]}
for (( ndx=0; ndx < $arrSz; ++ndx )); do
   echo -n "${ndx}: ${FnameArr[$ndx]}"
done

```
Running this script will produce an enumerated list of all files on your */boot* partition.
Enjoy!
Data and Streaming News September 2020
Published: 2020-09-14 01:59:56

---
title: Data and Streaming News September 2020
published: true
date: 2020-09-09 18:34:00 UTC
tags: 
canonical_url: 
---

- [https://github.com/linkedin/datahub](https://github.com/linkedin/datahub)
- [https://github.com/amundsen-io/amundsen](https://github.com/amundsen-io/amundsen)
- [https://flyte.org/](https://flyte.org/)
- [https://eng.uber.com/fiberdistributed/](https://eng.uber.com/fiberdistributed/)
- [https://petastorm.readthedocs.io/en/latest/readme\_include.html](https://petastorm.readthedocs.io/en/latest/readme_include.html)
- [https://github.com/Netflix/metacat](https://github.com/Netflix/metacat)
- [https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm\_dg\_chart\_time\_series\_data.html#cmug\_topic\_11](https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm_dg_chart_time_series_data.html#cmug_topic_11)
- [https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm\_metrics\_kafka\_broker.html](https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm_metrics_kafka_broker.html)
- [https://developers.redhat.com/blog/2020/08/24/java-development-on-top-of-kubernetes-using-eclipse-jkube/](https://developers.redhat.com/blog/2020/08/24/java-development-on-top-of-kubernetes-using-eclipse-jkube/)
- [https://github.com/confluentinc/demo-scene/blob/master/community-components-only/docker-compose.yml#L22-L51](https://github.com/confluentinc/demo-scene/blob/master/community-components-only/docker-compose.yml#L22-L51)
- [https://javadoc.io/](https://javadoc.io/)
Does a Top Level Domain (TLD) really matter?
Tags: discuss, watercooler
Published: 2020-09-09 18:20:32

With my current domain, luis.codes, set to expire next month, I was contemplating whether or not I should renew it. It is more on the expensive side ($72/mo), and it's not really perfect for what I want it to say about me. I don't just code,  I design and create digital experiences. As much as I would have liked to have luis.dev, I unfortunately missed the boat on that, so I went out looking at what other options I have available to me.

My criteria is not too bad I don't think, I just want something short, not too expensive, and with a TLD that I can use personally and professionally.

Namecheap claims to have [479 different TLDs](https://www.namecheap.com/domains/registration/results/?domain=&type=beast), which is pretty incredible! There are a ton of options at different price points, but as usual, the ones suited to a developer are mostly taken for (.dev, .io, .sh, etc).

After sifting through the options, I ended up securing luis.earth while I decide whether or not I would really like to use that. I thought it might be good for me because it stands out, and I could use a subdomain for my site (dev.luis.earth), I can setup an email such as dev@luis.earth,  and as someone who is environmentally conscious it might signify that I care about the planet. Since it is generic enough, it doesn't shoehorn me into doing one thing (just codes, or just a dev, just designs, etc). I have been writing it out with email addresses and website urls to see if it looks good, and I think I am happy about it but just worried it doesn't fit how just about every other developer uses .dev or the like.

Maybe I am thinking about it too much. Do you think that a TLD is really important, or so long as it isn't too cheesy it doesn't really matter? Do you include that in your first impressions of a website?
What do you do to relieve workplace anxiety?
Tags: anonymous, discuss
Published: 2020-09-09 18:15:56

---
title: What do you do to relieve workplace anxiety?
published: true
description: Looking for guidance to relieve workplace anxiety.
tags: anonymous, discussion
//cover_image: https://direct_url_to_image.jpg
---

If you have advice or tips for relieving workplace anxiety, please leave them below. Thank you!
Much needed love, I just updated RxJS-Socket.io to 0.3.7
Tags: rxjs, socketio, typescript, node
Published: 2020-09-09 18:15:15

After a long year of developing for work, I could finally take on _some_ break in between job and .. well, lets be serious: there isn't much else to do and gaming has become a chore - I was able to pour some time in and bring back my small project from the dead.

RE-introducing [RxJs-Socket.io](https://www.npmjs.com/package/rxjs-socket.io); A simple wrapper around socket.io and RxJs to make our lives way easier - the thought behind it is that I hated keeping track of all the events and callbacks and special cases and sharing them and.. now I don't have to! :D

Think of it like having a global stream for that specific event where you can simply import it, pipe it, and then subscribe and unsubscribe when you don't need it. And if you really want to, you can make it dead.

| links   |    |
|--- |--- |
| npm | https://www.npmjs.com/package/rxjs-socket.io |
| readme | https://gitlab.com/moshmage/rxjs-socket.io/-/blob/master/README.md |
| docs | https://moshmage.gitlab.io/rxjs-socket.io/modules/_index_.html |

```typescript    
// events.ts
import {IO, ioEvent} from 'rxjs-socket.io';

export const socket = new IO();

const helloWorld = new ioEvent<{text: string}>('hello-world');
const showoff = new ioEvent<any>('name', !!uniqueEvent, +count, initialState);


export const IOEvents = {helloWorld, ping};


// some-other-file.ts
import {IOEvents, socket} from 'events.ts';

const helloStream$ = IOEvents.helloWorld.event$;

helloStream$.pipe(
                filter(event => event.text === 'hello world'),
                take(1))
            .subscribe(({text}) => {
                console.log('text should be "hello world"', text);
                // make it dead -- we only take 1, but this event is still hooked, if you make it dead you make it silent for every other subscription
                IOEvents.helloWorld.unhook()
            });


socket.listenToEvent(IOEvent.helloWorld);

const [you$, can$, also$] = socket.listen(['do', 'this', 'if-you-want']);

you$.subscribe(data => console.log('you$ stream', data))

socket.connect('protocol://address:port');

// server.ts

//...
socket.emit('hello-world', {text: 'hello world'});
```
Secure ASP.NET Core Web API using API Key Authentication
Tags: netcore, c, aspnetcore
Published: 2020-10-13 13:22:14

---
title: Secure ASP.NET Core Web API using API Key Authentication
published: true
date: 2020-09-09 18:03:18 UTC
tags: NETCore, C#, aspnetcore
canonical_url: http://codingsonata.com/secure-asp-net-core-web-api-using-api-key-authentication/
---

You can easily secure ASP.NET Core Web API using API Key Authentication, it is just a matter of doing few steps and you will be able to secure your endpoints.

In this tutorial I will explain to you how to use API Key to secure your ASP.NET Core Web API in 2 different ways: 
Custom Attribute and Custom Middleware.

The post [Secure ASP.NET Core Web API using API Key Authentication](http://codingsonata.com/secure-asp-net-core-web-api-using-api-key-authentication/) appeared first on [Coding Sonata](http://codingsonata.com).
My #100DOC - Day 14
Tags: challenge, 100daysofcode, linux
Published: 2020-09-09 18:00:50

### Day 14: September 9, 2020

#### **Today's Progress**: 
1. **[Continued with The Complete JavaScript Course](https://github.com/pablohs1986/javaScriptCompleteCourse2020_Schmedtmann)** (xxh 47min):I started with section 5, where I started working with inheritance and objects. Concepts that I already know from Java, but applied to JavaScript.
2. **[Started Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (1h):I started a new course to strengthen my knowledge of HTML, CSS and continue to deepen in JavaScript. Today I started to read Unit 1, reviewing the structure of an HTML document.
    
#### **What I learned**: 
* How inheritance and objects work in JavaScript.
* Review of HTML structure.

#### **Total time**:
1h 47min
Machine learning at a glance 1.1 - So what is 'learning'?
Tags: machinelearning, course, beginners
Published: 2020-09-09 17:58:54

New cool machine learning posting course for beginners. You can learn the core notions by just enjoying the stories and solving quiz games for free.

https://www.philgineer.com/2020/09/machine-learning-at-glance-11-so-what.html
Configuring VSCode with GitHub
Tags: vscode, github, git
Published: 2020-09-09 17:50:32

##1. Install git scm to your machine  
``` sudo apt install git-all```

##2. Create a new GitHub repository
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hw9yonvu3sn34rby1atv.png)

##3. Ensure git is enabled in your VSCode settings
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q2g5lhx0g434x1fa8jdh.png)

##4. Add a Remote

* CTRL+SHIFT+P > Add Remote 
* Paste your GitHub repo url ex: https://github.com/DevLCodes/acrux-pharma-site.git
* Add a remote name 

##5. Pull all the initial changes

 First commit the changes present in your local system and run ```git pull <repo-name> master --allow-unrelated-histories```

##6. Commit all your changes to GitHub
 
Stage the changes that you want to commit , commit and push to the remote to which you want to add your changes.

###Clone a GitHub Repository
```git clone <repo-url>```
###Uninstall git from Ubuntu
``` sudo apt-get remove git ```
What did I do to pass on AWS Certified Developer Exam?
Tags: aws, cloud, certification
Published: 2020-09-09 17:46:36

First, some context: I'm a junior software developer with 1 year and a half of experience. I wrote this post because I want to help people that are willing to pass on the AWS DVA-C01 certification.

I chose this certification because I've been looking into cloud computing for a while, and the Developer certification was my choice because it seemed to be exactly what I was looking for as a developer. It made me study a lot of AWS services, how they work, how they interact with each other, and how I can develop solutions with AWS.

Before I start, just remember that this is my personal experience, it isn't a magical recipe that will guarantee your approval. Anyway, I hope that my tips will be useful for people who will read this article.

The first step to start studying was finding a course that would give me a "study path". I found a course on Udemy from Stephane Maarek and started doing it. It's a pretty solid course, it covers all the topics and services that may appear on the exam and it gives a nice foundation. I also bought a course with 5 sample exams.

After I finished the course, I started doing the sample exams. I did one exam per day, at the beginning my scores weren't good, so I kept practicing until I got a passing score almost every time I did a test. To improve my score, I took notes on what I was not getting right and read the docs to get a better understanding. After some time doing this, I started scoring 80%+ on the sample exams.

So, this was my experience studying and passing on the Developer Associate certification: If I could give some short tips, they would be:

- Read the exam guide.
- Take notes.
- Do some hands-on labs on AWS, from my experience, only theory isn't enough.
- Read the AWS documentation, it's very helpful and will probably help you to solve some doubts.
- The services FAQS are very helpful as well, reading them will probably help you to answer some questions on the exam.
- Consistency is key. I studied 45 minutes per day and it definitely helped me to pass on the exam.

Thanks for reading! Feel free to say what you think in the comments section. If you have any questions, feel free to ask as well.

[Stephane's Developer Associate Course]
(https://www.udemy.com/course/aws-certified-developer-associate-dva-c01/)

[Stephane's Sample Exams](https://www.udemy.com/course/aws-certified-developer-associate-practice-tests-dva-c01/)

[AWS Certified Developer Associate Exam Guide](https://d1.awsstatic.com/training-and-certification/docs-dev-associate/AWS-Certified-Developer-Associate_Exam-Guide.pdf)
Placeholder title
Tags: actionshackathon
Published: 2020-09-09 17:40:45

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)


### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)


### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )

[Reminder]: # (Submissions are due on September 12th (11:59 PM PDT) and winners will be announced on September 23!)
success, people praising you... it goes away
Tags: anxiety, inspiration, watercooler, mentalhealth
Published: 2020-09-09 17:30:33

Everyone likes fame and some of us achieve it too at some community group or at the organization level. But, the truth is **_it fades_**

As a developer, we get appreciated many times for our awesome work and it also encourages us to keep doing good stuff.

Being honest, I have done many things to impress team members, leads, colleagues, juniors, clients etc... and everything I have done was productive...

So people around my organization started to recognize me. There are some perks of being famous which are
* Surrounding people become nice to you.
* Opportunities arise for you
* You get noticed

So initially, we like being famous... But **_everything has a price to pay_**. There are also cons of it
* You will get more work and it will also keep increasing gradually
* You won't get appreciated as after some time it's not astonishing for others if you do amazing work of the same level as your previous work 
* You get the pressure of keep impressing everyone
* You easily get noticed if you do a single mistake

The above-mentioned things happened to me. So at this stage, I felt that I am not valued enough or in the technical term I am deprecating.

It gave me a bit of anxiety but then I have started blogging to share my thoughts and I again felt good. While going through the dev.to blogs, I found a blog and there was a quote 

>“Don’t expect to be motivated every day to get out there and make things happen. You won’t be. Don’t count on motivation. Count on Discipline.”
Jocko Willink
Blog - [Good habits, good code quality](https://dev.to/dvddpl/good-habits-good-code-quality-8ef)

I am actually inspired by it, Truth was known to me but I was busy impressing everyone... and a sharp question arose in my mind. Which is
> Why I need motivation or appreciation for doing amazing work?

...and a happy ending :D
Why does for i in range(1,3): only loop two times instead of three times in Python?
Tags: python, beginners, codenewbie, ddsry
Published: 2020-09-09 17:19:11

Why does for i in range(1,3): only loop two times instead of three times in Python Programming Language By DDSRY?


- The range() function only does numbers from the first to the last (not 
including the last).
- So it stop at two, not three, in the above.
- This turn out to be the most common way to do this kind of loop.

[Read more..](instagram.com/ddsry21)
Real World Data Structures - 30X Faster with 1 LOC
Tags: career, beginners, webdev, computerscience
Published: 2020-09-09 17:17:56

As a self-taught programmer I know how intimidating learning stuff like Data Structures can seem. It's "computer science" and impostor syndrome makes it seem like something for math geniuses only. 

In reality, it isn't that hard to learn and even just learning the basics can lead to massive performance boosts for your code. In this video I'll show you how changing 1 line of code in a text analysis can make it run up to 30X faster.

**This is just a tutorial to get you motivated and see the value of learning this stuff**,  doesn't go too in depth on any particular data structure. If you're interested in that type of content be sure to subscribe and follow because I'll be making tutorials covering that soon

{% youtube 7DqfhN4mmtQ  %}
Announcing Keynote Speaker for PyCon India 2020 - James Powell
Tags: pyconindia, python, datascience
Published: 2020-09-09 17:59:23

---
title: Announcing Keynote Speaker for PyCon India 2020 - James Powell
published: true
date: 09/09/2020 17:00:00 UTC
tags: ["pyconindia", "python", "datascience"]
canonical_url: 
---

We are happy to announce **James Powell** as a Keynote Speaker for PyCon India 2020!

James Powell is a professional Python programmer and enthusiast. He started working with Python in the finance industry building reporting and analysis systems for prop trading front offices. He currently works as a consultant building data engineering and scientific computing platforms for a wide-range of clients using cutting-edge open source tools like Python and React. He also offers a variety of corporate training courses and coaching sessions in all areas of Python.

In his spare time, he serves on the board of [NumFOCUS](https://numfocus.org/) as co-Chairman and Vice President. NumFOCUS is the 501(c)(3) non-profit that supports all the major tools in the Python data analysis ecosystem (incl. pandas, numpy, jupyter, matplotlib, and others.) At NumFOCUS, he helps build global open source communities for data scientists, data engineers, and business analysis. He helps NumFOCUS run the [PyData](https://pydata.org/) conference series and has sat on speaker selection and organizing committees for over two dozen conferences. James is also a prolific speaker: since 2013, he has given over seventy conference talks at over fifty Python events worldwide.

You can find him on Twitter [@dontusethiscode](https://twitter.com/dontusethiscode).

![James Powell](https://in.pycon.org/2020/assets/images/jamespowell.jpg)
What is Web Accessibility and How Do I Get Started?
Tags: a11y, beginners, webdev
Published: 2020-09-09 16:58:22

---
title: What is Web Accessibility and How Do I Get Started?
published: true
description: A progressive introduction to web accessibility for developers and beyond.
tags: a11y, beginner, webdev
cover_image: https://amberley.dev/static/7d3050753df8b4b82538a3b6bf305a9d/ee604/a11y-coffee-preview.png
canonical_url: https://amberley.dev/blog/2020-09-06-introducing-a11y-coffee/
---

Happy to say I finally shared this project! _(Turns out I actually made the initial commit a year ago today.)_ I'm grateful for the [warm reception it received on Twitter](https://twitter.com/amber1ey/status/1292866062233591809), and it now has over 10,000 page views! (Which is a big number for me). I'm really hopeful that it's a useful resource for folks.

[The a11y.coffee project](https://a11y.coffee/) is my take on created a structured introduction to web accessibility. It's intended for web developers who want to learn about accessibility, but perhaps don't know where to start. There's a lot to tackle, and my goal was to create a gentle introduction that tackles the why, the most immediate opportunities for impact, a crash course in testing, and some direction to further resources.

Essentially, I wanted to gift wrap the answer I generally give when someone asks me, "What is web accessibility and how do I get started?"

I hope you'll [check it out](https://a11y.coffee/), and that you find it useful!
Serverless with GraphQL #ServerlessSeptember
Tags: azure, graphql, devops, serverless
Published: 2020-09-09 16:52:42

Everything on Azure. Scalable and cost-effective Serverless system leveraging GraphQL API hosted on Azure. Easy deployable and production-ready code with Azure CLI and Azure DevOps. Built a simple API to query your professional details. You can modify and create your own API, isn't it beautiful. 

**GraphQL API URL:** https://ramanaditya-graphql.azurewebsites.net/graphql?code=mWybiYT9VGKSkNsZvuzMPajaNiMYvbEBhc6LErNr8hnXdeunrqOR7w==

## About the Project
**Medium Article:** https://medium.com/@ramanaditya/serverless-with-graphql-c0bf59078303

This article is part of **#ServerlessSeptember** [https://aka.ms/ServerlessSeptember2020](https://aka.ms/ServerlessSeptember2020). You'll find other helpful articles, detailed tutorials, and videos in this all-things-Serverless content collection. New articles from community members and cloud advocates are published every week from Monday to Thursday through September. 

Find out more about how **Microsoft Azure** enables your **Serverless functions** at
- [https://docs.microsoft.com/azure/azure-functions/](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=servsept20-devto-cxaall)

## Query
```txt
query {
    hello
}

query {
    name: {
        firstName
        lastName
    }
}

query {
    connect {
        professional {
            email
            website
            linkedin
            github
        }
        social {
            twitter
            instagram
        }
    }
}

query {
    skills {
        language
        database
        cloudService
        frameworks
        vcs
        api
        industryKnowledge
    }
}

```

### Important Links:
**Medium:** [https://medium.com/@ramanaditya/serverless-with-graphql-c0bf59078303](https://medium.com/@ramanaditya/serverless-with-graphql-c0bf59078303)
**Azure DevOps:** https://bellatrixdata@dev.azure.com/bellatrixdata/serverless-graphql/_git/serverless-graphql 
**GitHub:** https://github.com/ramanaditya/serverless-graphql.git
**GraphQL API URL:** https://ramanaditya-graphql.azurewebsites.net/graphql?code=mWybiYT9VGKSkNsZvuzMPajaNiMYvbEBhc6LErNr8hnXdeunrqOR7w==

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