teleren/devto huggingface dataset:
Make Responsive Landing Page With Hamburger Toggle Sidebar  using Html CSS & Javascript
Tags: html, css, codenewbie, codepen
Published: 2020-12-26 09:34:46

Make Responsive Landing Page With Hamburger Toggle Sidebar  using Html CSS & Javascript

Click On this link get Demo ===> 
            https://codepen.io/Bilal1909/pen/PoNVjwj
<img src="https://i.postimg.cc/767bKwqj/watch.png">
Django setup with MySQL
Published: 2020-12-26 09:22:16

####Requirements
  - Make sure you have mysql installed with a user access using password

1. Create Virtual Environment
```
$ python3 -m venv venv
```

2. Activate virtual environment depending on your OS
For Ubuntu user it is
```
$ source ./venv/bin/activate
```
Windows users
```
> .\venv\Scripts\activate
```
3. Install Django and Mysql connector for python
```
$ pip install django mysql-connector-python
```

4. Create Django Project
```
$ django-admin createproject <DJANGO_PROJECT_NAME>
```

5. Move to django project and create an app
```
$ cd <DJANGO_PROJECT_NAME>
```
```
$ django-admin createapp <DJANGO_APP_NAME>
```

6. Create a database in MySQL that you wish to use with your project
```
$ mysql -u root -p
```
```
$ CREATE DATABASE <db_name> CHARACTER SET utf8;
```
Note: Using COLLATE utf8bin causes an error

7. Change Django project level settings to connect django with database

Change database and connector
```
DATABASES = {
    'default': {
        'ENGINE': 'mysql.connector.django', 
        'NAME': '<DB_NAME>',
        'USER': '<DB_USER>',
        'PASSWORD': '<DB_USER_PASSWORD>',
        'HOST': 'localhost',   # Or an IP Address that your DB is hosted on
        'PORT': '3306',
    }
}
```

Change timezone
```
TIME_ZONE =  'Asia/Calcutta'
```
Cara Download Dengan IDM
Published: 2020-12-26 09:14:06

Sekilas tentang IDM. IDM atau Internet Download Manager adalah Software yang berguna untuk membantu kita unutk mendownload data-data yang ada di internet dengan memaksimalkan kecepatan. Dengan menggunakan IDM kita bisa mendownload lebih cepat daripada mendownload menggunakan browser.

IDM ini memiliki cara kerja yang cukup unik uintuk mengunduk berkas file yang ada di internet. Meski demikian, proses pengunduhan masih bisa dilakukan secara bersamaan beberapa file sekaligus.

Beberapaa fitur paling umum di IDM yakni mampu memaksimalkan kecepatan download hingga lima kali lipat lebih cepat dari pada mengunduh lewat browser. Proses unduh IDM sendiri dilakukan diluar browser dalam aplikasi IDM itu sendiri.

Berikut beberapa fitur lengkap IDM yang perlu kamu ketahui:
- IDMterintegrasi dengan semua peramban dan aplikasi popular di internet
- IDM dapat meningkatkan kecepatan unduhan hingga 5 kali lebih cepat dengan teknolofi segmentasi data dinamis Pengunduhan mudah dengan satu klik, karena adanya dukungan protokalHTTP, FTP, HTTPS, dan MMS - IDM memiliki fitur untuk melanjutkan unduhan data yang belum selesai 
- Data yang diunduh aman dari virus, sebab IDM memiliki fitur pemerikasaan antivirus otomatis 
- IDM memiliki fitur pengatur jadwal sambungan untuk setiap data yang ingin diunduh 
- IDM memberikan kemudahan pengguna hanya dengan menyalin alamat situs yang ingin diunduh 
- IDM juga mempermudah pengguna untuk mengategorikan tiap data unduhan.

Cara Download pakai IDM

Untuk mengunduh menggunakan IDM tidaklah sulit. Yang perlu kita lakukan hanya menginstal perangkat idm di komputer dengan versi terbaru dan mensinkronkannya dengan browser yang digunakan entah itu Chrome maupun Mozilla.

Jika sudah, langkah selanjutnya kamu tinggal mencari file yang ingin di unduh dan secara otomatis setiap kali kamu mengunduh sebuah file maka pop up IDM akan muncul dan kamu tinggal klik Download Now. Tutorial lengkap bisa cek: https://cukuptau.id/

Kamu bisa download IDM terbaru di : https://cukuptau.id/download-idm-terbaru/
My Top Dev Tools
Published: 2020-12-26 08:08:16

---
title: My Top Dev Tools 
published: true
description: Here are the top dev tools that I use in my daily software engineering job.
tags: 
//cover_image: https://direct_url_to_image.jpg
---
My List:
1. Ubuntu Linux
2. Zoom
3. VIM
...
complete list.
https://medium.com/swlh/my-top-dev-tools-in-2020-ec1fc8571dd3
A helper module for throttling tasks in Drupal
Tags: drupal
Published: 2020-12-26 07:52:22

It is pretty common that a site needs to do something regularly, but not too often.  Most frequently it is maintenance tasks done through hook_cron, like [core's update_cron](https://api.drupal.org/api/drupal/core%21modules%21update%21update.module/function/update_cron/9.2.x) which limits how often it checks for new versions of a site's modules.  The pattern is pretty simple - store a timestamp in the site's state when the task is executed, then before executing the task again check that the desired period has elapsed.

A colleague took another approach that I thought was interesting and worth polishing into a contrib module, so I created [Periodic](https://www.drupal.org/project/periodic).  Instead of each task needing to duplicate the code for storing and checking a timestamp, Periodic's cron task emits events for common periods of time which other modules can respond to as needed:

```
MyModuleEventSubscriber {

  public static function getSubscribedEvents() {
    $events = [];
    $events[PeriodicEvents::HOUR] = ['hourlyTask'];
    $events[PeriodicEvents::DAY] = ['dailyTask'];
    return $events;
  }

  public function hourlyTask() {
    // Do hourly task.
  }

  public function dailyTask() {
    // Do daily task.
  }

}
```

If a different interval is needed for a task, Periodic offers a service to check if execution should proceed:

```
function mymodule_cron() {
  $periodicManager = \Drupal::service('periodic.manager');

  // Limit task to every six hours.
  if ($periodicManager->execute('mymodule.crontask', 21600)) {
    // Do custom task.
  }
}
```
My javascript / tech / web development newsletter for 26-12-2020 is out!
Tags: javascript, tech, webdev, discuss
Published: 2020-12-26 07:01:02

---
title: My javascript / tech / web development newsletter for 26-12-2020 is out!
published: true
description: 
tags: javascript, tech, webdev, discuss
---
In this week’s edition:

Microsoft ARM chips, SapiensAsBlog, Proxima Centauri, FBvsApple, SPACs, Raspberry Pi Server, modern chips, Apple Car, IoT+NodeJS, Jamstack workflows, NYSE, Zoomail, Elon Alphabet, SSGs, podcasts... 

https://markjgsmith.substack.com/p/mark-smiths-newsletter-26-12-2020

Would love to hear any comments and feedback you have.

Happy holidays! :)

[@markjgsmith](https://twitter.com/markjgsmith)
8 places to Quickly Look for Jobs in Web Crawling
Published: 2020-12-26 05:57:05

Here are some places you can look for Web crawling jobs by various specialties.

Monster for jobs across the world

Upwork for remote gigs you can do from home and earn extra cash

Freelancer for remote gigs

Angel list for Web crawling jobs in Startups

Linkedin for Web crawling jobs

Stackoverflow for web crawling jobs with technology companies

Remote OK Jobs from Remote OK

Keywords you should be searching for

Make sure you search for the following keywords depending on your area of expertise to unearth more suitable jobs for you.

Web Crawling Jobs

web scraping Jobs

Scrapy Jobs

Beautiful Soup Jobs

Selenium Jobs

Goutte Jobs

Puppeteer Jobs

Browserless jobs
Building a Simple Proxy Rotator with Python and Beautiful Soup
Published: 2020-12-26 05:53:13

In the beginning stages of a web crawling project or when you have to scale it to only a few hundred requests, you might want a simple proxy rotator that uses the free proxy pools available on the internet to populate itself now and then.

We can use a website like https://sslproxies.org/ to fetch public proxies every few minutes and use them in our projects.
Here is a simple tutorial that does that. This tutorial assumes you have beautiful soup installed.
This will just get the HTML from sslproxies while using the User-Agent string to pretend to be a web browser.

The response.content object has the HTML.

And if you check the HTML using the inspect tool, you will see the full content is encapsulated in a table with the id.
The IP and port are the first and second elements in each row.

We can use the following code to select the table and its rows to iterate on and further pull out the first and second elements of the elements.
Now, let's organize this as a proper function we can call to get a list of proxies whenever we want and store it into an array.

So.
Now let's pull the data out of the array where the proxies are stored in a random manner using the function.
Now putting it all together
That should give you a different IP every time you call it. You should call the LoadUpProxies function every few minutes apart, so it has the latest IPs.
If you want to use this in production and want to scale to thousands of links, then you will find that many free proxies won't hold up under the speed and reliability requirements. In this scenario, using a rotating proxy service to rotate IPs is almost a must.

Otherwise, you tend to get IP blocked a lot by automatic location, usage, and bot detection algorithms.

Our rotating proxy server Proxies API provides a simple API that can solve all IP Blocking problems instantly.

With millions of high speed rotating proxies located all over the world
With our automatic IP rotation
With our automatic User-Agent-String rotation (which simulates requests from different, valid web browsers and web browser versions)
With our automatic CAPTCHA solving technology
Hundreds of our customers have successfully solved the headache of IP blocks with a simple API.

A simple API can access the whole thing like below in any programming language.
1: Buiding an ultimate freelancer website with NextJS, Django and wagtail-CMS
Tags: dohackathon, digitalocean, hackathon
Published: 2020-12-26 05:42:26

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

---

Many times we have to write our entire portfolio from scratch just to add our favorite tech stack make it **responsive**, **SEO optimized** with **inbuilt CMS**, and all the analytics goodies without spending a dime on third-party plugins that are **vaguely customizable** and we don't know whats going on under the hood.

_~~paid plugins~~_

> As software engineer we should build stuff ourselves, plugins are for a noob

Well, I a not saying that we should always reinvent the wheel but it's always a good idea to know what we are using and I personally struggle with plugins that are not customizable.

So I am making this **portfolio boilerplate** to integrate open-source tools(use what's been made) and build upon it a great website that is optimized both in performance and SEO with inbuilt analytics and a CMS which is more like WordPress CMS so that it's not used to post articles but customize the entire site. Moreover, this will be production-ready for deployment on the digital ocean app platform to get started asap.

---

Framework/Tech Stack - 
### Frontend
- **Next JS** => Maintainable UI components because of React, Server-Side-Rendering for SEO friendliness, inbuilt routing.
- **Bulma CSS** => Responsive by default, nice looking components.


### Backend
- **Django** => Hail to the most secure and perfectionist framework for the backend development.
- **Django-rest-framework** => Make it API based, leverage JAM stack.
- **Wagtail CMS** => Most flexible CMS to work with, as powerful as WordPress CMS, helps in SEO optimization too.
- **Support for google analytics integration**


It can be said that It's an over-kill for making a portfolio website with such optimization.

> **Please suggest any tech-stack/Framework to include to make it most awesome WEBSITE boilerplate**
Emoji Inside Markdown?
Tags: emoji, markdown, opensource, react
Published: 2020-12-26 05:01:27

When I was looking for emoji short-codes for markdown e.g. smiley :smiley: , I found some emoji cheat-sheets that were not searchable and easy to use. You would have to scroll through an entire page, select the code text with the cursor and then copy to use it inside markdowns. Too much work, right?. 

Why can't I have a single-page website just to search and copy emojis? So, a brother of mine suggested: Why don't you yourself make a small website just for these shortcodes which should be simple, searchable, and easy to copy-paste anywhere?

I took his advice seriously and built this open-source website called [emojis.ninja](https://emojis.ninja/) with React.js which got a lot of upvotes on [react.js community](https://www.reddit.com/r/reactjs/comments/kjrdj4/a_new_react_open_source_project_is_open_to/). Here you can **Search** and **Copy** any emoji short-code with just **One CLICK** and use anywhere inside Markdown environments.

Bookmark it and feel free to contribute here: [Project repo](https://github.com/aliabdulazeez/emoji-shortcodes-for-markdown)

Thanks for reading!
Generate Synthetic Datasets
Tags: machinelearning, datascience, showdev
Published: 2020-12-26 05:01:04

I’m working on a project to generate synthetic datasets. The idea is to take sklearn’s make_classification, but add more granular options and a sahweet interface.

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

This scratches a particular itch for me. I want to create tutorials with tailored datasets for exactly the scenario I need.

If you’re in the mood to write some python I would love the help.

https://github.com/bababrownbear/generate_synthetic_dataset
Online PTE Coaching | Prepare with The Best PTE Classes & Get 79+ - Classlly

Tags: ptecoaching, onlineptecoaching, onlinecoachingforpte
Published: 2020-12-26 04:59:49

Interested in obtaining the desired score in PTE Academic? Make the PTE preparation with Classlly, Which is the <a href="https://www.classlly.com/">best online PTE coaching</a> classes. Classlly provides personalized individual PTE coaching and group coaching to PTE seekers. We have highly skilled expert PTE trainers, who teach you the whole pattern of the PTE Academic exam in-depth and help you in fulfilling your dreams to study or settle abroad.
JavaScriptmas Solutions
Tags: scrimba, javascriptmas
Published: 2020-12-26 04:47:50

1. JavaScript Challenges: [Candies](https://scrimba.com/learn/adventcalendar/note-at-1-07-cod2e4f379d530d3772ef5e58)
2. JavaScript Challenges: [Deposit Profit](https://scrimba.com/learn/adventcalendar/note-at-1-14-co5ba47ee925c3eb21db9f630)
3. JavaScript Challenges: [Chunkey Monkey](https://scrimba.com/learn/adventcalendar/note-at-0-39-cod3a417eb340f864bdfbddcf)
4. JavaScript Challenges: [Century from year](https://scrimba.com/learn/adventcalendar/note-at-0-40-co38d4b4b96501fa8490a2205)
5. JavaScript Challenges: [Reserve a String](https://scrimba.com/learn/adventcalendar/note-at-0-52-co39c48fbb9bbb3c23793a071)
6. JavaScript Challenges: [Sort By Length](https://scrimba.com/learn/adventcalendar/note-at-0-40-co78645c5ae19060b796bf29f)
7. JavaScript Challenges: [Count Vowel Consonant](https://scrimba.com/learn/adventcalendar/note-at-1-09-co46c43b6bc6eae52c0477efc)
8. JavaScript Challenges: [Rolling Dice](https://scrimba.com/scrim/cob174fd8815e6b9d93029da5)
9. JavaScript Challenges: [Sum Odd Fibonacci Numbers](https://scrimba.com/scrim/cod5044feb82aa735fd17bff5)
10. JavaScript Challenges: [Avoid obstacles](https://scrimba.com/scrim/co3c7449795eb076f8cdafb2f)
11. JavaScript Challenges: [Adjacent Element Product](https://scrimba.com/scrim/co027419a82690637d79ff731)
12. JavaScript Challenges: [Valid Time](https://scrimba.com/scrim/co4b34bf992452f7fa25685c9)
13. JavaScript Challenges: [Extract each kth](https://scrimba.com/scrim/co0464e6692575d905726c0af)
14. JavaScript Challenges: [Maximal Adjacent Difference](https://scrimba.com/scrim/co6844d3996f64e17d82b5628)
15. JavaScript Challenges: [JavaScript Carousel](https://scrimba.com/scrim/coc454edd86759de9e5bc587c)
16. JavaScript Challenges: [Insert Dashes](https://scrimba.com/scrim/co09848f9bf909a869d01c75c)
17. JavaScript Challenges: [Different Symbols naive](https://scrimba.com/scrim/co35a4931b2e7f5b34591d2a2)
18. JavaScript Challenges: [Array previous less](https://scrimba.com/scrim/cof96451a8aa0cc6f683c59c5)
19. JavaScript Challenges: [Alphabet Subsequence](https://scrimba.com/scrim/co40b43319a42507eda2b5636)
20. JavaScript Challenges: [Domain Type](https://scrimba.com/scrim/coc694b9da5fbc15804258363)
21. JavaScript Challenges: [Sum of 2](https://scrimba.com/scrim/co662480daae307e796d71039)
22. JavaScript Challenges: [Extract Matrix Column](https://scrimba.com/scrim/co79b4c35a97415b46311990c)
23. JavaScript Challenges: [Social media input Challenge](https://scrimba.com/scrim/co610455786dc794e33b7fec6)
24. JavaScript Challenges: [Test your Agility](https://scrimba.com/scrim/cocfa43e1952171b6a11b36bb)
Scraping similar accounts on Instagram
Published: 2020-12-26 04:41:31

Hi everyone! I'm currently have started a scraping side project which scrape similar account on instagram. My approach is using selenium and recursion methods to scrape those accounts. But I get stuck in doing that recursively, can anyone give me some advice what should I look for to complete this project. 
Here is my code:
```
def grabbing(nms):
    usr_lnk = ["https://www.instagram.com/{}".format(n.text.split('\n')[0]) for n in a]
    def grabOne():
        nonlocal usr_lnk
        for lnk in usr_lnk:
            driver.get(lnk)
            try:
                wb = driver.find_element_by_class_name("yLUwa").text
                print(wb)
                time.sleep(15)
            except NoSuchElementException:
                pass
        pass
    return grabOne
            
```
Creating a database from scratch with Node.js - Day 3
Tags: database, node, javascript
Published: 2020-12-26 04:38:44

Hey folks!

Hope everyone had a nice Christmas.

I am back writing about my database project!

So, I've been studying a lot about databases and database engineering to understand what are the expected features for a database.

I've learned about indexing, partitioning, and sharding (mostly from [this channel](https://www.youtube.com/c/HusseinNasser-software-engineering)), and I am pretty sure I will add indexing and partitioning in this project, even though I think it will take a good time to code the partitioning logic.

---

## New Features 

#### Parser improvement

Now I can send objects to the database commands, this won't be useful now, but I intend to have a nice integration with Node.js in general, and reading objects will really help to build those integrations (I believe so).

The parser can also read arrays, so I can pass every parameter of a given command inside the same array if needed, this should be very useful, as it allows me to not write any logic to start and end of the parameter.

Example:

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

*Here I've created a new table with the columns "firstName", "lastName", "login", and "password"*

#### Query improvement 

Now I don't have to return every table from a query, the user can inform the keys he wants in the row structure. 

This will not be very useful now, but it should really help when I start working with indexing, as a user could declare an index with two columns that he uses frequently, and then instead of searching inside the document, I could just return the result he wants right from the index if his query matches the fields from the index (I will try to explain what I mean better when I start implementing it).

Examples:

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

*I've inserted some users and then wrote a query that retrieves their login*

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

*Here I am just showing that it can be done with multiple fields*

## Other changes

I've added unit testing to the project, finally!

the parser function is getting very complex (and ugly, tbh), so I've decided to add some tests to guarantee that it keeps working as expected as I keep adding things to it.

*BTW: if anyone reading this knows how to write a good parser or have any material that could help me, I would really appreciate it, the code for my parser is getting uglier and uglier by the day.*

Also, I've changed the code structure again, as the parser was getting way too big, I've separated it from the evaluator, which has it's own file now.

--- 

That's all, folks, if anyone wants to check out the project code or try to use it, this is the repository for it:

{% github ciochetta/learndb %}
Macro Tips: Method usage compilation errors
Tags: crystal, macros
Published: 2020-12-26 04:22:49

One cool feature of Crystal macros that I forget about is that they don't always have to be defined in a macro method. Where I've seen this be helpful is when you want to define a compile-time error in a method.

One way to think about it is, say you have a method called `destroy` and people keep mentioning that they keep forgetting and accidentally trying to call `delete`. Sometimes Crystal gives you a recommendation of the method it thinks you wanted but that is not always the case. To be helpful to users, you could use macros to provide a better error.

```crystal
class MyLibrary
  def destroy
    # pure destruction
  end

  def delete
    {% raise "Woops! Did you mean to call destroy instead?" %}
  end
end

my_library = MyLibrary.new
my_library.delete #=> Helpful compilation error!
```

It's a nice way to provide help to users who make mistakes from time to time. We use this in Lucky's ORM, Avram, to help users avoid making mistakes that would otherwise produce hard to understand compilation errors, or, even worse, runtime errors 🙀. One example is that in `Avram::Model` you define a "belongs to" association by writing `belongs_to user : User` but in a migration you can add a column with a foreign key relationship to a different table by writing `add_belongs_to user : User`. Out of habit, I have accidentally used `belongs_to` instead of `add_belongs_to` in a migration and didn't get an understandable error. It took me several minutes to track it down and I felt dumb for making the mistake. Because of that experience, we added a compilation error using macros to catch that and point users towards the solution. Here's the code in Avram that can be found on GitHub [here](https://github.com/luckyframework/avram/blob/1e6f4edd4d49c518c858ee9ecc277a3b963051eb/src/avram/migrator/create_table_statement.cr#L137-L147) (just a note that this is in a macro def but the same thing can be done in a regular def as well).

```crystal
macro belongs_to(type_declaration, *args, **named_args)
  {% raise <<-ERROR
    Unexpected call to `belongs_to` in a migration.
    Found in #{type_declaration.filename.id}:#{type_declaration.line_number}:#{type_declaration.column_number}.
    Did you mean to use 'add_belongs_to'?
    'add_belongs_to #{type_declaration}, ...'
    ERROR
  %}
end
```

### Caveat

One problem we've had with this recently, though, is that we implemented this in the base method of a class that would be inherited and a module dynamically overrides it to provide the expected functionality. Because we were replacing existing code, some users were calling super in their method expecting to get the base functionality and were instead getting a compilation error. This is not a knock of the macro usage, just a note that it isn't always the perfect choice.
Headless Browser and Cybersecurity
Tags: headlessbrowser, 0browser, zerobrowser, puppeteer
Published: 2020-12-26 03:52:12

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2vqw0wanw0zhz89afljp.jpg)
2020 was full of hacking surprises and cyber attacks on nation-states. Here is my take on how headless browsers can help us detect and protect software systems better.

https://blogs.0browser.com/Blog/10031/Why--How-to-Hire-Bots-to-Attack-Your-Networks