teleren/devto huggingface dataset:
VS Code extensions for Python
Tags: vscode, extension, python
Published: 2020-02-09 13:33:12

Won't waste your time and will just jump to the list of Visual Studio Code Extensions that I would recommend if you are a :snake: Python developer.

## 1.<a name="python-extension"></a> [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
This will be the first and most important extension that I would recommend. It is all in one power packed extension for Python. It includes rich features like IntelliSense, Linting, Code formatting, Debugging, Testing, Jupyter Notebooks, Environments, and Refactoring.

![Python extension GIF](https://raw.githubusercontent.com/microsoft/vscode-python/master/images/ConfigureDebugger.gif)

## 2. [autoDocstring](https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring)
We all know how important it is to comment and document your code. This extension will: 
- Quickly generates a docstring snippet that can be tabbed through.
- Choose between several different types of docstring formats.
- Infers parameter types through pep484 type hints, default values, and var names.
- Support for args, kwargs, decorators, errors, and parameter types.

![auto-docstring extension GIF](https://raw.githubusercontent.com/NilsJPWerner/autoDocstring/master/images/demo.gif)

## 3. [Python Test Explorer](https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter)
Yes, I know the [Python](#python-extension) extension already does this so why install another one? Well, this includes features like:
- Showing a Test Explorer in the Test view in VS Code's sidebar with all detected tests and suites and their state.
- Showing a failed test's log when the test is selected in the explorer.
- Supporting multi-root workspaces.
- Supporting Unittest and Pytest test frameworks.

![Python Test Explorer extension image](https://raw.githubusercontent.com/kondratyev-nv/vscode-python-test-adapter/master/img/screenshot.png)

## 4. [AREPL](https://marketplace.visualstudio.com/items?itemName=almenon.arepl)
This extension is a real-time Python scratchpad. It may not sound like a great deal at first but believe me, if you’re doing any sort of exploratory work then this thing can come handy.

![AREPL extension GIF](https://raw.githubusercontent.com/Almenon/AREPL-vscode/master/areplDemoGif2.gif)

I know there are many more extensions available in the [Market Place](https://marketplace.visualstudio.com/). Please let me know your favorite Python extensions for VS Code in the comments.

Thanks for giving your precious time and reading this.
How do you manage multi-project documentation?
Tags: discuss, documentation
Published: 2020-02-09 12:07:50

At work we have lots and lots of software projects and we believe having good documentation makes us more efficient and the code more maintainable.

The problem is how to manage this documentation. We used to have a central wiki system where we would document projects but because it was disconnected from the code, the docs got outdated.

We run our own Gitlab instance so we decided to move documentation into the Gitlab projects where we'd write quick intros and *get-the-project-running* docs in a README file and more detailed docs in the project wiki. That allowed the docs to be closer to the code and at least the READMEs checked via merge requests.

But non-code docs (processes etc.) are then more difficult to manage. We have some documentation repos to get around it, and a central doc repo with links to all the other repos and their docs.

How do you manage documentation for multiple projects?

---

*Photo by [Viktor Talashuk](https://unsplash.com/@viktortalashuk) on [Unsplash](https://unsplash.com/)*
(Rust-lang) Creating a simple TODO service with Actix [Video] - Part 2
Tags: rust, webdev, tutorial, microservices
Published: 2020-02-09 13:25:41

[![Creating a simple TODO service with Actix - Part 2](https://img.youtube.com/vi/e37NbhSm56o/0.jpg)](https://youtu.be/e37NbhSm56o)

Watch [Part 1](https://youtu.be/gQwA0g0NNSI)
pls i nead help  
Tags: help, beginners
Published: 2020-02-09 13:19:51

hi i have a error intro my bot discord

c:\Users\imady\OneDrive\Desktop\bot-final.edition\index.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17) at Function.Module._load (internal/modules/cjs/loader.js:686:27) at Module.require (internal/modules/cjs/loader.js:848:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (c:\Users\imady\OneDrive\Desktop\bot-final.edition\index.js:1:28) at Module._compile (internal/modules/cjs/loader.js:952:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10) at Module.load (internal/modules/cjs/loader.js:811:32) at Function.Module._load (internal/modules/cjs/loader.js:723:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
end i have a error whit NPM code
extract: WARN tar ENOENT: no such file or directory, open 'C:\Users\imady\OneDrive\Desktop\bot-final.edition\node_modules.staging\@babel\types-
What is a compile time constant in Java? What is the risk of using it?
Tags: java, discuss, tutorial
Published: 2020-02-09 12:28:21

***Compile time constant and Risk***

public static final variables are also known as a compile-time constant, the public is optional there. They are replaced with actual values at compile time because compiler know their value up-front and also knows that it cannot be changed during run-time. 

***Risk associate with Compile time constant***

One of the problems with this is that if you happened to use a public static final variable from some in-house or third party
library and their value changed later than your client will still be using old value even after you deploy a new version of JARs. To avoid that, make sure you compile your program when you upgrade dependency JAR files.
EP26: Digital Literacy, Critical Thinking & Connecting Classrooms Project
Published: 2020-04-03 08:06:14

---
title: EP26: Digital Literacy, Critical Thinking & Connecting Classrooms Project
published: true
date: 2020-02-09 10:57:51 UTC
tags: 
canonical_url: https://anchor.fm/code-cast-zm/episodes/EP26-Digital-Literacy--Critical-Thinking--Connecting-Classrooms-Project-ean67g
---

On this episode, hosts Cynthia and Mukuma speak to Buumba Siamalube, Project Office at the British Council in Lusaka Zamia.

We talk about the Connecting Classrooms Project and its impact on public schools all across Zambia. We also delve into Critical Thinking and how valuable this is in learning and appreciating everything around us.

Cynthia also shares her favorite tools that make up part of her workflow.

**Links and Info:**

- British Council: [Twitter](https://twitter.com/zmBritish) [  
](https://anchor.fm/sithe-ncube/episodes/Episode-7-A-New-Year-with-CodeCast-ZM--Also-community-management-is-hard-ea0vft)
- Mukuma Musenge: [Twitter](https://twitter.com/sour_bones) | [Website  
](https://mukuma.me/)
- Cynthia Mulenga: [Twitter](https://twitter.com/PythonKhaleesi)[  
](https://twitter.com/Jor_Eli360)
- Buumba Siamalube: [Twitter](https://twitter.com/Admuud_)[  
](https://www.cybersource.com/)

Leave us a review on[<u><strong>iTunes</strong></u>](https://podcasts.apple.com/us/podcast/codecast-zambia/id1442693166?mt=2) to let us know what you think about the show.

--- Send in a voice message: https://anchor.fm/code-cast-zm/message
Creating an open source software to collect user feedback
Tags: opensource, showdev, github, discuss
Published: 2020-02-09 10:03:21


# Why?


There're many paid products providing the similar service but it comes at greater cost as they set their pricing based on the number of user they're tracking _(a tracked user is anyone who posts, votes, or comments)_ and mostly their base price starts at **$50 to $60 per month with limited number of users to track**.

That's why...

# 🔼 LogChimp to rescue 

I created an open source software for site admins to self-deploy the application and allow them to collect feedback from their users.

![Showing list of latests posts on LogChimp homepage](https://dev-to-uploads.s3.amazonaws.com/i/fk8k3gdmbhdon4h8gwwn.png)
*Showing list of latests posts on LogChimp homepage*

The source code of the application is open source on GitHub and contributions / feedback / suggestions are really appreciated.

{% github logchimp/logchimp %}

# 🚕Test drive

The process of deploy the application is bit troublesome and I even need to write the documentation for the same.

You're most welcome to self-deploy the application and give it a test drive, please note, I have tried my best to not release any bugs in the initial release but if you find any, please do report back to us in our [Discord server](https://discord.gg/A7mztcC).

# 🚧 Development roadmap

* 1 Feb, 2020 - Started working on the project
* 8 Feb, 2020 - [Release `v0.0.1` MVP](https://github.com/logchimp/logchimp/releases/tag/v0.0.1)

I further working on [adding upvotes](https://github.com/logchimp/logchimp/pull/25) to the post and [roles based system](https://github.com/logchimp/logchimp/pull/3).

# 💻 Contributions

Every one is welcome to contribute to the project after all it's an open source project.

If you have any questions regarding How to contribute or setting up the development environment? You can shoot me a message on [LogChimp discord server](https://discord.gg/A7mztcC).

✌️
JavaScript OR Assignment Operator
Tags: javascript, beginners, tutorial
Published: 2020-02-09 08:58:42

In JavaScript, there may be times when you want to assign one variable to a non-null value. The JavaScript OR assignment operator can be used to quickly assign the value of a variable to one of two options based on one value and if it is null or undefined.

The below code shows a function called 'getNotNull' which takes two parameters 'a' and 'b'. If the value of 'a' is defined and isn't null, it is returned, otherwise, the variable 'b' is returned. This doesn't prevent a null value being returned though, as if both 'a' and 'b' are null then the value of 'b' will be returned and therefore a null value will be returned.

```javascript
function getNotNull(a, b){
  if(a){
    return a
  }else{
    return b;
  }
}
```

A ternary operator can also be used to the same effect. In the below code a ternary operator is used to set the value of the variable 'result' to either the value of 'a' if it defined and not null otherwise it will be set to the value 'b'. Again, this does not prevent a null value if both variables are null or undefined.

```javascript
var result = a ? a : b;
```

The JavaScript OR assignment operator is represented with two pipe '|' symbols. This can be used to achieve the same effect as the above two code snippets. The value of the 'result' variable will be assigned to the value of 'a' if it is defined or not null otherwise it will be assigned to the value of 'b'.

```javascript
var result = a || b;
```

The OR assignment operator does not need to be used with variables, it can be used with raw values too. The below code snippet shows using the OR operator to set the value of the 'result' variable uses raw values, 'null' or the number '2'. The value of the 'result' variable will be 2 as the left side of the OR assignment operator is null.

```javascript
var result = null || 2;
```

The OR assignment operator can be used to assign the value of one variable to either one or another value based on if the first value is null or undefined. Using the OR assignment operator does not prevent the variable from being assigned a null or undefined value, if both sides of the OR assignment operator are null then the resulting value will also be null.

This post was originally published on https://acroynon.com
Angular 9 New Features (Finally IVY is here)
Tags: javascript, angular, beginners, angular9
Published: 2020-02-09 08:23:44

---
title: Angular 9 New Features (Finally IVY is here)
published: true
description: Angular 9 New features
cover_image: https://i.ibb.co/K7Vry8x/0-7d-Sx-EASi-Mazb-Mt7-N.png 
tags: javascript, angular,beginners, angular 9
series: Angular Journey
---

Hey there,

The 9.0.0 release of Angular is here! This is a major release that spans the entire platform, including the <code>framework, Angular Material, and the CLI</code>. This release switches applications to the Ivy compiler and runtime by default, and introduces improved ways of testing components.

<h1> How to update to version 9</h1>
Visit <a href="update.angular.io">update.angular.io</a> for detailed information and guidance. To have the best update experience,   first update to the final release of Angular 8.

First, update to the latest version of 8
```cmd
ng update @angular/cli@8 @angular/core@8
```
Then, update to 9
```cmd
ng update @angular/cli @angular/core
```

In order to update your global angular,
``` cmd
npm i -g @angular/cli
```



<h1>Ivy</h1>
Version 9 moves all applications to use the Ivy compiler and runtime by default. In addition to hundreds of bug fixes, the Ivy compiler and runtime offers numerous advantages:
<ul>
<li>Smaller bundle sizes</li>
<li>Faster testing</li>
<li>Better debugging</li>
<li>Improved CSS class and style binding</li>
<li>Improved type checking</li>
<li>Improved build errors</li>
<li>Improved build times, enabling AOT on by default</li>
<li>Improved Internationalization</li>
</ul>
Here’s a breakdown of some of the more notable improvements.

<h2>Smaller bundle sizes</h2>
The Ivy compiler has been designed to remove parts of Angular that aren’t being used via <a href="https://webpack.js.org/guides/tree-shaking/">tree-shaking</a> and to generate less code for each Angular component.
With these improvements, small apps and large apps can see the most dramatic size savings.

![alt text](https://i.ibb.co/K7Vry8x/0-7d-Sx-EASi-Mazb-Mt7-N.png)

<h2>Faster testing</h2>
Previously, TestBed would recompile all components between the running of each test, regardless of whether there were any changes made to components (for example, through overrides).
In Ivy, TestBed doesn’t recompile components between tests unless a component has been manually overridden, which allows it to avoid recompilation between the grand majority of tests.

<h2>Better debugging</h2> 
Ivy provides you with more tools to debug your applications. When running an application in Dev Mode with the Ivy runtime, angular now offer the new ng object for debugging.

<h2>Improved CSS class and style binding</h2>

The Ivy compiler and runtime provides improvements for handling styles. Previously, if an application contained competing definitions for a style, those styles would destructively replace each other. With Ivy, the styles are merged in a predictable way.

For more lets hear it from the creators
 
Credits : <a href="https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived-23c97b63cfa3">Official Announcement 😄</a>
Writeup: HackTheBox Legacy - with Metasploit
Tags: pentest, hacking
Published: 2020-02-09 20:40:39

This series will follow my exercises in [HackTheBox][]. All published writeups are for retired HTB machines. Whether or not I use Metasploit to pwn the server will be indicated in the title.

# Legacy

_<small>Machine IP: 10.10.10.4</small>_

As always, I start enumeration with [AutoRecon][]. I see that the server is running SMB and the OS is likely Windows XP.

![autorecon results][]

![nmap results][]

![nmap script results][]

Let's see what options I have in Metasploit. I'll use the [MS08_67][] exploit.

![msf search][]

I configure the exploit options to target `10.10.10.4`.

![msf exploit][]

And there I have it. A root shell.

![root shell][]

From here I can read the user and root's flags with ease (ignoring some Windows directory traversal mistakes).

![user flag][]

![root flag][]

[autorecon]: https://github.com/Tib3rius/AutoRecon
[hackthebox]: https://www.hackthebox.eu
[ms08_67]: https://docs.microsoft.com/en-us/security-updates/securitybulletins/2008/ms08-067

[autorecon results]: https://blog.artis3nal.com/img/htb/legacy/autorecon.png
[msf exploit]: https://blog.artis3nal.com/img/htb/legacy/msf-exploit-options.png
[msf search]: https://blog.artis3nal.com/img/htb/legacy/msf-search-smb.png
[nmap results]: https://blog.artis3nal.com/img/htb/legacy/full-nmap-results.png
[nmap script results]: https://blog.artis3nal.com/img/htb/legacy/full-nmap-script-results.png
[user flag]: https://blog.artis3nal.com/img/htb/legacy/user-flag.png
[root flag]: https://blog.artis3nal.com/img/htb/legacy/root-flag.png
[root shell]: https://blog.artis3nal.com/img/htb/legacy/root-shell.png
Fill up your portfolio with meaningful projects in 2020, Use these APIs
Tags: opensource, codenewbie, javascript, projects
Published: 2020-02-09 07:41:25

[This post was first published on my official blog](https://justaashir.com/blog/free-apis-for-projects/) 

Hi,  You should be filling up your portfolio with new shiny projects, then just landing pages of dummy websites. 
People want to see a real-world app with all the data, they want to feel it and they don't just want lorem ipsum.
So It's time for you to use an Open API to create a real-world project. You can create a project with these APIs using Vanilla JS, JQuery, VueJS, React or even Angular. 
You just need to fetch the data from the APIs and then use it, you can pass different parameters to give the users dynamic search functionality or filter and sorting.

Let's Start

### [TMDB](https://www.themoviedb.org/)

It's a very great API to start, who don't like Movies? There are lots of possibilities, You can create your own IMDB like database website, or better trailer and movie recommendation website with Modern UI. Recruiters really like a project like this, but try to be a little unique cause otherwise, it'll look like a copy-paste of just API calls.

### [Open Weather](https://openweathermap.org/api)

[](https://openweathermap.org/api)Weather App is just the simplest example to show, just use this API and pick up a clean UI from dribble or Pinterest and try to make an app, It would be really great if you make a PWA, It will stand out as it'll show the cached data and can be installed on any phone.

### [Unsplash API](https://unsplash.com/developers)

[](https://unsplash.com/developers)I guess you've used their website to get backgrounds or stock photos. It's a huge collection of royalty-free photos. You can also use their API, to get backgrounds and pictures by categories, sizes, search parameters, and random. You can create a chrome extension for a new tab to show a random picture every 1 hour with a clock and Pomodoro.

### [PokéAPI](https://pokeapi.co/)

It's a really well-cooked API if you're trying to learn something and it's really fun, you can create a card game or a Wikipedia of Pokemons. If you love Pokemon then this is the best API for you to get your hands dirty.

### [Rest Countries API](https://restcountries.eu/)

[](https://restcountries.eu/)It's the only API you'll ever need if you're looking for information about countries. It'll give you all the information like Currency, Postal Codes, Calling Codes, Capital, Cities, Population.  You can create a beautiful analytical page for every country using charts and data.

[This post was first published on my official blog](https://justaashir.com/blog/free-apis-for-projects/) 


Follow me on Twitter: [twitter.com/justaashir](twitter.com/justaashir)
Progress!
Tags: angular, github, devops, javascript
Published: 2020-02-09 06:48:01

This week I worked on the personal website a bit more.  I didn't get the automated build/deploy completed, but that's fine.  I ran into issues with forwarding my DNS to my personal server, and enabling SSL.  I set up the SSL security the certificates successfully, but for some reason, when enabling nginx, I disabled the ability to see the website at all due to some sort of port requirement, but I was unable to get 8181 to work.

So... plan 2.  I decided to use my github.io website as the landing pad.  I followed the instructions here: http://www.curtismlarson.com/blog/2015/04/12/github-pages-google-domains/ 
I ran into a speedbump with the redirect however.  Apparently my original redirect to my personal website was stuck in the Google settings and it took almost 48 hours to get the site to finally redirect to Github this morning.

Tonight I worked on converting my angular-cli generated project away from the starter pages and to start getting my own personal code in there.  I have local versions started, but nothing yet on my github page.  

My goal for the next week is to setup something basic I can throw up on the github.io so it shows something more than a single line "welcome to my website" that is currently up there now.

I'd also like to get an azure pipe ready so that when I merge master, that it will compile and push my finalized code to the github.io location.
Say Hello to Kotlin Sequence
Published: 2020-02-09 06:23:23

In some case, sequence operation is faster than collection operation.

```kotlin
val list1 = (1..10_000_000)
    .filter { it % 2 == 0 }
    .map { it * 10 }
    .map { it.toString() }
    .size // 5,000,000
// took 1,263 milliseconds in my environment
```

```kotlin
val list2 = (1..10_000_000)
    .asSequence()
    .filter { it % 2 == 0 }
    .map { it * 10 }
    .map { it.toString() }
    .toList()
    .size // 5,000,000
// took 1,015 milliseconds in my environment
```

In this case, you can create Sequence directly like this:

```kotlin
val list3 = generateSequence(1) { it + 1 }
    .take(10_000_000)
    .filter { it % 2 == 0 }
    .map { it * 10 }
    .map { it.toString() }
    .toList()
    .size // 5,000,000
// took 861 milliseconds in my environment
```

Sequence executes lazily and does not create intermediate products.

Sequence need some overhead, so be care it is not always faster than Collection.
Switching to Haskell 
Tags: productivity, haskell
Published: 2020-02-09 05:53:12


Haskell is a great programming language that can be used in any domain. Ideally, it is best suited for business and logic relating to data analysis. It's known to be a functional programming language. 

Many programmers who use Haskell know that it is relatively faster than other programming languages. Languages like Java, C++, C, Python, PHP, and Ruby contain low-level commands compared to Haskell. These languages are more prone to have highly mutable variables. In addition, messed up code will lead to bugs and syntax errors. 

Of course, Java, Python, and other languages are useful, however, using Haskell often does not lead to many errors and it's more efficient.  

A program written in Java:                  

final int LIMIT=100; 
int[]a = new int[LIMIT];
int[]b = new int[LIMIT - 10]; 
for (int i=0; i < LIMIT;i++) {
  a[i] = (i+1)*2; 
  if (i>=5) b[i-5]=a[i]; 
}

 A program written in Haskell: 
 
 let a = [1,3..100]
 let b = drop 2

Haskell isn't as popular compared to Java and Python because it is a hard language to learn. However, it helps one create better quality software that doesn't require much debugging. 

If you want to write code more efficiently and faster then Haskell is the language for you!