Skip to content

Instantly share code, notes, and snippets.

View anilprasad's full-sized avatar

anilprasad anilprasad

  • Bangalore, Inida
View GitHub Profile

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@anilprasad
anilprasad / colorbrewer.js
Created September 20, 2022 16:01 — forked from anandpdoshi/colorbrewer.js
Relationships between DocTypes in ERPNext
// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
var colorbrewer = {YlGn: {
3: ["#f7fcb9","#addd8e","#31a354"],
4: ["#ffffcc","#c2e699","#78c679","#238443"],
5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
},YlGnBu: {
{
"guestFunctions": [
"erpnext.www.book_appointment.verify.index.get_context(context)",
"erpnext.www.book_appointment.index.get_appointment_settings()",
"erpnext.www.book_appointment.index.get_timezones()",
"erpnext.www.book_appointment.index.get_appointment_slots(date, timezone)",
"erpnext.www.book_appointment.index.create_appointment(date, time, tz, contact)",
"erpnext.templates.utils.send_message(subject='Website Query', message='', sender='', status='Open')",
"erpnext.templates.pages.search_help.get_help_results_sections(text)",
"erpnext.templates.pages.product_search.get_product_list(search=None, start=0, limit=12)",
@anilprasad
anilprasad / frappe.md
Created November 8, 2022 07:20 — forked from weiserman/frappe.md
Frappe Bench on Digital Ocean droplet

Guide-to-Install-Frappe-on-Digital-Ocean-Droplet

A guide to Install Frappe Bench v14 on Ubuntu 22.04 LTS and start building the Library Tutorial I hope this makes your Frappe development and exploration more simpler. Frappe Cloud provides great capabilities too. This is for a development server and not for a production build (obviously)

Pre-requisites before your start

  Digital Ocean account and a droplet created
  Ubuntu 22.04 LTS
@anilprasad
anilprasad / README.md
Created November 8, 2022 07:21 — forked from revant/README.md
Setup Data Server

Create Data Server

  • Debian / Ubuntu
  • Attach volumes for: MariaDB, MongoDB, NFS
  • Remove Public IP (Optional)
  • Add SSH Key
  • Add SSH Relay namespace and pod to connect to data-server from cluster

Prepare Server

@anilprasad
anilprasad / README.md
Created November 8, 2022 07:21 — forked from revant/README.md
ERPNext Development for beginners

Prerequisites:

  • "git" things to know
    • create app's git repo
    • create fork repo
    • create feature branch
    • send, approve and accept merge request
    • git tags, prepare release script.
    • push release to HEAD branch, e.g version-13, version-12, etc.
  • docker
@anilprasad
anilprasad / README.md
Created November 8, 2022 07:23 — forked from revant/README.md
ERPNext on Docker Swarm

Follow these steps:

Install prerequisites:

apt-get update && apt-get dist-upgrade -y
dpkg-reconfigure --priority=low unattended-upgrades
adduser -D craft
usermod -aG sudo craft
curl -fsSL https://get.docker.com | bash
@anilprasad
anilprasad / backup-with-restic-and-s3.md
Created November 8, 2022 07:24 — forked from revant/backup-with-restic-and-s3.md
backup with restic and S3

For local example, start MinIO

docker run \
  -p 9000:9000 \
  -p 9001:9001 \
  --name localminio \
  -v ~/minio/data:/data \
  -e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
  -e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
@anilprasad
anilprasad / docker-compose.yml
Created November 8, 2022 07:47 — forked from revant/docker-compose.yml
OpenCart Docker Compose
version: '2'
services:
mysql:
image: docker.io/bitnami/mysql:5.7.36
environment:
- MYSQL_ROOT_PASSWORD=123
- MYSQL_USER=opencartuser
- MYSQL_DATABASE=opencartdb
- MYSQL_PASSWORD=opencart
volumes:
@anilprasad
anilprasad / 1_erpnext13_production.sh
Created November 8, 2022 07:52 — forked from drthilina/1_erpnext13_public.sh
Install ERPNext V13 on Ubuntu 20.04 LTS || Production
Install ERPNext V13, FRAPPE-BENCH 13 on Ubuntu 20.04 and configure for production Environment
# Install GIT
$ apt install -y git
# Ubuntu update and upgrade packages
$ apt update -y && apt upgrade -y
# Install Python 3 and dependencies