teleren/devto huggingface dataset:
Giới Thiệu Gốm Sứ Quỳnh Hương 
Published: 2020-07-31 04:27:53

Gốm Quỳnh Hương là cơ sở sản xuất tư nhân, hoạt động trong lĩnh vực sản xuất, kinh doanh các mặt hàng gốm sứ.
https://gomquynhhuong.com/

Cơ sở gốm sứ Quỳnh Hương hoạt động trong lĩnh vực sản xuất gốm sứ với các mặt hàng như: Ấm chén, bát, đĩa, tranh gốm sứ, lọ hoa..vv. Với nhiều năm trong ngành, chúng tôi cam kết đưa tới quý khách hàng những sản phẩm cung cấp có nguồn gốc Bát Tràng, chất lượng cao với giá thấp nhất. Chúng tôi cung cấp dịch vụ in logo làm quà tặng, quà biếu với chi phí thấp. Rất hân hạnh được phục vụ quý khách.
Không ngừng sáng tạo, không ngừng học hỏi, chúng tôi luôn mang tới cho khách hàng những sản phẩm có chất lượng cao với giá cạnh tranh. Cùng với đó, chúng tôi còn đẩy mạnh giới thiệu sản phẩm tới khách hàng, đảm bảo quý khách được tiếp cận những sản phẩm mới nhất của chúng tôi
Với kinh nghiệm nhiều năm sản xuất và kinh doanh trên lĩnh vực gốm Bát Tràng, với truyền thống được tiếp nối từ nhiều thế hệ, chúng tôi sẽ đáp ứng được mọi nhu cầu về gốm sứ của quý khách.

Với việc phân phối trực tiếp sản phẩm, từ nhà sản xuất tới người tiêu dùng, loại bỏ các khâu trung gian, chúng tôi cam kết đưa tới quy khách những sản phẩm tốt nhất với giá cả cạnh tranh.

Với phương thức thanh toán linh động, đặt hàng qua mạng online, nhận hàng tận nhà, chúng tôi đặt cảm nhận của khách hàng lên trên hết, tạo những điều kiện tốt nhất cho quý khách trong việc tìm kiếm và lựa chọn sản phẩm.

Tư vấn sản phẩm bất kỳ, ngay khi bạn cần, đừng ngần ngại liên lạc với chúng tôi.

Hãy đến với chúng tôi để được thỏa mãn mọi nhu cầu về gốm sứ
Thông tin liên hệ:
Gốm Quỳnh Hương
Địa chỉ: Xóm 5, Bát Tràng, xã Bát Tràng, Gia Lâm, Hà Nội
Số điện thoai: 0988 157 188
I joined Behance being not a designer and why you should also?
Tags: discuss, productivity, webdev, codenewbie
Published: 2020-07-31 04:16:38


I joined **Behance** the day before yesterday. I am happy that I did what I was procrastinating from long days not only long days but also long months.

This is my profile on Behance: 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/y9qd29z3724yym5fvee2.jpg)

and this is a link to my first post:

https://www.behance.net/gallery/101550015/Personal-Website-Design

I started my career as a web designer for a month and jumped to web development but designing always interests me.

This is not an article about me but about us on why we should join Behance. I know I am not a designer but I definitely make a thing and it is a great way to showcase what I am doing and a pushing factor for me to do things look great.

In addition, make an account and be active in codepen also, post things that you make, or thing that you learn.

Even you don't have anything to post, just, make an account and enable newsletter from that site so that you keep a reminder that you have something on the list to do. 

Presenting things make you exposed to the real world and don't worry if you think you are not good enough. Don't worry no one is good enough here, everyone is on the journey here. It is not a good thing only to show your best skill. People love to know your learning journey. This is a great character where a person can learn new things that people often fail to present.

Another advantage of this platform is an interaction where you can get and share your feedback. This is the best way to grow.

We consider learning as an only important aspect of our growth but what I believe is networking is equally important. With networking and exposure, you can go to the limit that only learning may not push you.

There are so many reasons but don't just search for the reason just join it. There are other great spaces like dribble. Look for your convenient option and jump over. 

And last but not the least, don't indulge in it with the expectation of followers rather indulge just to present your self. That's the healthy way.

What makes you stop from joining it or if you have already joined what motivated you to join and what is the energy that you brew every day for this?
Remember that this is a good time for starting every good thing in life.
July 31st, 2020: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2020-07-31 04:03:33

<em>Wow!</em> July 31st. See you tomorrow August!

It's that time of the week again for the first time this year. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

![A hamster taking notes](https://media.giphy.com/media/tHufwMDTUi20E/giphy.gif)

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{% link https://dev.to/devteam/what-was-your-win-this-week-26oj %}

![A contestant excited after winning on Wheel of Fortune](https://media.giphy.com/media/3ohhwtf6F4tpnQ2HpS/giphy.gif)
SYSTEM ENGINEER LÀ GÌ? TỔNG QUAN VỀ SYSTEM ENGINEER
Tags: systemengineer
Published: 2020-07-31 03:43:47

System Engineer ( hay còn gọi là Kỹ sư hệ thống ) là một quá trình bao gồm xác định một vấn đề dựa trên nhu cầu của người tiêu dùng và phát triển một giải pháp liên tục được đánh giá lại trong suốt quá trình thực hiện. Nói tóm lại, các System Engineer giám sát hiệu suất của các hệ thống và liên tục đánh giá tất cả các giai đoạn hoạt động để đảm bảo rằng một vấn đề được giải quyết.

System Engineer đóng một vai trò quan trọng trong thế giới máy tính đa chiều. Chủ yếu họ xác định nhu cầu của khách hàng hoặc các bên liên quan và chức năng thiết yếu trong giai đoạn đầu của chu kỳ phát triển sản phẩm hoặc dịch vụ.Đó là một cách tiếp cận có phương pháp, kỷ luật để thiết kế, thực hiện và quản lý kỹ thuật. Về cốt lõi, System Engineer giúp phối hợp các nhóm khác nhau, thử nghiệm và đánh giá để phát triển thiết kế và thực hiện nó để có đầu ra tốt nhất.

System Engineer sẽ làm việc cùng với người quản lý dự án và đội ngũ kỹ sư và trở thành điểm giao tiếp chính để liên kết giữa hai bên để đơn giản hóa việc hoàn thành một hệ thống thành công. System Engineer cũng sẽ làm việc qua từng giai đoạn của hệ thống và quy trình nhất định, từ kế hoạch cùng với mở rộng đến xác nhận và vận hành, đánh giá rủi ro có thể đo lường được, thường xuyên tập trung vào hiệu suất, thử nghiệm, lập kế hoạch và ngân sách.
http://24htechtrend.com/index.php/system-engineer-la-gi/
Day 60 : #100DaysofCode - CSS in Rails
Published: 2020-07-31 03:35:49

CSS in rails may be harder than regular css. I have many partials and code in different areas and trying to reference different parts of my HTML is a little different than if it were all in one file. I hope to get my CSS all set up by this weekend so that i can share my project with the world. 

Sincerely, 
Brittany
Spring Framework Là Gì? Spring Framework Của Java
Tags: springframework
Published: 2020-07-31 03:11:30

Spring nhẹ và trong suốt (nhẹ: kích thước nhỏ, version cơ bản chỉ khoảng 2MB; trong suốt: hoạt động một cách trong suốt với lập trình viên). Không thể vì nhẹ như vậy mà coi thường nó, Spring giúp tạo các ứng dụng có hiệu năng cao, dễ kiểm thử, sử dụng lại code… giúp các lập trình viên tối ưu được công việc và tiết kiệm được thời gian làm việc.

Những tính năng chính trong Spring được sử dụng chủ yếu để xây dựng các ứng dụng trong Java Desktop, ứng dụng mobile, Java Web. Mục tiêu chính của Spring là giúp phát triển các ứng dụng J2EE một cách dễ dàng hơn dựa trên mô hình sử dụng POJO (Plain Old Java Object).
http://laptrinhvacongnghe.com/spring-framework-la-gi/
How to rate limit requests in Laravel with ThrottleRequests middleware
Published: 2020-07-31 03:07:27

---
title: How to rate limit requests in Laravel with ThrottleRequests middleware
published: true
description: This is a simple example of how to protect your web/api endpoints of malicious abuse
tags: 
//cover_image: https://windowsbulletin.com/wp-content/uploads/2019/08/Fix-Youtube-HTTP-Error-429-Too-Many-Requests.jpg
---

I decided to share this because I think it is the easiest way to protect your endpoints whether you are working with web or api endpoints with Laravel.

Given my API receives a lot of requests I am always looking for more and advanced ways to squeeze my stack and get the best performance without investing too much money on it.

Now, besides applying front and backend cache it was time to rate limit my api. After looking for some methods, I faced again with the 'laravel throttle' way to do it. The only thing you have to do is throttling your endpoints with the throttle middleware, here you have some examples:

```
Route::middleware(['auth:api'])->group(function () {
    Route::get('/recents', 'Api\WebappController@recents')->middleware('throttle:5,1,recents');
    Route::post('/directory', 'Api\WebappController@directory')->middleware('throttle:10,1,directory');
});
```

As you can see in the applied middleware, I am specifying with the first value the number of allowed requests, and with the second the time window the counter is going to be valid. The third parameter (recents|directory) is the way you specify the scope or segment of the rate limit, it is optional.

If you are wondering how throttle manage the storage of the rate limit counter, the answer is that it takes the session driver value from the env file, in my case is the following:

```
SESSION_DRIVER=redis
```

I strongly recommend you to use redis or memcached for caching and session storaging.

You can also apply a dynamic rate limiting or guest and auth rate limit to your endpoints. Here you have the Laravel official docs: [Rate Limiting](https://laravel.com/docs/7.x/routing#rate-limiting)

I hope you find this information useful, in the next chapter I'll post how to use the less known RateLimiter class which encapsulates the same behaviour but with a different implementation.
Choose if array element repeats itself twice — Javascript [duplicate]
Published: 2020-07-31 02:41:29

var arr  = [0, 1, 2, 2, 3, 3, 5];

var dups = arr.filter ( (v,i,a) => a.indexOf(v) < i );

console.log(dups);

[
  2,
  3
]

when v=2, a.indexof(2)=2,but i=3 
so filter 2 to the dups
Utility for arrays and array of objects
Tags: javascript, opensource, node, typescript
Published: 2020-07-31 02:39:24

Made something useful. It's a simple utility package to help deal with arrays and an array of objects. Do use it and leave a star if you like it. Any feedback is appreciated. I would really love to hear your thoughts on how I could improve the package.

Repo: https://github.com/das-jishu/simplifying
NPM: https://www.npmjs.com/package/simplifying
How to Setup Laravel on Ubuntu with Apache Server: Hands-on!
Tags: laravel, php, tutorial, codenewbie
Published: 2020-07-31 02:34:44

{% youtube wzExIxXiwxk %}
In this video, Let's understand how to setup Laravel on ubuntu with apache server. Lack of memory and directory permission issue resolved.

#laravel #ec2 #ubuntu

CONTENT:
--------------------------------------
00:00 Welcome
00:28 Install Apache2
01.12 Install PHP
01:40 Install Composer and Laravel
03:30 Enable rewrite and giving permission to the storage directory
04:18 Create Swapfile
05:48 Install dependencies
08:00 Application Key generate for Laravel

------------------------------SOCIAL------------------------------
Github: https://github.com/codingx01
Twitter: https://twitter.com/TechParida
Linkedin: https://www.linkedin.com/company/codingx/
Facebook: https://www.facebook.com/codingx
Instagram: https://www.instagram.com/coding.x/

Leave any questions in the comments section and don't forget to subscribe to be notified of new content! :)
Custom model Evaluation Metric
Tags: machinelearning, datascience
Published: 2020-07-31 01:48:53

In building machine learning models, There comes a time you might want to evaluate your model to know it's a performance using a metric you created. while scikit-learn with all it's beauty provides the evaluation metrics we need, there comes a time we might need to create our own metrics. scikit-learn makes this easy by providing a function **make_scorer**.
to create a custom metric, all you need to do is create a function containing the metric definition and convert it to a scorer function using scikit-learn **make_scorer**. we will use the **make_regression dataset** to show an example of creating a custom metric below.

let's begin by importing the neccessary libraries
```python
# Load libraries
from sklearn.metrics import make_scorer, r2_score
from sklearn.model_selection import train_test_split
from sklearn.linear_model import Ridge
from sklearn.datasets import make_regression
```
Next we generate features and the target matrix.
```python
features, target = make_regression(n_samples = 100,n_features = 4,
random_state = 1)
```
random_state parameter ensures we get the same distribution when we use the same random_state value.

let's continue by creating the training and testing set using **train_test_split**
```python
X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.10, random_state=1)
```
then create our custom metric function.
```python
def custom_metric(X_test, target_predicted):
    # Calculate r-squared score
    r_squared = r2_score(X_test, target_predicted)
    # Return r-squared score
    return r_squared
```
next convert the custom metric into a scorer metric
```python
# Make scorer and define that higher scores are better
score = make_scorer(custom_metric, greater_is_better=True)
```
**greater_is_better** signifies that higher score is better

Create the regression and train.
```python
classifier = Ridge()
# Train ridge regression model
model = classifier.fit(X_train, y_train)
```

Finally apply the custom metric to check model performance.
```python
score(model, X_test, y_test)
```
Some advices of Python
Tags: beginners, python, 100daysofcode
Published: 2020-07-31 01:19:53

First of all, I'm beginner in this language and my English isn't very good. So I'm sorry for the inconvenience but I started my studies and I discovered the PEP8 that can be found in their official site. This PEP8 is some rules that need to be followed and knowledge for beginners.

**Indentation**

Yeah, this is often common for us programmers doing this thing (if you don't do it, a flower dies...). If you have experienced this language, spaces between the lines makes difference for your code to run. So, before you do something, please give 4 spaces before to code your line.

**Spaces between the classes**

As I said before, spaces in python is veeery important. Above your code looks clearly, your classes need space to run. It's recommend to give two spaces between them.

**Import separately**

Don't save space in your code. For you import some sources for python, you need to separate them too. But, for specific imports, you can use in the same line.

**Do classes and variables with lowercase**

This is a challenge for me. Python doesn't recognize variables neither classes if you have an habit to uppercase the words. This is make difference while are you doing your code.

**Commas is a prisoner!**

Yes, in your code the commas need to be inside of the parentheses. It looks a dumb advice but we are humans and we can distract in any moment. The error of your code could be just a commas out of its prison.

This is a short post but I need to share this knowledge for the beginners as am I. These little things I feel more and more love of this language.
If its interested you, click [here](https://www.python.org/dev/peps/pep-0008/)
Once more, I'm so sorry for my bad English and I hope that this text inspires you!
Syncing threads
Published: 2020-07-31 01:10:49

#The Problem
Multithreading is an incredibly useful thing when making complex, computation heavy programs. This is because it allows the program to run multiple functions at once. This is all well and dandy until you run two threads that require data from each other, or worse yet, they require the exact same data from one source. For the latter example, imagine 2 toddlers wanting to play with the same toy, so they do what toddlers do best and try to snatch it from each other and break the toy in half (though there’s less crying and screaming when the threads do it). The same thing happens with the data being accessed by the two threads since they’re trying to modify it simultaneously.

#The solution

Since I posed two problems with multithreading, I feel like I’m required to give two answers. I don’t usually do this, but I’ll make an exception just this once. The first problem (two threads requiring data from each other) The best solution would be a future and promise. I know these sound like vague concepts that’ll teach you more about yourself, but I assure they’re actual programming terms. A future is a data type that blocks a thread until it receives data from a promise. In essence, a future is like a friend that’s stopping the group from going anywhere because they’re assuring us that the latecomer (the promise) is definitely on their way, and this friend is one hundred percent certain that the missing person will show up, so they stop everything until they eventually arrive (or it’ll stop everything forever because you forgot to set the promise). 

The second problem (two threads trying to access the same data) can be solved using a mutex lock. A mutex lock is a way for a thread to call dibs on some data. For example, if thread 1 wanted to access an integer so that it can add the number 2 to it, but thread 2 also wanted to access that same integer so that it may subtract 2 from it. Ignoring the counterintuitive nature of this program, the two threads now have to race each other to get that integer, and whoever gets to it first will use the mutex to lock that piece of data, which forces the other thread to patiently wait it’s turn while the faster thread does whatever it needs to do.

Ahmed Fayez
ES6 Node Script Template Repo
Published: 2020-07-31 01:08:30

I've been tasked with writing a ton of one-off scripts for work lately and most of the time they're handling emergencies. Due to the urgent nature of these tasks I'm left with a local collection of scripts that really should have similar file and code structure but alas this is not the case.

So in an effort to start addressing this issue I've created [a template repository](https://github.com/JeffWilkey/es6-node-script) for node scripts that I thought I would share with the dev community. It's dead simple and allows use of any package manager.

I'm hoping this helps me clean things up a bit and might even help you. 

If you have any suggestions feel free to drop them in the comments

[Github Repo](https://github.com/JeffWilkey/es6-node-script)
Diferencia entre método y objeto! JS
Tags: javascript, spanish
Published: 2020-07-31 00:59:40

Muchas veces utilizamos method y function, como si fueran lo mismo, pero hay una sutil diferencia entre ambos.

La function se usa cuando queremos usar código que vamos a volver utilizar, es independiente de cualquier objeto, y tiene su propio scope, permitiéndonos que la llamemos desde cualquier parte del programa. Por ejemplo:

let resultado;

let numero1 = 10;
let numero2 = 2;

resultado = numero1 - numero2;
alert(`El resultado es ${resultado}`);


Por otra parte, el método o 'Method' esta asociado con un objeto, es decir, para llamar al método tenemos que llamarlo desde un objeto. Dicho de otra manera, el método opera la información del objeto, como podemos ver en el siguiente ejemplo

var bar = {
  item0 : function (){return 0;},
  item1(){return 1;},
};

console.log(bar.item0()); // 0
console.log(bar.item1()); // 1


Espero que después de esta explicación la diferencia sea más clara y te sea útil, solo recuerda que una función es un código reusable y se puede usar desde cualquier parte del programa, mientras que los métodos son funciones que llamamos dentro de un objeto y opera la información del objeto.
Quick Tips
Tags: codenewbie, ruby, github
Published: 2020-07-31 00:44:29

As I am sure many of you can relate, teaching yourself to code is hard. Even with going to a bootcamp, it's just a start. The farther away I get from my graduation date the clearer it becomes that I still have so much to learn.

Thankfully, I have some developer friends in the industry that have been giving me some tips and tricks to help me hone my new skills. But for anyone out there that may not have that luxury, here are a few things I have picked up from them along the way. 

### 1. Always save

This seems almost ridiculous to mention, but it has caused me countless headaches. Why is this page not behaving the way I am expecting it to? I followed the tutorial exactly... What could I have possibly done wrong?? It just wasn't saved. 

### 2. Make sure new changes are pushed/deployed

In a similar vein to the first point, your code may be working locally just fine, but if those new last minute changes weren't deployed, your app is going to look the same as it did yesterday. 

### 3. Don't add things to the end of your host link

Speaking of deploying, make sure your host link doesn't have any hanging /'s or additional text. This cost me a number of hours of scouring the internet only to discover that a single "/" was the source of all my problems. If you are using an api controller structure (like api/v1) make sure you leave that off of your host link as well. 

### 4. Find where your methods are coming from

Have you ever misplaced one of your methods in your rails app? Look no further than this:  
```ruby
MyClass.method(:method_i_am_confused_about).source_location
```
It'll point you right down to the line number where that sucker is located.

### 5. Did I add this method?

Can't remember if this method is one that you added or one that came out of the box? Give this a try: 

```ruby 
MyClass.new.method - Object.new.method
```
### 6. Stop using git commit -m "My commit message"

Your git commits should be telling a story of how you write your code. It should be like writing a short, professional email to your future self and/or the team you are working with that describes exactly what you did. Check out [this article](https://chris.beams.io/posts/git-commit/) to level up your git commits.

### 7. Fix mistakes in your git commits

It's a story now, and a professional one at that. But we are all human; we make mistakes. Lean on [git commit --amend](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) for when that happens.

### 8. Check out git rebase

Following along with the story, merging can make things murky. Check out the documentation for [git rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to find out when it is best to merge or best to rebase.