teleren/devto huggingface dataset:
FileSearching With Python
Tags: python, regex
Published: 2019-04-21 15:10:54

Hi guys ...
I designed a python program for searching, Sending the files from the searched location to the newly created directory.

It can searches any file from any location also sending of permission restricted file is also possible(i don't exclude any dot files from the os.walk() function but the folders which don't contain anything in it or folders which don't have any file is excluded).


How FileSearching Works ??
-> So, the main working of FileSearching rely on some functions and modules i.e.,

1. OS - This module helped me with its several functions so that i can be able to communicate with my operating system.

2. Shutil - Helped in Sending Files from source to destination location.

3. os.walk() - Helped in iterating over a list of folders, sub-directories, files.

4. Regex - Helped in creating a pattern for searching that particular files(based on some extension ex. mp3, pdf, 7z, bz, mp4 and lot more).

These four masterpieces helped me to get my job perfectly done and there're also other functions but this Four is like a blueprint so that an end-user can understand how FileSearching works without even check every line of the code.


Project is still in development, If anybody needs to look the source code or test the project then he'll check my GitHub repo. of FileSearching -> {% github Himan10/FileSearching %} 

This is my first post in dev.to community ... So, Guys Please look at the repo. and provide suggestions for its improvement. 

Thankyou.
Installing Haskell Compiler in Linux
Tags: haskell, computerscience, linux, beginners
Published: 2019-06-10 13:48:56

---
title: Installing Haskell Compiler in Linux
published: true
tags: haskell, computer science, linux, beginners
canonical_url: https://lautarolobo.xyz/blog/installing-ghc-in-linux/
description: Let's get all setup and start running Haskell!
series: Haskell
---

Assuming that you know what Haskell is (if not, [read this brief introduction](https://dev.to/lautarolobo/what-s-haskell-1om3), and you know what the Glasgow Haskell Compiler is (check [this](https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler) if you don’t), I’ll show you how to get GHC up and running in your computer.

First things first, open the terminal and type:

```
sudo apt-get install haskell-platform
```

This command should work on the most common Linux distros out there ([Debian](https://www.debian.org/index.en.html), [Mint](https://linuxmint.com/), [Ubuntu](https://www.ubuntu.com/)).

Press Enter, and you will be asked to type your password, after you type it you’ll see a list of sugested packages, those won’t be installed, and a list of the packages that will be installed, with the amount of space that they are willing to occupe in your drive. Classic pre-installation info. Then you must type _s_ if you want to proceed with the installation, or _n_ if you regret.

Have in mind that the installation process once you type _s_, may take some time depending in your internet conection.

Following this simple operation, you have your Glasgow Haskell Compiler installed, ready to use.

If you want to make sure that it’s installed, just open the terminal and simply type:

```
ghci
```

Therefore you should see in your console something like this:

```
GHCi, version x.y.z: http://www.haskell.org/ghc/ :? for help
Prelude>
```

* * *

Didn’t work? Tell me in the comments and I'll be glad to help you out!

If you want to write your first Haskell function and test it with GHC, [click me!](https://dev.to/lautarolobo/first-haskell-function/)
Advent of Code 2018 Introduction
Tags: aoc2018, python, puzzle, challenge
Published: 2019-04-21 14:05:14

---
title: "Intro"
title: "Advent of Code 2018 Introduction"
tags: ["aoc2018", "python", "puzzle", "challenge"]
published: true
categories: ["Advent of Code 2018"]
description: A brief overview of Advent of Code and why I'm writing about it.
---

> This post originally appeared on [steadbytes.com](https://steadbytes.com/blog/advent-of-code-2018/intro/)

Since 2015, [Eric Wastl](http://was.tl/) has produced the excellent [Advent of Code](https://adventofcode.com/), described as:

> Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other

I have completed each year so far and it is an absolute highlight of the advent season! Advent of Code provides an excellent opportunity to learn, practice, challenge yourself and, most importantly, have fun programming and solving problems. Furthermore, there is a great community surrounding the event at [/r/adventofcode](https://www.reddit.com/r/adventofcode/) of newbies and experienced programmers alike.

I am aware that ,at the time of writing, it is March 2019 and that `March 2019 != December 2018`. I did complete the challenge as expected during December (though it is available all year) and put my solutions up on [GitHub](https://github.com/SteadBytes/advent-of-code-2018). However, I wanted to show my thought process, promote Advent of Code and hopefully (:crossed_fingers:) help others learn. To this end, I shall be posting a breakdown of my solutions to all of the Advent of Code 2018 puzzles over the course of some indeterminate period of time :smile:.

I encourage everyone to give Advent of Code a try - there's plenty of time to practice on the previous events before 2019!

If you do want to try it in Python, I'd love for you to check out a small side project of mine: [aocpy](https://pypi.org/project/aocpy/) - a CLI tool to fetch input, submit answers and generate boilerplate code files for solving Advent of Code. It's fully open source, so issues and pull requests are welcomed!

Finally, a huge thank you to Eric for all of the time and effort he puts in to make Advent of Code - if you enjoy it please consider supporting him by purchasing [AoC++](https://adventofcode.com/2018/support).
To comment or not to comment?
Tags: discuss, beginners, advice
Published: 2019-04-21 12:35:45

---
title: To comment or not to comment?
published: true
description: To comment or not to comment, that is the question. So do you?
tags: discuss, beginner, advice
cover_image: https://pixabay.com/get/e83db7062df3083ed1584d05fb0938c9bd22ffd41cb4144990f0c17bae/desk-1869579_1280.jpg
---

I recently had a quick look at the first blog post I ever wrote, _[Should you write comments?](https://lankydan.dev/2017/01/07/should-you-write-comments)_. This triggered me to question whether I still take the same stance around comments that I did when I wrote the post (over two years ago now).

I am not 100% sure where I stand now. I still think that pretty much everything I wrote is what I do nowadays. But, I think there are a few more situations now where I am willing to use comments.

While I spend a bit more time thinking about this myself, I think it is worth seeing what you all believe when it comes to writing comments. Maybe then, I can better collate my thoughts and possibly write a follow-up post that documents what I do now and what caused me to change my opinion.

So, should you write comments?

If so:
- When do you write them?
- What do put in them?
- Where do you put them?
- Do you think you can write too many comments?
- Are there times/projects where comments are more important?

And if not:
- Why not?
- What do you do instead?
- Are there times where you have been tempted to write comments
Error handling in Node.js Express Applications
Tags: discuss, node, javascript, typescript
Published: 2019-04-21 11:54:39

---
title: Error handling in Node.js Express Applications
published: true
tags: discuss, node, javascript, typescript 
---
Hello fellow devs. I thought we might share some ideas about error handling in Express applications. 

The goal: Having people share all kind of ideas could help everyone reading/discussing make their own error handling or strengthen the current one.

Requirements: One should handle cases having errors being thrown in one or more services, both their own and third party library utilization ones.

My idea: 

    1. Creation of StatusError such as
    https://thepracticaldev.s3.amazonaws.com/i/u6rxsufyjqvplr3364da.png

    2. Throwing this error in services that are part of our business domain with         
        meaningful statuses, such as 400, 404, 401 etc.

    3. Throwing this error in services that handle consuming 3rd party API with 
        such status that has semantic meaning, even if it may be slightly different 
        from the one in API. One could also add additional info comprised of data 
        successfully computed before such error. 
        
        e.g. Throwing 404 while trying to find 3rd party resource connected to some 
             in our base even though third party API may throw different error but 
             with such response that corresponds 404. One could also add name of 
             resource from our base in message to help further solving the issue.

    4. These errors could be caught in route handlers and sent further down the 
       pipe to error handler.
    
    5. Error handler could call the appropriate error handling module which can do 
        multiple, separated actions, such as logging, special handling for some of 
        the errors, etc.

I'm very eager to hear your ideas.
Top remote job boards for developers
Tags: career, remotework, remote, hiring
Published: 2019-04-21 11:43:06

---
title: Top remote job boards for developers
published: true
description: Remote job hunting doesn't need to be difficult! Here are the top remote developer job boards.
tags: career, remotework, remote, hiring
---
![workfromhomejobs](https://workfromhomejobs.me/wp-content/uploads/2019/04/remote-jobs-hiring-now.jpg)

With the growth of the internet, working remotely has rapidly become a more common employment set-up all over the world. This expands to numerous industries and professions, although it’s more prominent in the tech industry for jobs like programming, design and marketing. Whether you are considering some remote work or doing it already, here are useful remote job boards to get you started.

# [Work From Home Jobs](https://workfromhomejobs.me)
I'm placing this one first as it aggregates from the ones below, making it a one stop shop to see all the available developer/programmer jobs.

# [GitHub Jobs](https://jobs.github.com/)
Github is not a stranger to anyone involved in tech, but many people might not know they have a job section worth having a look.

# [StackOverFlow jobs](https://stackoverflow.com/jobs)
The most popular tech Q/A forum by far and they do advertise their jobs on the forum, but many still aren't aware of this gem! 

# RemoteOK
Very popular remote job board with a section for developers

# WeWorkRemotely
Another great option with lots of fresh jobs
React Native cleanup practices that will keep you sane.
Tags: reactnative, maintenance, npm
Published: 2019-04-21 10:35:44

---
title: React Native cleanup practices that will keep you sane.
published: true
description: Solve cache and build errors without effort
tags: reactnative, maintenance, npm
---

All of the commands here can be executed separately. Don't be afraid to clean up your React Native project every once in a while of or when something unexpected happens.

Doing a good cleanup first often saves the trouble of filing an issue ticket and waiting for someone else to suggest that you reinstall the app.. etc.

## What the scripts will do?

1. Cleanup react dependencies and cache

1. Cleanup metro bundler cache and files

1. Cleanup react-native haste cache references

1. Cleanup ios and android files

1. Always reset cache when using `npm start`

1. Optionally run script file after every package installation

1. Run `pod install` after every package installation


## How to use:

~~Don't forget to close all Metrobundler (or the like) instances first before running.~~ A killpackager script is added to start a close and new instance every `npm start`
Close all emulators or simulators
`run cleanup:all` and take a break

See the code here:

[React Native cleanup scripts
](https://gist.github.com/mjmaix/4f37e38ce8846ea02b931c9f9103c5f7)

## What if the errors are not fixed?

Go and read the error logs and ask the community if you need to. Use the repository issue tracker or stackoverflow

<script src="https://gist.github.com/mjmaix/4f37e38ce8846ea02b931c9f9103c5f7.js"></script>
Cloud save and review revisions of your Virtual Studio Code settings.
Tags: bestpractices, vscode, productivity
Published: 2019-04-21 07:11:21

---
title: Cloud save and review revisions of your Virtual Studio Code settings.
published: true
description: Never lose and be able to revert your VSCode settings.
tags: bestpractices, vscode, productivity
---

Most of us like to try plugins and setup for our projects, no?

Sample (my settings): 

https://gist.github.com/mjmaix/537827d2502a55087673c04115cdeaec/revisions

The plugin:

https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
E-commerce-Full-Boilerplate-With-Admin 
Tags: node, mongodb, ecommerce
Published: 2019-04-21 06:58:56

---
title: E-commerce-Full-Boilerplate-With-Admin 
published: true
description: On Top of Node.js And MongoDB. Get It
tags: Nodejs,MongoDB,e-commerce 
---
![](https://thepracticaldev.s3.amazonaws.com/i/5q5hmvlffi9zwjv85ih3.png)

# [Ecommerce-Full-Boilerplate-With-Admin](https://github.com/anikethsaha/Ecommerce-Full-Boilerplate-With-Admin)


### Click [here](https://gentle-eyrie-53138.herokuapp.com/) to see live demo . 
### Click [here](https://immense-refuge-43321.herokuapp.com/login) to see the admin site live demo

## technology
- NodeJS - Server
- ExpressJS - Nodejs framework
- MongoDB - Database
- HTML, CSS, JS, EJS - Frontend
- PM2 - Clustering
- Firebase - Firestore for Session Storage



## Features
- [x] Authentication with OAuth
- [x] Live Search
- [x] Cart
- [x] Checkout Item Changing
- [x] Instant Buy 
- [x] Payment with `razorpay`
- [x] Live Chat using [tawk.io](https://www.tawk.to)
- [x] Password reset using mail ( using nodemailer )
- [x] Contact us form
- [x] Categories With Subcategories 
- [x] Dynamic Content
- [x] Newsletter
- [x] Admin Panel 



##### Please do give feedback for this and **STAR** it and feel free to create **ISSUE**. 
###### *PRs are always welcome*
Job Search - Day 2 of 42
Tags: jobsearch, jobhunt, linkedin, recruiters
Published: 2019-04-21 03:18:21

---
title: Job Search - Day 2 of 42
published: true
description: Wake up, begin to boil eggs, call recruiter, update resume
tags: jobsearch, jobhunt, linkedin, recruiters
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vfdabmrju1rysaol3tne.jpg
---

*Started the day with an item in my LinkedIn inbox*
[Nate Volenik](https://www.linkedin.com/in/nathaniel-volenik-843ba1a5/) a recruiter with a saved name in my phone (not many)
A great to start the day - friendly professional next steps conversation
![Recruiter Nate Volenik](https://thepracticaldev.s3.amazonaws.com/i/e2pxdetkkbpeanmoz78i.png)

# Temporal Service

When my wife *wanted* and were **able** to buy a house
Finally, approved - ready to buy - **now**
We contacted agents, and many of them really wanted to help us out
*after the holidays...?*
**Our realtor** showed us fifteen homes over the weeks circling Christmas
*She* arranged a single day re-tour of our top rated houses
*She* genuinely helped us make an exciting life changing
*We* would refer **her** to anyone looking to buy a home in our area
`
Time is relative to perception
After being let go, it passes quickly
`

The time or day does not matter to friends
Reach out whenever the thought to help comes

```
I don't half step this stuff - Nate
```

# Proactive Job Search Steps

- Talked to Nate at 0930 after coffee (**3 leads**)
- Signed up for [LinkedIn Premium](https://premium.linkedin.com/)
  - One month free, can't hurt - timelines match up
- Updated status on [LinkedIn](https://www.linkedin.com/in/justin-beall/)
  - `Let recruiters know you’re open to opportunities` - check
- Updated [Resume](https://drive.google.com/file/d/1uDe9JY7iGbaKlRSzQFEuCCWykjtGmJsy/view?usp=sharing)
- Signed up for [PyCon Job Fair](https://us.pycon.org/2019/sponsors/jobs/) in Cleveland
  - [Volunteering as session runner](https://us.pycon.org/2019/about/volunteers/) (missed tickets)
- Signed up for [Co-Founder Speed Dating 2019](https://www.eventbrite.com/e/co-founder-speed-dating-2019-tickets-58199982715) by StartinCLE
- Committed to going to Meetups in May
  - [Cleveland Agile Group](https://www.meetup.com/ClevelandAgile/events/259175589/)
  - [Cleveland Python User Group Meeting](https://www.meetup.com/Cleveland-Area-Python-Interest-Group/events/wrwphqyzhbrb/) 
  - [We Make The Internet](https://www.meetup.com/make-the-internet/events/260426039/)
- Responded to inbound recruiting messages
- Committed daily writing as a creative stress relief - `job || 42`
  - Thanks **dev.to**!
- Committed code daily - `job || 42`
![GitHub Commits Graph](https://thepracticaldev.s3.amazonaws.com/i/kg861ehbvf3vtx1gtuhp.png)
16 Weeks Later
Tags: blogging, devto, atlg
Published: 2019-04-21 02:38:53

---
title: 16 Weeks Later
published: true
description: "...with however many there are to go."
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gbrrkn869j1e6ygkpv6q.png
tags: blogging, dev.to, atlg
---

# Just Starting

We have just a brief post this week since I'm trying to take it easy for a few days. Since I just got the 16-week badge I thought I'd take a moment to thank everyone who's followed and/or commented on the posts.

And with that said here are a few posts to get you started if you've never read any of them. 😉 Enjoy the rest of your weekend!

***

# Recommended Reading

{% link shindakun/attempting-to-learn-go---building-dev-log-part-01-1c3m %}
{% link shindakun/interacting-with-the-devto-article-api-4g34 %}
{% link shindakun/a-stab-at-roguish-go-part-01-2nc6 %}

And of course my first ever post.

{% link shindakun/better-static-glitch-sites-19j %}

***

You can find the code for most of the Attempting to Learn Go posts in the repo on GitHub.

{% github shindakun/atlg %}

***

| Enjoy this post? |
|:----:|
| [How about buying me a coffee?](https://ko-fi.com/shindakun) |

***
LeetCode in Java: 209
Tags: java, twopointers
Published: 2019-04-21 00:01:18

---
title: LeetCode in Java: 209
published: true
description: Solution + explanation for LeetCode problem 209
tags: java, twopointers
series: LeetCode in Java
---

```java
public class Solution {
    public int minSubArrayLen(int s, int[] nums) {
        if (nums == null || nums.length == 0) {
            return 0;
        }

        int sum = 0;
        int ans = Integer.MAX_VALUE;

        for (int l = 0, r = 0; r < nums.length; r++) {
            sum += nums[r];
            while (sum >= s) {
                ans = Math.min(ans, r - l + 1);
                sum -= nums[l++];
            }
        }

        return ans == Integer.MAX_VALUE ? 0 : ans;
    }
}
```

This problem is solved by using the two pointers `l` and `r`. In the for loop, we incrementally add the element at `r` to `sum`. Whenever the `sum` is greater or equal to `s`, we calculate the distance between the two pointers (`r - l + 1`) and if the distance is smaller than `ans`, we update `ans` with the distance. Then subtract the element at `l` from `sum` and increment `l`. At the end of the for loop, we should get the length of minimum subarray.

_Time Complexity_: `O(n)`

_Extra Space_: `O(1)`
Fizz Buzz in Every Language
Tags: challenge, polyglot, beginners, opensource
Published: 2019-04-20 23:43:15

---
title: Fizz Buzz in Every Language
published: true
description: Help grow the Sample Programs repo with your solution to Fizz Buzz.
tags: challenge, polyglot, beginners, opensource
series: Sample Programs Challenges
---

I noticed some folks on here were sharing some coding challenges, and I thought it might be fun to share some of my own (and shamelessly promote my [Sample Programs][2] project in the process).

## The Challenge

Fizz Buzz is that notorious interview question almost everyone in the industry knows. Ironically, I don't know of anyone who has every been asked it. Regardless, it's a fun problem to tackle because it involves a little bit of everything: loops, conditions, math, etc. And, there are countless ways to solve it. 

For the purposes of this challenge, here are the rules:

> Write a program that prints the numbers 1 to 100. However, for multiples of three, print “Fizz” instead of the number. Meanwhile, for multiples of five, print “Buzz” instead of the number. For numbers which are multiples of both three and five, print “FizzBuzz”

Here's a segment of the output:

```bash
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
```

If you're feeling festive, you can swap the terms for whatever you like (i.e. EasterEgg, AprilShowers, etc.). In any case, the solution should be executable in any language of your choice. The more obscure the language, the better!

## The Solution

I'll kick off the challenge with my favorite solution to the problem in Java:

```java
public class FizzBuzz {
  public static void main(String[] args) {
    for (int i = 1; i < 101; i++) {
      String output = "";
      if (i % 3 == 0) {
        output += "Fizz";
      }
      if (i % 5 == 0) {
        output += "Buzz";
      }
      if (output.isEmpty()) {
        output += i;
      }
      System.out.println(output);
    }
  }
}
```

If you're curious how this solution works, [Stuart Irwin wrote an excellent article about it][1]. Along with this solution, I've been collecting several others in a repo called [Sample Programs][2]. After you drop your solution below, you should see if its missing from the collection. We'd love your contribution!

[1]: https://sample-programs.therenegadecoder.com/projects/fizz-buzz/java/
[2]: https://github.com/TheRenegadeCoder/sample-programs/