teleren/devto huggingface dataset:
How To Get Started With Open Source Project Contribution
Tags: opensource, git, programming, devops
Published: 2021-01-26 09:56:45

Open source is in your best interest, whether you're an individual, a corporation, a small business, a non-profit, or a government agency.
Contributing to Open Source can be a rewarding way to learn, teach, share and build experience. There are plenty of reasons why one/people would contribute to an Open Source Project, some of the reasons are: 

- To improve the software you rely on
- To find a mentor if need one
- Learn new skills
- Share your skills
- helps you gain a much deeper knowledge about the software
- helps your reputation and can leverage your career
- is fun and gives you personal satisfaction 
*What is your motivation to contribute to open source projects? Let me know by responding to this post or via Comment Section.*


### How can one Contribute Open Source ?  

Contributing does not necessarily mean to contribute to code, one can contribute to open source in many different ways, like:
- You can add a description to elaborate more or even give a guidance to a given project.
- Add examples to show how the code works
- Write tutorials for the project
- Do a translation for a project
- You can answer questions about a project (Stack overflow, Reddit)
- Offer to mentor another contributor
- Fix typos and arrange the work folder correctly  

*All of the above ways count towards contributing to an open source project.*  

Read the whole article at my Blog Page: [How To Get Started With Open Source Project Contribution](https://larymak.hashnode.dev/how-to-get-started-with-open-source-project-contribution)


Connect With me at [Twitter](https://twitter.com/larymak1) | [Insta](https://www.instagram.com/nextgencoders/) | [YouTube](https://www.youtube.com/channel/UCrT1ARRZfLOuf6nc_97eXEg) | [LinkedIn](https://www.linkedin.com/in/hillary-nyakundi-3a64b11ab/)  | [GitHub](https://github.com/larymak)

Do share your valuable opinion, I appreciate your honest feedback!  

Check out my other Blogs too:  
- [Build A Random Name Generator Using Python](https://larymak.hashnode.dev/build-a-random-name-generator-using-python)
- [How To Write A Good README File](https://larymak.hashnode.dev/how-to-write-a-good-readme-file)
- [Top Freelancing Tool For Developers](https://larymak.hashnode.dev/top-freelancing-tools-early-2021)
- [Top Apps To Learn Coding](https://larymak.hashnode.dev/top-apps-to-learn-coding)
- [Coding A Jokes App Using Python](https://larymak.hashnode.dev/coding-a-comicjokes-app-using-python)
- [The GMAIL Story](https://larymak.hashnode.dev/the-origin-of-gmail)
- [Useful Bash/Terminal Commands](https://larymak.hashnode.dev/some-useful-bashterminal-commands) 

See you in my next Blog article, Be Safe and Take care!!
Enjoy Coding
Database Query Statistics
Tags: database, statistics, java, logging
Published: 2021-01-26 09:09:52

I am pretty sure most of us developers will face some database performance problem every day. 
Ninety percent of the time this could be due to the missing indexes.

Otherwise, the query does not use the newly created index and instead scans the whole table.

Most of the time we will not notice this since the application works perfectly fine for the first few weeks/months and performance gets worse slowly every day as the table grows.

I myself would prefer something automated which will prompt or notify in-case queries take a long time than expected. This is when I thought of making use of the hibernate-statistics setting and turning on this log. But this is doing a lot of things in the background and making use of a lot of non-week references which also takes a fair amount of JVM memory.

I thought of implementing a small library that will help me to customize to enable what we need and not store any other information. 

My motivation was 
1. Easy customizations using system properties.
2. Injectable even on non-hibernate or non-spring projects by little tweaks.
3. Statistics reporting will help the data to be sent to Prometheus or similar databases and create alerts to notify whether there are queries that need to be improved.
4. Developer need logs for SQL queries with the time taken to execute.
5. Developers can create alerts based on the Splunk (logging system) or Prometheus if there are queries taking more time or fetching rows more than expected.

[Library link here](https://github.com/jango89/hibernate-minimal-logger)
How to zip or unzip files in Ubuntu
Published: 2021-01-29 21:33:56

---
title: How to zip or unzip files in Ubuntu
published: true
date: 2021-01-26 09:09:09 UTC
tags: 
canonical_url: https://boobo94.github.io/devops/zip-ubuntu/
---

First step, make sure that you have zip installed on your machine:

```
sudo apt-get install unzip

```

If you want to extract to a particular destination folder, you can use:

```
unzip file.zip -d destination_folder

```

If the source and destination directories are the same, you can simply do:

```
unzip file.zip

```
Quickly Deserializing in Python
Tags: programming, python, tipsandtricks
Published: 2021-02-09 20:47:02

---
title: Quickly Deserializing in Python
published: true
date: 2021-01-26 09:00:00 UTC
tags: Programming,python,tipsandtricks
canonical_url: 
---

Just a quick “Tip and Trick” post right now, but I’ve been doing a lot of work with python lately. And I have to tell you, I’m really enjoying it. Python provides a lot of easy ways to do the kind of work that we have to do so often. The “Free form” nature of python gives the ability to build a lot of things very quickly, and one of the common problems I wanted to solve is pulling in configuration information into your python scripts.

One of the habits I’ve built over my time as a developer is that I HATE to build magic strings, and prefer to build configuration settings as I build my code. And rely upon this configuration almost immediately. And as I’ve been working with python, I found an easy way to handle this type of pattern.

The first benefit, is how Python handles json, when Python reads in a json script, it will treat it as a type “dict” which is great because it makes it really easy to read as a key / value pair. So for example, the following code works:

Below is the test.json:

```

{
	"value1":"value 2",
	"object1": {
		"objectvalue1":"test"
	}
}

```

The following python script can read that:

```

filePath = "./test.json"
f = open(filePath)
config = json.load(f)
f.close()

value1 = config["value1"]

```

Honestly pretty easy, but one of the fun tricks of python I recently discovered is how to map those values to a class. Take the following file for “test.json”

```

{
	"value1":"value 2",
	"object1": {
		"objectvalue1":"test1"
		"objectvalue2":"test2"
	}
}

```

And if I create the following class:

```

class Object1(object):
	def __init__ (self, objectvalue1, objectvalue2):
		self.objectvalue1 = objectvalue1
		self.objectvalue2 = objectvalue2

```

I can load that class with the following:

```

filePath = "./test.json"
f = open(filePath)
config = json.load(f)
f.close()

object1 = Object1(**config["object1"])

```

That one line at the end will take the json object from the “object1” property and will match it to the constructor to load the object, and do it based on name mapping, so as long as the constructor parameters match the names of the json file it will take care of the mapping.

So just a fun little trick for python for anyone who’s new to python.
AWS Infrastructure
Tags: aws, beginners, server
Published: 2021-01-26 08:56:04

**AWS Infrastructure entails to how AWS is setup for use by millions around the globe.**

AWS stores all of it's resources regionally to facilitate businesses and users located in different parts of the world. 

##**Region**
A *region* is a geographically self-contained area where all of the resources(compute, storage, etc.) you need for your application are contained. 

It could be a country or a continent bounded by it's own set of laws and procedures. And ofcourse, you need to choose the region that likely favor your needs. 

Few things that you need to consider before choosing a region are:
1. **Latency** : Users experience the application with greater speed if they are closer to a region. Analyze where most of your users are from and then choose a region closest to them. Speed does matter and think about latency if it is your first priority.
2. **Cost** :  Due to the fact that every country(that bound a region) has it's own set of tax laws or financial regulations, not every region is priced the same.
3. **Compliance** : Legal restrictions like that of United States HIPAA requirements or European GDPR requirements can sometimes outweigh any other consideration. Make sure to understand if the country you operate in has requirements that may dictate everything the right way.
4. **Service availability** : Not every new feature or service is available at all regions simultaneously, so make you know in which region it is operating in.

So, what are regions actually made of? Where are all the resources located in these regions? Here is the answer...

##**Availability Zones**

Think of a *Region* as a collection of *Availability Zones*. An availability zone(AZ) consists of two more standalone data centers.

They are separated with miles of distance from each other to prevent any natural disaster or unprecedented breach that could bring one down. In fact, all the availability zones in a region are inter-connected with high speed fiber network and when one goes down, the other takes backup and starts running as normal. You may infer this as your application is being run on multiple AZs simultaneously. 

Now that's something relaxing...

##**Extras**

**Local Zones** : They are a new type infrastructure deployment closer to large populated areas, industry and IT centers. With local zones you can run applications with high priority of latency such as live video & game streaming, electronic automations and machine-learning models.

**Points of Presence** : These locations consists of *Edge Locations and Regional Edge Cache Servers*. 

Check out [this](https://infrastructure.aws/) page for interesting visualization on AWS infrastructure.
  
  
  

  
###**Thank you!**:heart:
Azure Function Time Trigger: Cron tramite settings
Tags: azurefunctions, coding, cloud, timetrigger
Published: 2021-01-26 07:25:15

Io ed un cron sbagliato, potevo fare meglio ed evitare il disagio?

Quante volte nel definire una Azure Function Time Trigger ti sei pentito del cron definito e lo vorresti cambiare evitando un deploy?

Tante? Troppe? Una sola? Mai?

Con questa guida/suggerimento la vostra vita utilizzando le Azure Function Time Trigger cambierà una volta per tutte!

Tranquilli, predico bene e razzolo malissimo. 

Spesso e volentieri vince la pigrizia!

Per maggiori informazioni: [ARTICOLO COMPLETO](https://blog.devandreacarratta.it/azure-function-timer-trigger-cron-settings/?utm_source=devto&utm_medium=coding-tips&utm_campaign=azure-function&utm_content=azure-function-timer-trigger-cron-settings)
Gaming Industry Use of BitCherry Blockchain May Lead to Mass Adoption
Tags: blockchain, gamedev
Published: 2021-01-26 06:50:49

BitCherry (BCHC) Blockchain technology has the potential to create a new era of gaming and drive true adoption in the industry.

Blockchain technology has recently become a phenomenon in various areas of the economy, driving innovation, fostering growth, and bringing added value. Among the most noteworthy of these sectors is the gaming industry. Gaming is a use case that drives true adoption of blockchain technology by taking the incentive for the user from pure speculation to transactions on a blockchain platform. This drives innovation in development as well as consumer adoption.

According to Newzoo’s Global Games Market Report says the global gaming market will generate $159.3 billion in revenue in 2020.That would be 9.3 percent year-over-year growth. What’s more, the industry to surpass $200 billion in revenue in 2023. 

BitCherry (BCHC) is the world's first scalable blockchain infrastructure based on IPv6 technology to serve distributed commerce. BitCherry blockchain technology is committed to building the connection between business Avenue blockchain technology and real society, helping traditional enterprises build a trusted distributed business environment. BitCherry BCHC Blockchain Technologies can unlock immense benefits for the gaming entrepreneur and developers by preventing fraud activities and offering a secure environment to develop, launch games or monetize them. There are many popular games that need to be purchased before using them. In such situations, BitCherry can help in buying and selling in-game assets easier with the help of cryptocurrencies in a safe way.

BitCherry (BCHC) transactional technology can be a great way to build and manage in-game currency accounts. This will help in managing the rewards the players get on winning various stages, levels, competitions, etc. 

The usage of BitCherry (BCHC) blockchain development solution in gaming enables players to purchase game assets without depending on third-party payment providers to process the currency transactions.

Speculation on platforms that may find blockchain applications and tokens useful in gaming is on the rise, and the platforms are often listed on top exchanges shortly after being released. With the continued development of easy-to-use user interfaces, standards for BitCherry blockchain applications using aBFT+PoUc Consensus Mechanism to offering greater transaction speeds, and the release of items capturing the attention of audiences — acceptance by the mainstream is only a matter of time.

BitCherry (BCHC) Blockchain technology is especially suited for gaming, and gaming can directly benefit from blockchain technology, both technically as well as in unlocking value from in-game items, tournaments, character development and gamer recognition. This paves way for esports being a leader in the sports and entertainment sector, much like the internet is now. 

Today, traditional media is mostly run on the internet, so perhaps through blockchain technology, all sports could one day contain elements of esports.
Adding Typescript to my existing Node + Express API - Part 2 - Directory Structure 
Tags: node, typescript, mongodb, api
Published: 2021-01-26 06:30:48

If you're reading this I am assuming you are familiar with the set up steps we took in my [earlier post](https://dev.to/tintindas/adding-typescript-to-my-existing-node-express-api-part-1-set-up-48io). 

---

Before we get VSCode to chill let's make sure our project's directory structure is easily understandable.

My directory structure used to look like this

![Previous directory structure](https://dev-to-uploads.s3.amazonaws.com/i/vuq4omxok128tl2p2qhi.png)

Now it looks like this

![New directory structure](https://dev-to-uploads.s3.amazonaws.com/i/3t72jgezrs356znsv5ev.png)

The names of the folders are pretty self-explanatory.

- **config** exports all our configuration options for mongodb and our server. The most important variables being exported are the username and password with which we access our database.

Mine looks like this

```ts
import dotenv from 'dotenv'

dotenv.config()

const MONGO_OPTIONS = {
	useUnifiedTopology: true,
	useNewUrlParser: true,
	keepAlive: true,
	poolSize: 50
}

const MONGO_USER = process.env.MONGO_USER
const MONGO_PASS = process.env.MONGO_PASS
const MONGO_DB = process.env.MONGO_DB

const MONGO = {
	user: MONGO_USER,
	password: MONGO_PASS,
	db: MONGO_DB,
	options: MONGO_OPTIONS,
	url: `mongodb+srv://${MONGO_USER}:${MONGO_PASS}@cluster0-yo7rn.mongodb.net/${MONGO_DB}`
}

const PORT = process.env.PORT || 3000

const config = {
	port: PORT,
	mongo: MONGO
}

export default config
```

- **controllers** is the folder where we write the main control functions for our API, i.e., the main logic. These files will export functions which will be executed when the user goes to one of our API's endpoints.

- **models** is where we will create the models which tell our server how to interact with the data in our database.

- **interfaces** are to make sure that mongoose's model definitions play nice with typescript.

- In **routes** we define routers which will connect the controllers with the routes they are intended for. 

---

In the next part we will download some dependencies and set up some npm scripts that will let us set up our development server.

If you liked this post consider,

- checking out my projects at [tintindas](https://github.com/tintindas)
- following me on twitter [@tintin_das](https://twitter.com/tintin_das)

  {% twitter 1333455982739869698 %}
5 CSS Tricks Nobody Tells You!
Tags: css, webdev, uiweekly, design
Published: 2021-01-26 05:38:42

### 1. Center Anything
> Using _Flexbox_, _Align Items_ & _Justify Content_
```
.center {
   display: flex;
   align-items: center;
   justify-content: center;
}
```
Edit :-
> Note:- '.center' should be applied to the parent of the element to be aligned.
Another way to implement suggested by @mrdanielschwarz >> [here](https://dev.to/mrdanielschwarz/comment/1aogm)

### 2. Smooth Scrolling
> No JS. Only one HTML property
```
html {
   scroll-behavior: smooth;
}
```

### 3. Change Cursor To An Image
> Whenever the mouse hovers over the particular division, the cursor will change to the specified image
```
.change__cursor {
   cursor: url('path/to/the/image.jpg'), auto;
}
```

### 4. Add Shadow To Transparent Image
> No more box shadows
```
.drop-shadow {
   filter: drop-shadow(3px 6px 9px #636161);
}
```

### 5. Truncate Text
> The below property helps you truncate the text to the specified number of lines

Edit:-
> Appended the additional properties as suggested by @pustelto >> [here](https://dev.to/pustelto/comment/1aoi9) 
```
p {
   -webkit-box-orient: vertical; 
   -webkit-line-clamp: 4; 
   display: -webkit-box; 
   overflow: hidden;
}
```
<br />
Do try them!
<br />
Have knowledge of other tricks that can help reduce CSS coding time? Feel free to share in the comment section below!
<br/>
Support me : [Buy me a coffee!](https://paypal.me/deyrdx?locale.x=en_GB)
Learn how to make Animated Tab-Layout using HTML | CSS | and Pure JS.
Tags: html, css, javascript, tutorial
Published: 2021-01-26 05:55:22

If you're learning HTML, CSS, and JavaScript be sure to like and subscribe to my channel and never miss tips like this. 👇

Tutorial: https://youtu.be/OM8tE5nojDk
Twitter: https://twitter.com/shahir_dev
Telegram: https://t.me/WeeklyTipsWithShahir

{% codepen https://codepen.io/shahirhossaini/pen/gOwjVXb %}
Update on 250,000 #1
Published: 2021-01-29 05:02:54

---
title: Update on 250,000 #1
published: true
date: 2021-01-26 05:53:56 UTC
tags: 
canonical_url: https://mikebobadilla.com/update-one-250-00-1/
---

I started trying to do this challenge without any sort of schedule or plan. I just started writing about whatever came to my mind. The problem with that thinking is it really only works for tweets and small paragraphs. I was stuck just getting half-baked idea on the page.

<!--kg-card-begin: markdown-->
### Problems I noticed:

- I spent way too much time worrying about hitting my daily word count that It stopped me from even writing anything down.
- I found myself looking at ways to monetize the site with newsletters, affiliate links, etc. No ones even read the fucking thing.
- I was being really shy for whatever reason while I was writing.
- I completely forgot that this was just supposed to be fun and who give a fuck about anything else.
- I was worrying too much about writing the way that I speak. I say fuck. so what.

I was listening to Atomic Habits and in the first chapter my problem was pointed out; I was spending too much thinking about the goal and not enough time thinking about the process (He called it a system). So now I need to create a system that will work for me and help me succeed in this goal.

### Action Items:

- Update the word count to reflect the year instead of whatever I have now.
- Spend a day or two outlining a topic and working on a rough draft. Then I can write a longer post but meet my daily word count.
- Don't worry if I hit the word count or not. Just work on the habit of writing consistently.
- Fuck around more. This is just a personal life goal.

<!--kg-card-end: markdown-->

<!--kg-card-begin: hr-->
* * *
<!--kg-card-end: hr-->

Current word count: ~1964 / 250,000  
Daily average: ~79  
Daily average Goal: ~685
Best PyTorch Courses Online You Must Know in 2021 
Tags: deeplearning, machinelearning, python, datascience
Published: 2021-01-26 05:08:51

Are you looking for the Best PyTorch Courses Online? If yes, then check the online courses for PyTorch listed below. In this article, you will find **9 Free and Paid Pytorch Courses.** So without any further ado, let’s get started.

PyTorch is an open-source machine learning library inspired by Torch and developed by Facebook‘s artificial intelligence research group. PyTorch is more Pythonic in nature and it believes in a dynamic graph. The best part about PyTorch is due to its Pythonic nature it is easy to use, easy to debug, and has a great set of simple APIs.

And due to its increasing popularity, I have selected the 9 Best Free and Paid Online Courses for PyTorch for you. So, let’s move to the courses-
**[Click to continue reading...](https://www.mltut.com/best-online-courses-for-pytorch-for-deep-learning/#1-deep-neural-networks-with-pytorch-coursera)**
The Secret Ingredient
Published: 2021-01-26 04:50:47

---
title: The Secret Ingredient
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/u3qg1t4pvaspgd9l2yxa.jpg
---

I remember when I was in college (guess I’m old now), I used to enjoy learning so much. And still do.

I always wanted to score well in exams and get a good job, but never really actively worried about this stuff until the day of an exam or an interview. This may sound strange to most, but that’s how it’s been for me.

Most days, there was just this joy in learning. Each subject had its own charm. I enjoyed learning about database management and also learning about Economics and Finance. There was always something to learn from the course, the instructor, my peers, seniors, and juniors too.

And I learnt something everyday, not just about Computer Science but about myself, people and life in general.

Students often ask me now how I prepared for interviews, where did I  study from, and how long does it take to prepare for an interview (or as pop-culture suggests, ‘crack an interview’). I honestly don't have a clear answer.

If I tell you to actively learn whatever you find interesting and also take interests in things that are considered important for achieving your goal and simply enjoy the process, can you accept this answer?

Computer Science is not all about Data Structures— that is just one tiny part of that degree. Is it important? Yes. But you shouldn’t restrict yourself to just learning Data Structures because you think it will help you get a job. Or because there is so much popular culture focusing on the ‘it’ thing.

I see a lot of fear in students today, and this fear leads to all sorts of unconstructive activities— cheating in contests to get better ratings, envying those doing better than you, developing a scarcity mindset (thinking if someone else got a good job, your chances somehow diminish). But that is really not the case.

Having an abundance mindset really helps in life. I did my entire bachelors studying with a friend way smarter than me, and we both helped each other learn; it helped us both in the end.

Enjoy learning. Approach any subject with a natural curiosity, and then feed that quest with answers on how things work. There is so much joy in learning and growth when you do it for the right reasons; reasons not stemming from fear. And help each other along the way. The relationships you make in your journey to success will any day be more important than whatever your final destination looks like.