This file contains 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 json | |
from time import sleep | |
data = [] | |
print("Fetching page #%s" % 1) | |
r = requests.get("http://declarations.com.ua/search?format=opendata").json() | |
data += r["results"]["object_list"] |
This file contains 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
# -*- coding: utf-8 -*- | |
# Copyright 2016 Matt Martz | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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 sys | |
from redis import Redis | |
import argparse | |
import simplejson as json | |
import settings | |
redis_client = Redis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, | |
db=settings.REDIS_DB) |
This file contains 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
{ | |
"lotNumberStr": "27059380", | |
"ln": 27059380, | |
"mkn": "DODGE", | |
"lm": "CHALLENGER", | |
"lcy": 2018, | |
"fv": "2C3CDZGGXJH289026", | |
"la": 24998, | |
"rc": 27890, | |
"obc": "A", |
This file contains 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
--- ../venv/lib/python3.6/site-packages/flask_lambda.py 2017-07-04 02:51:23.000000000 +0300 | |
+++ lambdas/venues_finder/venues_finder/lambdify.py 2017-07-10 16:49:41.000000000 +0300 | |
@@ -31,7 +31,7 @@ | |
except ImportError: | |
from io import StringIO | |
-from werkzeug.wrappers import BaseRequest | |
+from werkzeug.wrappers import BaseRequest, Response | |
This file contains 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 sqlalchemy.dialects import postgresql | |
print(YOUR_SQL.statement.compile(dialect=postgresql.dialect(), compile_kwargs={"literal_binds": True})) |
This file contains 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 scrapy.spider import BaseSpider | |
from scrapy.conf import settings | |
from scrapy.http import Request | |
from random import choice | |
class DoubleIPSpider(BaseSpider): | |
name = "double_ip_test" | |
allowed_domains = ["httpbin.org"] |
This file contains 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 rpy2 import robjects | |
from rpy2.robjects.packages import importr, STAP | |
jsonlite = importr("jsonlite") | |
with open('function_to_test_decl_read_incomr_process.R', 'r') as f: | |
s = f.read() | |
proc = STAP(s, "declaration_income_processing") | |
with open("declarations_bank/data/01/авраменко_максим_ігорович_01a15d65-8f55-4c59-86f3-c6a58bc2f37b.json", "r") as fp: |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<company> | |
<name>ПАТ «БАНК КРЕДИТ ДНІПРО»</name> | |
<owners> | |
<owner> | |
<share>100</share> | |
<company> | |
<name>БРЕНКРОФТ ЕНТЕРПРАЙЗЕЗ ЛІМІТЕД</name> | |
<name_en>BRANCROFT ENTERPRISES LIMITED</name_en> | |
<country>Кіпр</country> |
This file contains 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": "ПАТ «БАНК КРЕДИТ ДНІПРО»", | |
"owners": [ | |
{ | |
"share": "100", | |
"company": { | |
"name": "БРЕНКРОФТ ЕНТЕРПРАЙЗЕЗ ЛІМІТЕД", | |
"name_en": "BRANCROFT ENTERPRISES LIMITED", | |
"country": "Кіпр", | |
"owners": [ |