teleren/devto huggingface dataset:
Plans for Major League Hacking Hackathon 2022 Season
Tags: mlh, webdev, majorleaguehacking
Published: 2021-07-01 07:08:38

The hackathon season of MLH 2022 has begun with a bang at MLH INIT 2022. INIT is a celebration for the start of the 2022 Hackathon Season! While this is the first time they are running INIT, the format will feel familiar to those who have participated in MLH Local Hack Day. It is running from June 27th to July 5th 2021.

A couple of highlights of mine up to Day 4 are:
- improved development speed
- collaborated with other hackers and developed programs together
- met one of the best and diverse hacker community who are sooooo welcoming.
- developed over 10 projects in merely 3 - 4 days, from games like UNO on CLI to complex API calls and displaying recipes and recipe searches

INIT 2021 gave me reason to build projects fast and develop code quick. Not to mention, the great sessions held by MLH mentors. The amount of energy they get into the streams is immense. Overall, INIT 2022 has been one of my best experiences!

Moving on from INIT 2021, I wanted to blog down my plans for the upcoming season hackathon. So, after INIT, I realised that to rank higher at hackathons merely knowing how to code well was not enough, what was needed was teamwork, and knowledge in some other fields like finance, biology, chemistry or entrepreneurship. 

So, my short term goals would be:
- Understand concepts and problems faced in fields apart from coding like fintech and biotech.
- Improve coding skills and learn better backend and security skills to make the code more fool-proof.
- Secure top 30 at INIT 2022 :smile: (still in top 50)

Long term goals:
- Improve open-source contributions and develop open-source projects
- Form a hackathon team to participate in major hackathons
- Learn complex concepts and applications of Machine Learing and AI to improve solutions in hackthons

So, that would be my list of things to do for MLH 2022 Season. What is yours? Tell me in the comments!
Rawkode Live: Hands-on Introduction to vcluster
Tags: kubernetes, vlcuster
Published: 2021-07-02 18:17:17

---
title: Rawkode Live: Hands-on Introduction to vcluster
published: true
date: 2021-07-01 07:05:36 UTC
tags: Kubernetes, vlcuster
canonical_url: https://loft.sh/blog/rawkode-live-hands-on-introduction-to-vcluster/
---

![Rawkode Live image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fgjjw37wilwl3wdveil3.jpeg)

Loft Labs CEO Lukas Gentele and I joined David McKay, AKA Rawkode, to talk about vcluster on his show Rawkode Live. If you’ve not seen Rawkode Live, David looks at a piece of technology from an end-user’s perspective.

If you want to get started with vcluster, I highly recommend watching this. David clearly enjoyed playing with it and thought of some use cases I hadn't considered, like using vcluster to test against multiple Kubernetes versions while developing operators.

You can watch the video below. If you try using vcluster, I'd love to hear about your experiences. You can comment here or [find me on Twitter.](https://twitter.com/richburroughs)

Thanks for having us on the show David.

{% youtube IMdMvn2_LeI %}
Uploading a binary file buffer to Strapi using a custom Strapi Service
Tags: strapi
Published: 2021-07-01 07:00:56

I'm working on a personal project that generates a web page screenshot (using Puppeteer) when a Strapi endpoint gets called.

After digging in the Strapi docs and archives, Stack Overflow, and deep in Google Search, I came up with only a couple of small leads.

Writing a Service in Strapi to handle the upload was the path I wanted to take; however, Strapi's documentation wasn't clear on using strapi.plugins.upload.services.upload.upload().

Based on what I could see, uploading a file to Strapi was primarily done by calling the upload endpoint. E.g. a file would be uploaded on the front end and sent via the endpoint to Strapi. I needed to upload a file generated on the server and use the upload Service within a Strapi Service.

When I tried using the Strapi upload Service directly with the binary buffer generated on the server, I ran into issues due to it expecting a file path that it can then read into a buffer:

```
readBuffer = await util.promisify(fs.readFile)(file.path);
```

This issue is resolved by skipping this step with a custom Service and providing Strapi with the binary buffer directly.

Here's the code that worked for me:

```
uploadFileBinary: async (binary, uuid) => {
    const fileInfo = { name : uuid }
    const metas = {}
    const { optimize } = strapi.plugins.upload.services['image-manipulation'];
    const { buffer, info } = await optimize(binary);
    const formattedFile = await strapi.plugins.upload.services.upload.formatFileInfo(
      {
        filename: uuid + '.png',
        type: 'image/png',
        size: binary.toString().length,
      },
      fileInfo,
      metas
    );
    const fileData = _.assign(formattedFile, info, {
      buffer,
    });
    const upload = await strapi.plugins.upload.services.upload.uploadFileAndPersist(fileData)
    return upload.id
}
```

Once implemented, I was able to call the endpoint and create the screenshot .png using Puppeteer and then provide the generated binary buffer to my custom uploadFileBinary Service to insert into Strapi's media library.

Success!
Connect to Docker database with an external tool
Tags: docker, database
Published: 2021-07-01 07:00:40

Docker is pretty awesome, and when creating a database instance with Docker, we can log in through the terminal command.

However, I'm one for [graphic Database tools](https://daily-dev-tips.com/posts/top-5-mysql-clients-for-mac/), so today I'll guide you through how to connect to a Docker database.

## Created the Docker database image

For this example, I'm going to use a [MariaDB](https://daily-dev-tips.com/posts/mac-installing-mariadb/) instance. The purpose of today is to show you how to connect with it.

Create a new `docker-compose.yml` file. This is the configuration file for Docker.

```yaml
version: '3.7'

services:
  db:
    image: mariadb
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/mysql
    ports:
      - 3307:3306
    environment:
      MYSQL_DATABASE: my_db
      MYSQL_USER: root
      MYSQL_PASSWORD: root
      MYSQL_ROOT_PASSWORD: root

volumes: db_data:
```

Above, we create a simple MariaDB image. I map the volume to a local folder (db_data).
Furthermore, we set the environment to have some log-in possibility and a default database.

But the critical part for connecting is the ports!
The first number is the port we can connect to. We mustn't use `3306` for this since this is our default system database.

I choose to use `3307` as it's close to what we know.
You can, however, change this to anything that's not in use.

Now when we run `docker-compose up`, we spool up this database.

![Docker MySQL instance](https://cdn.hashnode.com/res/hashnode/image/upload/v1624687000723/DUvHop4qe.png)

## Connecting to the Docker database

Alright, let's see how we can now connect to this, I'm using TablePlus, but the concept is the same for any tool.

We start by creating a new connection.

![TablePlus connect to Docker instance](https://cdn.hashnode.com/res/hashnode/image/upload/v1624687144316/5Pw0L6KAT.png)

The main parts here are:

- `host`: 0.0.0.0 as this will be the default docker host
- `port`: 3307 as we described above
- `user`: the user you set in the environment
- `password`: the password set in the environment

Now you should be able to test and connect with the Docker database!

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
WazirX Referral code ujeq4pg4 Earn 50% commission on trade
Tags: wazirx, referralcode
Published: 2021-07-01 06:44:32

<p>Wazirx Referral Scheme is the best option if you want to earn a lifetime income. It will help you make money over the long term as it is applicable for life.</p>
<table width="503">
<tbody>
<tr>
<td><span style="background-color: #ffcc00;">Wazirx</span></td>
<td><span style="background-color: #ffcc00;">Crypto exchange</span></td>
</tr>
<tr>
<td>Wazirx referral code</td>
<td><strong>ujeq4pg4</strong></td>
</tr>
<tr>
<td>Refer &amp; Earn</td>
<td>&nbsp;Register here</td>
</tr>
<tr>
<td>Commission</td>
<td>50% trading fee</td>
</tr>
</tbody>
</table>
<p>Refer people to earn money. Refer to WazirX for a referral code. Use the following referral code to join WazirX. Use a mobile or desktop browser to sign up.</p>
<p>&nbsp;</p>
<p><span style="color: #008000;"><strong>Wazirx Referral code " ujeq4pg4"</strong></span></p>
<p>&nbsp;</p>
<p>Wazirx Referral code required to make money</p>
<p>Valid Email Address to verify email and accept withdrawal requests.</p>
<p>You will need a valid phone number. Your mobile number can be used to verify your identity and also act as 2-factor authentication.</p>
<p>To verify your identity, you will need a valid ID card in order to trade, buy, or sell.</p>
<p>You will need an active Bank account in order to deposit and receive funds from that account.</p>
<p>Refer a friend to get 50% cashback when you sign up at Wazirx</p>
<p>&nbsp;</p>
<p>![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0dakahufuktvousizak.png)</p>
<p>Get the Wazirx App, or sign up on your browser</p>
<p>Register using your email address and password. Make sure you remember it.</p>
<p>To deposit INR into your wallet, you must complete KYC and verify with the bank.</p>
<p>Wazirx is the most trusted and safest app for trading.</p>
<p>Wazirx p2p program to buy and sell coins</p>
<p>Wazirx's p2p program makes it easy to deposit and withdraw money with p2p.</p>
<p>&nbsp;</p>
<p>If you create a request to buy or sell coins, Wazirx <a href="https://www.techbuy.in/wazirx-referral-code/">referral code</a> will match it with another party.</p>
<p>Wazirx displays the details and amount of the person to which we want to send money or buy coins.</p>
<p>Once they verify that they have received the money, wazirx will hold any other party coins. Wazirx will release those coins to your account.</p>
<p>It is absolutely free!</p>
<p>Earn as much as you can with the Wazirx Referral Program</p>
<p>Wazirx has made Wazirx a great platform. There are no restrictions on referrals. You can invite as many people as you like and earn decent money by referring your friends.</p>
<p>&nbsp;</p>
<p>Wazirx will reward you for referring friends to Wazirx and helping them trade with Wazirx.</p>
<p>&nbsp;</p>
<p>Conclusion</p>
<p>Refer a friend to join.</p>
Writing a Leetcode Kotlin Android App - Day 1
Tags: android, kotlin, leetcode
Published: 2021-07-01 06:22:42

This post is a continuation of my [previous post](https://dev.to/stephanbranczyk/writing-a-leetcode-kotlin-android-app-day-0-3eg5) on the idea of creating an Android app for Leetcode problems.

## Outline of Initial Mockup - V 0.1
### Three screens
* List of Leetcode Problems (3 problems to begin with)
   * Two sum - problem [1](https://leetcode.com/problems/two-sum/)
   * Palindromic Substrings - problem [647](https://leetcode.com/problems/palindromic-substrings/)
   * House robber - problem [198](https://leetcode.com/problems/house-robber/)
* Problem Statement Screen
* Coding Solution Screen

## Mockup - V 0.2
### Readability
* Summarized problem statement
* Very large font
* Summarized solution
* Actual code solution

## 
### Flexible form factor
* Vertical view on phone 
* Landscape view on tablet

### Underlying principles
#### ASCII diagrams
Do all my explanatory diagrams in ASCII text. Knowing how to draw diagrams in ASCII is an advantage for interviewees during remote coding interviews. 
#### Active Recall
Use [cloze deletions](https://www.supermemo.com/en/archives1990-2015/articles/20rules) to keep the architecture of my app simpler
* Reveal each cloze one at a time or all at once
* Prototype what I have in mind on [Anki](https://www.freecodecamp.org/news/use-spaced-repetition-with-anki-to-learn-to-code-faster-7c334d448c3c/)

### Other ideas
* Link to original problem
* Link to launch youtube videos related to problem

#### Once list of problems gets long enough
* Add Bookmark Icon to list and problems
* Add easy/medium/hard ranking
* Add search functionality
* Add categorizations
* Add links to related problems

<!-- 
* Some nice to have features, but that I'm not sure about
   * Link to easier related problems (or more difficult related problems)
   * Allow the user to highlight text in the problem statement?



### v. 0.8
#### Whiteboard overlay functionality
### v. 1.0
#### Spaced Repetition System
* Atomize information
   * Include cards checkbox
   * Show card
   * Again, Good, Easy buttons
   * Next review date
   * Practice the problem itself
* Additional features in no particular order
   * Random button

## Development 
### ConstraintLayout
### Jetpack Compose
### Room
### local file only, no database
-->
2022 Hackathon Season
Published: 2021-07-01 06:21:11

MLH Init began on 27th June 2021,marking the start of the 2022 hackathon season.It has been super exciting till now,and I hope to attend and complete more and more challenges every day!

This time the new live challenges have been a great oppurtunity to give folks an exposure to newer fields.and the challenges have been really community centric annd fun.

Hoping to attend all the 2022 season hackathons by MLH because it's really worth learning and testing new skills.
Saving a pandas Dataframe as a CSV File
Tags: machinelearning, datascience, computerscience, python
Published: 2021-07-01 05:50:39

https://waliamrinal.medium.com/saving-a-pandas-dataframe-as-a-csv-file-4f8b74b7a1bc

Pandas is a powerful resource for you as a Data Scientist. Pandas is an open-source library that is built on top of the NumPy library. 

Sometimes easy tasks such as saving your dataframe can be a hassle if you have recently started playing with them. Also saving your dataframe gives you numerous amount of options to work with your data in whatever style you want. 

Therefore here is an article, which most of you might have worked on in your project but don't consider remembering it. Have a look at the article and please give your valuable feedback.

Topic: Saving a pandas Dataframe as a CSV File

#data #datascientist #machinelearning #datascience #pandas #usecase
What can I do with Remix IDE?
Tags: solidity, plugins, smartcontracts, remixide
Published: 2021-07-01 10:34:08

---
title: What can I do with Remix IDE?
published: true
date: 2021-07-01 05:30:05 UTC
tags: solidity,plugins,smartcontracts,remixide
canonical_url: https://medium.com/coinmonks/what-can-i-do-with-remix-ide-85e6803986e0
---

[![](https://cdn-images-1.medium.com/max/600/1*zZSUYJzqekUhewQljfJ96w.png)](https://medium.com/coinmonks/what-can-i-do-with-remix-ide-85e6803986e0?source=rss----721b17443fd5---4)

Exploring the plugins on Remix IDE — a Smart Contract developer’s POV

[Continue reading on Coinmonks »](https://medium.com/coinmonks/what-can-i-do-with-remix-ide-85e6803986e0?source=rss----721b17443fd5---4)
Getting Started with the Blazor ListView Component
Tags: blazor, listview, component, webdev
Published: 2021-07-01 05:27:28

Learn how easily you can create and configure the [Blazor ListView](https://www.syncfusion.com/blazor-components/blazor-listview "Blazor ListView") component from Syncfusion using Visual Studio.

In this video, I’ll create a new Blazor WebAssembly app using Visual Studio 2019 and integrate the [Blazor ListView](https://www.syncfusion.com/blazor-components/blazor-listview "Blazor ListView") component by adding the Syncfusion Blazor package from NuGet. I’ll also explain how to configure a few of the control’s basic features like how to bind different types of data, group list items, add checkboxes to a list, and add nested list items.

Download an example from GitHub:
https://bit.ly/2AIzUhm

Demo: https://blazor.syncfusion.com/demos/listview/default-functionalities

{% youtube 3uCjLuwukPw %}
Hello, I am David founder and lead dev at the Onsu programming language. Ask me anything!

Published: 2021-07-01 05:18:44

Hello, world!

I am David, a 12 years old hobby programmer, maker and open-source enthusiast!

Things I do:
compiler construction
learning blockchain dev
maintaining the Monero currency

https://www.rav4world.com/threads/toyota-alexa-make-iphone-battery-drain-fast.313922/
https://forum.fractalaudio.com/threads/iphone-on-ios-14-2-1-uses-battery-drain.174277/#post-2112881
https://www.native-instruments.com/forum/threads/battery-4-kits-missing.444631/
https://forums.everythingicafe.com/threads/great-battery-life-on-iphone-4.59409/page-8
https://www.avforums.com/threads/iphone-11-pro-battery-usage-times.2366717/
https://www.ferrarichat.com/forum/threads/iphone-x-battery-replacement.643924/
https://forums.garmin.com/apps-software/mobile-apps-web/f/garmin-connect-mobile-ios/268356/vivosmart-4-will-not-connect-to-iphone-12-pro-max
How to Get Values From Array With Specific Range in Javascript
Tags: javascript, api, array, ruby
Published: 2021-07-01 05:08:29

## Ruby World 💎

In Ruby, I can get the specific range from an array like this;

```ruby
>> myArray = ['a','b','c','d','e','f','g', 'h', 'i']
>> myArray[0..4]
=> ['a','b','c', 'd', 'e']
```

However, since I am not using `Ruby` on this project and am using **vanilla Javascript**, I wonder how to achieve the same result.

Turns out that it's extremely easy to do !!!

---

## Javascript World 🌈

#### You can use [`array.slice(begin [, end])`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) !!!

```javascript
var myArray = ['a','b','c','d','e','f','g', 'h','i'];
var sliced = myArray.slice(0, 5); //will contain ['a', 'b', 'c','d', 'e']
```

Easy right.

If you notice, the last index is different from the `Ruby` implementation.

This is because **the last index is non-inclusive**; to mimic ruby's behavior you have to increment the `end` value.

So, in `Ruby`;
```ruby
myArray[m..n]
```
in `Javascript`;
```javascript
myArray.slice(m, n+1);
```
> the second argument to slice in `Ruby` is the **length**, but in `JavaScript` it is the **index of the last element**.

## Other stuff

1) You can also pass a **negative number**, which selects from the **end of the array**:
```javascript
var myArray = ['a','b','c','d','e','f','g', 'h','i'];
var lastThree = myArray.slice(-3);  //g, h, i
```

2) If `end` is **omitted**, `slice` extracts through the end of the sequence (`arr.length`).
```javascript
var myArray = ['a','b','c','d','e','f','g', 'h','i'];
var noEndInSlice = myArray.slice(5);  //f, g, h, i
```
> which indicate that the `end` value is **optional**

The End

---

Resources:
[1](https://stackoverflow.com/questions/3580239/javascript-array-get-range-of-items) [2](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) [3](https://cmsdk.com/javascript/get-values-from-array-with-specific-range--javascript.html)
Job search is broken
Published: 2021-07-01 04:41:04

I personally think the current state of job search is broken. When your type your favorite job position on the job search bar, you get the best results at the top from FAANG and other companies. But when you look through those jobs, it might not match your skill set, experience level, etc. When you search all the jobs, you may match with two or three jobs after wasting a lot of time.

What if we can build something to solves these issues? I need all your suggestions by filling out the short 1-minute survey given below:

https://forms.gle/e6aZh4pJMeYTCwuy6
Modal File Manager: Update and Extensions
Tags: svelte, nwjs, html, css
Published: 2021-07-01 04:34:19

I recently wrote an update to my [Modal File Manager project](https://github.com/raguay/ModalFileManager) called [Modal File Manager: Update and Extensions](https://blog.customct.com/modal-file-manager-update-and-extensions). It goes into many new features that I've added to the Modal File Manager, how to install the macOS version that I bundled for downloading, and all the themes and extensions that I've created for the Modal File Manager. 

I hope you enjoy this fun little project and decide to help me in the journey to create a very powerful, dual file pane file manager together!
Modify or Update live database in Python and Django
Tags: python, django, career, database
Published: 2021-07-01 04:17:53

Hello guys, in this post I'm gonna tell you about how to update the live database in Python and Django, you'll see in this blog how to connect with the live database and update or modify that. we update and convert all the emails into lowercase. We'll use LOWER(column) function for converting all the emails into the lowercase.

```
pip install psycopg2
```

Psycopg2 is used to implement a connection pool.

Make a connection and enter your database name and credentials or host and password.

```
conn = psycopg2.connect(
    database = "dindin",
    user="postgres",
    host="localhost",
    port="5432",
    password="Shivam123",

)

cur = conn.cursor()
```

then execute a update command 

```
cur.execute("UPDATE auth_user SET email = LOWER(email) WHERE email != LOWER(email);")
```

after then commit this

```
conn.commit()
```

then use the select command and select all the users from your table name

```
cur.execute("SELECT * from auth_user")
rows = cur.fetchall()
```

and then print all the user details you want to print or want to know that your emails are converted successfully or not. Use these print commands, and please write their indexes carefully otherwise it shows errors.

```
for row in rows:
    print("ID :", row[0] )
    print("username :", row[4] )
    print("email :", row[7] )
    print("/n")
```

and print this command for checking your program compiled successfully or not.

```
print("Complete")
```

then close the connection.

```
conn.close()    
```

and name this file as update.py and  run this program in your terminal

```
python update.py
```

after running this command you will see the complete message in your terminal.

Thank You
Shivam Rohilla | Python Developer
Finding element that appears once in an array where other elements appear twice : Leetcode
Tags: algorithms, typescript, arrays
Published: 2021-07-01 03:56:16

This is an example implementation using hashmap. The input array nums is considered to have only one unique number found once, other numbers occurs > once. 

```
// ts
function singleNumber(nums: number[]): number {
    
    const hash = {};
    
    for(let i = 0; i< nums.length; i++){   
        hash[nums[i]] = hash[nums[i]] ? hash[nums[i]] + 1 : 1
    }

    return Object.keys(hash).filter(k=> hash[k] === 1).map(k=> parseInt(k))[0];
    
};
```
Course Launch: Build a REST API Using Python and Deploy it to Microsoft Azure
Tags: python, azure, cloud, webdev
Published: 2021-07-01 03:54:40

There are tons of articles out there about why you should learn Python, but I’ll keep it simple. It is easily one of the most versatile languages that you can pick up. It’s great for machine learning, data science, web development, and in some extreme cases, building out distributed systems.

If you plan on becoming a software engineer, you need to have a solid understanding of how to build and work with APIs, particularly RESTful APIs.

They are the glue that connects data together and allows authorized applications to easily access it. APIs define the interactions of your product (i.e. what it does / how it can be used) and allow those interactions to be easily integrated into other platforms. In a sense, they underpin the apps we use everyday. Learn them now, and learn them well. It will pay huge dividends down the road.

Checkout the course now at [Educative.io](https://www.educative.io/courses/rest-api-python-microsoft-azure?aff=xg3L).