资源简介
bootstrap-3.2.0资源文件,内含源码,以及各种实例,特别好用。可以进网站得到最新版本
代码片段和文件信息
#!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import unicode_literals print_function division
from sys import argv
from os import environ stat chdir remove as _delete_file
from os.path import dirname basename abspath realpath expandvars
from hashlib import sha256
from subprocess import check_call as run
from json import load dump as save
from contextlib import contextmanager
from datetime import datetime
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.exception import S3ResponseError
CONFIG_FILE = ‘./S3Cachefile.json‘
UPLOAD_TODO_FILE = ‘./S3CacheTodo.json‘
BYTES_PER_MB = 1024 * 1024
@contextmanager
def timer():
start = datetime.utcnow()
yield
end = datetime.utcnow()
elapsed = end - start
print(“\tDone. Took“ int(elapsed.total_seconds()) “second(s).“)
@contextmanager
def todo_file(writeback=True):
try:
with open(UPLOAD_TODO_FILE ‘rt‘) as json_file:
todo = load(json_file)
except (IOError OSError ValueError):
todo = {}
yield todo
if writeback:
try:
with open(UPLOAD_TODO_FILE ‘wt‘) as json_file:
save(todo json_file)
except (OSError IOError) as save_err:
print(“Error saving {}:“.format(UPLOAD_TODO_FILE) save_err)
def _sha256_of_file(filename):
hasher = sha256()
with open(filename ‘rb‘) as input_file:
hasher.update(input_file.read())
file_hash = hasher.hexdigest()
print(‘sha256({}) = {}‘.format(filename file_hash))
return file_hash
def _delete_file_quietly(filename):
try:
_delete_file(filename)
except (OSError IOError):
pass
def mark_needs_uploading(cache_name):
with todo_file() as todo:
todo[cache_name] = True
def mark_uploaded(cache_name):
with todo_file() as todo:
todo.pop(cache_name None)
def need_to_upload(cache_name):
with todo_file(writeback=False) as todo:
return todo.get(cache_name False)
def _tarball_size(directory):
kib = stat(_tarball_filename_for(directory)).st_size // BYTES_PER_MB
return “{} MiB“.format(kib)
def _tarball_filename_for(directory):
return abspath(‘./{}.tar.gz‘.format(basename(directory)))
def _create_tarball(directory):
print(“Creating tarball of {}...“.format(directory))
with timer():
run([‘tar‘ ‘-czf‘ _tarball_filename_for(directory) ‘-C‘ dirname(directory) basename(directory)])
def _extract_tarball(directory):
print(“Extracting tarball of {}...“.format(directory))
with timer():
run([‘tar‘ ‘-xzf‘ _tarball_filename_for(directory) ‘-C‘ dirname(directory)])
def download(directory):
mark_uploaded(cache_name) # reset
try:
print(“Downloading {} tarball from S3...“.format(cache_name))
with timer():
key.get_contents_to_filename(_tarball_filename_for(directory))
except S3ResponseError as err:
mark_needs_u
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-06-26 16:36 bootstrap-3.2.0\
文件 191 2014-06-26 16:36 bootstrap-3.2.0\.editorconfig
文件 184 2014-06-26 16:36 bootstrap-3.2.0\.gitattributes
文件 451 2014-06-26 16:36 bootstrap-3.2.0\.gitignore
文件 2007 2014-06-26 16:36 bootstrap-3.2.0\.travis.yml
文件 17 2014-06-26 16:36 bootstrap-3.2.0\CNAME
文件 8384 2014-06-26 16:36 bootstrap-3.2.0\CONTRIBUTING.md
文件 12948 2014-06-26 16:36 bootstrap-3.2.0\Gruntfile.js
文件 1084 2014-06-26 16:36 bootstrap-3.2.0\LICENSE
文件 5883 2014-06-26 16:36 bootstrap-3.2.0\README.md
文件 1066 2014-06-26 16:36 bootstrap-3.2.0\_config.yml
文件 849 2014-06-26 16:36 bootstrap-3.2.0\bower.json
文件 743 2014-06-26 16:36 bootstrap-3.2.0\composer.json
目录 0 2014-06-26 16:36 bootstrap-3.2.0\dist\
目录 0 2014-06-26 16:36 bootstrap-3.2.0\dist\css\
文件 21368 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap-theme.css
文件 23071 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap-theme.css.map
文件 18860 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap-theme.min.css
文件 132546 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap.css
文件 220790 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap.css.map
文件 109518 2014-06-26 16:36 bootstrap-3.2.0\dist\css\bootstrap.min.css
目录 0 2014-06-26 16:36 bootstrap-3.2.0\dist\fonts\
文件 20335 2014-06-26 16:36 bootstrap-3.2.0\dist\fonts\glyphicons-halflings-regular.eot
文件 62927 2014-06-26 16:36 bootstrap-3.2.0\dist\fonts\glyphicons-halflings-regular.svg
文件 41280 2014-06-26 16:36 bootstrap-3.2.0\dist\fonts\glyphicons-halflings-regular.ttf
文件 23320 2014-06-26 16:36 bootstrap-3.2.0\dist\fonts\glyphicons-halflings-regular.woff
目录 0 2014-06-26 16:36 bootstrap-3.2.0\dist\js\
文件 60681 2014-06-26 16:36 bootstrap-3.2.0\dist\js\bootstrap.js
文件 31819 2014-06-26 16:36 bootstrap-3.2.0\dist\js\bootstrap.min.js
目录 0 2014-06-26 16:36 bootstrap-3.2.0\docs\
文件 19466 2014-06-26 16:36 bootstrap-3.2.0\docs\LICENSE
............此处省略369个文件信息
- 上一篇:YY0505标准
- 下一篇:NOIP 数据结构课件
相关资源
- Bootstrap-中文-API(高清完整版chm)
- 用bootstrap做的前端页面,UI库
- 基于bootstrap的管理系统
- spring boot+thymeleaf+bootstrap 简单实现后台
- 非常精美的AngularJS框架后台管理系统
- Bootstrap用户手册高清PDF
- bootstrap离线帮助文档3.2.2
- 炫酷的官网页面bootstrap
- 微金所网站案例源码
- bootstrap +springMVC+mybtis分页
- 超漂亮的bootstrap网站首页模板
- bootstrap官方帮助文档
- bootstrap-table插件相关的css和js文件
- bootstraptable-reorder-columns表格拖拽排序
- 基于bootstrap的多重中介效应分析方法
- bootstrap3.0实用组件完整版demo
- bootstrap前台界面模板
- bootstrap 4.1.3-dist.zip
- bootstrap3.0.0 教程+源码+中文手册
- Axure RP8 bootstrap4 样式库 PRD必备
- 李炎恢Bootstrap视频教程配套讲义.pdf
- LayoutIt Bootstrap3
- AceAdmin后台管理模板
- bootstrap实现响应式登录页面
- 2019最新 BOOTSTRAP 4 Admin 仪表板
- Spring+Springmvc+Hibernate+Bootstrap开发企业
- 基于bootstrap的漂亮的中文后台模板—
- MVC5 + EF 6 + Bootstrap 2 权限管理系统完美
- easyui+bootstrap皮肤组件
- 基于SSH+Bootstrap的公司员工管理系统
评论
共有 条评论