code stringlengths 3 6.57k |
|---|
range(0, im_h - rows, tile_h) |
range(0, im_w - columns, tile_w) |
im.crop(area) |
int(floor(pos_x / tile_w) |
int(floor(pos_y / tile_h) |
Tile(image, number, position, coords) |
tiles.append(tile) |
get_basename(filename) |
tuple(tiles) |
main(path, **kwargs) |
os.path.isdir(path) |
os.path.join(path, f) |
os.listdir(path) |
os.path.isfile(os.path.join(path, f) |
f.endswith(".jpg") |
os.path.join(os.path.abspath(path) |
os.path.join(os.path.dirname(os.path.abspath(path) |
os.path.exists(output) |
os.makedirs(output) |
_do_slice(filename, output, **kwargs) |
len(tiles) |
optparse.OptionParser(usage="usage: python %prog [OPTIONS] filename") |
run (do not actually perform anything, only report) |
parser.parse_args() |
time.time() |
main(args[0], **vars(opts) |
exit() |
int(time.time() |
list(map(int, open('d9.txt') |
enumerate(data) |
range(len(data) |
range(i) |
print(j, i, 'inclusive') |
print(min(orig_data[j:i+1]) |
max(orig_data[j:i+1]) |
sys.exit() |
logging.getLogger(__name__) |
RemoteB186ACN01(XiaomiQuickInitDevice) |
MultistateInputCluster(CustomCluster, MultistateInput) |
__init__(self, *args, **kwargs) |
super() |
__init__(*args, **kwargs) |
_update_attribute(self, attrid, value) |
super() |
_update_attribute(attrid, value) |
PRESS_TYPES.get(value) |
self.listener_event(ZHA_SEND_EVENT, self._current_state, event_args) |
super() |
_update_attribute(0, self._current_state) |
Copyright (c) |
Client(components.Component) |
Capabilities(components.Capabilities) |
Expectations(components.Capabilities) |
json.enum("path", optional=True) |
__init__(self, sock) |
log.info("Connecting to client over stdio...", self) |
messaging.JsonIOStream.from_stdio() |
open(os.devnull, "r") |
atexit.register(stdin.close) |
open(os.devnull, "w") |
atexit.register(stdout.close) |
messaging.JsonIOStream.from_socket(sock) |
sessions.Session() |
super(Client, self) |
__init__(session, stream) |
set() |
session.register() |
propagate_after_start(self, event) |
self._deferred_events.append(event) |
log.debug("Propagation deferred.") |
self.client.channel.propagate(event) |
_propagate_deferred_events(self) |
log.debug("Propagating deferred events to {0}...", self.client) |
log.debug("Propagating deferred {0}", event.describe() |
self.client.channel.propagate(event) |
log.info("All deferred events propagated to {0}.", self.client) |
event(self, event) |
self.server.channel.propagate(event) |
request(self, request) |
self.server.channel.delegate(request) |
initialize_request(self, request) |
request.isnt_valid("Session is already initialized") |
request("clientID", "") |
self.Capabilities(self, request) |
self.Expectations(self, request) |
_start_message_handler(f) |
handle(self, request) |
request.is_request("launch", "attach") |
request.isnt_valid("Session is not initialized yet") |
request.isnt_valid("Session is already started") |
request("noDebug", json.default(False) |
servers.dont_wait_for_first_connection() |
request("debugOptions", json.array(unicode) |
f(self, request) |
self.server.initialize(self._initialize_request) |
arguments.get("console") |
dict(arguments) |
arguments.get("redirectOutput") |
dict(arguments) |
self.server.channel.request(request.command, arguments) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.