code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def task_done(self): '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads. For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue that the processing on the task is complete. If a :meth:`join` is cur...
Indicate that a formerly enqueued task is complete. Used by queue consumer threads. For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue that the processing on the task is complete. If a :meth:`join` is currently blocking, it will resume ...
task_done
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/queue.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/queue.py
MIT
def select(rlist, wlist, xlist, timeout=None): """An implementation of :meth:`select.select` that blocks only the current greenlet. Note: *xlist* is ignored. """ watchers = [] loop = get_hub().loop io = loop.io MAXPRI = loop.MAXPRI result = SelectResult() try: try: ...
An implementation of :meth:`select.select` that blocks only the current greenlet. Note: *xlist* is ignored.
select
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/select.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/select.py
MIT
def _tcp_listener(address, backlog=50, reuse_addr=None, family=_socket.AF_INET): """A shortcut to create a TCP socket, bind it and put it into listening state.""" sock = socket(family=family) if reuse_addr is not None: sock.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, reuse_addr) try: ...
A shortcut to create a TCP socket, bind it and put it into listening state.
_tcp_listener
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/server.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/server.py
MIT
def getsignal(signalnum): """ Exactly the same as :func:`signal.signal` except where :const:`signal.SIGCHLD` is concerned. """ if signalnum != _signal.SIGCHLD: return _signal_getsignal(signalnum) global _child_handler if _child_handler is _INITIAL: _child_handler = _signal_g...
Exactly the same as :func:`signal.signal` except where :const:`signal.SIGCHLD` is concerned.
getsignal
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/signal.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/signal.py
MIT
def signal(signalnum, handler): """ Exactly the same as :func:`signal.signal` except where :const:`signal.SIGCHLD` is concerned. .. note:: A :const:`signal.SIGCHLD` handler installed with this function will only be triggered for children that are forked using :func:`gevent.os.fork...
Exactly the same as :func:`signal.signal` except where :const:`signal.SIGCHLD` is concerned. .. note:: A :const:`signal.SIGCHLD` handler installed with this function will only be triggered for children that are forked using :func:`gevent.os.fork` (:func:`gevent.os.fork_and_watch`); ...
signal
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/signal.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/signal.py
MIT
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeo...
Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the...
create_connection
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/socket.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/socket.py
MIT
def call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete or timeout, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example:: retcode = call(["ls", "-l"]) """ timeout = kwargs.pop('...
Run command with arguments. Wait for command to complete or timeout, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example:: retcode = call(["ls", "-l"])
call
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute. The arguments are the same...
Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute. The arguments are the same as for the Popen constructor. Example:: ...
check_call
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output. If the exit code was non-zero it raises a :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute and output in the output attribute....
Run command with arguments and return its output. If the exit code was non-zero it raises a :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute and output in the output attribute. The arguments are the same as for the Pop...
check_output
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. If the exit code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and output in the output attr...
Run command with arguments and return its output as a byte string. If the exit code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and output in the output attribute. The arguments are the same as for th...
check_output
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def __init__(self, args, bufsize=None, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=_PLATFORM_DEFAULT_CLOSE_FDS, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0, threadpo...
Create new Popen instance. :param kwargs: *Only* allowed under Python 3; under Python 2, any unrecognized keyword arguments will result in a :exc:`TypeError`. Under Python 3, keyword arguments can include ``pass_fds``, ``start_new_session``, and ``restore_signals``.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def communicate(self, input=None, timeout=None): """Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no ...
Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child. communica...
communicate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None) ...
Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
_get_handles
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _make_inheritable(self, handle): """Return a duplicate of handle, which is inheritable""" return DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(), 0, 1, DUPLICATE_SAME_ACCESS)
Return a duplicate of handle, which is inheritable
_make_inheritable
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _find_w9xpopen(self): """Find and return absolute path to w9xpopen.exe""" w9xpopen = os.path.join(os.path.dirname(GetModuleFileName(0)), "w9xpopen.exe") if not os.path.exists(w9xpopen): # Eeek - file-not-found - possibly an embe...
Find and return absolute path to w9xpopen.exe
_find_w9xpopen
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _internal_poll(self): """Check if child process has terminated. Returns returncode attribute. """ if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._hand...
Check if child process has terminated. Returns returncode attribute.
_internal_poll
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def wait(self, timeout=None): """Wait for child process to terminate. Returns returncode attribute.""" if self.returncode is None: if not self._waiting: self._waiting = True self._wait() result = self.result.wait(ti...
Wait for child process to terminate. Returns returncode attribute.
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ p2cread, p2cwrite = None, None c2pread, c2pwrite = None, None errread, errwrite = None, None ...
Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
_get_handles
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def pipe_cloexec(self): """Create a pipe with FDs set CLOEXEC.""" # Pipes' FDs are set CLOEXEC by default because we don't want them # to be inherited by other subprocesses: the CLOEXEC flag is removed # from the child's FDs by _dup2(), between fork() and exec(). ...
Create a pipe with FDs set CLOEXEC.
pipe_cloexec
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def _internal_poll(self): """Check if child process has terminated. Returns returncode attribute. """ if self.returncode is None: if get_hub() is not getcurrent(): sig_pending = getattr(self._loop, 'sig_pending', True) ...
Check if child process has terminated. Returns returncode attribute.
_internal_poll
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def wait(self, timeout=None): """Wait for child process to terminate. Returns :attr:`returncode` attribute. :keyword timeout: The floating point number of seconds to wait. Under Python 2, this is a gevent extension, and we simply return if it expires...
Wait for child process to terminate. Returns :attr:`returncode` attribute. :keyword timeout: The floating point number of seconds to wait. Under Python 2, this is a gevent extension, and we simply return if it expires. Under Python 3, if this tim...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/subprocess.py
MIT
def join(self): """Waits until all outstanding tasks have been completed.""" delay = 0.0005 while self.task_queue.unfinished_tasks > 0: sleep(delay) delay = min(delay * 2, .05)
Waits until all outstanding tasks have been completed.
join
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/threadpool.py
MIT
def spawn(self, func, *args, **kwargs): """ Add a new task to the threadpool that will run ``func(*args, **kwargs)``. Waits until a slot is available. Creates a new thread if necessary. :return: A :class:`gevent.event.AsyncResult`. """ while True: semaphore ...
Add a new task to the threadpool that will run ``func(*args, **kwargs)``. Waits until a slot is available. Creates a new thread if necessary. :return: A :class:`gevent.event.AsyncResult`.
spawn
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/threadpool.py
MIT
def apply_e(self, expected_errors, function, args=None, kwargs=None): """ .. deprecated:: 1.1a2 Identical to :meth:`apply`; the ``expected_errors`` argument is ignored. """ # Deprecated but never documented. In the past, before # self.apply() allowed all errors to be r...
.. deprecated:: 1.1a2 Identical to :meth:`apply`; the ``expected_errors`` argument is ignored.
apply_e
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/threadpool.py
MIT
def start_new(cls, timeout=None, exception=None, ref=True): """Create a started :class:`Timeout`. This is a shortcut, the exact action depends on *timeout*'s type: * If *timeout* is a :class:`Timeout`, then call its :meth:`start` method if it's not already begun. * Otherwise,...
Create a started :class:`Timeout`. This is a shortcut, the exact action depends on *timeout*'s type: * If *timeout* is a :class:`Timeout`, then call its :meth:`start` method if it's not already begun. * Otherwise, create a new :class:`Timeout` instance, passing (*timeout*, *exception...
start_new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/timeout.py
MIT
def __str__(self): """ >>> raise Timeout #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... Timeout """ if self.seconds is None: return '' suffix = '' if self.seconds == 1 else 's' if self.exception is None:...
>>> raise Timeout #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... Timeout
__str__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/timeout.py
MIT
def with_timeout(seconds, function, *args, **kwds): """Wrap a call to *function* with a timeout; if the called function fails to return before the timeout, cancel it and return a flag value, provided by *timeout_value* keyword argument. If timeout expires but *timeout_value* is not provided, raise :cla...
Wrap a call to *function* with a timeout; if the called function fails to return before the timeout, cancel it and return a flag value, provided by *timeout_value* keyword argument. If timeout expires but *timeout_value* is not provided, raise :class:`Timeout`. Keyword argument *timeout_value* is not ...
with_timeout
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/timeout.py
MIT
def __init__(self, errors, func): """ Calling this makes a new function from *func*, such that it catches *errors* (an :exc:`BaseException` subclass, or a tuple of :exc:`BaseException` subclasses) and return it as a value. """ self.__errors = errors self.__func = ...
Calling this makes a new function from *func*, such that it catches *errors* (an :exc:`BaseException` subclass, or a tuple of :exc:`BaseException` subclasses) and return it as a value.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/util.py
MIT
def fromEnvironment(cls): """ Get as many of the platform-specific error translation objects as possible and return an instance of C{cls} created with them. """ try: from ctypes import WinError except ImportError: WinError = None try: ...
Get as many of the platform-specific error translation objects as possible and return an instance of C{cls} created with them.
fromEnvironment
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/win32util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/win32util.py
MIT
def formatError(self, errorcode): """ Returns the string associated with a Windows error message, such as the ones found in socket.error. Attempts direct lookup against the win32 API via ctypes and then pywin32 if available), then in the error table in the socket module, ...
Returns the string associated with a Windows error message, such as the ones found in socket.error. Attempts direct lookup against the win32 API via ctypes and then pywin32 if available), then in the error table in the socket module, then finally defaulting to C{os.strerror}. ...
formatError
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/win32util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/win32util.py
MIT
def release(self): """ Release the semaphore, notifying any waiters if needed. """ self.counter += 1 self._start_notify() return self.counter
Release the semaphore, notifying any waiters if needed.
release
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def rawlink(self, callback): """ rawlink(callback) -> None Register a callback to call when a counter is more than zero. *callback* will be called in the :class:`Hub <gevent.hub.Hub>`, so it must not use blocking gevent API. *callback* will be passed one argument: this instance...
rawlink(callback) -> None Register a callback to call when a counter is more than zero. *callback* will be called in the :class:`Hub <gevent.hub.Hub>`, so it must not use blocking gevent API. *callback* will be passed one argument: this instance. This method is normally calle...
rawlink
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def unlink(self, callback): """ unlink(callback) -> None Remove the callback set by :meth:`rawlink`. This method is normally called automatically by :meth:`acquire` and :meth:`wait`; most code will not need to use it. """ try: self._links.remove(cal...
unlink(callback) -> None Remove the callback set by :meth:`rawlink`. This method is normally called automatically by :meth:`acquire` and :meth:`wait`; most code will not need to use it.
unlink
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def _do_wait(self, timeout): """ Wait for up to *timeout* seconds to expire. If timeout elapses, return the exception. Otherwise, return None. Raises timeout if a different timer expires. """ switch = getcurrent().switch self.rawlink(switch) try: ...
Wait for up to *timeout* seconds to expire. If timeout elapses, return the exception. Otherwise, return None. Raises timeout if a different timer expires.
_do_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def wait(self, timeout=None): """ wait(timeout=None) -> int Wait until it is possible to acquire this semaphore, or until the optional *timeout* elapses. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever if no timeout is ...
wait(timeout=None) -> int Wait until it is possible to acquire this semaphore, or until the optional *timeout* elapses. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever if no timeout is given. :keyword float timeout: I...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def acquire(self, blocking=True, timeout=None): """ acquire(blocking=True, timeout=None) -> bool Acquire the semaphore. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever (unless a timeout is given or blocking is set to...
acquire(blocking=True, timeout=None) -> bool Acquire the semaphore. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever (unless a timeout is given or blocking is set to false). :keyword bool blocking: If True (the defa...
acquire
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_semaphore.py
MIT
def _wait(self, watcher, timeout_exc=timeout('timed out')): """Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :f...
Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called, raise ``socket.error(EBADF, 'File descript...
_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket2.py
MIT
def __send_chunk(self, data_memory, flags, timeleft, end): """ Send the complete contents of ``data_memory`` before returning. This is the core loop around :meth:`send`. :param timeleft: Either ``None`` if there is no timeout involved, or a float indicating the timeout to use...
Send the complete contents of ``data_memory`` before returning. This is the core loop around :meth:`send`. :param timeleft: Either ``None`` if there is no timeout involved, or a float indicating the timeout to use. :param end: Either ``None`` if there is no timeout involved,...
__send_chunk
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket2.py
MIT
def __repr__(self): """Wrap __repr__() to reveal the real class name.""" try: s = _socket.socket.__repr__(self._sock) except Exception as ex: # Observed on Windows Py3.3, printing the repr of a socket # that just sufferred a ConnectionResetError [WinError 1005...
Wrap __repr__() to reveal the real class name.
__repr__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def _wait(self, watcher, timeout_exc=timeout('timed out')): """Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :f...
Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called, raise ``socket.error(EBADF, 'File descript...
_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def dup(self): """dup() -> socket object Return a new socket object connected to the same system resource. """ fd = dup(self.fileno()) sock = self.__class__(self.family, self.type, self.proto, fileno=fd) sock.settimeout(self.gettimeout()) return sock
dup() -> socket object Return a new socket object connected to the same system resource.
dup
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def accept(self): """accept() -> (socket object, address info) Wait for an incoming connection. Return a new socket representing the connection, and the address of the client. For IP sockets, the address info is a pair (hostaddr, port). """ while True: try: ...
accept() -> (socket object, address info) Wait for an incoming connection. Return a new socket representing the connection, and the address of the client. For IP sockets, the address info is a pair (hostaddr, port).
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def makefile(self, mode="r", buffering=None, *, encoding=None, errors=None, newline=None): """Return an I/O stream connected to the socket The arguments are as for io.open() after the filename, except the only mode characters supported are 'r', 'w' and 'b'. The semantic...
Return an I/O stream connected to the socket The arguments are as for io.open() after the filename, except the only mode characters supported are 'r', 'w' and 'b'. The semantics are similar too.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def fromfd(fd, family, type, proto=0): """ fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket(). """ nfd = dup(fd) return socket(family, type, proto, nfd)
fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket().
fromfd
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def socketpair(family=None, type=SOCK_STREAM, proto=0): """socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the defau...
socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise,...
socketpair
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socket3.py
MIT
def wait(io, timeout=None, timeout_exc=_NONE): """ Block the current greenlet until *io* is ready. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called on *io*...
Block the current greenlet until *io* is ready. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called on *io* by another greenlet, raise an exception in this b...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socketcommon.py
MIT
def wait_read(fileno, timeout=None, timeout_exc=_NONE): """ Block the current greenlet until *fileno* is ready to read. For the meaning of the other parameters and possible exceptions, see :func:`wait`. .. seealso:: :func:`cancel_wait` """ io = get_hub().loop.io(fileno, 1) return wait...
Block the current greenlet until *fileno* is ready to read. For the meaning of the other parameters and possible exceptions, see :func:`wait`. .. seealso:: :func:`cancel_wait`
wait_read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socketcommon.py
MIT
def wait_write(fileno, timeout=None, timeout_exc=_NONE, event=_NONE): """ Block the current greenlet until *fileno* is ready to write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In ...
Block the current greenlet until *fileno* is ready to write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In the future, it may become an error. .. seealso:: :func:`cancel_wait` ...
wait_write
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socketcommon.py
MIT
def wait_readwrite(fileno, timeout=None, timeout_exc=_NONE, event=_NONE): """ Block the current greenlet until *fileno* is ready to read or write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this param...
Block the current greenlet until *fileno* is ready to read or write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In the future, it may become an error. .. seealso:: :func:`canc...
wait_readwrite
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socketcommon.py
MIT
def getfqdn(name=''): """Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname from gethostname() is returned. """ ...
Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname from gethostname() is returned.
getfqdn
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_socketcommon.py
MIT
def read(self, len=1024): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" while True: try: return self._sslobj.read(len) except SSLError as ex: if ex.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: ...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl2.py
MIT
def connect(self, addr): """Connects to remote ADDR, and then wraps the connection in an SSL channel.""" # Here we assume that the socket is client-side, and not # connected at the time of the call. We connect it, then wrap it. if self._sslobj: raise ValueError("atte...
Connects to remote ADDR, and then wraps the connection in an SSL channel.
connect
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl2.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" sock = self._sock while True: try: client_socket, ad...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl2.py
MIT
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" if not PYPY: self._makefile_refs += 1 # close=True so as to decrement the reference count when done with ...
Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl2.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl2.py
MIT
def read(self, len=1024, buffer=None): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" self._checkClosed() if not self._sslobj: raise ValueError("Read on closed or unwrapped SSL socket.") while True: try: if b...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def getpeercert(self, binary_form=False): """Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.""" self._checkClosed() s...
Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.
getpeercert
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def version(self): """Return a string identifying the protocol version used by the current SSL channel. """ if not self._sslobj: return None return self._sslobj.version()
Return a string identifying the protocol version used by the current SSL channel.
version
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" newsock, addr = socket.accept(self) newsock = self.context.wrap_socket(newsock,...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def get_channel_binding(self, cb_type="tls-unique"): """Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). """ if cb_type not i...
Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).
get_channel_binding
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_ssl3.py
MIT
def create_default_context(purpose=Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None): """Create a SSLContext object with default settings. NOTE: The protocol and settings may change anytime without prior deprecation. The values represent a fair balance between max...
Create a SSLContext object with default settings. NOTE: The protocol and settings may change anytime without prior deprecation. The values represent a fair balance between maximum compatibility and security.
create_default_context
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def _create_unverified_context(protocol=PROTOCOL_SSLv23, cert_reqs=None, check_hostname=False, purpose=Purpose.SERVER_AUTH, certfile=None, keyfile=None, cafile=None, capath=None, cadata=None): """Create a SSLContext object for Python s...
Create a SSLContext object for Python stdlib modules All Python stdlib modules shall use this function to create SSLContext objects in order to keep common settings in one place. The configuration is less restrict than create_default_context()'s to increase backward compatibility.
_create_unverified_context
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def read(self, len=0, buffer=None): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" self._checkClosed() if not self._sslobj: raise ValueError("Read on closed or unwrapped SSL socket.") while True: try: if buffe...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def getpeercert(self, binary_form=False): """Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.""" self._checkClosed() s...
Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.
getpeercert
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" newsock, addr = socket.accept(self) newsock = self.context.wrap_socket(newsock,...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" if not PYPY: self._makefile_refs += 1 # close=True so as to decrement the reference count when done with ...
Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def get_channel_binding(self, cb_type="tls-unique"): """Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). """ if cb_type not i...
Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).
get_channel_binding
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def version(self): """ Return a string identifying the protocol version used by the current SSL channel, or None if there is no established channel. """ if self._sslobj is None: return None return self._sslobj.version()
Return a string identifying the protocol version used by the current SSL channel, or None if there is no established channel.
version
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_sslgte279.py
MIT
def _init_ugly_crap(): """This function implements a few ugly things so that we can patch the traceback objects. The function returned allows resetting `tb_next` on any python traceback object. Do not attempt to use this on non cpython interpreters """ import ctypes from types import Trace...
This function implements a few ugly things so that we can patch the traceback objects. The function returned allows resetting `tb_next` on any python traceback object. Do not attempt to use this on non cpython interpreters
_init_ugly_crap
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_tblib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_tblib.py
MIT
def tb_set_next(tb, next): """Set the tb_next attribute of a traceback object.""" if not (isinstance(tb, TracebackType) and (next is None or isinstance(next, TracebackType))): raise TypeError('tb_set_next arguments must be traceback objects') obj = _Traceback.from_add...
Set the tb_next attribute of a traceback object.
tb_set_next
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_tblib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_tblib.py
MIT
def task_done(self): """Indicate that a formerly enqueued task is complete. Used by Queue consumer threads. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it ...
Indicate that a formerly enqueued task is complete. Used by Queue consumer threads. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it will resume when all items ...
task_done
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def join(self): """Blocks until all items in the Queue have been gotten and processed. The count of unfinished tasks goes up whenever an item is added to the queue. The count goes down whenever a consumer thread calls task_done() to indicate the item was retrieved and all work on it is ...
Blocks until all items in the Queue have been gotten and processed. The count of unfinished tasks goes up whenever an item is added to the queue. The count goes down whenever a consumer thread calls task_done() to indicate the item was retrieved and all work on it is complete. When the...
join
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def qsize(self): """Return the approximate size of the queue (not reliable!).""" self.mutex.acquire() try: return self._qsize() finally: self.mutex.release()
Return the approximate size of the queue (not reliable!).
qsize
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def empty(self): """Return True if the queue is empty, False otherwise (not reliable!).""" self.mutex.acquire() try: return not self._qsize() finally: self.mutex.release()
Return True if the queue is empty, False otherwise (not reliable!).
empty
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def full(self): """Return True if the queue is full, False otherwise (not reliable!).""" self.mutex.acquire() try: if self.maxsize <= 0: return False if self.maxsize >= self._qsize(): return True finally: self.mutex.rele...
Return True if the queue is full, False otherwise (not reliable!).
full
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def put(self, item, block=True, timeout=None): """Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises ...
Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within ...
put
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def get(self, block=True, timeout=None): """Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises ...
Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available w...
get
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/gevent/_threading.py
MIT
def __new__(self, projparams=None, preserve_units=False, **kwargs): """ initialize a Proj class instance. Proj4 projection control parameters must either be given in a dictionary 'projparams' or as keyword arguments. See the proj documentation (http://trac.osgeo.org/proj/) for m...
initialize a Proj class instance. Proj4 projection control parameters must either be given in a dictionary 'projparams' or as keyword arguments. See the proj documentation (http://trac.osgeo.org/proj/) for more information about specifying projection parameters. Exampl...
__new__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def __call__(self, *args, **kw): #,lon,lat,inverse=False,radians=False,errcheck=False): """ Calling a Proj class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y native map projection coordinates (in meters). If optional keyword 'inverse' is True ...
Calling a Proj class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y native map projection coordinates (in meters). If optional keyword 'inverse' is True (default is False), the inverse transformation from x/y to lon/lat is performed. If optional ...
__call__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def transform(p1, p2, x, y, z=None, radians=False): """ x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False) Transform points between two coordinate systems defined by the Proj instances p1 and p2. The points x1,y1,z1 in the coordinate system defined by p1 are transformed to x2,y2,z2 in t...
x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False) Transform points between two coordinate systems defined by the Proj instances p1 and p2. The points x1,y1,z1 in the coordinate system defined by p1 are transformed to x2,y2,z2 in the coordinate system defined by p2. z1 is optional, if...
transform
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def _copytobuffer(x): """ return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is true if input is a tuple,...
return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is true if input is a tuple, isfloat is true if input is ...
_copytobuffer
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def __new__(self, initstring=None, **kwargs): """ initialize a Geod class instance. Geodetic parameters for specifying the ellipsoid can be given in a dictionary 'initparams', as keyword arguments, or as as proj4 geod initialization string. Following is a list of the ell...
initialize a Geod class instance. Geodetic parameters for specifying the ellipsoid can be given in a dictionary 'initparams', as keyword arguments, or as as proj4 geod initialization string. Following is a list of the ellipsoids that may be defined using the 'ellps' key...
__new__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def fwd(self, lons, lats, az, dist, radians=False): """ forward transformation - Returns longitudes, latitudes and back azimuths of terminus points given longitudes (lons) and latitudes (lats) of initial points, plus forward azimuths (az) and distances (dist). latitudes (...
forward transformation - Returns longitudes, latitudes and back azimuths of terminus points given longitudes (lons) and latitudes (lats) of initial points, plus forward azimuths (az) and distances (dist). latitudes (lats) of initial points, plus forward azimuths (az) and...
fwd
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def inv(self,lons1,lats1,lons2,lats2,radians=False): """ inverse transformation - Returns forward and back azimuths, plus distances between initial points (specified by lons1, lats1) and terminus points (specified by lons2, lats2). Works with numpy and regular python array objec...
inverse transformation - Returns forward and back azimuths, plus distances between initial points (specified by lons1, lats1) and terminus points (specified by lons2, lats2). Works with numpy and regular python array objects, python sequences and scalars. if radians=Tr...
inv
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def npts(self, lon1, lat1, lon2, lat2, npts, radians=False): """ Given a single initial point and terminus point (specified by python floats lon1,lat1 and lon2,lat2), returns a list of longitude/latitude pairs describing npts equally spaced intermediate points along the geodesic ...
Given a single initial point and terminus point (specified by python floats lon1,lat1 and lon2,lat2), returns a list of longitude/latitude pairs describing npts equally spaced intermediate points along the geodesic between the initial and terminus points. if radians=Tru...
npts
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/pyproj/__init__.py
MIT
def check_access_token(self): """ Add few seconds to now so the token get refreshed before it invalidates in the middle of the request """ now_s = get_time() + 120 if self._access_token is not None: if self._access_token_expiry == 0: self.log...
Add few seconds to now so the token get refreshed before it invalidates in the middle of the request
check_access_token
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/shared/pgoapi/auth.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/shared/pgoapi/auth.py
MIT
def dict_to_protobuf(pb_klass_or_instance, values, type_callable_map=REVERSE_TYPE_CALLABLE_MAP, strict=True): """Populates a protobuf model from a dictionary. :param pb_klass_or_instance: a protobuf message class, or an protobuf instance :type pb_klass_or_instance: a type or instance of a subclass of googl...
Populates a protobuf model from a dictionary. :param pb_klass_or_instance: a protobuf message class, or an protobuf instance :type pb_klass_or_instance: a type or instance of a subclass of google.protobuf.message.Message :param dict values: a dictionary of values. Repeated and nested values are full...
dict_to_protobuf
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/shared/pgoapi/protobuf_to_dict.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/shared/pgoapi/protobuf_to_dict.py
MIT
def long_to_bytes(val, endianness='big'): """ Use :ref:`string formatting` and :func:`~binascii.unhexlify` to convert ``val``, a :func:`long`, to a byte :func:`str`. :param long val: The value to pack :param str endianness: The endianness of the result. ``'big'`` for big-endian, ``'little'`` f...
Use :ref:`string formatting` and :func:`~binascii.unhexlify` to convert ``val``, a :func:`long`, to a byte :func:`str`. :param long val: The value to pack :param str endianness: The endianness of the result. ``'big'`` for big-endian, ``'little'`` for little-endian. If you want byte- and word-...
long_to_bytes
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/shared/pgoapi/utilities.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/shared/pgoapi/utilities.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" use_aesni = dict_parameters.pop("use_aesni", True) try: key = dict_parameters.pop("key") except KeyError: raise ...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/AES.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/AES.py
MIT
def new(key, mode, *args, **kwargs): """Create a new AES cipher :Parameters: key : byte string The secret key to use in the symmetric cipher. It must be 16 (*AES-128*), 24 (*AES-192*), or 32 (*AES-256*) bytes long. Only in `MODE_SIV`, it needs to be 32, 48, or 64 bytes lo...
Create a new AES cipher :Parameters: key : byte string The secret key to use in the symmetric cipher. It must be 16 (*AES-128*), 24 (*AES-192*), or 32 (*AES-256*) bytes long. Only in `MODE_SIV`, it needs to be 32, 48, or 64 bytes long. mode : a *MODE_** constant ...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/AES.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/AES.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") effective_keyl...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ARC2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ARC2.py
MIT
def __init__(self, key, *args, **kwargs): """Initialize an ARC4 cipher object See also `new()` at the module level.""" if len(args) > 0: ndrop = args[0] args = args[1:] else: ndrop = kwargs.pop('drop', 0) if len(key) not in key_size: ...
Initialize an ARC4 cipher object See also `new()` at the module level.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ARC4.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ARC4.py
MIT
def encrypt(self, plaintext): """Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). """ expect_byte_string(plaint...
Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext).
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ARC4.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ARC4.py
MIT
def decrypt(self, ciphertext): """Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext). """ try: return...
Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext).
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ARC4.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ARC4.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a smart pointer to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") exp...
This method instantiates and returns a smart pointer to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/Blowfish.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/Blowfish.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") expect_byte_st...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/CAST.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/CAST.py
MIT
def __init__(self, key, nonce): """Initialize a ChaCha20 cipher object See also `new()` at the module level.""" expect_byte_string(key) expect_byte_string(nonce) self.nonce = nonce self._next = ( self.encrypt, self.decrypt ) self._state = VoidPointer() ...
Initialize a ChaCha20 cipher object See also `new()` at the module level.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ChaCha20.py
MIT
def encrypt(self, plaintext): """Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). """ if self.encrypt not in se...
Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext).
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/Cryptodome/Cipher/ChaCha20.py
MIT