teleren/devto huggingface dataset:
[Internship/ Java/ Python/ Front-End/ QA Engineer /Grand Parade/ Krakow/ Remote]
Tags: java, python, beginners, career
Published: 2021-04-23 19:50:46

💻 Are you looking for experience in IT?
💲 Paid Summer Development Internship 2021 in Grand Parade is a perfect opportunity to gain it by learning from the best specialists!

👉Apply here - https://lnkd.in/gCCJfgX
👉Q&A session - https://www.linkedin.com/events/internshipatgp-everythingyouwan6788448893492367360/
Solve the scenario - using Thread synchronization in Dotnet - CountDownEvent
Tags: dotnet, threading, synchronization, csharp
Published: 2021-04-23 19:46:47

**Use Case**:

Consider this hypothetical scenario. We need to simulate a Marathon Race. So, we have two entities **Race** & **Player**

Following are the requirements of each entity.

**Race**:
1. Should be able to add the players
2. Should be able to start the race
3. It should inform when race starts
4. It should inform when race ends

**Player**:
1. It should have a name
2. It should declare the fatigue level. *Lower is the fatigue, faster the player will run*.
3. It should notify when player starts running
4. It should notify when player finishes the race

**Scenario 1**:
When race starts it should wait for all the players to finish the race. Race will only end after that.

All players have a consolation price !!

**Scenario 2**:
When race starts it should wait for the first three winners !! Race ends after it.

Only first three winners will get a price!! Sorry about other folks.

Take a pause

Think about the solution

**?**

Think again

Scroll down for the solution

...

...

...

...

...

...

#Solution

Run the below code in Linqpad (https://www.linqpad.net/), to see it action. You can create a console project in VS and copy this code as well.

Make sure you press Ctrl+Shift+M, and add the namespace imports i.e. System.Threading & System.Threading.Tasks

We will be using **TPL** (Task Parallel Library) and **Thread Synchronization** constructs to solve the problem.

**Scenario 1**

{% gist https://gist.github.com/debashish2014/6bf5b3fa0c5c7b81089539d663d6a9b9 %}

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

If you see the output above, the player who is having the lowest fatigue level comes first and one who comes last is having the highest fatigue.

In this solution we are using Task.WaitAll() to wait for all the players to finish the race, before we end it.

**Scenario 2**

{% gist https://gist.github.com/debashish2014/19b31937a242a5db0dc17899a3c8ce60 %}

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7qnrdaywm8amst7w4c5g.png)

In this solution we are using **CountDownEvent**. When a player finishes the race it signal's the CountDownEvent by calling the Signal function/method on it. When it get's the signal, it's counter is decremented by 1. When first 3 players finishes the race, the counter would have been decremented thrice, so the counter would be 0 at this point. Since the Race is waiting on CountDownEvent, as soon as it's counter reaches 0, the race would end.

I hope you have understood how to use synchronization to solve these type of problems.

Happy Coding !!
Hosting a Website or online Resume on GitHub (Free!)
Tags: webdev, github, tutorial, beginners
Published: 2021-04-23 19:39:39

GitHub is not only a great place to store and share your code with others
but they also offer free web hosting of your HTML, CSS, and JavaScript projects!
want something like ![yusufadell.github.io](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0gm0uaczdkcnuevojmsk.png) https://yusufadell.github.io

**follow these 8 easy steps**
Firstly you should 
#### 1-Create a GitHub account on github.com.

after that you have 2 choices.
create a repository from the website then chose **setup on desktop**
 
or you can 

#### 2-download  desktop version: 
windows and mac >> [this website](https://desktop.github.com/)

for [ubuntu-linux](https://gist.github.com/yusufadell/807827670087c04f2cebe36a1b835b42)

#### 3-(On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.


4-Create a new repository in your GitHub application.
####Name it your-username.github.io
The name is very important.
Make sure the "Push to GitHub?" box is checked.

5-Move your website's files into the folder that GitHub just created when you made the repository.

###IMPORTANT:
Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.

6-Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called "commit summary", something like "initial commit." Then, click the commit button.

7-Click the "Publish repo" button in the top right corner.

8-Give it about 10 minutes, then check your-
username.github.io. Your website should be there!


##Interesting in Using a custom Domain name

consider reading [this post](https://www.dev.to/yusufadel)
Lists vs Tuples in Python. 
Tags: python
Published: 2021-04-23 19:23:33

Python has support for data structures which enables you to store and access data in your piece of code. 

There are several data structures in Python such as:
- List.
- Tuple.
- Set.
- Dictionary. 

In this article, we would be looking at the list and tuple. 

**What is a List?**

A list is a data structure that consists of an ordered sequence of mutable elements that can be modified.

**What is a Tuple?**

A tuple is a list of ordered and immutable properties.

Now that we know what they mean, what are the differences between these two data structures in Python?

#### 1. Definition.
Lists are defined by having values between square brackets [ ], while Tuples are defined by having values between parentheses ().

```
l1 = [1, "string", True]
print(l1)
>>> [1, "string", True]   # for a list 

t1 = (25, "Python", False)
print(t1)
>>> (25, "Python", False)   # for a tuple
```

#### 2. Mutability.
From the definitions above, we see that Lists are mutable data structures (can be modified) while Tuples are immutable data structures (cannot be modified). 

#### 3. Functions and Methods.
List and Tuples share some Python functions such as `len()`, `max()`, `min()`, `sum()`, `any()`, `all()`, `sorted()`. They  also share the `index()` and `count()` methods. This is because that they are data structures; they have a shared general function. But as two different data structures, they will have specific functions and methods to suit their use case. 

#### 4. Errors.
In Lists, unexpected changes and errors are more likely to occur. This is because it can be changed at anytime. But in Tuples, it is hard to take place as it is immutable.

#### 5. Memory.
Lists consume more memory than tuples. Because of this, Tuples are faster.


#### 6. Available Operations.
 From the first example, if the List and Tuple are passed to the function dir() i.e dir (l1) and dir (t1), all inbuilt functions associated with List and Tuple can be obtained. The results would show and it can be deduced that Lists have more functions or operations than Tuples.

Now that we know the differences between Tuples and Lists in Python, it shouldn’t be a very tough choice between the two. The major difference is that a List is mutable, but a Tuple isn’t. So, we use a List when we want to contain similar items, but use a Tuple when we know what information goes into it.
Dev-blog 23/04/2021
Published: 2021-04-23 19:15:07

##En cette soirée du 23 avril 2021, voici tout ce qui a été fait durant la journée ! 




  ·Équilibrage des différents métiers comme, Mineur·euse de Bitcoin, Pharmacien·enne, Producteur·rice de bière, etc...

  ·Ajout d'une radio achetable dans les entités. Parfait pour écouter vos musiques préférés directement en jeu !

  ·Suppression de certaines entités dans le menu F4, comme la boîte de graines, etc... En effet, ils ont été rajoutés, **au Blackmarket !**

  ·Ajout du téléphone portable, avec une multitude de fonctions comme : Blackmarket, achetez des objets illégaux, mais soyez rapide, la police pourrait vous remarquer ! ; Magasin de fonds, sonneries et notifications, achetez des fonds d'écrans amusants et autres pour égayer votre journée ! ; Tueur à gage, vous avez besoin d'éliminer quelqu'un ? Essayez peut être de faire un contrat, qui sait, peut-être qu'un malhonnête citoyen l'acceptera...


C'est un dev-blog léger mais c'est toujours sympathique, la prochaine mise à jour devrait déjà être plus importante.

**🏚 Bon jeu sur Le Grenier !**
TifiPay Looking for Head of Technology/Engineering
Published: 2021-04-23 19:08:08

Our team is seeking a Head of Tech to join our company (in stealth mode). We’re building an app in the Bill Pay space & as we develop the app & transition it to our team, we are seeking a technical co-founder to take ownership of the technology, architecture, design & build. The head of tech will make decisions on the technology stack & also share coding responsibilities with the engineering team.
Node JS POST Request including certificates and proxy configuration
Tags: node, javascript, certificates, proxy
Published: 2021-04-23 18:58:36

i have a special issue that i cannot fix. My setup is as follows:
i want to make a POST request from behind a proxy using also certificates. I tried to use node-fetch or axios for this but axios has a defect when using a POST request and proxys and in node-fetch you only can use a proxy or the certificate as an agent, not both. Now i tried to use the node build in https module and wrote the following code (data is dummy):

```
const body = {}

const data = JSON.stringify(body)

const options = {
    host: proxy.host,
    port: proxy.port,
    path: 'https://server:port/path',
    method: 'POST',
    headers: {
        'Proxy-Authorization': auth,
        'Accept': 'application/json',
        'content-type': 'application/json',
        'requestid': 'ec69aa5d-52d8-4849-8b95-6e360f472860',
        'testid': '9b8183ed-967c-4701-bfa4-dd8c0ec6bab1',
    },
    key: fs.readFileSync('certificates/client.key.pem'),
    cert: fs.readFileSync('certificates/client.cert.pem'),
    agent: false
}

const req = https.request(options, (res) => {
    console.log('statusCode:', res.statusCode);
    console.log('headers:', res.headers);

    res.on('data', (d) => {
        process.stdout.write(d);
    });
});

req.write(data, () => {
    console.log(req)
});
req.on('error', (e) => {
    console.error(e);
});

req.end();
```

but this also does not work. It seams to me that the certificates are used for the proxy not for the actual URL in this case as i get the following error:

``` 
Error: write EPROTO 4348:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16) {
  errno: 'EPROTO',
  code: 'EPROTO',
  syscall: 'write'
}
``` 

triggering the request with CURL works with no problems. 

can you assist here somehow? Perhaps suggest another library that i can use for making this complex request?

thanks,
Flaviu
Calling SAP RFC modules from Python - what you need to remember
Tags: python, 5days5blogposts, sap, abap
Published: 2021-04-23 18:49:42

One of the most popular ways to obtain data from SAP system is OData. To set it up, you need at least basic knowledge about ABAP and SAP. There is another way too using mainly Python. 

Here you need to know what is ``function module``. For this example I'll make it very simple. Treat it like a simple function with input and output. That's it 😉.

### What we need 

* [SAP NetWeawer RFC SDK](https://support.sap.com/en/product/connectors/nwrfcsdk.html)
* [PyRFC](https://github.com/SAP/PyRFC)
* Some SAP system 🤷‍♀️

Follow [this](http://sap.github.io/PyRFC/install.html) installation steps. I found them very useful. I warn you, it is not easy with Windows 😉. 

### SAP Client 

First thing is to make connection with system. Remember to check if your IP is authorized to connect with it. 

```python
from pyrfc import Connection

con = Connection(
    user=config["user"],
    passwd=config["password"],
    mshost=config["mshost"],
    msserv=config["msserv"],
    sysid=config["sysid"],
    group=config["group"],
    saprouter=config["saprouter"],
    client=config["client"],
)
```

I like to pass all configuration as a dictionary and keep it in env variables or another file. 

### GET DATA

The whole idea is to trigger the FM (function module) as I mention. In SAP standard lib there is FM called ``RFC_READ_TABLE``. We can use it to make a select statement to database. 

Use method ``call`` of our ``Connection`` class instance. The first parameter is the FM name. In this case it is ``RFC_READ_TABLE``. Next parameters are the same as in interface in FM. You can check it in ``se37`` T-code in SAP. 

```python 
response = con.call(
    fm_name,
    QUERY_TABLE=table_name,
    DELIMITER=delimiter,
    FIELDS=fields,
    OPTIONS=options,
    ROWCOUNT=rowcount,
    ROWSKIPS=rowskips,
)
```

Display the obtained data and play with string splitting a bit 😅. 

### Nice to remember

* All rows from table are single strings. Use delimiter that fits in your code and split them.
* To know the exact type of fields you can use FM ``DDIF_FIELDINFO_GET``.
* ``RFC_READ_TABLE`` has a problem with wide tables. Using ``DDIF_FIELDINFO_GET``, you can check how many fields such table has, which are the keys and download them in chunks. 
* It is always a good idea to limit fields in select statement. Not only in ``RFC_READ_TABLE``. Use parameter FIELDS to pass a list with fields names which you want to obtain. 

You can use PyRFC to trigger your custom FM too. For example, you can make some python script which will invoke some workflows in SAP etc.  

Do you use PyRFC? If you had some other adventures calling FM from Python, write them down in a comment😉
Move over Bloomberg Terminal, here comes Gamestonk Terminal
Tags: python, programming, terminal, stocks
Published: 2021-04-23 18:24:43

https://github.com/DidierRLopes/GamestonkTerminal

Hey all,

2 months ago I made a terminal that I had been working on my spare time, to help me on my stock research, open-source. See https://dro-lopes.medium.com/gamestonk-terminal-the-next-best-thing-after-bloomberg-terminal-a263c001a61f

The motto: 

Gamestonk Terminal provides a modern Python-based integrated environment for investment research, that allows the average joe retail trader to leverage state-of-the-art Data Science and Machine Learning technologies. As a modern Python-based environment, Gamestonk Terminal opens access to numerous Python data libraries in Data Science (Pandas, Numpy, Scipy, Jupyter), Machine Learning (Pytorch, Tensorflow, Sklearn, Flair), and Data Acquisition (Beautiful Soup, and numerous third-party APIs).

As of today, and thanks to all your help and the traction created around it, the terminal is looking better than ever. Now it's no longer only me taking care of the repo, but also 2 other experienced devs, who are adding features on a daily basis and increasing the robustness of the codebase. Feel free to wander through the FEATURES page to see what you would get out of this tool! 

If some of you thought it was amazing 2 months ago, you won't believe what it looks like now. You can check out the ROADMAP for all the features that have been added since, but let me list some of them:

- New Screener for stocks, which allows users to save their presets and share them
- New Options menu
- New Comparison Analysis to compare several tickers in their historical price, sentiment, or fundamental analysis
- New Portfolio Optimisation that assigns stocks weights based on risk level specified by the user
- New Exploratory Data Analysis menu that looks at historical data from a statistic point of view
- New Residual Analysis after using a statistical model for prediction
- New menu to provide access to your portfolio (supports Robinhood, Ally invest, Alpaca, and Degiro)
- New Cryptocurrency, Forex, and FRED menus
- Prediction with backtesting
- Technical analysis that includes a score and a summary
- Due Diligence menu with data from Dark Pools, and also Failure to Deliver
- Sentiment analysis from news provided from collaboration with a company that provides this feature paid. Free for us!

As always feedback is appreciated, and contributions even more so! 

Let’s try to reduce the gap between the amount of information that the Hedge Funds have access to in comparison with the usual retail trader. 

Bloomberg Terminal, we’re coming for you.

 Feel free to join our discord at https://discord.gg/Up2QGbMKHY.
Perfection !!!
Published: 2021-04-23 18:20:23

Developers are by nature very detail-oriented individuals. It's a required trait since the apps we create must meet the requirements imposed on us by both users and the technologies we use.

But, the downside occurs when your attention to detail turns into perfectionism. Our definition of perfectionism is devoting attention and attention to details associated with a task, before they are needed.

This is where an Agile Methodology can be your best friend.

The Agile Manifesto values "Responding to change over following a plan" and one of the 12 Agile Principles is:

    Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.

Timing is critical since it's important to do the right thing at the right time. Some practical tips include:

    Create simple app components based on what you currently know and add to them as new details surface in later sprints.

    Don't let what you've already created lead to resistance to change. Your code is the means to a goal, not the goal itself.

    Design and write your code assuming that it will need to be modified and enhanced.

    Treat your backlog as a "living" document. Continuously groom it in each sprint as new details are found.

    Don't hide your status from the team. Information should be freely and openly shared (including problems!) since all teammates are equally responsible for reaching the MVP.

Keep in mind that being an Agile Developer means you embrace the concept of incremental development. Start simple and add complexity as needed!

Alt Text
Before you Go!

    Chingu helps you to get out of “Tutorial Purgatory” by transforming what you’ve learned into experience. The experience to boost your Developer career and help you get jobs.

https://fansply.com
https://tajmiel.com
https://famfex.com
Nice illustrations for websites
Tags: html, css, illustration, design
Published: 2021-04-23 18:10:45

Here are my 3 suggestions to find nice illustrations for your website!

unDraw
https://undraw.co/illustrations
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhqad8rvkrsvw9x9nk82.png)

lukaszadam
https://lukaszadam.com/illustrations
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlbv3k39vc1rcaptcpl7.png)

icons8
https://icons8.com/illustrations
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2on0nup5zstlxhqshm2y.png)

In case you have more useful websites for illustrations to propose, I am open to suggestions. It's always good to learn new things!
Laravel Event Broadcasting Using Socket.io with Redis
Tags: laravel
Published: 2021-04-23 18:06:45

Today, out leading topic is event broadcasting with redis and socket.io in laravel application. i want to give you very simple example of laravel broadcast using rest and socket io in laravel application. you can send real time chat message using rest socket io and event broadcasting with laravel 6, laravel 7 and laravel 8 application.

Laravel provide event broadcasting topic. event broadcast is a very interesting and it's also difficult to implement with redis and socket.io as specially. but i will give you step by step instruction of how to send real time message with rest and socket io in laravel 6 application.

You need to just follow few step to done this following thing. so let's follow bellow steps and done as real time notification with laravel.

[Laravel Event Broadcasting Using Socket.io with Redis](https://www.codecheef.org/article/laravel-event-broadcasting-using-socketio-with-redis)
Dynamic CRUD Example with Repository Design Pattern in Laravel

Tags: laravel
Published: 2021-04-23 18:05:01

Hi, Guys i always try to find something new article for laravel developer so that can be help for his development. So Today i will share with you amazing tutorial of laravel sortable table example, you can can sort your table field with pagination. We will do it column sorting using kyslik/column-sortable composer package in laravel 6, laravel 7 and laravel 8 app.

As we much know, sorting is important to find quick and perfect data. If you want to get ascending date or descending date of creation users then you have to simple sort data and then get. So same way if you want for name, price, id etc. So here i will explain how to do it using kyslik/column-sortable package.

kyslik/column-sortable package provide simple sorting function and they use font Awesome icons for default, you can also customize it. They provide sortable() helper for query builder.

I will give you very simple example from scratch, so you can easily understand and customize as you want. you can also use in your laravel different version, So here i am going to share from scratch.

After end of the tutorial you will get layout like as bellow and easily sorting with each field. So let's just follow.

[Dynamic CRUD Example with Repository Design Pattern in Laravel](https://www.codecheef.org/article/dynamic-crud-example-with-repository-design-pattern-in-laravel)
[Laravel 8.x Table Column Sorting Example with Pagination](https://www.codecheef.org/article/laravel-8-table-column-sorting-example-with-pagination)
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-04-23 17:53:21

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there!


**Looking back on your week — what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Going on a beautiful walk ... or whatever else might spark joy ❤️ 

---

Happy Weekend!

![Excited astronaut](https://media.giphy.com/media/KEG5UtvXUD7WPIhhuy/giphy.gif)