code stringlengths 3 6.57k |
|---|
should_execute(self) |
datetime.now() |
schedule_next_execution(self) |
instant.next_datetime() |
self._schedule.instants() |
min(datetimes) |
ActionScheduler(object) |
__init__(self) |
start_session(self, schedule: Schedule) |
add(self, callback: Callable, *args, **kwargs) |
Action(callback, *args, *kwargs) |
action.set_schedule(self._schedule) |
self.actions.append(action) |
end_session(self) |
run(self) |
action.should_execute() |
action() |
action.schedule_next_execution() |
combine_schema(borough_name) |
borough_name.lower() |
open('../scraped_data/borough_schema/' + borough_name + ".json", 'r', encoding='utf-8') |
json.load(json_file) |
range(len(data[borough_name]) |
open('../scraped_data/neighborhood_schema/' + borough_name + ".json", 'r+', encoding='utf-8') |
json.load(zipcode_file) |
print(neighborhood_data) |
open('../scraped_data/neighborhood_schema/' + borough_name + ".json", 'w', encoding='utf-8') |
json.dump(neighborhood_data, combined_file, sort_keys=True, indent='\t', separators=(',', ': ') |
main() |
os.listdir("./boroughs") |
borough.split(".") |
replace("-", " ") |
title() |
input(name + " => ") |
input("Convert " + name + " data to json format? (yes/no) |
print("Writing to file ...") |
combine_schema(name) |
print("Will not convert data json ...") |
print("Skipping borough: " + name + " ... ") |
main() |
average_volume_difference() |
NotImplementedError() |
dice(y_true, y_pred, axis=(1, 2, 3, 4) |
empty (e.g., all background) |
tf.convert_to_tensor(y_pred) |
tf.cast(y_true, y_pred.dtype) |
tf.keras.backend.epsilon() |
tf.reduce_sum(y_true * y_pred, axis=axis) |
tf.reduce_sum(y_true, axis=axis) |
tf.reduce_sum(y_pred, axis=axis) |
return (2 * intersection + eps) |
generalized_dice(y_true, y_pred, axis=(1, 2, 3) |
tf.convert_to_tensor(y_pred) |
tf.cast(y_true, y_pred.dtype) |
y_true.get_shape() |
y_pred.get_shape() |
ValueError("y_true and y_pred must be at least rank 2.") |
tf.keras.backend.epsilon() |
tf.math.reciprocal(tf.square(tf.reduce_sum(y_true, axis=axis) |
tf.where(tf.math.is_finite(w) |
tf.reduce_sum(w * tf.reduce_sum(y_true * y_pred, axis= axis) |
tf.reduce_sum(w * tf.reduce_sum(y_true + y_pred, axis= axis) |
tf.where(tf.math.is_finite(gdice) |
tf.zeros_like(gdice) |
hamming(y_true, y_pred, axis=(1, 2, 3) |
tf.convert_to_tensor(y_pred) |
tf.cast(y_true, y_pred.dtype) |
tf.reduce_mean(tf.not_equal(y_pred, y_true) |
haussdorf() |
NotADirectoryError() |
jaccard(y_true, y_pred, axis=(1, 2, 3, 4) |
empty (e.g., all background) |
tf.convert_to_tensor(y_pred) |
tf.cast(y_true, y_pred.dtype) |
tf.keras.backend.epsilon() |
tf.reduce_sum(y_true * y_pred, axis=axis) |
tf.reduce_sum(y_true, axis=axis) |
tf.reduce_sum(y_pred, axis=axis) |
return (intersection + eps) |
tversky(y_true, y_pred, axis=(1, 2, 3) |
tf.convert_to_tensor(y_pred) |
tf.cast(y_true, y_pred.dtype) |
y_true.get_shape() |
y_pred.get_shape() |
ValueError("y_true and y_pred must be at least rank 2.") |
tf.keras.backend.epsilon() |
tf.reduce_sum(y_pred * y_true, axis=axis) |
tf.reduce_sum(y_pred * (1 - y_true) |
tf.reduce_sum((1 - y_pred) |
tf.reduce_sum((num + eps) |
dice_coef_multilabel(y_true, y_pred) |
tf.shape(y_pred) |
range(n_classes) |
dice(y_true[:,:,:,:,index], y_pred[:,:,:,:,index]) |
PeeringWatcherTestCase(SecurityMonkeyWatcherTestCase) |
freeze_time("2016-07-18 12:00:00") |
test_slurp(self) |
boto.connect_vpc('the_key', 'the secret') |
conn.create_vpc("10.0.0.0/16") |
conn.create_vpc("10.0.0.0/16") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.