teleren/devto huggingface dataset:
🎁 Introducing Ornamentum: lightweight, feature-rich, highly configurable, UI framework
Tags: webdev, angular, rxjs
Published: 2019-09-18 05:27:55

💡 Features

⚡️ Reactive stream data binding

📈 Multi-Column Sorting

💄 Theming and custom templating

💾 Row selection, state persistence and much more

Designed with a lot of flexibility in terms of configuring elements to the smallest detail level. It's a library designed by developers in the aim of building "A GREAT API"

UI framework (Bootstrap, Foundation, Material Design, etc.) agnostic hence it doesn't matter which UI framework you use. The fully configurable theme style sheets bundle provides several UI/UX flavors and extensive customization out of the box. Hide or report this

Mobile-friendly with all major device platforms. From Desktop to Tablet and Mobile devices, Ornamentum is fully responsive for any viewport resolution. Dynamic behavior of width calculation works hand in hand along with static column sizes to provide the best user experience.

Reactive programming ready with asynchronous data streams. Data binding is fully handled via RxJS observable streams which accepts reactive data sources and use them under the hood for paginating, grouping, filtering and sorting data

Link :- https://github.com/yohangz/ornamentum

website :- https://ornamentum.app/
How to add a progress bar to Python with tqdm
Tags: python, tutorial
Published: 2019-09-18 05:22:07

Original Post [How to add a progress bar to Python with tqdm](https://letslearnabout.net/python/how-to-add-a-progress-bar-to-python-with-tqdm/ "Permalink to How to add a progress bar to Python with tqdm")

# How to add a progress bar to Python with tqdm

![Progress Bar Python][1]

Learn how to add a cool progress bar to your Python process and iterations just in seconds!

How often are you doing Machine Learning iterations, long calculations or process that take a lot of time, with Python, and you have to wait for minutes? Right now, you don't know how much time is going to take to finish the task! You could be waiting for 30 seconds or 2 hours, without any indicator of how much is going to take.

That's it, until now. This is an example of what you are going to create:

![][2]

In this lesson, you are going how to use the TQDM Python library to give your iterators a cool, customizable, progress bar that calculates how much time it's going to take.

This Python library focuses on creating a visual aid for the user, in the form of a progress bar, Because of that, this lesson is going to be in video format only. Watch it here:

{%youtube XmoOV38DamA%}


* * *

[My Youtube tutorial videos][4]

[Reach to me on Twitter][5]

[Read more tutorials][6]

[1]: https://i2.wp.com/letslearnabout.net/wp-content/uploads/2019/09/image-17.png?fit=688%2C495&ssl=1
[2]: https://i2.wp.com/letslearnabout.net/wp-content/uploads/2019/09/aaaaaaaa.gif?w=688&ssl=1
[4]: https://www.youtube.com/channel/UC9OLm6YFRzr4yjlw4xNWYvg?sub_confirmation=1
[5]: https://twitter.com/DavidMM1707
[6]: https://letslearnabout.net/category/tutorial/
Formatting error messages in Go
Tags: go
Published: 2019-09-18 05:14:46

In go errors are values, and hence error management is an explicit process. There is no exception handling or bubbling them up, you get an error and you decide what do with it often leading to verbose scenarios as below
```go
value, err := someFunc()
if err != nil {
  log.Fatal(err)
}


```

While writing a tool recently, one of my use cases had a method invoking some system functions. This led me to a scenario to return back formatted error messages, and to do that I ended up with `fmt.Errorf()`[1]

It allows us to return formatted errors like below

```go
result, err := externalFunc()
if err != nil {
  return fmt.Errorf("Calling external function failed: %s", err)
}

```

`errors.New()` doesn't allow us to format text, but only pass a string. Otherwise we would have to use `Sprintf` or equivalent to create a formatted string and then pass to `errors.New()`. Although, guess what, that's what the method internally does. 


References:
[1] https://godoc.org/fmt#Errorf
Coverlet, unit tests coverage for .NET
Tags: coverlet, dotnet, unittests, coverage
Published: 2019-09-18 03:35:57

---
title: Coverlet, unit tests coverage for .NET
published: true
description: Coverlet, unit tests coverage for. NET
tags: coverlet, dotnet, unit tests, coverage
---

Measuring the coverage of unit tests is an important topic because we need to check the design of the tests and the scope in the code of them.

Coverlet is an amazing tool to measure the coverage of unit tests in .NET projects.

Coverlet is completely opensource and free. it supports .NET and .NET Core and you can add it as a NuGet Package.

{% github https://github.com/tonerdo/coverlet %}

First, we have to add the NuGet within an existing unit test project (MSTest, xUnit, etc..). Coverlet has many ways to use it but I recommend to use MSBuild.

```dotnet add package coverlet.msbuild```

after that, we can use easily the integration between MSBuild and coverlet to run the test and measure the coverage with the following command: 

```dotnet test /p:CollectCoverage=true```

you will get the following result:

![Alt text of image](https://mteheran.files.wordpress.com/2019/09/screen-shot-2019-09-09-at-9.57.20-pm.png?w=595)

In the first column from left to right we can see the list of modules covered. In the column 'Line', we get the percentage of lines checked after running the tests and it's the same for 'Branch'(statements) and 'Method'(functions inside the classes).

Coverlet generates a file coverage.json that contains the whole information displayed in the console. You can consume this file with your own application. 

Try it out!

{% github https://github.com/Mteheran/CoverletDemo %}
Do Good Daily Day 6
Tags: swift, swiftui, ios
Published: 2019-09-18 03:14:22

📅 09/17/2019
🔥 6 day streak
📱 Do Good Daily
💰 $0.99 price
🤑 0 sales
⌚️ 5.5 hours spent
💻 37 files changed 554 additions(+) 81 deletions(-)
✅ Today's goal: Finish up rough versions of intro views

## SwiftUI is better than web development

When it works it really works. Today the preview feature was working well and I managed to breeze through a few more static screens with simple buttons. It's insane that all it takes to make something very custom looking is ~70 lines of code per screen, if you can even call it code. It definitely makes me wonder what the heck we're doing out there in web development land. Anyway, I did learn a few SwiftUI tricks that I thought I'd share

## SwiftUI full screen background image

```swift
var body: some View {
        VStack {
        }
        .background(
            Image("bg")
            .resizable()
            .scaledToFill()
            .edgesIgnoringSafeArea(.all)
        )
}
```

That's all it takes. Either that or a `ZStack` and put the image as the first child.

## SwiftUI center an image

Or anything really. It's funny I was messing around with this problem for a while but I came up with something pretty decent, assuming you only have one thing to center

```swift
var body: some View {
        VStack {
             Spacer()

             Image("bg")

             Spacer()
        }

}
```

There's some more code with some other goodies but there's always tomorrow.
HTML Crash Course For Absolute Beginner
Tags: html, webdev, tutorial, beginners
Published: 2019-09-18 02:41:05

HTML Crash Course For Absolute Beginner - Become a HTML5 Pro. Learn HTML important tags. How to use HTML tags, and learn different HTML tags which does the same work.

In this course you are gonna to see 90% oh HTML tags which you see in day-life webpages. By this end of this course you feel like a pro in HMTL. Best part of this course is you learn HTML in the simplest way. I shortened 5 - 6 hours of learning HTML to within 2 hours. I need only one thing is concentrate on video and don,t forget to workout what you have learned in this course.

What you'll learn:

- Main Tags In HTML

{% youtube 9_U0wF5D_1E %}
Sweet & Sour mongoose.js methods – 2
Tags: javascript, mongodb, webdev
Published: 2019-09-18 02:30:19

![Mongoose.js](https://thepracticaldev.s3.amazonaws.com/i/8o7x9tx9meytb7prody3.png)


This is part of the 'Sweet & Sour mongoose.js methods' series. 
In this function we will write a method that acts upon the UserSchema to  check whether an email OR username already exists in the database. As an example use-case, this method can then be used in the any of your routes files by exporting the "User" to check whether an email address already exists in the database during the registration process.

Schema statics methods act directly upon the user. In this case the method is called "emailCheck". As you might know methods are functions that act upon an object and in this case the UserSchema. The function takes in an email address and callback as arguments. For any particular User The findOne method is used to match the email passed as an as argument to "emailCheck" with an email address in the database. So out here {email:email} is a query condition. The database will not be queried unless it is executed with "exec". 

<pre>

UserSchema.statics.emailCheck = function(email, callback) {
  User.findOne({ email: email }).exec(function(error, user) {
    if (error) {
      return callback(error);
    }
    // Pass user to callback and handle whether email exist in the callback.
    callback(null, user);
  });
};

</pre>
FizzBuzz in one planet-size JavaScript statement
Tags: javascript, fizzbuzz
Published: 2019-09-18 02:28:25

JavaScript has many tempting features and it is easy to get carried away. And so I have. Here is a FizzBuzz one-liner that uses a whole whack of ES5 and ES6 features: 
* Array.from()
* Array-like objects
* Array.assign()
* map
* forEach
* ternary operator
* truthy and falsy values
* IIFE
* and, of course, fat arrow functions

```
(n=>Array.from({length:n}, (_,i)=>i+1)
.map(e=>({text:e+' ', value: e}))
.map(e=> e.value%3? e: Object.assign(e, {text:e.text+'Fizz'}))
.map(e=> e.value%5? e: {value:e.value, text:e.text+'Buzz'})
.forEach(e=>console.log(e.text)))(100)
```

Compare this to a purely procedural C-like version:

```
for (var i = 1; i <= 100; i++) 
  console.log(i+' '+(i%15==0?"FizzBuzz":i%3==0?"Fizz":i%5==0?"Buzz":""));
```

It takes way less resources and probably runs ten times faster.

The lesson? Sometimes it's best to avoid the frills and stick to the basics.
Bounty: Build a decentralized forums and earn $3,200 USD
Published: 2019-09-18 00:48:56

Centralized industries hold control over their users and their data. Forums are constantly created, users spend hours helping build the community with useful content and then suddenly disappear or you get banned without any prior notice. At Arweave we want to break this barrier and help build the next web, the permaweb.

Create a fully decentralized approach to a Forum using Arweave’s blockchain technology to store and host the platform.

If you know Javascript/HTML/CSS you already know how to build an Arweave dApp!

To participate in the bounty and learn more click here: https://gitcoin.co/issue/ArweaveTeam/Bounties/13/3467
Any questions you may have about Arweave or our other bounties you can ask here or join our discord at https://discord.gg/AhsZfBm

I hope to see many of you participating!
Good luck!
Cedrik.
Git errors when using Hyper-V
Tags: microsoft, git
Published: 2019-10-07 14:47:23

---
title: Git errors when using Hyper-V
published: true
date: 2019-09-18 00:20:25 UTC
tags: Microsoft, Git
canonical_url: http://arturo.linar.es/en/blog/git-errors-when-using-hyper-v
---


**I started having some issues when using git inside a Linux VM** while setting up an [experimental Drupal development environment](https://arturo.linar.es/en/blog/drupal-development-windows). I wasn't able to clone repositories because I was getting some errors saying the remote host hanged unexpectedly, or couldn't push changes. However I was able to clone shallow repos, but strangely Bitbucket and Gitlab seemed to be more prone to these errors.

```
$ git clone git@....
Cloning into 'somedir'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
```

At some point, disabling offloading solved the issue: [Disabling Offloading on Ubuntu 18.04 with Netplan and/or systemd-networkd](https://michael.mulqueen.me.uk/2018/08/disable-offloading-netplan-ubuntu/)

It apparently worked, but soon I found that only worked when using Github. Of course, that didn't make any sense. When I tried to push changes to Bitbucket or Gitlab I had again the same strange errors saying the remote host hung up unexpectedly.

I tried to debug git using `GIT_SSH_COMMAND`, tried using https and even recompiled git to use OpenSSL instead of GnuTLS. Nothing seemed to work... Until I found an answer from [this guy who found the solution](https://stackoverflow.com/a/56946337/547972)): I needed to update my Wi-Fi drivers.

Strange error indeed.

**TLDR** : A bug between Hyper-V and my Wi-Fi card (_Intel 5060_) was causing this. Updating the drivers solved it:

[https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t](https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t)
JAMstack Roundup for September 16th 2019
Published: 2019-09-18 00:17:00

###Here are 5 great articles we're bringing to you this week!

1. [How to Build Authenticated Serverless JAMstack Apps with Gatsby and Netlify](https://www.freecodecamp.org/news/building-jamstack-apps/)

    When interacting with a backend, a JAMstack app can do everything ☑ a mobile app can do, without the tyranny 🎛 of the app store. This is a fundamental insight 🧠 that goes as deep as the fight for a more open, secure, decoupled, faster web.

2. [Markdown is Markup and Other Confusions Around JAMstack](https://dev.to/remotesynth/markdown-is-markup-and-other-confusions-around-jamstack-41pg)

    The M in JAMStack goes beyond 💫 just the Markdown, HTML, YAML and Liquid you may use. It includes the build process to put these together.

3. [The Beginner’s Guide to Static Site Generators](https://bejamas.io/blog/static-site-generators/)

    World 🌎 of static sites has grown beyond HTML, CSS and occasional JS and much of it is owed to static site generators.

4. [Why your next site should be built with JAM in mind](https://medium.com/jamstack/why-your-next-site-should-be-built-with-jam-in-mind-34b9234a272f)

    There’s no reason to have a massive, unwieldy CMS with a database or a fancy 💎 isomorphic monolith when you could have a fast 💨, secure and beautiful static site.

5. [Traditional vs Modern Web Development ⚔️](https://sunnysingh.io/blog/traditional-vs-modern-web-dev)

    Modern web development - we have a love ❤ and hate 💔 relationship with it because while it revolutionized web development practices, it also greatly complicated them.
Narrow down scope with `within` in Capybara Rails testing
Tags: rails
Published: 2019-09-18 00:10:52

---
title: Narrow down scope with `within` in Capybara Rails testing
tags: rails
---

## 🔗 Parent Note
{% link https://dev.to/n350071/my-capybara-note-2gp3 %}


## 🤔 By using find method
```ruby
expect(find('div.greet > h1').text).to eq 'Hello'
expect(find('div.greet > p.message').text).to eq "world"
```

## 👍 By using within method
```ruby
within('div.greet') do
  expect(find('h1').text).to eq 'Hello'
  expect(find('p.message').text).to eq "world"
end
```

📚 [Method: Capybara::Session#within — Documentation for jnicklas/capybara (master)](https://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FSession:within)
have_selector is good for waiting test in Capybara
Tags: capybara, rspec, rails
Published: 2019-09-18 00:06:23

---
title: have_selector is good for waiting test in Capybara
tags: capybara, rspec, rails
---

## 🔗 Parent Note
{% link https://dev.to/n350071/my-capybara-note-2gp3 %}


## 🤔 Situation
Let's suppose that you have a panel and test it's changed from open to closed.

## 😅 Bad code

```ruby
expect(find('div.target > div.message', visible: false).visible?).to eq true
find('div.target').click # the panel will be closed.
expect(find('div.target > div.message', visible: false).visible?).to eq false

# Error because Capybara is too fast 😭
# ---
# Failure/Error
#   expected: false
#        got: true
```

## 👍Good code
Let's use [Capybara::RSpecMatchers#have_selector](https://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FRSpecMatchers:have_selector).  
Then, Capybara waits the animation until the test is green.

```ruby
expect(find('div.target').to have_selector('div.message')
find('div.target').click
expect(find('div.target').not_to have_selector('div.message')
```
My dev content feed is only 10% relevant. How do you hack it to 90%?
Tags: discuss, content, feed, reading
Published: 2019-09-17 23:44:14

---
title: My dev content feed is only 10% relevant. How do you hack it to 90%?
published: true
description: Content feeds are rarely relevant. How do you hack a feed of dev content that matches your interests?
tags: discuss, content, feed, reading
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6po1o5sw9szwkhuq0j9k.jpg
---

Software dev is certainly life-long learning journey. My Dev.to feed is usually only 10% relevant to my learning interests.

Same with Medium, HackerNoon, you name it... No one seem to have hit the jackpot in building a personalizable, relevant dev content feed.

How do you consume content? Especially, how do you hack into getting a relevant feed that matches your learning interests?

_Cover image photo by [Julius Drost](https://unsplash.com/@juliusdrost?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/newspaper?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_
Where Do You See Yourself in Five Years
Tags: discuss, career, life
Published: 2019-09-17 23:24:31

---
title: Where Do You See Yourself in Five Years
published: true
description: where do you see yourself in 5 years from now
tags: #discuss #career #life
---
In 5 years, I see myself:
1- CEO of a programming company (Started <a href="https://www.codinstyle.pro">Codinstyle</a>)

2- Social media influencer (reach 500000  <a href="https://codinstyle.pro/subscribe-codinstyle/">subscribers</a> on my website Codinstyle)

3- Owner of a great game (created and published <a href="https://play.google.com/store/apps/details?id=com.AtomicGameStudio.DontBlink">Don't Blink</a>

4- Have a secured full time job in a managerial position as a Telecom Enginser

5- Create and have my Youtube channel with 20000 subscribers

6- make 10000$ from my <a href="https://dev.to/dashboard">blog</a> using affiliate marketing

7-Publish my Ebook on Amazon and make a revenue of 500$ from it

8- Have 30000 true followers on my <a href="https://mobile.twitter.com/hussein_cheayto">Twitter</a> account.

9- Delegate small businesses

10- Have my own Udemy courses.

This is on the work level. However on the lifestyle level

1- Get married
2- Have 2 cars (sport car and a regular car for casual trips)
3- own a luxurious house
4- Keep my healthy and fit body
5- travel once or twice per year during my vacation.

I'm interested to know your plans for the 5 coming years. You need to believe in yourself.

Right it to reach it
;python problem Numpy
Published: 2019-09-17 23:09:25



# FIRST PART HERE IS THE ISSUE……………...
# multivariate multi-step 1d cnn example
from numpy import array
from numpy import hstack
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Flatten
from keras.layers.convolutional import Conv1D
from keras.layers.convolutional import MaxPooling1D
 




# split a multivariate sequence into samples
def split_sequences(sequences, n_steps_in, n_steps_out):
	X, y = list(), list()
	for i in range(len(sequences)):
		# find the end of this pattern
		end_ix = i + n_steps_in
		out_end_ix = end_ix + n_steps_out-1
		# check if we are beyond the dataset
		if out_end_ix > len(sequences):
			break
		# gather input and output parts of the pattern
		seq_x, seq_y = sequences[i:end_ix, :-1], sequences[end_ix-1:out_end_ix, -1]
		X.append(seq_x)
		y.append(seq_y)
	return array(X), array(y)
 
# define input sequence
in_seq1 = array([10, 20, 30, 40, 50, 60, 70, 80, 90])
in_seq2 = array([15, 25, 35, 45, 55, 65, 75, 85, 95])
out_seq = array([in_seq1[i]+in_seq2[i] for i in range(len(in_seq1))])
# convert to [rows, columns] structure
in_seq1 = in_seq1.reshape((len(in_seq1), 1))
in_seq2 = in_seq2.reshape((len(in_seq2), 1))
out_seq = out_seq.reshape((len(out_seq), 1))
# horizontally stack columns
dataset = hstack((in_seq1, in_seq2, out_seq))
# choose a number of time steps
n_steps_in, n_steps_out = 3, 2
# convert into input/output
X, y = split_sequences(dataset, n_steps_in, n_steps_out)
# the dataset knows the number of features, e.g. 2
n_features = X.shape[2]
# define model
model = Sequential()
model.add(Conv1D(filters=64, kernel_size=2, activation='relu', input_shape=(n_steps_in, n_features)))
model.add(MaxPooling1D(pool_size=2))
model.add(Flatten())
model.add(Dense(50, activation='relu'))
model.add(Dense(n_steps_out))
model.compile(optimizer='adam', loss='mse')
# fit model
model.fit(X, y, epochs=2000, verbose=0)
# demonstrate prediction
x_input = array([[70, 75], [80, 85], [90, 95]])
x_input = x_input.reshape((1, n_steps_in, n_features))
yhat = model.predict(x_input, verbose=0)
print(yhat)
CLI editor in Typescript
Tags: cli, editor, vim
Published: 2019-09-17 22:37:20

---
title: CLI editor in Typescript
published: true
description: Buffer based CLI editor in Typescript
tags: cli, editor, vim
---

Wrote a small buffer based CLI editor in Typescript. Was a great experience to implement a small buffer, cursor class. 

It even supports undo. Also, without any dependencies. 

Feedback 🙌🙏

Code: https://github.com/divyenduz/chi-editor
PykashTextUtil
Tags: replit, django
Published: 2019-09-17 21:54:34

This website name pykash textUtil.
Introdunction : 

Because this website is build on the python language and working is remove the punctutation from the paragraph and lot of little/preety work this website on this .
Why ?  This website name is pykashtextutil?
So Name of my website is pykash because it's take "py" from python 
textutil from the optimize the text so it's name is "pykash textutil

{% replit @pykash24/Pykash %}
What code have you read recently?
Tags: discuss
Published: 2019-09-17 21:09:57

I recently read Peter Seibel's [Code is Not Literature](http://www.gigamonkeys.com/code-reading/) where he observers that in order to understand code, we more often have to decode and play with the code rather than simply reading it. This made me wonder if others have run into code so clear that you can understand it just by reading it?