teleren/devto huggingface dataset:
Python'da sınıf kavramı
Tags: python, sinif, class
Published: 2020-08-26 19:34:39

Özellikle nesne yönelimli programlama geliştirilirken en önemli kavramlardan birisi sınıf(class) olarak düşünülebilinir.

Python üzerinde sınıf kavramından bahsedeceksek özet olarak fonksiyonlar yerine yöntem(method), değişken yerine de nitelik(attribute) kullanacağınızı düşünebilirsiniz.

Sınıf kavramını bir çok nesne yönelimli programlama kitabında bulabilirsiniz fakat bu yazımızda Python üzerinde basit bir örneği üzerinden anlatılmaya çalışılacak.

## Basit değişken nedir?

Python üzerinde herhangi bir basit şekilde aşağıdaki yöntemlerle sayı ve yazı şeklinde iki tip değişken tanımlayabiliyorsunuz:

```python
ad="ali veli"
numara=12
```

## Basit fonksiyon nedir?

Yine python üzerinde basitçe bir fonksiyon tanımlamak için aşağıdaki gibi kullanım sağlanabilmektedir:

```python
def adinNe(isim):
	return("adım "+isim)
```

## Peki yöntem ve nitelik nedir?

Python üzerinde sınıf tanımlayarak aşağıdaki gibi yöntem ve nitelikler tanımlayabilirsiniz:

```python
class personel:
	tipi="insan"
    def __init__(self,ad,no):
    	self.ad=ad
        self.no=no
    def adinNe(self):
    	return("ad: "+self.ad)
    def numaraNe(self):
        return("no: "+str(self.no))
```

### init yöntemi

Bu tanımlamalarda en farklı gördüğümüz kısım \_\_init\_\_ isimli yöntem(method) olacaktır. Bu yöntem özetle sınıfın tanımlanması, tanımlanırken neler yapılması gerektiğini anlatır. Yani birazdan nesne oluştururken kullanılacak yöntem tam olarak burasıdır.

### self yapısı nedir?

Sınıfın içerisindeki herhangi bir nesnenin, "global" bir yapı kazanması yani bulunduğu yapının bir üst katmanında da kullanılabilmesini sağlayan yapıdır.

Yukarıdaki örneğimizde init yönteminde dışarıdan aldığımız 2 değişkeni, içeride çeşitli yöntemlerin içinde de kullanabilmek için "self" yapısı kullanılmıştır. Eğer adinNe ve numaraNe yöntemlerinde self kullanılmaadan değişkenler kullanılsaydı bu değişkenler diğer yöntemlerde kullanılamazdı.

## Sınıfı kullanma ve nesne oluşturma

Python üzerinde sınıfı kullanarak birden fazla nesne oluşturmak için aşağıdaki gibi örnek yapabilirsiniz:

```python
kisi1=personel("ali",101)
kisi2=personel("veli",102)
kisi3=personel("zeki",103)
```

## Nesnedeki yöntem ve nitelikleri kullanma

Python üzerinde oluşturulan nesnelerdeki nitelik ve yöntemleri basitçe kullanmak için aşağıdaki örnekleri kullanabilirsiniz. Ve bu örnekte aslında kisi1 nesnesinde tanımladığınız yöntemlerle ad ve numara ayrı ayrı ekrana yazdırabilirsiniz:

```python
print(kisi1.adinNe())
print(kisi1.numaraNe())
```

Ayrıca herhangi bir nitelik kullanmak istediğiniz de aşağıdaki gibi çağırabilirsiniz:

```python
print(kisi1.tipi)
```

## Özet

Özet olarak temel sınıf bileşenlerini anlatmak istedim. Umarım faydalı bir içerik olmuştur ve kullanılmasında yardımcı olur.

----

Tempus fugit
Microservices Interactions
Tags: aws, microservices
Published: 2020-08-26 19:05:44

First, let's start by describing the differences between Orchestration and Choreography:

* Orchestration: An orchestrator controls the interactions between services. This orchestrator dictates the control flow of the business logic and makes sure that everything is executed according to this workflow.

* Choreography: Every service does its work independently. There are no hard dependencies between services, and they are loosely coupled only through shared events. Each one of the services is interested about certain events and they will only listen to the specific events assigned to them. For example, this would be a good scenario for event-driven architectures that use lambda functions. That is the reason why this approach is extremely popular for serverless projects that benefit from SNS, SQS, Kinesis, Eventbridge...

As we can see, the advantages of a choreography approach are:

* There is no single point of failure
* Each step of the workflow can be modified and scaled independently from the rest of the services
However, it is important to note that it will be very difficult to monitor all of those services and implement timeouts between events.

In order to solve that problem, one of the main paradigms that comes to mind is the implementation of a state machine, which is also another serverless service. As always, depending on the context one approach is more suitable than the other. It would be a mistake to draw the conclusion that all serverless projects should be inclined towards using a choreography approach.

By using an orchestrator approach with Step functions and Event Bridge monitoring becomes trivial because of the built-in visualizations and audit histories included with Step functions. It also gets easier to implement timeouts between state transitions, and all the business logic is stored in one central unit, namely a state machine that is easy to maintain and manage.
Dây da đồng hồ Tavos

Published: 2020-08-26 19:00:05

Đơn vị chuyên cung cấp và phân phối các sản phẩm về dây da đồng hồ handmade chất lượng, chính hãng hàng đầu thị trường. Cam kết đem tới cho khách hàng những mẫu sản phẩm cao cấp, dây da thật với giá ưu đãi và hấp dẫn số 1 toàn quốc.
Địa chỉ: 105 Trần Anh Tông, Nam Định, Việt Nam
Website: http://www.tavos.vn/
SĐT: 0942.381.855
Dvorak, more than a week
Tags: ergonomics, dvorak, keyboard, typing
Published: 2020-08-26 18:59:39

Original post: [orbjet.org](https://www.orbjet.org/post/2020-08-26/dvorak-more-than-a-week/)

After getting proficient with the Colemak layout I got somewhat disappointed in what it promised to deliver. The finger-rolling magic wears off as soon as you move away from the English language and I was hoping it would transition well into other typing variants (Swedish, Italian…). 

That being said, it was yet again that my curiosity got the best of me as I wasn’t ready to go back to the old querty layout. So, I took a look at the next alternative layout I had in the list (and it was either Colemak or Dvorak to begin with).

It’s important to note that Dvorak is also primarily aimed for the English language but the alternating way of typing makes it pleasant to use with other languages too, as all vowels are located on the left side of the keyboard (aoeui).

Ok, that all sounds great but what about getting good at typing in Dvorak? The learning curve follows the same process I had with Colemak (read about that in a previous post). The only difference I noticed was that I was slightly faster and less prone to errors compared to the aforementioned layout.

The one week practice investment got me up to 37 wpm with a total of 5 hours keyboard typing time.

I’d like to emphasize that I’m not looking for typing speed as much as typing comfort and Dvorak is truly relaxing to type. I’ve also noticed that the learning process was much faster compared to Colemak but that is entirely subjective and YMMW.

My reflections so far? I’m sticking with it. I tried to use it over long typing sessions with different languages and I didn’t get that tiring sensation as with the old querty layout.

Copy, paste, cut and undo mechanics? These seem the main problem for some but I’m using a programmable keyboard so no issues with the common shortcuts.

The whole keyboard layout quest has been a fun and educating journey. I’ve learned a lot about ergonomics and the importance of it for your hands. As someone who makes a living working on a keyboard, keeping healthy hands for a lasting career is imperative. Sadly it’s a topic not commonly discussed among fellow typists. It gets attention mostly when someone can’t type anymore on a regular keyboard due to RSI, carpal tunnel issues, finger numbness etc.

I would also like to note that this should be an individual exploration task. Something that works for me, will unlikely fit your typing needs.

I do need to put a side note here, Colemak is great, but it’s not for me. It just didn’t fit my needs. If you type only in English, I would highly recommend it. It’s really a joy to type with but for me… it’s team Dvorak.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jjf0kbc40kpmwo20v6ch.png)
Software Testing: to do or not to do?
Tags: 100daysofcode, testing
Published: 2020-08-26 18:55:27

Is now  good time to learn how to how write tests? Is there ever a good time to learn anything?. I've been contemplating on whether or not to learn how to test code. The first time i heard about this it sounded ridiculous; why would i have to write code to test? It does not make any sense, does it? But before we unanimously conclude on the sensibility,let's explore what testing is.

Software testing is a fault finding mission. A mission undertaken to ascertain that a software is performing the desired action efficiently. Take an example of a one page web app, you would naturally click through the links and buttons to confirm if they are working. Sounds so easy! But what if we scaled up this web app into a multiple page app (say 10 pages or so). It would quickly move from easy to boring or tedious depending on the complexity. 

The gist is instead of manually clicking through a software interface searching for bugs, you can automate the process. The advantage is that you only write tests once and use a test script (one or two words) to test the program. One command and all the clicking is done for you, how convenient!

I do not know about you, but it is kinda making sense to me. I'd rather write the tests and let the program do the rest! But let us wait and see if that changes when i write my first test. 

_See you then_
_Day 41_
Mindset and Encouragement
Tags: beginners, mentalhealth
Published: 2020-08-26 18:46:28

The following is an article that I wrote a while back mainly for myself in times of slump or discouragement. Who would have thought the past me would have ended up helping future me! I hope it provides some insight and encouragement for anyone else in the same situation.

-----------------------------------------------------------

As a second-generation Asian-American, I was raised in an environment that required a stoic temperament and expressions of vulnerability were seen as foreign. However, as we navigate these uncertain times, I wanted to break that cycle and share a few important tips to for creating a mindset that I found valuable in order to conquer the feelings of anxiety, lack of self-worth, or imposter syndrome that individuals like myself may encounter, i.e. bootcamp grads trying to land a position. But really, these can apply to anyone in a less than favorable employment position as a result of COVID-19.

Practicality

Unfortunately, the reality is that a number of bootcamp students are under the illusion that after however many weeks, a developer position will be handed to them on a silver platter. Finishing bootcamp is just scratching the surface, and the thought that there is always something to learn every day is something that should fill us with excitement every morning that we're blessed to wake up. Self-awareness is incredibly important. If the process of trying to solve a problem, finally solving it, and adding that solution to your toolbox doesn't excite you, or at the very least isn't tolerable, some self-reflection may be in order. In my short experience, the world of development is extremely welcoming, but we have to meet it halfway.

Resilience

Being stubborn is something that I have been chastised for in the past, but who would have thought that it would have come so in handy as a developer? Many budding devs feel a lot of pressure to produce great projects, really fast. The key however, is to get at least 1% better each day. Just 1%. Go above and beyond if you can, but 1% is the minimum requirement. Whether that be fixing a bug, learning a small part of a new framework, or improving your understanding of something you've already experienced. Just. 1%.

Optimism

At the end of the day, our time will come my friends. It may not be tomorrow, next month, or even next year. But it will come. Focus on building on that 1% every day and before you know it, you'll look back and won't even recognize the code that you used to write. It's easier said than done, but I wanted to offer some encouragement as I know for a fact that there are countless others who feel similarly and are going through the same trials.

I hope that this does not come off as pseudo-philosophical or entirely preachy. Remembering these things has been an immense benefit to my mindset in these times and if it helps one person tackle that problem just one more time, I'll be gratified.
Why am I here
Published: 2020-08-26 18:26:52

I am not sure why I signed up for this website. I am not completely sure what I am going to get from here. Seems like it's computers related. I like computers, no doubt about it but I'm not sure I understand most of it. I know how to use computers yet totally oblivious to their background processes and the written lines of codes. My aims are low and Nothing pleases me more than laying back, relaxing and reading about the inspirations from other peoples' stories. I hope to treasure their experiences and endeavours regarding computers.
let's see what this platform has to offer.
CommVault Interview Questions

Tags: beginners
Published: 2020-08-26 15:08:41

Top 30 Commvault Interview Questions
Q1. What is Commvault?

Ans. Commvault is a data management platform that assists organizations with data backup and recovery, cloud, virtualization, disaster recovery, security, and compliance.

Commvault software consists of modules to backup, restore, archive, replicate, and search data.

Q2. What is Commvault Simpana?

Ans. Simpana is one of the features of Commvault’s enterprise backup software platform that is specially designed for backup, archive, and reporting data. Simpana is the new version of the Deduplication process introduced by Commvault.

Q3. What are the key features of Commvault?

Ans. The key features of Commvault are listed below:

Provides complete data protection and supports all the major applications, operating systems, databases, and mobile devices. 
Efficient storage management using deduplication for disk and tape.
Simplified management through a single console
Advanced security and encryption
We can use third-party screen readers with a command-line interface, web console, and admin console.
Snapshot Management
Edge Endpoint Solutions
CommCell Management
Media Management
Data Management

Q4. What are the various ways of doing High availability?

Ans. The various ways of doing High availability are listed below:

Log shipping
SQL mirroring
Clustering SQL level

Q5. Explain storage policy?

Ans. A storage policy is a data management entity with a set of rules that describe the lifecycle management of protected data in the Subclient’s content. It manages the Subclient’s data even when it stays on other servers in Commcell.

The set of rules includes how to manage data, protect data, where it will reside, and other management options such as compression, encryption, and deduplication of data in protected storage.

If you want to read more click here: https://bit.ly/39Bho7y
My first CSS animated art!
Tags: codepen
Published: 2020-08-26 18:19:45

I have admired CSS art for a long time and finally decided to make my first attempt today. I spent way too long and it is definitely not detailed but I am quite happy with my attempt.

The scene is simple: a sun rises up behind the mountains as a cloud drifts across the sky. Everything is linear and geometric, the next project I attempt will probably include more detail and/or a more realistic animation.

Please check it out and if you have any suggestions, I would love to hear them!

{% codepen https://codepen.io/fem/pen/WNwjerV %}
Serverless Top 3
Tags: serverless, discuss
Published: 2020-08-26 18:19:27

Which are your favorite 3 serverless services and why?  I'll go first...

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/boszf7rmwxebxit9d9x8.png)

- [BigQuery (GCP)](https://cloud.google.com/bigquery) - SQL on files, so useful, just make sure you understand pricing if using huge files.  There are a number of ways to reduce the cost.  Read the docs #proTip
- [Lambda (AWS)](https://aws.amazon.com/lambda/) - yes, you know how to use it, but do you really?  For example are you using the [SAR](https://docs.aws.amazon.com/serverlessrepo/latest/devguide/what-is-serverlessrepo.html)?  And just how do you observe performance, and adjust capacity as needed, as well (X-Ray, Honeycomb.io...)
- [Logic Apps (Azure)](https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview) - buy vs. build yet again.  But, then serverless is all about speed to market now, isn't it?
Python to Neural Networks : A Guide for Beginners
Tags: python, machinelearning, beginners, computerscience
Published: 2020-08-26 17:56:05

Last Month, I completed a year of my exploration with Machine Learning and Data Science and thus, I decided to pen down the resources I have followed till now. 

I don’t say this is the way to be followed, this is just my share of experiences and mistakes which landed me here. This summary is for all my peers, who like me, find themselves lost on ‘how to-s’ of Data Science. 

## Python 101 
#### Video Resources I followed : 
Telusko’s Python Playlist : I started learning Python with [this](https://www.youtube.com/playlist?list=PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3) series by Navin Reddy which built my foundations for this journey
I have also followed lectures by Charles Severance, you can find them [here](https://www.py4e.com/) . 
[Sentdex](https://www.youtube.com/user/sentdex) is a much recommended YouTube Channel, I came across it pretty late.
#### Books I followed :
 - Automate the Boring Stuff with Python
 - Fluent Python


## Machine Learning 
#### Video Resources I followed : 
I started by taking up a Udemy Course which gave an overview of all the algorithms and its implementation, [Machine Learning A-Z](https://www.udemy.com/course/machinelearning/) by Kirill Eremenco.
While I explored the project ideas after the course, I knew I was missing on to something which was deeper and more mathematical when I read that everyone was doing a Machine Learning Course by Andrew Ng. Truly, the mathematical concepts built from this course helped me sail smoothly through the next phase. [Here’s](https://www.youtube.com/watch?v=PPLop4L2eGk&list=PLLssT5z_DsK-h9vYZkQkYNWcItqhlRJLN) the link to the course. 
You can find it on Coursera too. 
#### Books I followed :
I have relied majorly on Machine Learning Mastery with Python - Jason Brownlee
I also followed O’Reilly Python Data Science Handbook for a few things.

## Delving Deeper to the Neural Nets 
- Deeplearning.ai ‘s Specialisation Course : Again, I have finished them on YouTube (I didn’t know about financial aid a year back on Coursera). 
- [Stanford cs230](https://cs230.stanford.edu/) : Another course taken by Andrew Ng which is based on Deep Learning and its applications.
- [Stanford cs224n](http://web.stanford.edu/class/cs224n/) : A course based on Natural Language Processing, it was my stepping stone to NLP. I learnt through doing the assignments and following up from books and blogs (say, Olah’s Blog for LSTM).
[Stanford cs231n](http://cs231n.stanford.edu/) : While learning Computer Vision, this course is my guide. Solving assignments and trying out related projects was enough to substantiate the theory. Also, I can share my handwritten notes on this series, if required. 

_I can’t emphasize more on trying out self-paced Projects to implement whatever you learn! Through the year I have finished many projects, some internship assignments that helped me learn so much._
Know All The Startup From Indonesia
Published: 2020-08-26 17:54:11

There are energetic leading mobile development in Indonesia, that have come to be the hidden factor for the boom in startup development. As all of us recognize it that no startup company can picture rising among its rivals unless it is assisted with enough seed financing. Startups are newbie companies that are brand-new to the market. But to establish themselves they require to obtain their monetary backup solid. And also it is only possible if they get better funding as well as support from the most effective investors. In Indonesia, start-ups need to really battle a great deal throughout their infant stage of business. Discovering a capitalist is not that much easier as one might consider. It is truly not possible to consider start-up split second success. The majority of the start-ups fail as a result of an absence of funding and various other reasons. Nevertheless, there are some finest examples of startups like Microsoft started by Costs Gates, MacDonalds by Ray Kroc, and Ford Motors by Henry Ford.

One of the most tough job for a start-up is to gather a substantial quantity of funds in establishing and also promoting the product. Also, they need to be one-of-a-kind in terms of a brand-new concept with a huge method. However without obtaining correct funding, a start-up often tends to stop working and all their hopes and also fantasizes to make big obtains smashed. However, with the appearance of Hugaf, there can be no concerns concerning [Mobile Apps](https://hugaf.com/jasa-pembuatan-aplikasi-android-dan-ios) and Web development for your start-up.
Doorkeeper (open/close ports from GHActions) for DigitalOcean
Tags: actionshackathon, github, digitalocean
Published: 2020-08-26 17:45:26

This Github action allows you to open or close an specific port in your DigitalOcean firewall. It's really useful for deploy in your instances from Github Actions, as they don't provide a list of IPs to add to your security groups.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/82v3so588wj8mkwlfk1f.png)

### Instructions
1. You need to generate a **personal access token** from [your DigitalOcean Applications & API](https://cloud.digitalocean.com/account/api/tokens) page.
2. Copy that token, and paste in the secrets of your repo.
3. Create or update a workflow, adding the file `.github/workflows/doorkeeper.yml` ([more info about how to use Github Actions](https://help.github.com/en/actions/getting-started-with-github-actions/starting-with-preconfigured-workflow-templates)).


```yaml

############################
## prepare your artifacts ##
############################

- name: Doorkeeper open
  uses: patoroco/doorkeeper@master
  with:
    digitaloceanToken: ${{ secrets.DO_TOKEN }}
    firewallName: "name_of_the_firewall"
    actionToDo: "add"
    dryRun: false

############################
## deploy to DigitalOcean ##
############################

- name: Doorkeeper close
  uses: patoroco/doorkeeper@master
  with:
    digitaloceanToken: ${{ secrets.DO_TOKEN }}
    firewallName: "name_of_the_firewall"
    actionToDo: "remove"
    dryRun: false
```

To check that everything is working as expected, you have to push these changes to your repo, and a new build in the `Actions` tab should be starting.

### My Workflow
I'm using this workflow to allow to deploy to my small 5$ instance in digitalocean (I'm using dokku as the PaaS).
It's really easy to push a new commit, and wait for the automatic release :)


### Submission Category

DIY Deployments

### Yaml File or Link to Code

This is a github action, and all the code is available in my repo: https://github.com/patoroco/doorkeeper/

### Additional Resources / Info

Feel free to collaborate with issues / PRs :)
Use 👍 more often
Tags: github, opensource, watercooler
Published: 2020-08-26 17:25:54

Agree with a GitHub comment? Spare a second of your time and give that comment a 👍. It can make the author of the content feel good and encourage them to contribute more.

Want that issue to be resolved sooner? Give it a 👍. It's often used by maintainers for prioritizing issues.

## Some advice:

- favor 👍 over ❤️/🎉/🚀 for GitHub issues, it will make prioritizing issues easier to do for maintainers (GitHub UI allows you to sort issues only by a particular reaction)
- use 👎 less often (or don't use it at all), it can make the contributor feel bad and even discourage them from contributing
- never write a comment that just says "+1" or "👍", use the 👍 **reaction**


Use 👍 more often.