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 | |
import re | |
from google_images_download import google_images_download | |
import random | |
import csv | |
import os | |
import sys | |
import logging | |
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
#!/usr/bin/env bash | |
conda activate birds | |
git clone https://github.com/hardikvasa/google-images-download.git | |
cd google-images-download && sudo python setup.py install |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 6 columns, instead of 4 in line 6.
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
Name,Alternative name,Russian name,WikipediaDE,Latin name,Image URL | |
Amsel,Schwarzdrossel,Чёрный дрозд,https://de.wikipedia.org/wiki/Amsel,Turdus merula,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-amsel_seehawer.jpg | |
Bachstelze,,Белая трясогузка,https://de.wikipedia.org/wiki/Bachstelze,Motacilla alba,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-seehawer_bachstelze.jpg | |
Bartmeise,,Усатая синица,https://de.wikipedia.org/wiki/Bartmeise,Panurus biarmicus, | |
Baumfalke,,Чеглок,https://de.wikipedia.org/wiki/Baumfalke,Falco subbuteo,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-baumfalke_falco_subbuteo_tatiana_bulyonkova.jpg | |
Bergfink,,Вьюрок,https://de.wikipedia.org/wiki/Bergfink,Fringilla montifringilla, | |
Birkenzeisig,,Чечётка,https://de.wikipedia.org/wiki/Birken |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 2 in line 6.
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
Name,Latin name,Image URL | |
Amsel Schwarzdrossel, Turdus merula,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-amsel_seehawer.jpg | |
Bachstelze, Motacilla alba,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-seehawer_bachstelze.jpg | |
Baumfalke, Falco subbuteo,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-baumfalke_falco_subbuteo_tatiana_bulyonkova.jpg | |
Birkenzeisig, Carduelis flammea,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-birkenzeisig_juha_soininen_984434.jpg | |
Blässhuhn, Fulica atra,https://www.berlin.de/ba-charlottenburg-wilmersdorf/verwaltung/aemter/umwelt-und-naturschutzamt/naturschutz/pflanzen-artenschutz/mdb-blesshuhn_philip_mackenzie_717748.jpg | |
Blaumeise, Cyanistes c |
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
from bs4 import BeautifulSoup | |
import requests | |
import csv | |
import random | |
# Using random user-agent to emulate regular browser | |
user_agent_list = [ | |
#Chrome | |
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36', | |
'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36', |
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
#!/usr/bin/env bash | |
conda activate berlin-birds | |
conda install -c conda-forge requests beautifulsoup4 -y |
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
#!/usr/bin/env bash | |
conda create -n berlin-birds python=3.6 -y | |
conda activate berlin-birds | |
which python |
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
#!/usr/bin/env bash | |
sudo apt update | |
sudo apt install wget -y | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | |
bash ~/miniconda.sh -b -p $HOME/miniconda | |
eval "$(~/miniconda/bin/conda shell.bash hook)" | |
conda init |
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
#!/bin/bash | |
# <http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2> | |
echo -e "\n\nArch Linux ARM to SD Card" | |
echo -e "for the Raspberry Pi 2" | |
echo -e "(and for the Raspberry Pi 3, if you don't need to use the unofficial arm64 variant)\n\n" | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 |
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
#!/bin/bash | |
# <http://archlinuxarm.org/platforms/armv6/raspberry-pi> | |
echo -e "\n\nArch Linux ARM for Raspberry Pi to SD Card" | |
echo -e "(Not meant for the Raspberry Pi 2 - " | |
echo -e " check https://gist.github.com/pklaus/9dd4a7bf040788cda501 instead.)\n\n" | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 |