teleren/devto huggingface dataset:
Methods in Python O.O.P
Tags: python, programming, codenewbie, oop
Published: 2021-08-17 09:08:04

![methods in python](https://dbader.org/static/figures/python-classes-magic-methods.png)
###Introduction
This is a series of <a href="https://dev.to/titusnjuguna/simplified-object-oriented-programming-python-3l12">Simplified Object-oriented programming in python</a>. Kindly check out the post before proceeding. As discussed in that post,here we will discuss the following:
  - Definition of Methods
  - Types of methods in python
  

##What is a Method?
Recall definition of a class, we mentioned that an object has two properties: an attribute and behavior. Now in a simpler term, a method is a way of defining behavior of an object.

Python offers various types of these methods. These are crucial to becoming an efficient programmer and consequently are useful for a data science professional.

##Types of Methods in Python
There are basically three types of methods in Python:
  * Instance Method
  * Class Method
  * Static Method

###1. Instance method
This is the most commonly used type of method and the purpose of instance methods is to set or get details about instances (objects). They have one default parameter *self*, although you can add other parameters.
Example 1 of instance method(with default parameter only)
```python
class Car:
   def instance_method(self):
       return("This is an instance method")
```
Example 2 (with additional parameter)
```python
class Car:
    def instance_method(self,b):
       return f 'this is instance method b={b}.'
```
###2. Class Method
The purpose of class methods is to set or get details/status of the class.When defining a class method, you have to identify it  as class method with the help of the @classmethod decorator and the class method takes one default parameter *cls*

Lets create a class method
```python
class Car:
    @classmethod
   def class_method(cls):
      return ("This is a class method")
```
Let's try access the method
```python
obj1 = Car()
obj1.class_method()
```
Output:
```python 
This is a class method
```
Different from other methods, we can access the class methods directly without creating an instance or object of the class. 
using class_name.method_name()
Let’s see how:
```python
Car.class_method()
```
Output:
```python
This is a class method
```

###3.Static Method
Static methods work independently,they do not need to access the class data.Since they are not attached to any class attribute, they cannot get or set the instance state or class state.

To define a static method, we can use the @staticmethod decorator there is no need to pass any special or default parameters.
Example:
```python
class Car:
  @staticmethod
  def static_method():
    return "This is a static method."
```
Just like the class method, we can call static methods directly, without creating an object/instance of the class:
using class_name.Static_method()
Var vs Let vs Const in JavaScript
Tags: javascript, reactnative, react, oop
Published: 2021-08-17 09:07:35

> ## Let's understand comparison between `var`, `let` and `const`.

![javascript ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwam3jlrr3oi9n9m50yr.png)


* Variables defined with `var` declarations are globally scoped or function scoped and `let` and `const` has block scope or we can say local scope.

> example:

```javascript
var testVar = 'var'; // global scope
let testLet = 'let'; // local scope
const testConst= 'const'; // local scope

function testScope {
  consol.log(window.testVar); // var
  consol.log(window.testLet); // undefined
  consol.log(window.testConst); // undefined
}

testScope() // output var
```

* Variables defined with `var` can be Redeclared but with `let` and `const` cannot be Redeclared.

> example :

```javascript
var testVar = 10; 
let testLet = 10;
const testConst = 10;

function test{
   var testVar = 20; // it will work
   let testLet = 20; // it will throw error
   const testConst = 20; // it will throw error

console.log(testVar,testLet,testConst); 
}

test(); 
```   

> * `Var` can updated and re-declared. 
> * `Let` can be updated but not re-declared.
> * `Const` cannot be updated and re-declared.  

 example :

```javascript
var testVar = 10; 
let testLet = 10;
const testConst = 10;

function test{
   testVar = 20; // it will work
   testLet = 20; // it will work
   testConst = 20; // it will throw error

console.log(testVar,testLet,testConst); 
}

test(); 
```

* While `var` and `let` can be declared without being initialized, `const` must be initialized during declaration.  

![diffrence between var vs let vs const](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhlxuii5pte2d94pwpsj.png)

### This all about var, let and const.

Got any question or additions? Please let me know in the comment box.

Thank you for reading 😃.
Persistence: Making of a Mobile Dev
Published: 2021-08-17 09:06:03

The word, PERSISTENCE is often used when we encounter difficulties or challenges, irrespective of the person or situation.

Taking a deep dive into the tech space in Nigeria, which of course is in its infancy, we would say there are a few hubs and tech "giant" which will be well known for their work, sacrifices and persistence to take Africa to The Tech Heaven. We have seen a lot of innovations and ideas sprout out of the blues. 

But how did we get here? Talents! Yes, Yes thats the word, but a standalone word which can be horned and groomed either by self (Self thought) or by bootcamp sessions.

I have always have a keen interest in Mobile technologies and its UI/UX concepts. But how can one spark his or her interest and  become better in Software development and build beautiful stuffs? 

Guess what I found? HNG internship, The Zuri Team. After 7 years, these guys are so experienced in taking you from a novice/newbie to a full blown Mobile Developer. So I opt in for The Mobile Stack and will be dealing with Flutter to become a Mobile Developer during the 8 weeks of this fast Paced internship . I am so excited about it because it will be worth it.

You want to get in, click https://training.zuri.team.

But meanwhile you might want to get your hands dirty with a few courses to frame out your desired interest. 

To Learn how to use GIT for your version control, click 
https://www.youtube.com/watch?v=SWYqp7iY_Tc

To learn Figma for designers click
https://www.youtube.com/watch?v=FTFaQWZBqQ8


To learn Flutter For mobile development click 
https://www.youtube.com/watch?v=x0uinJvhNxI


See you on the inside...
How to produce YouTube videos simpler?
Tags: beginners, video, discuss, livecoding
Published: 2021-08-17 09:04:33

Today I published my first youtube video. It was much harder to make than I expected.

I learned a lot:

- Lightning
- Sound setup
- Screen + Face + Drone recording
- Kdenlive
- OBS recording settings
- public domain licenses
- time wrap
- cutting, effects, ...
- publishing at youtube

I invested over 15 hours in producing 16 minutes video. 

Is this huge time effort normal? 
How do you prepare your videos? 
How do you edit them?

Here is my result: https://youtu.be/j5qqn2eOI2M
IDEA plugin Fast Request 2.0.0 released
Tags: idea, plugin
Published: 2021-08-17 09:04:14

![Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/von8hn13qiw1wdc9ygth.gif)

[**Fast Request**](https://plugins.jetbrains.com/plugin/16988-fast-request) is a plugin based on springmvc that help you quickly generate **url** and **params**.It is also a http client tool.

You only need to click the rocket icon on the left side of the method, the plugin will help you generate the method url and parameters and display in the tool, and then click Send Request to complete the API debugging in IDEA, and you can save the history request 

Compared with the HTTP Client, Fast Request not only has the built-in functions of the HTTP Client, but also provides a friendly, easy-to-understand and intuitive interface, which makes it more convenient and simple for users to debug the API. At the same time, various types of parameters also provide different customization methods to make it more flexible.

updates
1. support store request
2. support params optional
3. optimal iu
My goals as an Intern
Tags: react, javascript, webdev
Published: 2021-08-17 09:03:30

My name is Juwon, a front-end developer. I recently came across the Zuri intership program, an online workspace community where students and developers grow and learn in which I believe will be
stepping stone for me in my journey as developer.
For more information about the program click here:
https://internship.zuri.team   

###By the end of the internship I hope to:
* To build relationships with people I can look up to as mentors
* Grow my experience working in Teams.
* Expand my network and meet like-minded students and developers like myself.
* Be more proficient as a web developer

### Here are some useful resources for anyone looking to gain more knowledge on web development
1. HTML, CSS and Javascript for beginners:
(https://youtube.com/playlist?list=PLC3y8-rFHvwiLG5IsOAxDkacPGPVYZlOT)

2. Intro to node.js:
(https://youtube.com/playlist?list=PLillGF-RfqbYLBAkywyB2cCy8y87GAket)

3. Introduction to figma:
https://youtu.be/FTFaQWZBqQ8

4: Intro to git and gitHub:
https://youtu.be/RGOj5yH7evk

5:Intro to react:
https://youtu.be/w7ejDZ8SWv8
Cloud BYOC
Tags: twilio, programming, productivity, saas
Published: 2021-08-17 08:57:20

Hello Developers !

We’re kicking off the Cloud BYOC project, a community-inspired SaaS project for existing Twilio, Zoom Phone, and other cloud communications users, with the of use cloid Bring Your Own Carrier (BYOC) feature,you can use any of the available 300+ providers instantly or add your own carrier, unify control of routing and billing under on roof. 

The goal for this project is to let you have just one BYOC profile and control routing policies to multiple carriers via #CloudBYOC portal without the need to create another BYOC profile per carrier. By default by using CloudBYOC you don’t have to be dependent on one carrier, there are hundreds of alternatives that you can switch to without creating yet another BYOC profile in your Twilio, Zoom Phone portal. 

With CloudBYOC you don’t need an SBC or billing system to manage your costs across different providers. It providers you all that out of the box! 

For this project, we welcome both #developers and telecom carriers to join and contribute to solving the cloud communication BYOC debate once and for all. 

If your interested in trying this out when ready, you can register here: https://lnkd.in/eppknHD3
Kodecamp 2021 Internship Program plans
Tags: webdev, javascript, react, typescript
Published: 2021-08-17 08:55:31

I recently joined kodecamp 2021 internship program. I have to say, I am eager to what awaits me during this program. I recently developed a passion in programming and aiming to be a front-end web developer.

Here's my goals for the 16-week internship program:
* [Master HTML & CSS] (https://www.freecodecamp.org/learn/responsive-web-design/)
* [Learn Javascript](https://www.sololearn.com/learning/1024)
* [Learn CSS preprocessor, **SASS**](https://www.udemy.com/course/advanced-css-and-sass/)
* [Learn Javscript preprocessor, **Typescript**](https://www.udemy.com/course/typescript-the-complete-developers-guide/)
* [Learn React](https://www.udemy.com/course/react-the-complete-guide-incl-redux/)
Getting started with data science and machine learning
Tags: machinelearning, datascience, ai
Published: 2021-08-17 08:54:20

🚀 Getting started with data science and machine learning.

- the first step is to know what data science and machine learning mean. is this field worth getting into?
- if you ask me, I would say yes. the world is data-centric. in every industry, data is useful and will be for a long long time. 
- if you are a developer, it will be easier for you to get into data science
- but it also means you have to work twice as hard since you are already working
- if you are a fresher or a student, it's much easier for you to spend at least 4 hours a day learning something new
- now a lot of people ask where to start from? 
- step 0 will be learning to code. I prefer python and so does the majority of the industry and research when it comes to machine learning/data science
- then, you can start by googling what is machine learning and reading the Wikipedia page. then you can try Andrew Ng's Coursera course on machine learning and create an account on Kaggle. Go through the course, work out the exercises and simultaneously, start taking part in a Kaggle competition: for example, the Titanic one. Also, there is no need to spend more than a few weeks (max 1 month) on this competition.
- a lot of people will tell you that you don't need to know the basics, just learn very high-level libraries, but do not trust them. start from the course mentioned above but do solve a problem simultaneously.
- These are a few courses you can take a look at: 

Coursera machine learning: https://lnkd.in/dns-Rnj

fast.ai course: https://course.fast.ai/

CS229 Machine Learning: https://lnkd.in/d6F9NrU

Intro to convnets (CS231n): https://lnkd.in/dkQ2yXy

Natural Language Processing with deep learning (CS224n): https://lnkd.in/dSidxDX

deeplearning.ai Deep learning specialization: https://lnkd.in/dhFWTYy

Machine learning crash course from google: https://lnkd.in/d96x4Cg

to be honest, there are many free courses available online that you can go through. it doesn't matter which courses you take. if you plan on just starting a course and solving problems without understanding anything, you will be in big trouble. if you do not plan on finishing a course, it's better not to start.

If you plan to do Bachelors, or Masters there are many universities that offer degrees in computer science and data science, ai, etc in both Europe and the USA. P.S. in Europe, most universities do not have a tuition fee. Unfortunately, I don't advise on which universities to go for. All universities are good. It's all up to the student.

#datascience #machinelearning #deeplearning
Use iconic.app icons in your Django templates
Tags: django
Published: 2021-08-17 08:54:14

[iconic.app](https://iconic.app) icons are a wonderful, free, set of icons. You can use them wherever you like. How you use them is by copy and pasting and SVG into your templates. That can be a bit cumbersome.

But there is a better way for your Django (and Jinja) templates: use [iconic](https://github.com/monty5811/iconic) and you can include any icon by name:

```django
{% load iconic %}

{% iconic_icon "announcement" size=48 class="h-4 w-4 inline" %}
```

Easy peasy.

### Links

 * [iconic.app](https://iconic.app)
 * [Github](https://github.com/monty5811/iconic)
 * [pypi](https://pypi.org/project/iconic/)


### Credits

 * Thanks to [@jamesm](https://twitter.com/jamesm) and [@ormanclark](https://twitter.com/ormanclark) for the fantastic icons. You should definitely buy the "Pro" icons
 * The python package is a fork of the [heroicons](https://github.com/adamchainz/heroicons) package by [Adam Johnson](https://adamj.eu/). Check out his [announcement post](https://adamj.eu/tech/2021/04/16/introducing-the-heroicons-python-package/) for more information

### Caveats

Right now this package does not support the Pro icons in any way - you still need to copy and paste those SVGs.


### Full Instructions

Install the package

```sh
pip install iconic[django]
```

Add it to your `INSTALLED_APPS`:

```python
# settings.py
INSTALLED_APPS = [
    ...,
    'iconic',
    ...,
]
```

Then just load it and use it in your templates:


```django
{% load iconic %}

{% iconic_icon "announcement" size=48 class="h-4 w-4 inline" data_controller="announcement" %}
```
How to be better at coding?
Tags: skills, productivity, webdev
Published: 2021-08-17 08:42:41

I tried to learn python on my own last year from codecademy and MIT opencourseware youtube channel. I completed 80% of codecademy course and watched 4 lectures of MIT opencourseware, then I stopped, suddenly my interest level dropped maybe because I had university assignments piling up or maybe the course was not giving me any signals on how much I was improving. I am not trying to take away the value these course provide but as a commerce student, self learner and victim of instant gratification, these course did not work out for me.

Then I found [neog camp](https://neog.camp/guide/home), a **bootcamp** which is more focused on project based learning, in just a month I learned basics of HTML, CSS, javascript and even made two apps in [react](https://tzvd4.csb.app/). Now I am on my way to take admission in level 1 of this bootcamp.

So first thing is watch a tutorial and then try to make the **project** from your memory, this will give you the confidence you need to keep going on this long journey also projects gives you satisfaction that you have created a working application at least it does for me.

You can join an online **community** where people share projects, solve doubts and make professional connections. There are tons of community out there but I have found it takes a lot of time to find a good active community, I have solved that problem for you, join this [Team Tanay](https://discord.gg/sw5zFxqt) community where we discuss front end projects and solve doubts.

Last I would like to add is reading **documentation**, generally for a language there are websites which explains syntax and its usage but nothing is better than reading documentation, it will build your **basics** and is helpful when you are stuck.
Youtube: Rust SDK - DJI Tello Drone
Tags: rust, drone, tutorial, beginners
Published: 2021-08-17 08:53:36

## Rust SDK - DJI Tello Drone

![YouTube](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfku8wotqsepagrp2hiw.png) 

Finally, I did it!
https://youtu.be/j5qqn2eOI2M

It is much harder than I expected, and I could invest more days to polish it. 

## What I learn:

- 🔥 No take_off() without land()
- 🏄 How to use Kdenlive
- 📜 Make a script before starting a video 
- 🤯 LiveCoding without a script for a video is hard
- 🪚 Flying a drone without seeing it could hurt


## Repo:

crates.io: https://crates.io/crates/tello
github: https://github.com/Alexander89/rust-tello
Angular Shared Module
Tags: angular, github
Published: 2021-08-17 08:53:26

In my last post we look at lazy loading in angular [Link](https://dev.to/es404020/lazy-loading-angular-429g) in the post here, but we have a little draw back to this structure. Which is duplications of modules or components.
   Take for instance I am to use ng-news-api in 3 of my lazy loaded modules , I have to load this modules in all 3 modules which is stressful and code duplication. The best way to handle this is by creating a shared module which can be reuses across the 3 modules.

To implement this :

Step 1: create a module without 

```
ng g m @shared/share 
```

Step 2:Refactor the newly create module to work like a shared module. By adding exports key to the **ngModule**:

```
@NgModule({
  declarations: [TableComponent],


  imports: [
NewsModule
   
  ], exports: [
   NewsModule
  ]
})
export class SharedModule { }


```
Step 3:This newly created shared module can be imported in the all the 3 modules by adding it to the imports section of the 
**@NgModule in the module.ts** file of each of the modules.

With this you can just import and export new modules on the shared module and it reflect across board.

Thanks for reading.
HNGi8: a place to be. 
Published: 2021-08-17 08:49:07

I am Opeyemi Oyeyipo, a Student of Kwara State University who is versatile in some certain skill sets with years of experience. As a core, Frontend developing is what I do. 

WHAT IS HNGi8?
HNG stands for Hotels.ng, a company who is responsible for allocating beautiful apartments for clients both locally and internationally. They are a Nigerian online hotels booking agency which was launched in 2013. The platform was founded by Mark Essien who hails from Akwa Ibom State, Nigeria and claims to list over 7,138 hotels from 320 cities in Nigeria. 
Generously, they host the HNG internship yearly to train people to learn and improve on some skill set. HNGi8 is the 8th edition. 

So, I applied for the HNG8 internship (https://internship.zuri.team) somewhat last month, got onboarded to the program on slack and I must say it's been a beautiful experience. Gosh, there's a lot of people with great skills, and connecting with these people has been a wonderful experience. 

Learning for me never stops; it is an endless process which I've solely fallen in love with. With HNG8, learning lingers on; you can't just decide not to learn when you're part of the workspace (the announcement channel alone sef😂), with the constructors we have as mentors. 🥰
The training will run for 8 weeks, 8 weeks of discipline, dedication, time management, and improved knowledge. That I won't joke with (who even wants that?) because it defines a core aspect of my career. 

MY GOALS FOR THE HNGi8. 
Before 2021, I drafted out a resolution and improving myself came up top. HNGi8 will be one avenue I can use to perfect that. I also want to build a network of skilled people who are willing to give all it takes to make things work out, with learning as as their core goal.
For the beautiful minds starting out in tech, I will advice that you keep up with that; you can only testify to what you've tried, and I must say it's a beautiful process. With the right tools, courses, books to read you can attain what you want to. 
Below are links to various programmes you can try out; learn and keep learning! 

FIGMA
https://youtu.be/c9Wg6Cb_YlU

GIT
https://youtu.be/RGOj5yH7evk

HTML
https://youtu.be/qz0aGYrrlhU

CSS
https://youtu.be/1Rs2ND1ryYc

JAVASCRIPT
https://youtu.be/eIrMbAQSU34

PYTHON
https://youtu.be/_uQrJ0TkZlc

FLUTTER
https://youtu.be/x0uinJvhNxI
My goals for kodeCamp Internship program
Published: 2021-08-17 08:34:49

I am Egwuenu precious a beginner in frontend development and here are what I want to achieve at the end of the 16 weeks internship program.

My goals for the internship program.
1. Meet and connect with people.
2. Improve my skills in frontend development.
3. Experience as much as I can.
4. Get a well paying remote job.
5. Help and guide new beginners in my track
HNGi8 x 14G: Goals and Achievements
Published: 2021-08-17 08:31:26

I recently joined the workspace of this internship I'd been seeing a lot about on twitter, I have heard a lot of things about this internship and people that have gone through it. Generall, the conclusion I have come to is that it is a fast paced internship that gathers like minds that are interested in tech and development and bring out the best in them in a short period of time and under a bit of pressure. This seems like a great idea, and the first task that was assigned on the work space was to write an article stating what we aim to achieve and our goals for the next eight weeks.

I recently started NYSC and this is going to be a tough one for me as I am going to have to combine both my job and the internship but I am excited for the opportunity to see how far I can push myself to complete tasks, and to build technologies that I never thought I would come across. I am a frontend developer and my main tracks are Reactjs and Nextjs.

My goal for this internship is to become a better developer than I already am, work successfully in a group with other developers and designers and become the best version of my developer self that I can be. I started this journey by joining the zuri team slack channel (zuri is also an internship program but for complete beginners), you can find out more about that on https://internship.zuri.team .

If you are a beginner in tech or hoping to break into frontend web development here are some resources you can use to get started

- Begin with HTML and CSS
https://www.youtube.com/watch?v=mU6anWqZJcc

- Javascript as a programming language
https://www.youtube.com/playlist?list=PL4cUxeGkcC9haFPT7J25Q9GRB_ZkFrQAc 

- You will need to know the basics of figma https://www.popwebdesign.net/popart_blog/en/2020/08/figma-101-the-beginners-ultimate-guide-to-the-basics/

- Collaboration and version control https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners