This file contains hidden or 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
class DataProvider(object): | |
def __init__(self,label_dict, top_blobs = None): | |
# for determinist evaluation | |
self.random_state = None | |
self.label_dict = label_dict | |
if top_blobs is None: | |
x = label_dict.values()[0] | |
if type(x) == int: | |
self.top_blobs = ["img", "label"] |
This file contains hidden or 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
#python3 | |
def hook(t): | |
def inner(bytes_amount): | |
t.update(bytes_amount) | |
return inner | |
BUCKET_NAME = 'your_s3_bucket_name' | |
FILE_NAME = 'your_s3_file_name' | |
s3 = boto3.resource('s3') |
This file contains hidden or 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
.card { | |
font-family: arial; | |
font-size: 20px; | |
text-align: center; | |
color: black; | |
background-color: white; | |
} | |
.card { word-wrap: break-word; } | |
.win .chinese { font-family: "MS Mincho", "MS 明朝"; } | |
.mac .chinese { font-family: "STFangsong"} |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vispy: gallery 50 | |
""" | |
This example shows how to display 3D objects. | |
You should see a colored outlined spinning cube. | |
""" | |
import numpy as np | |
from vispy import app, gloo |
OlderNewer