Skip to content

Instantly share code, notes, and snippets.

View bluzir's full-sized avatar
🐍
⠀⠀⠀⠀⠀⠀⠀⠀⠀

Vlad Kooklev bluzir

🐍
⠀⠀⠀⠀⠀⠀⠀⠀⠀
View GitHub Profile

About

Hello, my name is Vladislav Kooklev. I'm Full-stack Developer from St. Petersburg, Russia.

@bluzir
bluzir / test.py
Last active January 17, 2019 18:21
import datetime
import uuid
from marshmallow_sqlalchemy import ModelSchema
from sqlalchemy import Table, Column, ForeignKey, Integer, String, Text, DateTime, Float
from sqlalchemy import create_engine, text, func
from sqlalchemy.orm import Session, relationship, backref, joinedload_all, sessionmaker
from sqlalchemy.ext.mutable import MutableDict
from sqlalchemy.ext.declarative import declarative_base
@bluzir
bluzir / Dockerfile
Last active December 20, 2018 10:27
FROM python:3.6
ENV PYTHONUNBUFFERED 1
COPY . .
ENV FLASK_APP cli.py
ENV SETTINGS_ENV app.settings.production
RUN pip install -r requirements.txt
#RUN flask db migrate; flask db upgrade
EXPOSE 5070
CMD ["gunicorn", "app:create_app('app.settings.production')"]

API для книжного интернет-магазина

У нас есть сервис который позволяет клиенту приобрести несколько книг.

Каждая книга характеризуется кодом ISBN. Также книги различаются категориями: художественные, бизнес, научо-популярные. У каждой книги цена в рублях.

Книги могут фильтроваться по категориям и цене.

import React from "react";
import styled from "styled-components";
import "react-dates/initialize";
import "react-dates/lib/css/_datepicker.css";
import { DayPickerRangeController } from "react-dates";
const Button = styled.button`
border-radius: 4px;
@bluzir
bluzir / test.jsx
Last active January 13, 2018 18:40
import React from "react";
import styled from "styled-components";
import "react-dates/initialize";
import "react-dates/lib/css/_datepicker.css";
import { DayPickerRangeController } from "react-dates";
const Button = styled.button`
border-radius: 4px;
import re
import requests
BASE_URL = 'http://archillect.com/{}'
headers = {
'User-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) '
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36',
'Refferer': 'https://vk.com/'
}
{
"users": {
"id": 1,
"email": "[email protected]",
"first_name": "Vladislav",
"last_name": "Kooklev"
}
}
import React from 'react';
import ReactDOM from 'react-dom';
var token = document.head.querySelector("[name=token]").content,
user = {};
var Profile = React.createClass({
render: function() {
return (
<div className="profile__info">
# -*- coding: utf-8 -*-
import requests
from time import sleep
from datetime import datetime
import json
import sys
database = {"admins":[],
"suggestions":{}
}