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
def generate_data_from_response(resp, chunk=2048): | |
for data_chunk in resp.iter_content(chunk_size=chunk): | |
yield data_chunk | |
def serve_partial(url, range_header, mime, size=3145728): | |
from_bytes, until_bytes = range_header.replace('bytes=', '').split('-') | |
if not until_bytes: | |
until_bytes = int(from_bytes) + size # Default size is 3MB | |
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
const eslintFormatter = require('react-dev-utils/eslintFormatter'); |
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 beem | |
from datetime import datetime | |
def get_resource_credits(username): | |
client = beem.Steem() | |
rc = beem.rc.RC(steem_instance=client) | |
account = beem.account.Account(username).json() | |
comment_requirement = rc.comment() |
OlderNewer