Skip to content

Instantly share code, notes, and snippets.

View podolskyi's full-sized avatar

Oleksandr Podolskyi podolskyi

  • Ukraine
View GitHub Profile
@miztiik
miztiik / python-scrapy-install-centos.sh
Last active March 3, 2021 04:16
Installing scrapy in CentOS
# Install deltarpm to reduce the size of download
yum install -y deltarpm \
&& yum install -y python-pip \
&& pip install --upgrade pip
# Scrapy Pre-Requisites
yum install -y gcc libffi-devel python-devel openssl-devel
yum install -y libxslt-devel libxml++-devel libxml2-devel
pip install lxml incremental
@melekes
melekes / README.md
Last active August 11, 2016 11:28
How to learn any language in six months | Chris Lonsdale | TEDxLingnanUniversity

https://www.youtube.com/watch?v=d0yGdNEWdn0

Краткое содержание

Принципы:

  1. Фокусируйте внимание на контенте, имеющем для вас какое-то значение
  2. Используйте язык как средство для коммуникации начиная с первого дня
  3. Если вы сначала поймёте то, что вам хотели сказать, то вы начинаете овладевать языком бессознательно (comprehensive input)
  4. Изучение нового языка - это также тренировка тела (правильное произношение зависит от мышц)
@rmax
rmax / txspider.py
Last active February 15, 2024 17:00
Using twisted deferreds in a scrapy spider!
$ scrapy runspider txspider.py
2016-07-05 23:11:39 [scrapy] INFO: Scrapy 1.1.0 started (bot: scrapybot)
2016-07-05 23:11:39 [scrapy] INFO: Overridden settings: {}
2016-07-05 23:11:40 [scrapy] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats', 'scrapy.extensions.logstats.LogStats']
2016-07-05 23:11:40 [scrapy] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
@dannguyen
dannguyen / README.md
Last active May 17, 2024 02:07
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@skratchdot
skratchdot / _top-1-million-alexa-sites.md
Last active November 9, 2018 14:55
Top 1 million sites on the internet
@PolBaladas
PolBaladas / GCI-Task-LoginPage.md
Last active August 27, 2023 05:06
Creating a Login Page with Python Flask and SQLite 3 DB.

Login page using Python, Flask and sqlite3 DB

How-to guide

(Task for GCI 2015-16) Year: 2015-16 This guide will show how to create a simple login page with Flask (a python microframework) and a sqlite3 database.

1. Database Schema and Models

As we are creating a simple user login app we need to store 2 basic values in the database: the username and the password. In order to build the database we need to define a schema:

@danechitoaie
danechitoaie / app_virtualenv.service
Created November 16, 2015 23:00
Virtualenv Systemd Service
[Unit]
Description=Python Virtualenv service example
After=network.target
[Service]
User=my_user
Group=my_group
Environment=VIRTUAL_ENV=/home/my_user/.virtualenvs/my_venv
Environment=PATH=$VIRTUAL_ENV/bin:$PATH
ExecStart=$VIRTUAL_ENV/bin/my_entrypoint
@nrollr
nrollr / MySQL.md
Last active October 28, 2020 02:53
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

@pboling
pboling / PhantomJS Install.md
Last active July 23, 2019 17:54
How to install old PhantomJS 1.8.2 on Mac OS X
@aaronsilber
aaronsilber / scrapyd
Last active February 25, 2020 14:48
CentOS Scrapyd web crawler init script (w/ chkconfig support)
#!/bin/bash
#
# scrapyd This shell script enables scrapyd server on boot
#
# Author: Aaron Silber <aaron@brandthropology.com>
#
# chkconfig: - 50 01
#
# description: Autostart scrapyd web scraper framework daemon
# processname: scrapyd