This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Specify to use alpine | |
FROM alpine:latest | |
# Install OpenSSH server | |
RUN apk update && apk add openssh | |
# Create the directory for the SSH daemon | |
RUN mkdir /var/run/sshd && \ | |
echo 'root:password' | chpasswd && \ | |
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an official lightweight Linux distribution as the base image | |
FROM debian:bullseye-slim | |
# Set environment variables to reduce prompts during installation | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install necessary dependencies for curl and python3 | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
python3 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "User name" | |
git config --global user.email "email" | |
repo init -u https://android.googlesource.com/platform/manifest | |
repo sync | |
source build/envsetup.sh | |
lunch | |
m | |
# http://archive.today/2024.09.14-091250/https://medium.com/make-android/build-aosp-on-docker-5490db101a6a | |
# https://medium.com/make-android/build-aosp-on-docker-5490db101a6a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
import html | |
def clean_file_name(file_name): | |
clean_name = html.unescape(file_name) | |
clean_name = clean_name.replace('%', '') | |
return clean_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
# Function to scrape book data from a single page | |
def scrape_goodreads_books_from_page(user_id, shelf_name, page_num): | |
if page_num == 1: | |
url = f'https://www.goodreads.com/review/list/{user_id}?shelf={shelf_name}' | |
else: | |
url = f'https://www.goodreads.com/review/list/{user_id}?page={page_num}' |