teleren/devto huggingface dataset:
Introduction to Data Science and Analytics
Tags: beginners, python, machinelearning, datascience
Published: 2019-09-28 18:22:01

---
title: Introduction to Data Science and Analytics
published: true
description: I am starting an online free course on Data Science and Analytics where I will share articles and tutorials on data science applications. 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kio3ibwq66o06nvl5pje.jpg
tags: beginners, python, machinelearning, datascience,
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/kio3ibwq66o06nvl5pje.jpg)

**Data Science** is a multi-disciplinary field that make use of mathematical methods, processes, systems, and algorithms to extract knowledge or business intelligence from structured or unstructured data.

Data is everywhere nowadays from social media platforms to banking systems. And for businesses it is quite important to understand the data and gain business intelligence to improve the overall customer experience. The concepts, process, and methods with which the knowledge is extracted from the structured and unstructured data is called Data Science.

Data Science is base for Machine Learning. It is a field of study in which computers/systems gain the capability to learn itself through programming. Machine Learning make use of past data to do predictive analysis and learn itself to predict the future outcomes and take appropriate actions.

I am starting a [course on Data Science & Analytics and Machine Learning](https://www.codeitbro.com/introduction-to-data-science-and-analytics-course/) and will soon start posting articles and tutorials on various data science applications as listed below. I kindly invite you to my learning journey to become a good **Data Scientist.**

##Road map for Data Science and Machine Learning course

Module 1: Excel – Charts, Functions, VBA Macros, etc. 

Module 2: MS SQL – RDBMS Concepts and SQL. 

Module 3: Tableau – Introduction to Tableau, advance reports, interactive dashboards, etc. 

Module 4: MS VBA – Functions, Procedures, Error Handling, etc. 

Module 5: R – Data Mining and Modelling. 

Module 6: R – Machine Learning

Module 7: Python – Basics, Statistical analysis in Python, etc. 

Module 8: Python – Machine Learning using Python with applications. 

[Subscribe to our mailing list](https://www.subscribepage.com/codeitbro) to get email notifications of new updated posts.
Poll: What is your UI Framework of choice?
Tags: framework, react, vue, angular
Published: 2019-09-28 17:47:38

---
title: Poll: What is your UI Framework of choice?
published: true
description: What is your UI Framework of choice?
tags: framework, react, vue, angular
---

What is your framework of choice? 
React, Vue, Angular, W3C WebComponents or Other?



UPDATE: Results as of 10/2/2019 (and counting)

| Angular       | React         | Vue   | Aurelia |W3C Web Components|
| ------------- |:-------------:| -----:|---------|------------------|
| 3             | 5             | 3     |3        |1
FlareOn6 - Challenge 4: Write-Up
Tags: security, ctf
Published: 2019-09-28 17:42:31

---
title: FlareOn6 - Challenge 4: Write-Up
published: true
description: My write up for the 3rd challenge of the flareon6 reverse engineering CTF.
tags: security, ctf
---

Hello,

In this article I will present you my solution for the fourth challenge of [flareon6](http://flare-on.com/).

The tools I used to solve this challenge were:

* Kali Linux
* DnsChef
* Wireshark
* Python
* Ghidra

I opened the binary in Kali and I got a nice chess game going on for me, when I made the first move the AI resigned. I opened up the provided pcap file in Wireshark and saw a lot of DNS traffic. Since Malware often uses DNS to do certain actions and if a server is not found it stops operating, I've figured it out that I have to fake the DNS, lucky I got all the traffic I needed in the pcap file.

Since copy pasting 80 lines of Wireshark lines would be painfully slow, I took some time to install `pyshark` and wrote a small Python program to parse the pcap and output the traffic in a format that `dnschef` would like.

```python
import pyshark

def main():
    print("gimme da pcap")
    cap = pyshark.FileCapture('./capture.pcap')
    for packet in cap:
        if packet.ip.dst == "192.168.122.1":
            print("{}={}".format(packet.dns.qry_name, packet.dns.a))

if __name__ == '__main__':
    main()
```

After that I redirected the output of the script to `fakehosts.txt` added an `[A]` section header in the file and I've ran dnschef with the following command:

```
dnschef --fakens=ns1.game-of-thrones.flare-on.com --file=fakehosts.txt -i 0.0.0.0
```

And that didn't work, I forgot to go to the network manager and set my DNS server to localhost, after that was done I opened up the program, picked up a random move from the list and it magically worked, the AI responded to my move! Hurray!

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/l4cqc2fxv7q3cujyq3pu.png)

I thought this is it, I solved the challenge, now to make the next move and... the AI resigned. It looked like I had to do the moves in a certain order, I couldn't do them randomly or in the order that I wanted to do them.

But, It took me some time to realise that. I even looked at the source code in Ghidra to see what I was doing wrong:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/gavy3wjfc6r9nuv0f365.png)

--

One night, when I had some extra time. I sat down with the list of available moves and I started manually brute forcing the moves until I got the right combination and the flag! It took me about one to two hours, luckly I knew a bit chess otherwise wouldn't have finished it that fast.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/atrjjjw9uh2zmsxpspib.png)

Thank you for reading!
New Contributors Welcome / Open Source Project (Silverback)
Tags: contributorswanted, python, hacktoberfest
Published: 2019-09-28 17:14:31

👋 there!

**[Silverback 🔥](https://github.com/silverbackhq/silverback) is a free and open source project for web infrastructure, developer APIs, services and SaaS companies to set up their very own status page in minutes.**

The project started a while ago and quite stable even the beta release will be on october 2019 🤘.

{% github silverbackhq/silverback %}

🚀 Some of the project features quickly:
- Auto Installer.
- User management with different roles.
- Services and service groups statuses.
- Uptime charts for services and service groups.
- Incidents and incident updates management.
- Metrics with third party integrations (NewRelic and more ...).
- Subscriber notifications via email, SMS, customer endpoint, RSS feed and Atom Feed.
- Asynchronous workers for subscriber notifications with ability to run any number to scale.
- Realtime administration dashboard.
- Multilingual.
- and much more ..


### Screenshots or Demo 🤔

![](https://i.imgur.com/70qCMaH.gif)

Well, You can [run silverback on heroku for free!](https://heroku.com/deploy?template=https://github.com/silverbackhq/silverback/tree/master)

### Architecture

![Architecture](https://raw.githubusercontent.com/silverbackhq/silverback/master/assets/chart.png)


### Contributors Wanted 😌

![Contributors](https://i.giphy.com/media/l42Pz6bumqF4MpPWM/giphy.gif)

If you're interested in practising your Python (Django), JavaScript, MySQL and Asynchronous Programming (RabbitMQ & Redis) skills, you should jump right now!

Want to know more about a specific area, don't hesitate to ask. More than happy to do whatever I can to help get you ramped up and contributing ❤️

Happy coding everyone! ❤️
Understanding Refactoring
Tags: refactoring, watercooler
Published: 2019-09-28 17:02:46

 Hi everyone, I am a software engineering student who wants to understand the challenges that professional developers face while refactoring. Would you mind taking this very short survey (less than 5 minutes)? I really appreciate your time:

https://abdulazizalaboudi.typeform.com/to/BOVN6F
Reddit Post Upvoted by you to Twitter
Tags: reddit
Published: 2019-10-04 10:56:20

---
title: Reddit Post Upvoted by you to Twitter
published: true
tags: reddit,Python
canonical_url: https://daniele.tech/2019/09/reddit-post-upvoted-by-you-to-twitter/
---

I want to publish my upvoted posts on Reddit with a filter to exclude some subreddits that are from different topics that I don’t want to be shared (like political or non-IT). So after a lot, looking on IFTTT or other services I chosen to do it on my own. Post upvoted from the user [...]

[Read More...](https://daniele.tech/2019/09/reddit-post-upvoted-by-you-to-twitter/)

The post [Reddit Post Upvoted by you to Twitter](https://daniele.tech/2019/09/reddit-post-upvoted-by-you-to-twitter/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
Adobe XD Tips & Tricks
Tags: adobe, xd, ux
Published: 2019-09-28 16:04:20

---
title: Adobe XD Tips & Tricks
published: true
description: Tips & Tricks for using Adobe XD
tags: adobe, xd, ux
series: Adobe XD Tips & Tricks
---


**Duplicate Objects**
Select the object(s) you want to duplicate.
Hold down the Alt key and drag the cursor to create duplicates of the selection.

**Drawing Circles & Squares**
Hold down Shift key while dragging the cursor to draw circles and squares.
dapp Today is the Internet in 1992-1993?
Tags: blockchain, dapp
Published: 2019-09-28 14:57:35

---
title: dapp Today is the Internet in 1992-1993?
published: true
description: 
tags: #blockchain, #dapp
---

Marc Andreessen helped start the Internet revolution when he co-wrote early web browser Mosaic and co-founded Netscape. He mentioned that the recent development of the blockchain technology and its various difficulties seem to be a historical of the development of the Internet. More precisely, the current world of blockchain is about the Internet world of 1992-1993.

What do you think about this?
PHP標準機能でディレクトリ毎にPHPの設定変更を行う方法
Tags: php, japanese
Published: 2019-09-28 14:27:42

PHP標準機能 `.user.ini`を利用して、ディレクトリ毎にPHP設定を変更する方法をご紹介します。  

WebサーバーにApacheを利用している場合は .htaccessファイル でディレクトリ毎にPHP設定を変更することができますが、
Nginx + php-fpm を利用している場合 .htaccessファイル は使用できません。  
なので`.user.ini`を利用します。

[PHP公式ドキュメント .user.ini ファイル](https://www.php.net/manual/ja/configuration.file.per-user.php)

検証用のNginx + php-fpm 環境をDockerで構築しています。  
※ファイル内容は最後にまとめて記載していますので、ご活用してください。

例として、使用メモリ最大値`memory_limit`を変更してみます。

## デフォルトのPHP設定を確認する

デフォルトでは、`.user.ini`というファイルを探すようになっていますが、変更することもできます。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/7u7zffx9x3dm3vzey80w.png)

`.user.ini`を使用していない状態の設定を確認しておきます。
左側の数値がディレクトリ毎の設定、右側の数値がphp.iniで設定している値です。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/hhnuu8p1wlu6axfn80ja.png)
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ab13bvqgnhds7srsx3nc.png)


## .user.iniで設定を変更する

PHP設定を変更したいディレクトリ直下に`.user.ini`ファイルを作成します。

```ini
; .user.ini
memory_limit = 256M
```

再度、phpinfoを確認してみると`256M`に変更されていることがわかります。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/rd4j8yjnl6youpjg9ymt.png)

## まとめ
上記のように`.user.ini`を利用することで、Nginx + php-fpm環境でもディレクトリ毎にPHP設定を変更することができます。

私が実際に行った例としては、  
AWS上に構築した EC2 AutoScalingGroup + CodeDeploy(Blue/Green) という環境に対してCakePHPプロジェクトをデプロイする必要があり、
デプロイソースに`.user.ini`を含めることで、ディレクトリ毎のPHP設定変更を実現しました。

PHPファイル内で`ini_set()`を行うよりも`.user.ini`を使うほうが設定の見通しがよくなるので、`.user.ini`を積極的に使うべきだと思います。

---

## 検証で利用したDocker構成
### ディレクトリ構成

```shell
$ tree -a
.
├── code
│   ├── .user.ini
│   └── index.php
├── docker-compose.yml
└── nginx.conf
```

## ファイル内容
### ./code/.user.ini

```ini
memory_limit = 256M
```

### ./code/index.php

```php
<?php
phpinfo();
```

### ./docker-compose.yml

```yaml
version: '3'
services:
  web:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - "./nginx.conf:/etc/nginx/conf.d/default.conf"
      - ./code:/code
    depends_on:
      - php
    links:
      - php
  php:
    image: php:7-fpm-alpine
    volumes:
      - ./code:/code
```

### ./nginx.conf

```conf
server {
    listen       80;
    root         /code;
    index  index.php index.html index.htm;

    location ~ \.php$ {
       fastcgi_pass   php:9000;
       fastcgi_index  index.php;
       include        fastcgi_params;
       fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
    }
}
```

## Docker起動方法

```shell
$ docker-compose up
# localhsot:8080でアクセスできます。
# ctrl + C で終了できます。
```
Dev editor upgraded
Tags: productivity, dev, react, javascript
Published: 2019-09-28 14:09:10

---
title: Dev editor upgraded
published: true
description: 
tags: #productivity #dev #react #javascript
---

#[Dev editor](https://deveditor.dev/) got some new feature

1. Support for lists
2. Live previews of embeds
3. Draft mode.


Last month i released minimal version of editor to write dev blogs without remembering markdown syntax.

{% link https://dev.to/saravanan_ramupillai/write-your-dev-blocks-quickly-using-this-editor-36fk %} 

Now it got some missed out feature like live preview of embeds and list.

{% codesandbox xrmx20305w %} 

And with Auto draft mode, all your changes are saved locally so you can resume your writing later.

**Notes: This blog is written using [devedior](https://deveditor.dev)**
GitHub Actions: Rust edition
Tags: github, rust, devops
Published: 2019-09-28 13:43:27

Photo by Zsolt Palatinus on [Unsplash](https://unsplash.com/photos/pEK3AbP8wa4)

I'm on a bit of a GitHub Actions deep dive this weekend. I tried GitHub's starter workflow for [Rust](https://github.com/actions/starter-workflows/blob/master/ci/rust.yml) but I was disappointed to discover the macOS virtual environment doesn't have the [Rust](https://www.rust-lang.org/) toolchain.

Luckily the folks at [action-rs](https://github.com/actions-rs) have you covered. They've developed a bunch of actions for Rust's toolchain. All your favourites are there including Clippy!

Why do I need Rust on macOS? I like to test my code across as many platforms as possible. You can use a job [strategy](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategy) in your workflow to achieve this.

There's a handy [quickstart](https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md) guide on the action-rs "meta" GitHub repo.

p.s. Can you tell I'm super excited about GitHub Actions? Doing a lot of squeeing at the moment despite coming across the odd quirk.
p.p.s. There's a rather excellent blog post about the action-rs project by one of the main authors of action-rs: [svartalf.info/posts/2019-09-16-github-actions-for-rust](https://svartalf.info/posts/2019-09-16-github-actions-for-rust/)
Debugging Svelte apps with the newly released Svelte Devtools
Tags: svelte, javascript, debugging
Published: 2019-09-28 13:37:29

---
title: Debugging Svelte apps with the newly released Svelte Devtools
published: true
description: The community created Svelte devtools extension allows you to easily inspect and update components from within the browser.
tags: Svelte, Javascript, debugging
canonical_url: https://jimmyutterstrom.com/blog/2019/09/28/using-svelte-devtools
---

A minor nuisance with using Svelte 3 (if you're coming from Vue or React) might be the lack of a browser plugin like Vue devtools, it offers convenient ways to inspect the app's component tree and direct access to component state. 

There is now a [community created devtools extension for Svelte](https://github.com/RedHatter/svelte-devtools), made by [Timothy Johnson](https://github.com/RedHatter), which gives you some of the basic functionality found in similar tools for other frameworks.  

## Installation 
**Firefox** - [Install from the official store](https://addons.mozilla.org/en-US/firefox/addon/svelte-devtools/)
**Chrome** - The extension is, at the time of writing, under review for Chrome so you'll have to manually download a zip package according to the instructions in the Readme: https://github.com/RedHatter/svelte-devtools/blob/master/README.md

## Usage
Svelte Devtools only work with Svelte version 3.12 or greater, so you might want to make sure that you've updated your Svelte NPM dependency.

### 1. Create a new Svelte app and compile it with development mode enabled
If you don't have a custom Svelte 3 project to use you can just go with the basic app template:

```
npx degit sveltejs/template svelte-app
cd svelte-app
npm install

npm run dev
```

### 2. Open the app in Firefox or Chrome, press F12 and select the "Svelte tab"
![Open devtools](https://thepracticaldev.s3.amazonaws.com/i/22m5c8ffgck7w1vm84qt.PNG)

### 3. Inspect state & components and filter what's shown 
![Devtools window](https://thepracticaldev.s3.amazonaws.com/i/8zuzwwpb10vpqghtsnwd.PNG)
In the main panel you can view and inspect all components and the HTML elements they contain. A component's props are shown both in the element/component view and in the state panel to the right. 

Props and state can be updated directly from the devtools:
![Edit state](https://thepracticaldev.s3.amazonaws.com/i/lv1j0knwk763lw7w9ct7.gif)

You can also filter which information you want to be shown, for example if you'd like to hide HTML elements and only show components.
![Filter view](https://thepracticaldev.s3.amazonaws.com/i/drkwerhoqalfyy424srg.gif)


Like what you see? At least make sure to star the repo on GitHub (https://github.com/RedHatter/svelte-devtools) and perhaps check if [RedHatter](https://github.com/RedHatter) wants any help on improving the tool. 

Also check out my earlier post on Svelte: [Boost your legacy apps with Svelte 3 components](https://dev.to/jimutt/boost-your-legacy-apps-with-svelte-3-components-2ab)
Create React Modal Popup with Material UI
Tags: react, javascript, reactmodalpopup, createreactmodalpopup
Published: 2020-02-01 18:31:54

---
title: Create React Modal Popup with Material UI
published: true
tags: React, JS, React Modal Popup, Create React Modal Popup
canonical_url: https://www.positronx.io/create-react-modal-popup-with-material-ui/
---

The post [Create React Modal Popup with Material UI](https://www.positronx.io/create-react-modal-popup-with-material-ui/) appeared first on [positronX.io](https://www.positronx.io).

In this tutorial, we are going to **build a simple and animated modal popup in React using Material UI**. Modals are a widely used component in React-based web and mobile applications.


The Modal popup provides a simple solution to user interface related problems. A Modal window covers the entire screen and useful in displaying relevant information to the users. Modals are also known as Overlays, Dialogs etc. It constitutes a convention that covers the browser window with appropriate information keeping in front of the users.


[Click here to read more](https://www.positronx.io/create-react-modal-popup-with-material-ui/)
LeetCode "K-th Symbol in Grammar"
Tags: leetcode, python
Published: 2019-09-28 12:52:01

---
title: LeetCode "K-th Symbol in Grammar"
published: true
description: 
tags: [leetcode, python]
---

Recursive, Recursive, Recursive...🤮

**Reference**
https://leetcode.com/explore/learn/card/recursion-i/253/conclusion/1675/discuss/381460/Go-recursion-with-explanation/352630

```python
class Solution:
    def kthGrammar(self, N: int, K: int) -> int:
        if N == 1:
            return 0
        elif N == 2:
            return 0 if K == 1 else 1
        
        v = self.kthGrammar(N - 1, (K + 1) // 2)
        if v == 0:
            if K % 2 == 0:
                return 1
            else:
                return 0
        else:
            if K % 2 == 0:
                return 0
            else:
                return 1
           
```
Fixing 401 Error with CORS Preflights (with Spring boot)
Published: 2019-09-28 12:27:12



When the web application runs on a different domain and the server runs on another domain, we have to deal with cross origin requests. But, if we don’t know the mechanism of cross origin resource sharing (CORS), we will end up with errors like 401.



**Error in brief**

My Angular web application runs on port 4200, and my spring boot application runs on server on port 8080. I could not enable CORS in my backend, so, I got an error when sending a request from my application like this.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/gd0daqgu7gp2l4r7dokq.JPG)


**Reason**

My [pre-flight request](https://webtechmora.blogspot.com/2019/09/pre-flight-request.html) is not responded with status OK(200).


**Solution**

I enabled CORS in my backend. To do this, there are several methods. Here in my post, I have shown the easiest way to do that. But, if you are interest in knowing other ways, [click me](https://www.baeldung.com/spring-cors) )

**By using Web Security in Spring Boot,**

You have to create a web security configuration class. I hope everybody creates that class for backend authentication purposes.

If you have already created that class, inside *configure( HttpSecurity httpSecurity )* method ,add this line *httpSecurity.cors();*


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/42oq0cclcz5wsjou6xhp.png)


It’s that simple !!!
Originally published at [https://webtechmora.blogspot.com](https://webtechmora.blogspot.com) by Udith.
On Knowing What and When
Tags: sideprojectstimepriorities
Published: 2019-09-28 11:27:21

---
title: On Knowing What and When
published: true
description: The dilemma of side projects
tags: side projects time priorities
---

I like to think that I'm a guy that knows what he wants and how to go about and do it. I've been in the tech industry for quite a few years now, in many different positions. I've been able to climb the ranks in my current path (Software Engineer) and I've been blessed with the opportunity to be the lead on many exciting and fun projects at work.

I say all this to say that when it comes to my hobbies (aka-side projects)...I really have no idea where to start or end...and I think it's the same for us all.

Like many of us, I'm one that has ideas for a lot of projects to do. It is many a Saturday that I spend tinkering with a Raspberry Pi to setup as a web server that I can run cables to so I can turn lights on through my phone...or it has been many a frustrating weeknight when the Cisco managed router and switch that I configured myself has issues (hey, it's been a few years since my networking days...give me a break! :) ). 

This mindset led me to a class that I believe will be very good for me, but has also shown me bright and clear a large problem I have, and I believe many of us have. Let me explain.

I have gone back to school to get a formal degree and broaden my horizons in more ways than one. One of those ways was to take a web business creation class where you must pick a field, a product, and go run a Google Ads Campaign to market and sell that product. 

"EASY!" I thought to myself, "That will give me the motivation I need to finish idea A that I have sitting in a Sketch file right now...or idea B that I just bought that brand new shiny .app domain for...or idea C...or idea D..." You get the picture.

And so I have found myself at that crossroads...how to do my best work, but still do what really every creative professional has ever wanted to do - publish their work for the masses.

And really, I don't know the answer to that question. Having had few side projects ever make it public, I don't think I'm in place right now where I can answer that question. But I do know this...I hope I never get to a place where I have more time than project ideas. Because for me, that would be the scarier reality.
What do you find the most difficult with CSS?
Tags: discuss, css, beginners
Published: 2019-09-28 12:22:06

---
title: What do you find the most difficult with CSS?
published: true
description: 
tags: devdiscuss, css, beginners
---

I’m writing a [new book] (https://cssfromscratch.com) that teaches you how to write CSS from scratch, so I’m curious about what people find the most difficult with CSS. 

Also, what do you wish you were taught about CSS, early on in your career?