body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def voice(self, roomJID):
'\n Request voice for a moderated room.\n\n @param roomJID: The room jabber/xmpp entity id.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
message = VoiceRequest(recipient=roomJID)
self.xmlstream.send(message.toElement()) | 1,138,415,530,318,392,200 | Request voice for a moderated room.
@param roomJID: The room jabber/xmpp entity id.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | voice | Gandi/wokkel | python | def voice(self, roomJID):
'\n Request voice for a moderated room.\n\n @param roomJID: The room jabber/xmpp entity id.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
message = VoiceRequest(recipient=roomJID)
self.xmlstream.send(message.toElement()) |
def history(self, roomJID, messages):
"\n Send history to create a MUC based on a one on one chat.\n\n See: http://xmpp.org/extensions/xep-0045.html#continue\n\n @param roomJID: The room jabber/xmpp entity id.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @pa... | 7,635,375,756,510,448,000 | Send history to create a MUC based on a one on one chat.
See: http://xmpp.org/extensions/xep-0045.html#continue
@param roomJID: The room jabber/xmpp entity id.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param messages: The history to send to the room as an ordered list of
message... | wokkel/muc.py | history | Gandi/wokkel | python | def history(self, roomJID, messages):
"\n Send history to create a MUC based on a one on one chat.\n\n See: http://xmpp.org/extensions/xep-0045.html#continue\n\n @param roomJID: The room jabber/xmpp entity id.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @pa... |
def getConfiguration(self, roomJID):
"\n Grab the configuration from the room.\n\n This sends an iq request to the room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @return: A deferred that fires with the room's... | -5,454,010,734,910,756,000 | Grab the configuration from the room.
This sends an iq request to the room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@return: A deferred that fires with the room's configuration form as
a L{data_form.Form} or C{None} if there are no configuration
... | wokkel/muc.py | getConfiguration | Gandi/wokkel | python | def getConfiguration(self, roomJID):
"\n Grab the configuration from the room.\n\n This sends an iq request to the room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @return: A deferred that fires with the room's... |
def configure(self, roomJID, options):
'\n Configure a room.\n\n @param roomJID: The room to configure.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param options: A mapping of field names to values, or C{None} to\n cancel.\n @type options: C{dic... | 2,256,700,753,176,623,900 | Configure a room.
@param roomJID: The room to configure.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param options: A mapping of field names to values, or C{None} to
cancel.
@type options: C{dict} | wokkel/muc.py | configure | Gandi/wokkel | python | def configure(self, roomJID, options):
'\n Configure a room.\n\n @param roomJID: The room to configure.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param options: A mapping of field names to values, or C{None} to\n cancel.\n @type options: C{dic... |
def _getAffiliationList(self, roomJID, affiliation):
'\n Send a request for an affiliation list in a room.\n '
def cb(response):
stanza = AdminStanza.fromElement(response)
return stanza.items
request = AdminStanza(recipient=roomJID, stanzaType='get')
request.items = [Admin... | -2,799,156,953,370,444,300 | Send a request for an affiliation list in a room. | wokkel/muc.py | _getAffiliationList | Gandi/wokkel | python | def _getAffiliationList(self, roomJID, affiliation):
'\n \n '
def cb(response):
stanza = AdminStanza.fromElement(response)
return stanza.items
request = AdminStanza(recipient=roomJID, stanzaType='get')
request.items = [AdminItem(affiliation=affiliation)]
d = self.reque... |
def _getRoleList(self, roomJID, role):
'\n Send a request for a role list in a room.\n '
def cb(response):
stanza = AdminStanza.fromElement(response)
return stanza.items
request = AdminStanza(recipient=roomJID, stanzaType='get')
request.items = [AdminItem(role=role)]
d... | -7,067,061,049,045,694,000 | Send a request for a role list in a room. | wokkel/muc.py | _getRoleList | Gandi/wokkel | python | def _getRoleList(self, roomJID, role):
'\n \n '
def cb(response):
stanza = AdminStanza.fromElement(response)
return stanza.items
request = AdminStanza(recipient=roomJID, stanzaType='get')
request.items = [AdminItem(role=role)]
d = self.request(request)
d.addCallbac... |
def getMemberList(self, roomJID):
'\n Get the member list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'member') | 8,178,079,271,744,483,000 | Get the member list of a room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | getMemberList | Gandi/wokkel | python | def getMemberList(self, roomJID):
'\n Get the member list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'member') |
def getAdminList(self, roomJID):
'\n Get the admin list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'admin') | 7,913,491,116,521,769,000 | Get the admin list of a room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | getAdminList | Gandi/wokkel | python | def getAdminList(self, roomJID):
'\n Get the admin list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'admin') |
def getBanList(self, roomJID):
'\n Get an outcast list from a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'outcast') | 3,179,525,397,458,575,400 | Get an outcast list from a room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | getBanList | Gandi/wokkel | python | def getBanList(self, roomJID):
'\n Get an outcast list from a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'outcast') |
def getOwnerList(self, roomJID):
'\n Get an owner list from a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'owner') | -1,628,875,077,073,642,200 | Get an owner list from a room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | getOwnerList | Gandi/wokkel | python | def getOwnerList(self, roomJID):
'\n Get an owner list from a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._getAffiliationList(roomJID, 'owner') |
def getModeratorList(self, roomJID):
'\n Get the moderator list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
d = self._getRoleList(roomJID, 'moderator')
return d | 8,124,120,447,538,257,000 | Get the moderator list of a room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | getModeratorList | Gandi/wokkel | python | def getModeratorList(self, roomJID):
'\n Get the moderator list of a room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
d = self._getRoleList(roomJID, 'moderator')
return d |
def _setAffiliation(self, roomJID, entity, affiliation, reason=None, sender=None):
"\n Send a request to change an entity's affiliation to a MUC room.\n "
request = AdminStanza(recipient=roomJID, sender=sender, stanzaType='set')
item = AdminItem(entity=entity, affiliation=affiliation, reason=r... | 9,061,982,443,933,875,000 | Send a request to change an entity's affiliation to a MUC room. | wokkel/muc.py | _setAffiliation | Gandi/wokkel | python | def _setAffiliation(self, roomJID, entity, affiliation, reason=None, sender=None):
"\n \n "
request = AdminStanza(recipient=roomJID, sender=sender, stanzaType='set')
item = AdminItem(entity=entity, affiliation=affiliation, reason=reason)
request.items = [item]
return self.request(reque... |
def _setRole(self, roomJID, nick, role, reason=None, sender=None):
"\n Send a request to change an occupant's role in a MUC room.\n "
request = AdminStanza(recipient=roomJID, sender=sender, stanzaType='set')
item = AdminItem(nick=nick, role=role, reason=reason)
request.items = [item]
r... | 5,439,391,183,908,645,000 | Send a request to change an occupant's role in a MUC room. | wokkel/muc.py | _setRole | Gandi/wokkel | python | def _setRole(self, roomJID, nick, role, reason=None, sender=None):
"\n \n "
request = AdminStanza(recipient=roomJID, sender=sender, stanzaType='set')
item = AdminItem(nick=nick, role=role, reason=reason)
request.items = [item]
return self.request(request) |
def modifyAffiliationList(self, roomJID, entities, affiliation, sender=None):
'\n Modify an affiliation list.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param entities: The list of entities to change for a room.\n ... | -5,120,453,398,144,076,000 | Modify an affiliation list.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param entities: The list of entities to change for a room.
@type entities: C{list} of
L{JID<twisted.words.protocols.jabber.jid.JID>}
@param affiliation: The affilation to the entit... | wokkel/muc.py | modifyAffiliationList | Gandi/wokkel | python | def modifyAffiliationList(self, roomJID, entities, affiliation, sender=None):
'\n Modify an affiliation list.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param entities: The list of entities to change for a room.\n ... |
def grantVoice(self, roomJID, nick, reason=None, sender=None):
'\n Grant voice to an entity.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the user in this room.\n @type nick: C{unic... | -6,749,614,054,787,218,000 | Grant voice to an entity.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The nick name for the user in this room.
@type nick: C{unicode}
@param reason: The reason for granting voice to the entity.
@type reason: C{unicode}
@param sender: The entit... | wokkel/muc.py | grantVoice | Gandi/wokkel | python | def grantVoice(self, roomJID, nick, reason=None, sender=None):
'\n Grant voice to an entity.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the user in this room.\n @type nick: C{unic... |
def revokeVoice(self, roomJID, nick, reason=None, sender=None):
'\n Revoke voice from a participant.\n\n This will disallow the entity to send messages to a moderated room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n ... | -3,556,443,029,513,131,000 | Revoke voice from a participant.
This will disallow the entity to send messages to a moderated room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The nick name for the user in this room.
@type nick: C{unicode}
@param reason: The reason for revo... | wokkel/muc.py | revokeVoice | Gandi/wokkel | python | def revokeVoice(self, roomJID, nick, reason=None, sender=None):
'\n Revoke voice from a participant.\n\n This will disallow the entity to send messages to a moderated room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n ... |
def grantModerator(self, roomJID, nick, reason=None, sender=None):
'\n Grant moderator privileges to a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the user in this room.\n ... | 887,203,103,960,406,700 | Grant moderator privileges to a MUC room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The nick name for the user in this room.
@type nick: C{unicode}
@param reason: The reason for granting moderation to the entity.
@type reason: C{unicode}
@pa... | wokkel/muc.py | grantModerator | Gandi/wokkel | python | def grantModerator(self, roomJID, nick, reason=None, sender=None):
'\n Grant moderator privileges to a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the user in this room.\n ... |
def ban(self, roomJID, entity, reason=None, sender=None):
'\n Ban a user from a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param entity: The bare JID of the entity to be banned.\n @type entity: L{JID... | -4,115,670,468,276,500,000 | Ban a user from a MUC room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param entity: The bare JID of the entity to be banned.
@type entity: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param reason: The reason for banning the entity.
@type reason: C{un... | wokkel/muc.py | ban | Gandi/wokkel | python | def ban(self, roomJID, entity, reason=None, sender=None):
'\n Ban a user from a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param entity: The bare JID of the entity to be banned.\n @type entity: L{JID... |
def kick(self, roomJID, nick, reason=None, sender=None):
'\n Kick a user from a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The occupant to be banned.\n @type nick: C{unicode}\n\n @... | 3,500,691,337,500,821,000 | Kick a user from a MUC room.
@param roomJID: The bare JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The occupant to be banned.
@type nick: C{unicode}
@param reason: The reason given for the kick.
@type reason: C{unicode}
@param sender: The entity sending the request.
@t... | wokkel/muc.py | kick | Gandi/wokkel | python | def kick(self, roomJID, nick, reason=None, sender=None):
'\n Kick a user from a MUC room.\n\n @param roomJID: The bare JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The occupant to be banned.\n @type nick: C{unicode}\n\n @... |
def destroy(self, roomJID, reason=None, alternate=None, password=None):
'\n Destroy a room.\n\n @param roomJID: The JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param reason: The reason for the destruction of the room.\n @type reason: C{uni... | 7,246,284,918,132,050,000 | Destroy a room.
@param roomJID: The JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param reason: The reason for the destruction of the room.
@type reason: C{unicode}
@param alternate: The JID of the room suggested as an alternate venue.
@type alternate: L{JID<twisted.words.protocols.... | wokkel/muc.py | destroy | Gandi/wokkel | python | def destroy(self, roomJID, reason=None, alternate=None, password=None):
'\n Destroy a room.\n\n @param roomJID: The JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param reason: The reason for the destruction of the room.\n @type reason: C{uni... |
def __init__(self, roomJID, nick):
'\n Initialize the room.\n '
self.roomJID = roomJID
self.setNick(nick)
self.roster = {} | -6,570,074,872,449,545,000 | Initialize the room. | wokkel/muc.py | __init__ | Gandi/wokkel | python | def __init__(self, roomJID, nick):
'\n \n '
self.roomJID = roomJID
self.setNick(nick)
self.roster = {} |
def addUser(self, user):
'\n Add a user to the room roster.\n\n @param user: The user object that is being added to the room.\n @type user: L{User}\n '
self.roster[user.nick] = user | -8,182,693,432,624,344,000 | Add a user to the room roster.
@param user: The user object that is being added to the room.
@type user: L{User} | wokkel/muc.py | addUser | Gandi/wokkel | python | def addUser(self, user):
'\n Add a user to the room roster.\n\n @param user: The user object that is being added to the room.\n @type user: L{User}\n '
self.roster[user.nick] = user |
def inRoster(self, user):
'\n Check if a user is in the MUC room.\n\n @param user: The user object to check.\n @type user: L{User}\n '
return (user.nick in self.roster) | 1,240,849,481,805,474,000 | Check if a user is in the MUC room.
@param user: The user object to check.
@type user: L{User} | wokkel/muc.py | inRoster | Gandi/wokkel | python | def inRoster(self, user):
'\n Check if a user is in the MUC room.\n\n @param user: The user object to check.\n @type user: L{User}\n '
return (user.nick in self.roster) |
def getUser(self, nick):
"\n Get a user from the room's roster.\n\n @param nick: The nick for the user in the MUC room.\n @type nick: C{unicode}\n "
return self.roster.get(nick) | 7,890,928,055,650,853,000 | Get a user from the room's roster.
@param nick: The nick for the user in the MUC room.
@type nick: C{unicode} | wokkel/muc.py | getUser | Gandi/wokkel | python | def getUser(self, nick):
"\n Get a user from the room's roster.\n\n @param nick: The nick for the user in the MUC room.\n @type nick: C{unicode}\n "
return self.roster.get(nick) |
def removeUser(self, user):
"\n Remove a user from the MUC room's roster.\n\n @param user: The user object to check.\n @type user: L{User}\n "
if self.inRoster(user):
del self.roster[user.nick] | 5,453,805,317,436,812,000 | Remove a user from the MUC room's roster.
@param user: The user object to check.
@type user: L{User} | wokkel/muc.py | removeUser | Gandi/wokkel | python | def removeUser(self, user):
"\n Remove a user from the MUC room's roster.\n\n @param user: The user object to check.\n @type user: L{User}\n "
if self.inRoster(user):
del self.roster[user.nick] |
def _addRoom(self, room):
'\n Add a room to the room collection.\n\n Rooms are stored by the JID of the room itself. I.e. it uses the Room\n ID and service parts of the Room JID.\n\n @note: An entity can only join a particular room once.\n '
roomJID = room.occupantJID.userhost... | 212,867,097,126,227,550 | Add a room to the room collection.
Rooms are stored by the JID of the room itself. I.e. it uses the Room
ID and service parts of the Room JID.
@note: An entity can only join a particular room once. | wokkel/muc.py | _addRoom | Gandi/wokkel | python | def _addRoom(self, room):
'\n Add a room to the room collection.\n\n Rooms are stored by the JID of the room itself. I.e. it uses the Room\n ID and service parts of the Room JID.\n\n @note: An entity can only join a particular room once.\n '
roomJID = room.occupantJID.userhost... |
def _getRoom(self, roomJID):
'\n Grab a room from the room collection.\n\n This uses the Room ID and service parts of the given JID to look up\n the L{Room} instance associated with it.\n\n @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._room... | -2,379,347,027,078,015,000 | Grab a room from the room collection.
This uses the Room ID and service parts of the given JID to look up
the L{Room} instance associated with it.
@type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | _getRoom | Gandi/wokkel | python | def _getRoom(self, roomJID):
'\n Grab a room from the room collection.\n\n This uses the Room ID and service parts of the given JID to look up\n the L{Room} instance associated with it.\n\n @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
return self._room... |
def _removeRoom(self, roomJID):
'\n Delete a room from the room collection.\n '
if (roomJID in self._rooms):
del self._rooms[roomJID] | 7,946,502,388,913,218,000 | Delete a room from the room collection. | wokkel/muc.py | _removeRoom | Gandi/wokkel | python | def _removeRoom(self, roomJID):
'\n \n '
if (roomJID in self._rooms):
del self._rooms[roomJID] |
def _getRoomUser(self, stanza):
"\n Lookup the room and user associated with the stanza's sender.\n "
occupantJID = stanza.sender
if (not occupantJID):
return (None, None)
room = self._getRoom(occupantJID.userhostJID())
if (room is None):
return (None, None)
nick = ... | 3,306,524,792,348,439,000 | Lookup the room and user associated with the stanza's sender. | wokkel/muc.py | _getRoomUser | Gandi/wokkel | python | def _getRoomUser(self, stanza):
"\n \n "
occupantJID = stanza.sender
if (not occupantJID):
return (None, None)
room = self._getRoom(occupantJID.userhostJID())
if (room is None):
return (None, None)
nick = occupantJID.resource
user = room.getUser(nick)
return... |
def unavailableReceived(self, presence):
'\n Unavailable presence was received.\n\n If this was received from a MUC room occupant JID, that occupant has\n left the room.\n '
(room, user) = self._getRoomUser(presence)
if ((room is None) or (user is None)):
return
room.... | 3,576,241,825,482,311,000 | Unavailable presence was received.
If this was received from a MUC room occupant JID, that occupant has
left the room. | wokkel/muc.py | unavailableReceived | Gandi/wokkel | python | def unavailableReceived(self, presence):
'\n Unavailable presence was received.\n\n If this was received from a MUC room occupant JID, that occupant has\n left the room.\n '
(room, user) = self._getRoomUser(presence)
if ((room is None) or (user is None)):
return
room.... |
def availableReceived(self, presence):
'\n Available presence was received.\n '
(room, user) = self._getRoomUser(presence)
if (room is None):
return
if (user is None):
nick = presence.sender.resource
user = User(nick, presence.entity)
user.status = presence.stat... | 5,144,098,115,746,772,000 | Available presence was received. | wokkel/muc.py | availableReceived | Gandi/wokkel | python | def availableReceived(self, presence):
'\n \n '
(room, user) = self._getRoomUser(presence)
if (room is None):
return
if (user is None):
nick = presence.sender.resource
user = User(nick, presence.entity)
user.status = presence.status
user.show = presence.show... |
def groupChatReceived(self, message):
'\n A group chat message has been received from a MUC room.\n\n There are a few event methods that may get called here.\n L{receivedGroupChat}, L{receivedSubject} or L{receivedHistory}.\n '
(room, user) = self._getRoomUser(message)
if (room i... | 5,187,066,251,613,629,000 | A group chat message has been received from a MUC room.
There are a few event methods that may get called here.
L{receivedGroupChat}, L{receivedSubject} or L{receivedHistory}. | wokkel/muc.py | groupChatReceived | Gandi/wokkel | python | def groupChatReceived(self, message):
'\n A group chat message has been received from a MUC room.\n\n There are a few event methods that may get called here.\n L{receivedGroupChat}, L{receivedSubject} or L{receivedHistory}.\n '
(room, user) = self._getRoomUser(message)
if (room i... |
def userJoinedRoom(self, room, user):
'\n User has joined a MUC room.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n\n @param room: The room the user has joined.\n @type room: L{Room}\n\n @param user: The user that j... | 8,850,210,654,812,462,000 | User has joined a MUC room.
This method will need to be modified inorder for clients to
do something when this event occurs.
@param room: The room the user has joined.
@type room: L{Room}
@param user: The user that joined the MUC room.
@type user: L{User} | wokkel/muc.py | userJoinedRoom | Gandi/wokkel | python | def userJoinedRoom(self, room, user):
'\n User has joined a MUC room.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n\n @param room: The room the user has joined.\n @type room: L{Room}\n\n @param user: The user that j... |
def userLeftRoom(self, room, user):
'\n User has left a room.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n\n @param room: The room the user has joined.\n @type room: L{Room}\n\n @param user: The user that left the ... | -3,553,983,360,623,956,000 | User has left a room.
This method will need to be modified inorder for clients to
do something when this event occurs.
@param room: The room the user has joined.
@type room: L{Room}
@param user: The user that left the MUC room.
@type user: L{User} | wokkel/muc.py | userLeftRoom | Gandi/wokkel | python | def userLeftRoom(self, room, user):
'\n User has left a room.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n\n @param room: The room the user has joined.\n @type room: L{Room}\n\n @param user: The user that left the ... |
def userUpdatedStatus(self, room, user, show, status):
'\n User Presence has been received.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n '
pass | 7,898,166,675,434,161,000 | User Presence has been received.
This method will need to be modified inorder for clients to
do something when this event occurs. | wokkel/muc.py | userUpdatedStatus | Gandi/wokkel | python | def userUpdatedStatus(self, room, user, show, status):
'\n User Presence has been received.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n '
pass |
def receivedSubject(self, room, user, subject):
'\n A (new) room subject has been received.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n '
pass | -6,649,055,416,230,628,000 | A (new) room subject has been received.
This method will need to be modified inorder for clients to
do something when this event occurs. | wokkel/muc.py | receivedSubject | Gandi/wokkel | python | def receivedSubject(self, room, user, subject):
'\n A (new) room subject has been received.\n\n This method will need to be modified inorder for clients to\n do something when this event occurs.\n '
pass |
def receivedGroupChat(self, room, user, message):
'\n A groupchat message was received.\n\n @param room: The room the message was received from.\n @type room: L{Room}\n\n @param user: The user that sent the message, or C{None} if it was a\n message from the room itself.\n ... | 8,303,721,188,655,743,000 | A groupchat message was received.
@param room: The room the message was received from.
@type room: L{Room}
@param user: The user that sent the message, or C{None} if it was a
message from the room itself.
@type user: L{User}
@param message: The message.
@type message: L{GroupChat} | wokkel/muc.py | receivedGroupChat | Gandi/wokkel | python | def receivedGroupChat(self, room, user, message):
'\n A groupchat message was received.\n\n @param room: The room the message was received from.\n @type room: L{Room}\n\n @param user: The user that sent the message, or C{None} if it was a\n message from the room itself.\n ... |
def receivedHistory(self, room, user, message):
"\n A groupchat message from the room's discussion history was received.\n\n This is identical to L{receivedGroupChat}, with the delayed delivery\n information (timestamp and original sender) in C{message.delay}. For\n anonymous rooms, C{me... | -2,393,166,430,892,089,300 | A groupchat message from the room's discussion history was received.
This is identical to L{receivedGroupChat}, with the delayed delivery
information (timestamp and original sender) in C{message.delay}. For
anonymous rooms, C{message.delay.sender} is the room's address.
@param room: The room the message was received ... | wokkel/muc.py | receivedHistory | Gandi/wokkel | python | def receivedHistory(self, room, user, message):
"\n A groupchat message from the room's discussion history was received.\n\n This is identical to L{receivedGroupChat}, with the delayed delivery\n information (timestamp and original sender) in C{message.delay}. For\n anonymous rooms, C{me... |
def join(self, roomJID, nick, historyOptions=None, password=None):
'\n Join a MUC room by sending presence to it.\n\n @param roomJID: The JID of the room the entity is joining.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the entitity... | -775,746,254,155,071,400 | Join a MUC room by sending presence to it.
@param roomJID: The JID of the room the entity is joining.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The nick name for the entitity joining the room.
@type nick: C{unicode}
@param historyOptions: Options for conversation history sent by the
... | wokkel/muc.py | join | Gandi/wokkel | python | def join(self, roomJID, nick, historyOptions=None, password=None):
'\n Join a MUC room by sending presence to it.\n\n @param roomJID: The JID of the room the entity is joining.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param nick: The nick name for the entitity... |
def nick(self, roomJID, nick):
"\n Change an entity's nick name in a MUC room.\n\n See: http://xmpp.org/extensions/xep-0045.html#changenick\n\n @param roomJID: The JID of the room, i.e. without a resource.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param ... | -6,502,918,311,450,282,000 | Change an entity's nick name in a MUC room.
See: http://xmpp.org/extensions/xep-0045.html#changenick
@param roomJID: The JID of the room, i.e. without a resource.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param nick: The new nick name within the room.
@type nick: C{unicode} | wokkel/muc.py | nick | Gandi/wokkel | python | def nick(self, roomJID, nick):
"\n Change an entity's nick name in a MUC room.\n\n See: http://xmpp.org/extensions/xep-0045.html#changenick\n\n @param roomJID: The JID of the room, i.e. without a resource.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param ... |
def leave(self, roomJID):
'\n Leave a MUC room.\n\n See: http://xmpp.org/extensions/xep-0045.html#exit\n\n @param roomJID: The Room JID of the room to leave.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
def cb(presence):
self._removeRoom(roomJID... | 7,147,643,475,307,881,000 | Leave a MUC room.
See: http://xmpp.org/extensions/xep-0045.html#exit
@param roomJID: The Room JID of the room to leave.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} | wokkel/muc.py | leave | Gandi/wokkel | python | def leave(self, roomJID):
'\n Leave a MUC room.\n\n See: http://xmpp.org/extensions/xep-0045.html#exit\n\n @param roomJID: The Room JID of the room to leave.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n '
def cb(presence):
self._removeRoom(roomJID... |
def status(self, roomJID, show=None, status=None):
'\n Change user status.\n\n See: http://xmpp.org/extensions/xep-0045.html#changepres\n\n @param roomJID: The Room JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param show: The availability o... | 4,186,971,232,257,511,000 | Change user status.
See: http://xmpp.org/extensions/xep-0045.html#changepres
@param roomJID: The Room JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param show: The availability of the entity. Common values are xa,
available, etc
@type show: C{unicode}
@param status: The current... | wokkel/muc.py | status | Gandi/wokkel | python | def status(self, roomJID, show=None, status=None):
'\n Change user status.\n\n See: http://xmpp.org/extensions/xep-0045.html#changepres\n\n @param roomJID: The Room JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param show: The availability o... |
def destroy(self, roomJID, reason=None, alternate=None, password=None):
'\n Destroy a room.\n\n @param roomJID: The JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param reason: The reason for the destruction of the room.\n @type reason: C{uni... | -1,991,528,344,491,774,500 | Destroy a room.
@param roomJID: The JID of the room.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}
@param reason: The reason for the destruction of the room.
@type reason: C{unicode}
@param alternate: The JID of the room suggested as an alternate venue.
@type alternate: L{JID<twisted.words.protocols.... | wokkel/muc.py | destroy | Gandi/wokkel | python | def destroy(self, roomJID, reason=None, alternate=None, password=None):
'\n Destroy a room.\n\n @param roomJID: The JID of the room.\n @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n @param reason: The reason for the destruction of the room.\n @type reason: C{uni... |
def cb(presence):
'\n We have presence that says we joined a room.\n '
if (STATUS_CODE.ROOM_CREATED in presence.mucStatuses):
room.locked = True
return room | -8,467,959,678,290,151,000 | We have presence that says we joined a room. | wokkel/muc.py | cb | Gandi/wokkel | python | def cb(presence):
'\n \n '
if (STATUS_CODE.ROOM_CREATED in presence.mucStatuses):
room.locked = True
return room |
def testPing(self):
'Test Ping'
pass | 4,234,929,287,827,278,000 | Test Ping | test/test_ping.py | testPing | velopaymentsapi/velo-python | python | def testPing(self):
pass |
def calc(self, t):
'\n Calc position\n if t is outside of the input x, return None\n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = (((self.a[i] + (self.b[i] * dx)) + (self.c[i]... | 3,248,057,401,415,408,000 | Calc position
if t is outside of the input x, return None | cubic_spline_planner.py | calc | hadleyhzy34/mpc_python_traj | python | def calc(self, t):
'\n Calc position\n if t is outside of the input x, return None\n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = (((self.a[i] + (self.b[i] * dx)) + (self.c[i]... |
def calcd(self, t):
'\n Calc first derivative\n if t is outside of the input x, return None\n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = ((self.b[i] + ((2.0 * self.c[i]) * d... | -103,370,416,844,136,660 | Calc first derivative
if t is outside of the input x, return None | cubic_spline_planner.py | calcd | hadleyhzy34/mpc_python_traj | python | def calcd(self, t):
'\n Calc first derivative\n if t is outside of the input x, return None\n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = ((self.b[i] + ((2.0 * self.c[i]) * d... |
def calcdd(self, t):
'\n Calc second derivative\n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = ((2.0 * self.c[i]) + ((6.0 * self.d[i]) * dx))
return result | 8,793,203,312,076,528,000 | Calc second derivative | cubic_spline_planner.py | calcdd | hadleyhzy34/mpc_python_traj | python | def calcdd(self, t):
'\n \n '
if (t < self.x[0]):
return None
elif (t > self.x[(- 1)]):
return None
i = self.__search_index(t)
dx = (t - self.x[i])
result = ((2.0 * self.c[i]) + ((6.0 * self.d[i]) * dx))
return result |
def __search_index(self, x):
'\n search data segment index\n '
return (bisect.bisect(self.x, x) - 1) | 3,739,817,014,440,759,000 | search data segment index | cubic_spline_planner.py | __search_index | hadleyhzy34/mpc_python_traj | python | def __search_index(self, x):
'\n \n '
return (bisect.bisect(self.x, x) - 1) |
def __calc_A(self, h):
'\n calc matrix A for spline coefficient c\n '
A = np.zeros((self.nx, self.nx))
A[(0, 0)] = 1.0
for i in range((self.nx - 1)):
if (i != (self.nx - 2)):
A[((i + 1), (i + 1))] = (2.0 * (h[i] + h[(i + 1)]))
A[((i + 1), i)] = h[i]
A[(i... | -9,205,206,347,078,354,000 | calc matrix A for spline coefficient c | cubic_spline_planner.py | __calc_A | hadleyhzy34/mpc_python_traj | python | def __calc_A(self, h):
'\n \n '
A = np.zeros((self.nx, self.nx))
A[(0, 0)] = 1.0
for i in range((self.nx - 1)):
if (i != (self.nx - 2)):
A[((i + 1), (i + 1))] = (2.0 * (h[i] + h[(i + 1)]))
A[((i + 1), i)] = h[i]
A[(i, (i + 1))] = h[i]
A[(0, 1)] = 0.0... |
def __calc_B(self, h):
'\n calc matrix B for spline coefficient c\n '
B = np.zeros(self.nx)
for i in range((self.nx - 2)):
B[(i + 1)] = (((3.0 * (self.a[(i + 2)] - self.a[(i + 1)])) / h[(i + 1)]) - ((3.0 * (self.a[(i + 1)] - self.a[i])) / h[i]))
return B | 903,250,203,395,355,500 | calc matrix B for spline coefficient c | cubic_spline_planner.py | __calc_B | hadleyhzy34/mpc_python_traj | python | def __calc_B(self, h):
'\n \n '
B = np.zeros(self.nx)
for i in range((self.nx - 2)):
B[(i + 1)] = (((3.0 * (self.a[(i + 2)] - self.a[(i + 1)])) / h[(i + 1)]) - ((3.0 * (self.a[(i + 1)] - self.a[i])) / h[i]))
return B |
def calc_position(self, s):
'\n calc position\n '
x = self.sx.calc(s)
y = self.sy.calc(s)
return (x, y) | -4,300,209,088,292,946,400 | calc position | cubic_spline_planner.py | calc_position | hadleyhzy34/mpc_python_traj | python | def calc_position(self, s):
'\n \n '
x = self.sx.calc(s)
y = self.sy.calc(s)
return (x, y) |
def calc_curvature(self, s):
'\n calc curvature\n '
dx = self.sx.calcd(s)
ddx = self.sx.calcdd(s)
dy = self.sy.calcd(s)
ddy = self.sy.calcdd(s)
k = (((ddy * dx) - (ddx * dy)) / (((dx ** 2) + (dy ** 2)) ** (3 / 2)))
return k | -8,597,725,787,627,640,000 | calc curvature | cubic_spline_planner.py | calc_curvature | hadleyhzy34/mpc_python_traj | python | def calc_curvature(self, s):
'\n \n '
dx = self.sx.calcd(s)
ddx = self.sx.calcdd(s)
dy = self.sy.calcd(s)
ddy = self.sy.calcdd(s)
k = (((ddy * dx) - (ddx * dy)) / (((dx ** 2) + (dy ** 2)) ** (3 / 2)))
return k |
def calc_yaw(self, s):
'\n calc yaw\n '
dx = self.sx.calcd(s)
dy = self.sy.calcd(s)
yaw = math.atan2(dy, dx)
return yaw | 8,619,149,569,145,831,000 | calc yaw | cubic_spline_planner.py | calc_yaw | hadleyhzy34/mpc_python_traj | python | def calc_yaw(self, s):
'\n \n '
dx = self.sx.calcd(s)
dy = self.sy.calcd(s)
yaw = math.atan2(dy, dx)
return yaw |
def csce(args: Namespace):
'Parse configuration options from Cobalt Strike Beacon.'
if (not args.source.is_file()):
logger.error('Source path does not exist or is not file')
return 1
if args.cs_version:
version_list = [args.cs_version]
else:
version_list = list(CobaltStri... | -3,054,200,988,728,596,000 | Parse configuration options from Cobalt Strike Beacon. | libcsce/bin/csce.py | csce | strozfriedberg/cobaltstrike-config-extractor | python | def csce(args: Namespace):
if (not args.source.is_file()):
logger.error('Source path does not exist or is not file')
return 1
if args.cs_version:
version_list = [args.cs_version]
else:
version_list = list(CobaltStrikeConfigParser.SUPPORTED_VERSIONS)
config: Dict[(str... |
def create_skbuild_argparser():
'Create and return a scikit-build argument parser.'
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('--build-type', default='Release', metavar='', help='specify the CMake build type (e.g. Debug or Release)')
parser.add_argument('-G', '--generator', me... | -6,549,896,405,690,057,000 | Create and return a scikit-build argument parser. | skbuild/setuptools_wrap.py | create_skbuild_argparser | pekkarr/scikit-build | python | def create_skbuild_argparser():
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('--build-type', default='Release', metavar=, help='specify the CMake build type (e.g. Debug or Release)')
parser.add_argument('-G', '--generator', metavar=, help='specify the CMake build system generato... |
def _is_cmake_configure_argument(arg):
'Return True if ``arg`` is a relevant argument to pass to cmake when configuring a project.'
for cmake_arg in ('-C', '-D'):
if arg.startswith(cmake_arg):
return True
return False | -3,802,505,428,589,892,000 | Return True if ``arg`` is a relevant argument to pass to cmake when configuring a project. | skbuild/setuptools_wrap.py | _is_cmake_configure_argument | pekkarr/scikit-build | python | def _is_cmake_configure_argument(arg):
for cmake_arg in ('-C', '-D'):
if arg.startswith(cmake_arg):
return True
return False |
def parse_skbuild_args(args, cmake_args, build_tool_args):
'\n Parse arguments in the scikit-build argument set. Convert specified\n arguments to proper format and append to cmake_args and build_tool_args.\n Returns the tuple ``(remaining arguments, cmake executable, skip_generator_test)``.\n '
pars... | 3,962,547,829,053,957,000 | Parse arguments in the scikit-build argument set. Convert specified
arguments to proper format and append to cmake_args and build_tool_args.
Returns the tuple ``(remaining arguments, cmake executable, skip_generator_test)``. | skbuild/setuptools_wrap.py | parse_skbuild_args | pekkarr/scikit-build | python | def parse_skbuild_args(args, cmake_args, build_tool_args):
'\n Parse arguments in the scikit-build argument set. Convert specified\n arguments to proper format and append to cmake_args and build_tool_args.\n Returns the tuple ``(remaining arguments, cmake executable, skip_generator_test)``.\n '
pars... |
def parse_args():
'This function parses the command-line arguments ``sys.argv`` and returns\n the tuple ``(setuptools_args, cmake_executable, skip_generator_test, cmake_args, build_tool_args)``\n where each ``*_args`` element corresponds to a set of arguments separated by ``--``.'
dutils = []
cmake = ... | 8,402,786,183,257,945,000 | This function parses the command-line arguments ``sys.argv`` and returns
the tuple ``(setuptools_args, cmake_executable, skip_generator_test, cmake_args, build_tool_args)``
where each ``*_args`` element corresponds to a set of arguments separated by ``--``. | skbuild/setuptools_wrap.py | parse_args | pekkarr/scikit-build | python | def parse_args():
'This function parses the command-line arguments ``sys.argv`` and returns\n the tuple ``(setuptools_args, cmake_executable, skip_generator_test, cmake_args, build_tool_args)``\n where each ``*_args`` element corresponds to a set of arguments separated by ``--``.'
dutils = []
cmake = ... |
def _parse_setuptools_arguments(setup_attrs):
"This function instantiates a Distribution object and\n parses the command line arguments.\n\n It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``\n where\n\n - display_only is a boolean indicati... | -3,338,949,724,349,137,400 | This function instantiates a Distribution object and
parses the command line arguments.
It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``
where
- display_only is a boolean indicating if an argument like '--help',
'--help-commands' or '--author' was pa... | skbuild/setuptools_wrap.py | _parse_setuptools_arguments | pekkarr/scikit-build | python | def _parse_setuptools_arguments(setup_attrs):
"This function instantiates a Distribution object and\n parses the command line arguments.\n\n It returns the tuple ``(display_only, help_commands, commands, hide_listing, force_cmake, skip_cmake, plat_name)``\n where\n\n - display_only is a boolean indicati... |
def strip_package(package_parts, module_file):
"Given ``package_parts`` (e.g. ``['foo', 'bar']``) and a\n ``module_file`` (e.g. ``foo/bar/jaz/rock/roll.py``), starting\n from the left, this function will strip the parts of the path\n matching the package parts and return a new string\n (e.g ``jaz/rock/r... | 5,353,424,950,498,382,000 | Given ``package_parts`` (e.g. ``['foo', 'bar']``) and a
``module_file`` (e.g. ``foo/bar/jaz/rock/roll.py``), starting
from the left, this function will strip the parts of the path
matching the package parts and return a new string
(e.g ``jaz/rock/roll.py``).
The function will work as expected for either Windows or Uni... | skbuild/setuptools_wrap.py | strip_package | pekkarr/scikit-build | python | def strip_package(package_parts, module_file):
"Given ``package_parts`` (e.g. ``['foo', 'bar']``) and a\n ``module_file`` (e.g. ``foo/bar/jaz/rock/roll.py``), starting\n from the left, this function will strip the parts of the path\n matching the package parts and return a new string\n (e.g ``jaz/rock/r... |
def _package_data_contain_module(module, package_data):
'Return True if the ``module`` is contained\n in the ``package_data``.\n\n ``module`` is a tuple of the form\n ``(package, modulename, module_file)``.\n '
(package, _, module_file) = module
if (package not in package_data):
return F... | -4,050,379,927,419,049,500 | Return True if the ``module`` is contained
in the ``package_data``.
``module`` is a tuple of the form
``(package, modulename, module_file)``. | skbuild/setuptools_wrap.py | _package_data_contain_module | pekkarr/scikit-build | python | def _package_data_contain_module(module, package_data):
'Return True if the ``module`` is contained\n in the ``package_data``.\n\n ``module`` is a tuple of the form\n ``(package, modulename, module_file)``.\n '
(package, _, module_file) = module
if (package not in package_data):
return F... |
def _should_run_cmake(commands, cmake_with_sdist):
'Return True if at least one command requiring ``cmake`` to run\n is found in ``commands``.'
for expected_command in ['build', 'build_ext', 'develop', 'install', 'install_lib', 'bdist', 'bdist_dumb', 'bdist_egg', 'bdist_rpm', 'bdist_wininst', 'bdist_wheel', ... | -6,954,401,875,759,451,000 | Return True if at least one command requiring ``cmake`` to run
is found in ``commands``. | skbuild/setuptools_wrap.py | _should_run_cmake | pekkarr/scikit-build | python | def _should_run_cmake(commands, cmake_with_sdist):
'Return True if at least one command requiring ``cmake`` to run\n is found in ``commands``.'
for expected_command in ['build', 'build_ext', 'develop', 'install', 'install_lib', 'bdist', 'bdist_dumb', 'bdist_egg', 'bdist_rpm', 'bdist_wininst', 'bdist_wheel', ... |
def _save_cmake_spec(args):
'Save the CMake spec to disk'
try:
os.makedirs(os.path.dirname(CMAKE_SPEC_FILE()))
except OSError:
pass
with open(CMAKE_SPEC_FILE(), 'w+') as fp:
json.dump(args, fp) | -7,583,062,114,144,099,000 | Save the CMake spec to disk | skbuild/setuptools_wrap.py | _save_cmake_spec | pekkarr/scikit-build | python | def _save_cmake_spec(args):
try:
os.makedirs(os.path.dirname(CMAKE_SPEC_FILE()))
except OSError:
pass
with open(CMAKE_SPEC_FILE(), 'w+') as fp:
json.dump(args, fp) |
def _load_cmake_spec():
'Load and return the CMake spec from disk'
try:
with open(CMAKE_SPEC_FILE()) as fp:
return json.load(fp)
except (OSError, IOError, ValueError):
return None | 1,013,507,571,363,470,100 | Load and return the CMake spec from disk | skbuild/setuptools_wrap.py | _load_cmake_spec | pekkarr/scikit-build | python | def _load_cmake_spec():
try:
with open(CMAKE_SPEC_FILE()) as fp:
return json.load(fp)
except (OSError, IOError, ValueError):
return None |
def setup(*args, **kw):
'This function wraps setup() so that we can run cmake, make,\n CMake build, then proceed as usual with setuptools, appending the\n CMake-generated output as necessary.\n\n The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping\n... | -6,127,948,168,491,292,000 | This function wraps setup() so that we can run cmake, make,
CMake build, then proceed as usual with setuptools, appending the
CMake-generated output as necessary.
The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping
associated with the generator set in the ``CMa... | skbuild/setuptools_wrap.py | setup | pekkarr/scikit-build | python | def setup(*args, **kw):
'This function wraps setup() so that we can run cmake, make,\n CMake build, then proceed as usual with setuptools, appending the\n CMake-generated output as necessary.\n\n The CMake project is re-configured only if needed. This is achieved by (1) retrieving the environment mapping\n... |
def _collect_package_prefixes(package_dir, packages):
'\n Collect the list of prefixes for all packages\n\n The list is used to match paths in the install manifest to packages\n specified in the setup.py script.\n\n The list is sorted in decreasing order of prefix length so that paths are\n matched w... | 1,475,335,275,993,887,200 | Collect the list of prefixes for all packages
The list is used to match paths in the install manifest to packages
specified in the setup.py script.
The list is sorted in decreasing order of prefix length so that paths are
matched with their immediate parent package, instead of any of that
package's ancestors.
For ex... | skbuild/setuptools_wrap.py | _collect_package_prefixes | pekkarr/scikit-build | python | def _collect_package_prefixes(package_dir, packages):
'\n Collect the list of prefixes for all packages\n\n The list is used to match paths in the install manifest to packages\n specified in the setup.py script.\n\n The list is sorted in decreasing order of prefix length so that paths are\n matched w... |
def _copy_file(src_file, dest_file, hide_listing=True):
'Copy ``src_file`` to ``dest_file`` ensuring parent directory exists.\n\n By default, message like `creating directory /path/to/package` and\n `copying directory /src/path/to/package -> path/to/package` are displayed\n on standard output. Setting ``hi... | 6,659,556,599,875,273,000 | Copy ``src_file`` to ``dest_file`` ensuring parent directory exists.
By default, message like `creating directory /path/to/package` and
`copying directory /src/path/to/package -> path/to/package` are displayed
on standard output. Setting ``hide_listing`` to False avoids message from
being displayed. | skbuild/setuptools_wrap.py | _copy_file | pekkarr/scikit-build | python | def _copy_file(src_file, dest_file, hide_listing=True):
'Copy ``src_file`` to ``dest_file`` ensuring parent directory exists.\n\n By default, message like `creating directory /path/to/package` and\n `copying directory /src/path/to/package -> path/to/package` are displayed\n on standard output. Setting ``hi... |
def _consolidate_package_modules(cmake_source_dir, packages, package_dir, py_modules, package_data, hide_listing):
'This function consolidates packages having modules located in\n both the source tree and the CMake install tree into one location.\n\n The one location is the CMake install tree\n (see :func:... | -8,092,281,073,517,067,000 | This function consolidates packages having modules located in
both the source tree and the CMake install tree into one location.
The one location is the CMake install tree
(see :func:`.constants.CMAKE_INSTALL_DIR()`).
Why ? This is a necessary evil because ``Setuptools`` keeps track of
packages and modules files to i... | skbuild/setuptools_wrap.py | _consolidate_package_modules | pekkarr/scikit-build | python | def _consolidate_package_modules(cmake_source_dir, packages, package_dir, py_modules, package_data, hide_listing):
'This function consolidates packages having modules located in\n both the source tree and the CMake install tree into one location.\n\n The one location is the CMake install tree\n (see :func:... |
def _consolidate_package_data_files(original_package_data, package_prefixes, hide_listing):
"This function copies package data files specified using the ``package_data`` keyword\n into :func:`.constants.CMAKE_INSTALL_DIR()`.\n\n ::\n\n setup(...,\n packages=['mypkg'],\n package_di... | 2,946,959,034,722,457,000 | This function copies package data files specified using the ``package_data`` keyword
into :func:`.constants.CMAKE_INSTALL_DIR()`.
::
setup(...,
packages=['mypkg'],
package_dir={'mypkg': 'src/mypkg'},
package_data={'mypkg': ['data/*.dat']},
)
Considering that (1) the packages assoc... | skbuild/setuptools_wrap.py | _consolidate_package_data_files | pekkarr/scikit-build | python | def _consolidate_package_data_files(original_package_data, package_prefixes, hide_listing):
"This function copies package data files specified using the ``package_data`` keyword\n into :func:`.constants.CMAKE_INSTALL_DIR()`.\n\n ::\n\n setup(...,\n packages=['mypkg'],\n package_di... |
def _cmake_set(self, tline: CMakeTraceLine) -> None:
"Handler for the CMake set() function in all variaties.\n\n comes in three flavors:\n set(<var> <value> [PARENT_SCOPE])\n set(<var> <value> CACHE <type> <docstring> [FORCE])\n set(ENV{<var>} <value>)\n\n We don't support the ENV... | 355,447,399,708,182,140 | Handler for the CMake set() function in all variaties.
comes in three flavors:
set(<var> <value> [PARENT_SCOPE])
set(<var> <value> CACHE <type> <docstring> [FORCE])
set(ENV{<var>} <value>)
We don't support the ENV variant, and any uses of it will be ignored
silently. the other two variates are supported, with some ca... | mesonbuild/cmake/traceparser.py | _cmake_set | Linux-Defender/meson | python | def _cmake_set(self, tline: CMakeTraceLine) -> None:
"Handler for the CMake set() function in all variaties.\n\n comes in three flavors:\n set(<var> <value> [PARENT_SCOPE])\n set(<var> <value> CACHE <type> <docstring> [FORCE])\n set(ENV{<var>} <value>)\n\n We don't support the ENV... |
def cmd(tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None):
'\n Execute a single command via the salt-ssh subsystem and return all\n routines at once\n\n .. versionaddedd:: 2015.2\n\n A wrapper around the :py:meth:`SSHClient.cmd\n <salt.client.ssh.client.SSHClient.cmd>` method.\n '
... | 6,070,789,426,128,428,000 | Execute a single command via the salt-ssh subsystem and return all
routines at once
.. versionaddedd:: 2015.2
A wrapper around the :py:meth:`SSHClient.cmd
<salt.client.ssh.client.SSHClient.cmd>` method. | salt/runners/ssh.py | cmd | 0xf10e/salt | python | def cmd(tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None):
'\n Execute a single command via the salt-ssh subsystem and return all\n routines at once\n\n .. versionaddedd:: 2015.2\n\n A wrapper around the :py:meth:`SSHClient.cmd\n <salt.client.ssh.client.SSHClient.cmd>` method.\n '
... |
def test_salt_cp(master, minion, salt_cp, tempfiles):
'\n Test copying a file from the master to the minion\n '
tfile = tempfile.NamedTemporaryFile(delete=True)
tfile.close()
dest = tfile.name
try:
contents = 'id: foo'
sls = tempfiles.makeslsfile(contents)
assert master... | 2,320,564,476,749,740,000 | Test copying a file from the master to the minion | tests/integration/factories/master/test_master.py | test_salt_cp | cmcmarrow/pytest-salt-factories | python | def test_salt_cp(master, minion, salt_cp, tempfiles):
'\n \n '
tfile = tempfile.NamedTemporaryFile(delete=True)
tfile.close()
dest = tfile.name
try:
contents = 'id: foo'
sls = tempfiles.makeslsfile(contents)
assert master.is_alive()
assert minion.is_alive()
... |
def main():
" This script creates HRTF filtered sound samples of the sounds given in the folder SOUND_FILES.\n This is done for each participant's HRTF specified in participant_numbers.\n ALL ELEVATIONS (50) are taken to filter the data.\n\n "
logger = logging.getLogger(__name__)
logger.info('makin... | -7,958,006,284,450,632,000 | This script creates HRTF filtered sound samples of the sounds given in the folder SOUND_FILES.
This is done for each participant's HRTF specified in participant_numbers.
ALL ELEVATIONS (50) are taken to filter the data. | src/data/generateData.py | main | oesst/HRTF_neural_model | python | def main():
" This script creates HRTF filtered sound samples of the sounds given in the folder SOUND_FILES.\n This is done for each participant's HRTF specified in participant_numbers.\n ALL ELEVATIONS (50) are taken to filter the data.\n\n "
logger = logging.getLogger(__name__)
logger.info('makin... |
@distributed_trace
def begin_cancel(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Cancels the current virtual machine scale set rolling upgrade.\n\n :param resource_group_name: The name of the resource group.\n :type resource_group_name: str\n :para... | 2,920,294,095,514,641,400 | Cancels the current virtual machine scale set rolling upgrade.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_scale_set_name: The name of the VM scale set.
:type vm_scale_set_name: str
:keyword callable cls: A custom type or function that will be passed the direct ... | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | begin_cancel | AikoBB/azure-sdk-for-python | python | @distributed_trace
def begin_cancel(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Cancels the current virtual machine scale set rolling upgrade.\n\n :param resource_group_name: The name of the resource group.\n :type resource_group_name: str\n :para... |
@distributed_trace
def begin_start_os_upgrade(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Starts a rolling upgrade to move all virtual machine scale set instances to the latest\n available Platform Image OS version. Instances which are already running the lates... | -6,496,827,081,151,570,000 | Starts a rolling upgrade to move all virtual machine scale set instances to the latest
available Platform Image OS version. Instances which are already running the latest available
OS version are not affected.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_scale_se... | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | begin_start_os_upgrade | AikoBB/azure-sdk-for-python | python | @distributed_trace
def begin_start_os_upgrade(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Starts a rolling upgrade to move all virtual machine scale set instances to the latest\n available Platform Image OS version. Instances which are already running the lates... |
@distributed_trace
def begin_start_extension_upgrade(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to\n the latest available extension version. Instances which are already... | 5,628,296,231,556,651,000 | Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to
the latest available extension version. Instances which are already running the latest
extension versions are not affected.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm... | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | begin_start_extension_upgrade | AikoBB/azure-sdk-for-python | python | @distributed_trace
def begin_start_extension_upgrade(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> LROPoller[None]:
'Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to\n the latest available extension version. Instances which are already... |
@distributed_trace
def get_latest(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> '_models.RollingUpgradeStatusInfo':
'Gets the status of the latest virtual machine scale set rolling upgrade.\n\n :param resource_group_name: The name of the resource group.\n :type resource_gro... | 2,527,987,070,942,094,000 | Gets the status of the latest virtual machine scale set rolling upgrade.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_scale_set_name: The name of the VM scale set.
:type vm_scale_set_name: str
:keyword callable cls: A custom type or function that will be passed t... | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | get_latest | AikoBB/azure-sdk-for-python | python | @distributed_trace
def get_latest(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> '_models.RollingUpgradeStatusInfo':
'Gets the status of the latest virtual machine scale set rolling upgrade.\n\n :param resource_group_name: The name of the resource group.\n :type resource_gro... |
@undoc
def softspace(file, newvalue):
'Copied from code.py, to remove the dependency'
oldvalue = 0
try:
oldvalue = file.softspace
except AttributeError:
pass
try:
file.softspace = newvalue
except (AttributeError, TypeError):
pass
return oldvalue | -5,996,212,998,271,666,000 | Copied from code.py, to remove the dependency | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | softspace | CMU-IDS-2022/final-project-the-evaluators | python | @undoc
def softspace(file, newvalue):
oldvalue = 0
try:
oldvalue = file.softspace
except AttributeError:
pass
try:
file.softspace = newvalue
except (AttributeError, TypeError):
pass
return oldvalue |
def raise_error(self):
'Reraises error if `success` is `False`, otherwise does nothing'
if (self.error_before_exec is not None):
raise self.error_before_exec
if (self.error_in_exec is not None):
raise self.error_in_exec | 7,432,556,278,080,430,000 | Reraises error if `success` is `False`, otherwise does nothing | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | raise_error | CMU-IDS-2022/final-project-the-evaluators | python | def raise_error(self):
if (self.error_before_exec is not None):
raise self.error_before_exec
if (self.error_in_exec is not None):
raise self.error_in_exec |
@property
def input_splitter(self):
'Make this available for backward compatibility (pre-7.0 release) with existing code.\n\n For example, ipykernel ipykernel currently uses\n `shell.input_splitter.check_complete`\n '
from warnings import warn
warn('`input_splitter` is deprecated since ... | -7,653,960,977,976,236,000 | Make this available for backward compatibility (pre-7.0 release) with existing code.
For example, ipykernel ipykernel currently uses
`shell.input_splitter.check_complete` | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | input_splitter | CMU-IDS-2022/final-project-the-evaluators | python | @property
def input_splitter(self):
'Make this available for backward compatibility (pre-7.0 release) with existing code.\n\n For example, ipykernel ipykernel currently uses\n `shell.input_splitter.check_complete`\n '
from warnings import warn
warn('`input_splitter` is deprecated since ... |
def get_ipython(self):
'Return the currently running IPython instance.'
return self | -5,054,242,317,332,809,000 | Return the currently running IPython instance. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | get_ipython | CMU-IDS-2022/final-project-the-evaluators | python | def get_ipython(self):
return self |
def set_autoindent(self, value=None):
'Set the autoindent flag.\n\n If called with no arguments, it acts as a toggle.'
if (value is None):
self.autoindent = (not self.autoindent)
else:
self.autoindent = value | -8,217,420,294,068,633,000 | Set the autoindent flag.
If called with no arguments, it acts as a toggle. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | set_autoindent | CMU-IDS-2022/final-project-the-evaluators | python | def set_autoindent(self, value=None):
'Set the autoindent flag.\n\n If called with no arguments, it acts as a toggle.'
if (value is None):
self.autoindent = (not self.autoindent)
else:
self.autoindent = value |
def init_environment(self):
"Any changes we need to make to the user's environment."
pass | 3,436,820,746,371,780,600 | Any changes we need to make to the user's environment. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | init_environment | CMU-IDS-2022/final-project-the-evaluators | python | def init_environment(self):
pass |
def init_logstart(self):
'Initialize logging in case it was requested at the command line.\n '
if self.logappend:
self.magic(('logstart %s append' % self.logappend))
elif self.logfile:
self.magic(('logstart %s' % self.logfile))
elif self.logstart:
self.magic('logstart') | -2,385,930,210,229,966,300 | Initialize logging in case it was requested at the command line. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | init_logstart | CMU-IDS-2022/final-project-the-evaluators | python | def init_logstart(self):
'\n '
if self.logappend:
self.magic(('logstart %s append' % self.logappend))
elif self.logfile:
self.magic(('logstart %s' % self.logfile))
elif self.logstart:
self.magic('logstart') |
@staticmethod
def get_path_links(p: Path):
'Gets path links including all symlinks\n\n Examples\n --------\n In [1]: from IPython.core.interactiveshell import InteractiveShell\n\n In [2]: import sys, pathlib\n\n In [3]: paths = InteractiveShell.get_path_links(pathlib.Path(sys.exec... | -1,158,422,851,321,546,800 | Gets path links including all symlinks
Examples
--------
In [1]: from IPython.core.interactiveshell import InteractiveShell
In [2]: import sys, pathlib
In [3]: paths = InteractiveShell.get_path_links(pathlib.Path(sys.executable))
In [4]: len(paths) == len(set(paths))
Out[4]: True
In [5]: bool(paths)
Out[5]: True | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | get_path_links | CMU-IDS-2022/final-project-the-evaluators | python | @staticmethod
def get_path_links(p: Path):
'Gets path links including all symlinks\n\n Examples\n --------\n In [1]: from IPython.core.interactiveshell import InteractiveShell\n\n In [2]: import sys, pathlib\n\n In [3]: paths = InteractiveShell.get_path_links(pathlib.Path(sys.exec... |
def init_virtualenv(self):
"Add the current virtualenv to sys.path so the user can import modules from it.\n This isn't perfect: it doesn't use the Python interpreter with which the\n virtualenv was built, and it ignores the --no-site-packages option. A\n warning will appear suggesting the user... | -1,645,497,003,472,402,400 | Add the current virtualenv to sys.path so the user can import modules from it.
This isn't perfect: it doesn't use the Python interpreter with which the
virtualenv was built, and it ignores the --no-site-packages option. A
warning will appear suggesting the user installs IPython in the
virtualenv, but for many cases, it... | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | init_virtualenv | CMU-IDS-2022/final-project-the-evaluators | python | def init_virtualenv(self):
"Add the current virtualenv to sys.path so the user can import modules from it.\n This isn't perfect: it doesn't use the Python interpreter with which the\n virtualenv was built, and it ignores the --no-site-packages option. A\n warning will appear suggesting the user... |
def save_sys_module_state(self):
'Save the state of hooks in the sys module.\n\n This has to be called after self.user_module is created.\n '
self._orig_sys_module_state = {'stdin': sys.stdin, 'stdout': sys.stdout, 'stderr': sys.stderr, 'excepthook': sys.excepthook}
self._orig_sys_modules_main... | 8,436,972,721,409,837,000 | Save the state of hooks in the sys module.
This has to be called after self.user_module is created. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | save_sys_module_state | CMU-IDS-2022/final-project-the-evaluators | python | def save_sys_module_state(self):
'Save the state of hooks in the sys module.\n\n This has to be called after self.user_module is created.\n '
self._orig_sys_module_state = {'stdin': sys.stdin, 'stdout': sys.stdout, 'stderr': sys.stderr, 'excepthook': sys.excepthook}
self._orig_sys_modules_main... |
def restore_sys_module_state(self):
'Restore the state of the sys module.'
try:
for (k, v) in self._orig_sys_module_state.items():
setattr(sys, k, v)
except AttributeError:
pass
if (self._orig_sys_modules_main_mod is not None):
sys.modules[self._orig_sys_modules_main_... | -2,300,663,245,410,239,700 | Restore the state of the sys module. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | restore_sys_module_state | CMU-IDS-2022/final-project-the-evaluators | python | def restore_sys_module_state(self):
try:
for (k, v) in self._orig_sys_module_state.items():
setattr(sys, k, v)
except AttributeError:
pass
if (self._orig_sys_modules_main_mod is not None):
sys.modules[self._orig_sys_modules_main_name] = self._orig_sys_modules_main_mo... |
def set_hook(self, name, hook, priority=50, str_key=None, re_key=None):
"set_hook(name,hook) -> sets an internal IPython hook.\n\n IPython exposes some of its internal API as user-modifiable hooks. By\n adding your function to one of these hooks, you can modify IPython's\n behavior to call at ... | -1,604,421,436,809,402,000 | set_hook(name,hook) -> sets an internal IPython hook.
IPython exposes some of its internal API as user-modifiable hooks. By
adding your function to one of these hooks, you can modify IPython's
behavior to call at runtime your own routines. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | set_hook | CMU-IDS-2022/final-project-the-evaluators | python | def set_hook(self, name, hook, priority=50, str_key=None, re_key=None):
"set_hook(name,hook) -> sets an internal IPython hook.\n\n IPython exposes some of its internal API as user-modifiable hooks. By\n adding your function to one of these hooks, you can modify IPython's\n behavior to call at ... |
def register_post_execute(self, func):
"DEPRECATED: Use ip.events.register('post_run_cell', func)\n\n Register a function for calling after code execution.\n "
raise ValueError("ip.register_post_execute is deprecated since IPython 1.0, use ip.events.register('post_run_cell', func) instead.") | -6,596,494,135,322,957,000 | DEPRECATED: Use ip.events.register('post_run_cell', func)
Register a function for calling after code execution. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | register_post_execute | CMU-IDS-2022/final-project-the-evaluators | python | def register_post_execute(self, func):
"DEPRECATED: Use ip.events.register('post_run_cell', func)\n\n Register a function for calling after code execution.\n "
raise ValueError("ip.register_post_execute is deprecated since IPython 1.0, use ip.events.register('post_run_cell', func) instead.") |
def new_main_mod(self, filename, modname):
"Return a new 'main' module object for user code execution.\n\n ``filename`` should be the path of the script which will be run in the\n module. Requests with the same filename will get the same module, with\n its namespace cleared.\n\n ``modnam... | 1,946,551,123,751,409,700 | Return a new 'main' module object for user code execution.
``filename`` should be the path of the script which will be run in the
module. Requests with the same filename will get the same module, with
its namespace cleared.
``modname`` should be the module name - normally either '__main__' or
the basename of the file... | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | new_main_mod | CMU-IDS-2022/final-project-the-evaluators | python | def new_main_mod(self, filename, modname):
"Return a new 'main' module object for user code execution.\n\n ``filename`` should be the path of the script which will be run in the\n module. Requests with the same filename will get the same module, with\n its namespace cleared.\n\n ``modnam... |
def clear_main_mod_cache(self):
"Clear the cache of main modules.\n\n Mainly for use by utilities like %reset.\n\n Examples\n --------\n In [15]: import IPython\n\n In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')\n\n In [17]: len(_ip._main_mod_cache) > 0\n ... | 4,561,598,257,768,678,000 | Clear the cache of main modules.
Mainly for use by utilities like %reset.
Examples
--------
In [15]: import IPython
In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')
In [17]: len(_ip._main_mod_cache) > 0
Out[17]: True
In [18]: _ip.clear_main_mod_cache()
In [19]: len(_ip._main_mod_cache) == 0
Out[19]: Tru... | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | clear_main_mod_cache | CMU-IDS-2022/final-project-the-evaluators | python | def clear_main_mod_cache(self):
"Clear the cache of main modules.\n\n Mainly for use by utilities like %reset.\n\n Examples\n --------\n In [15]: import IPython\n\n In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')\n\n In [17]: len(_ip._main_mod_cache) > 0\n ... |
def debugger(self, force=False):
"Call the pdb debugger.\n\n Keywords:\n\n - force(False): by default, this routine checks the instance call_pdb\n flag and does not actually invoke the debugger if the flag is false.\n The 'force' option forces the debugger to activate even if t... | 3,130,626,380,053,997,600 | Call the pdb debugger.
Keywords:
- force(False): by default, this routine checks the instance call_pdb
flag and does not actually invoke the debugger if the flag is false.
The 'force' option forces the debugger to activate even if the flag
is false. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | debugger | CMU-IDS-2022/final-project-the-evaluators | python | def debugger(self, force=False):
"Call the pdb debugger.\n\n Keywords:\n\n - force(False): by default, this routine checks the instance call_pdb\n flag and does not actually invoke the debugger if the flag is false.\n The 'force' option forces the debugger to activate even if t... |
def prepare_user_module(self, user_module=None, user_ns=None):
'Prepare the module and namespace in which user code will be run.\n\n When IPython is started normally, both parameters are None: a new module\n is created automatically, and its __dict__ used as the namespace.\n\n If only user_modu... | 4,863,675,843,523,326,000 | Prepare the module and namespace in which user code will be run.
When IPython is started normally, both parameters are None: a new module
is created automatically, and its __dict__ used as the namespace.
If only user_module is provided, its __dict__ is used as the namespace.
If only user_ns is provided, a dummy modul... | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | prepare_user_module | CMU-IDS-2022/final-project-the-evaluators | python | def prepare_user_module(self, user_module=None, user_ns=None):
'Prepare the module and namespace in which user code will be run.\n\n When IPython is started normally, both parameters are None: a new module\n is created automatically, and its __dict__ used as the namespace.\n\n If only user_modu... |
def init_user_ns(self):
'Initialize all user-visible namespaces to their minimum defaults.\n\n Certain history lists are also initialized here, as they effectively\n act as user namespaces.\n\n Notes\n -----\n All data structures here are only filled in, they are NOT reset by this... | -6,793,962,417,877,935,000 | Initialize all user-visible namespaces to their minimum defaults.
Certain history lists are also initialized here, as they effectively
act as user namespaces.
Notes
-----
All data structures here are only filled in, they are NOT reset by this
method. If they were not empty before, data will simply be added to
them. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | init_user_ns | CMU-IDS-2022/final-project-the-evaluators | python | def init_user_ns(self):
'Initialize all user-visible namespaces to their minimum defaults.\n\n Certain history lists are also initialized here, as they effectively\n act as user namespaces.\n\n Notes\n -----\n All data structures here are only filled in, they are NOT reset by this... |
@property
def all_ns_refs(self):
'Get a list of references to all the namespace dictionaries in which\n IPython might store a user-created object.\n\n Note that this does not include the displayhook, which also caches\n objects from the output.'
return ([self.user_ns, self.user_global_ns, s... | -6,780,696,099,578,258,000 | Get a list of references to all the namespace dictionaries in which
IPython might store a user-created object.
Note that this does not include the displayhook, which also caches
objects from the output. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | all_ns_refs | CMU-IDS-2022/final-project-the-evaluators | python | @property
def all_ns_refs(self):
'Get a list of references to all the namespace dictionaries in which\n IPython might store a user-created object.\n\n Note that this does not include the displayhook, which also caches\n objects from the output.'
return ([self.user_ns, self.user_global_ns, s... |
def reset(self, new_session=True, aggressive=False):
'Clear all internal namespaces, and attempt to release references to\n user objects.\n\n If new_session is True, a new history session will be opened.\n '
self.history_manager.reset(new_session)
if new_session:
self.execution_... | -6,565,744,993,413,206,000 | Clear all internal namespaces, and attempt to release references to
user objects.
If new_session is True, a new history session will be opened. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | reset | CMU-IDS-2022/final-project-the-evaluators | python | def reset(self, new_session=True, aggressive=False):
'Clear all internal namespaces, and attempt to release references to\n user objects.\n\n If new_session is True, a new history session will be opened.\n '
self.history_manager.reset(new_session)
if new_session:
self.execution_... |
def del_var(self, varname, by_name=False):
"Delete a variable from the various namespaces, so that, as\n far as possible, we're not keeping any hidden references to it.\n\n Parameters\n ----------\n varname : str\n The name of the variable to delete.\n by_name : bool\n ... | -5,895,738,298,108,169,000 | Delete a variable from the various namespaces, so that, as
far as possible, we're not keeping any hidden references to it.
Parameters
----------
varname : str
The name of the variable to delete.
by_name : bool
If True, delete variables with the given name in each
namespace. If False (default), find the var... | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | del_var | CMU-IDS-2022/final-project-the-evaluators | python | def del_var(self, varname, by_name=False):
"Delete a variable from the various namespaces, so that, as\n far as possible, we're not keeping any hidden references to it.\n\n Parameters\n ----------\n varname : str\n The name of the variable to delete.\n by_name : bool\n ... |
def reset_selective(self, regex=None):
'Clear selective variables from internal namespaces based on a\n specified regular expression.\n\n Parameters\n ----------\n regex : string or compiled pattern, optional\n A regular expression pattern that will be used in searching\n ... | 3,842,207,063,457,542,000 | Clear selective variables from internal namespaces based on a
specified regular expression.
Parameters
----------
regex : string or compiled pattern, optional
A regular expression pattern that will be used in searching
variable names in the users namespaces. | venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py | reset_selective | CMU-IDS-2022/final-project-the-evaluators | python | def reset_selective(self, regex=None):
'Clear selective variables from internal namespaces based on a\n specified regular expression.\n\n Parameters\n ----------\n regex : string or compiled pattern, optional\n A regular expression pattern that will be used in searching\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.