function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def reset_timer(self, *args): """ Reset the timer. """ self.timing_tracker.reset(self.current_time()) self.restart_time = time.time() self.elapsed_time = 0 if self.autoplay.is_looping(): self.autoplay.start_looping() self.update_time()
Cimbali/pympress
[ 820, 75, 820, 22, 1442468502 ]
def __init__(self): """ Initialisation is important. """ GObject.Object.__init__(self)
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def __init__(self, uuid): Budgie.Applet.__init__(self) # for exit-from-panel procedure self.uuid = uuid self.currpanelsubject_settings = None self.wstopwatch_onpanel = True GLib.timeout_add_seconds(1, self.watchout) # setup css timer_css = """ .lab...
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def check_ifonpanel(self, *args): applets = self.currpanelsubject_settings.get_strv("applets") self.wstopwatch_onpanel = self.uuid in applets
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def load_data(self): try: self.workspace_data = ast.literal_eval(open(self.logfile).read()) except (FileNotFoundError, SyntaxError): self.workspace_data = {}
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def act_on_change(self, screen, workspace): self.workspaces = screen.get_workspaces() key = self.workspaces.index(workspace) currtime = time.time() span = currtime - self.starttime # try get current time for key, add key if needed try: curr_spent = self.worksp...
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def do_update_popovers(self, manager): self.manager = manager self.manager.register_popover(self.box, self.popover)
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def show_result(self, *args): self.maingrid.destroy() self.maingrid = Gtk.Grid() self.popover.add(self.maingrid) # update to latest currws = self.scr.get_active_workspace() self.act_on_change(self.scr, currws) topleft = Gtk.Label() topleft.set_text("\t") ...
UbuntuBudgie/budgie-extras
[ 139, 35, 139, 49, 1502096081 ]
def __init__(self, max_core_distance, min_energy, max_energy, *args, **kwargs): """Simulation initialization :param max_core_distance: maximum distance of shower core to center of cluster (in meters). :param min_energy,max_energy: Minimum and m...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def simulate_detector_response(self, detector, shower_parameters): """Simulate detector response to a shower Get the mips in a detector from the LDF. :param detector: :class:`~sapphire.clusters.Detector` for which the observables will be determined. :param show...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def simulate_particles_for_density(p): """Get number of particles in detector given a particle density :param p: particle density in number per detector area. :return: random number from Poisson distribution. """ return random.poisson(p)
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def simulate_particles_for_density(p): """Exact number""" return p
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def __init__(self, *args, **kwargs): super(NkgLdfSimulation, self).__init__(*args, **kwargs) self.ldf = NkgLdf()
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def __init__(self, *args, **kwargs): super(KascadeLdfSimulation, self).__init__(*args, **kwargs) self.ldf = KascadeLdf()
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def __init__(self, *args, **kwargs): super(EllipsLdfSimulation, self).__init__(*args, **kwargs) self.ldf = EllipsLdf()
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def get_num_particles_in_detector(self, detector, shower_parameters): """Get the number of particles in a detector :param detector: :class:`~sapphire.clusters.Detector` for which the number of particles will be determined. :param shower_parameters: dictionary with the s...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def calculate_ldf_value(self, r, n_electrons=None, s=None): return 0.
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def __init__(self, n_electrons=None, s=None): """NKG LDF setup :param n_electrons: Shower size (number of electrons). :param s: Shower age parameter. """ if n_electrons is not None: self._n_electrons = n_electrons if s is not None: self._s = s ...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def calculate_ldf_value(self, r, n_electrons=None, s=None): """Calculate the LDF value :param r: core distance in m. :param n_electrons: number of electrons in the shower. :param s: shower age parameter. :return: particle density in m ** -2. """ if n_electrons i...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def _c(self, s): """Part of the LDF As given in Fokkema2012 eq 7.3. :param s: shower age parameter. :return: c(s) """ r0 = self._r0 return (gamma(4.5 - s) / (2 * pi * r0 ** 2 * gamma(s) * gamma(4.5 - 2 * s)))
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def ldf_value(self, r, n_electrons, s): """Calculate the LDF value Given a core distance, shower size, and shower age. As given in Fokkema2012 eq 7.4. :param r: core distance in m. :param n_electrons: number of electrons in the shower. :param s: shower shape parameter. ...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def __init__(self, n_electrons=None, zenith=None, azimuth=None, s1=None, s2=None): if n_electrons is not None: self._n_electrons = n_electrons if zenith is not None: self._zenith = zenith if azimuth is not None: self._azimuth = azimuth ...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def calculate_ldf_value(self, r, phi, n_electrons=None, zenith=None, azimuth=None): """Calculate the LDF value for a given core distance and polar angle :param r: core distance in m. :param phi: polar angle in rad. :param n_electrons: number of electrons in t...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def _c(self, s1, s2): """Normalization of the LDF As given in Montanus, paper to follow. :param s1: shower shape parameter. :param s2: shower shape parameter. :return: c(s1,s2) """ r0 = self._r0 return (gamma(-s2) / (2 * pi * r0 ** 2 * g...
HiSPARC/sapphire
[ 8, 10, 8, 17, 1353340410 ]
def setUpClass(cls): cls.cache_dir = tempfile.mkdtemp() cls.server_dir = tempfile.mkdtemp() cls.temp_dir = tempfile.mkdtemp() cls.server_process = Process(target=_start_server, args=(cls.server_dir,)) cls.server_process.start() time.sleep(2) # give server some time to s...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def tearDownClass(cls): cls.server_process.terminate() shutil.rmtree(cls.cache_dir) shutil.rmtree(cls.server_dir) shutil.rmtree(cls.temp_dir)
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_put_file_should_save_file_both_locally_and_remotely(self): temp_file = os.path.join(self.temp_dir, 'put.txt') with open(temp_file, 'w') as tf: tf.write('hello') self.client.put_file('/put.txt', temp_file) cache_path = os.path.join(self.cache_dir, 'files', 'put.txt'...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_get_file_should_save_file_contents_to_destination(self): src_file = os.path.join(self.temp_dir, 'get_src.txt') dest_file = os.path.join(self.temp_dir, 'get_dest.txt') with open(src_file, 'w') as sf: sf.write('hello') self.client.put_file('/get.txt', src_file) ...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_big_files_should_be_handled_correctly(self): # To be more precise, Content-Length header should be # set to the actual size of the file. src_file = os.path.join(self.temp_dir, 'big.txt') with open(src_file, 'wb') as sf: sf.write(b'r') for _ in range(1024 ...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_file_size_should_return_decompressed_size_without_cache(self): src_file = os.path.join(self.temp_dir, 'size.txt') with open(src_file, 'wb') as sf: sf.write(b'hello size') # size = 10 self.client.put_file('/size.txt', src_file, to_local_store=False) self.assertEqua...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_put_older_should_fail(self): """This test assumes file version is stored in mtime.""" src_file = os.path.join(self.temp_dir, 'older.txt') with open(src_file, 'wb') as sf: sf.write(b'version 1') self.client.put_file('/older.txt@1', src_file) with open(src_fi...
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def test_delete_nonexistent_should_404(self): with self.assertRaisesRegexp(FiletrackerError, "404"): self.client.delete_file('/nonexistent.txt')
sio2project/filetracker
[ 7, 12, 7, 1, 1346586491 ]
def __init__(self, dbname, host, port, user, password): self.dbname = dbname self.host = host self.port = port self.user = user self.password = password try: self.conn = psycopg2.connect( "dbname=%s host=%s port=%s \ ...
balazsdukai/batch3dfier
[ 3, 1, 3, 7, 1498038705 ]
def getQuery(self, query): """DB query where the results need to return (e.g. SELECT) Parameters ---------- query : str SQL query Returns ------- psycopg2 resultset """ with self.conn: with self.conn.cursor() as cur: ...
balazsdukai/batch3dfier
[ 3, 1, 3, 7, 1498038705 ]
def except_hook(exc_type, exc_value, exc_tb): tb = "".join(traceback.format_exception(exc_type, exc_value, exc_tb)) root_logger.error(tb)
OceanOptics/Inlinino
[ 8, 2, 8, 1, 1466951811 ]
def default(self, obj): if isinstance(obj, bytes): return {'__bytes__': self.ENCODING, 'content': obj.decode(self.ENCODING)} # Let the base class default method raise the TypeError return json.JSONEncoder.default(self, obj)
OceanOptics/Inlinino
[ 8, 2, 8, 1, 1466951811 ]
def __init__(self): self.__logger = logging.getLogger('CFG') with open(PATH_TO_CFG_FILE) as file: self.__logger.debug('Reading configuration.') cfg = json.load(file, object_hook=as_bytes) if 'instruments' not in cfg.keys(): self.__logger.critical('Unable to lo...
OceanOptics/Inlinino
[ 8, 2, 8, 1, 1466951811 ]
def __init__(self, _length, _dtype=None): # initialize buffer with NaN values # length correspond to the size of the buffer if _dtype is None: self.data = np.empty(_length) # np.dtype = float64 self.data[:] = np.NAN else: # type needs to be compatible...
OceanOptics/Inlinino
[ 8, 2, 8, 1, 1466951811 ]
def get(self, _n=1): # return the most recent n element(s) in buffer return self.data[-1 * _n:]
OceanOptics/Inlinino
[ 8, 2, 8, 1, 1466951811 ]
def forwards(self, orm): # Adding model 'Party' db.create_table(u'votes_party', ( (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('name', self.gf('django.db.models.fields.CharField')(max_length=200)), ('official_site', self.gf('django.db.mode...
AriMeidan/Fantasy-Knesset
[ 2, 2, 2, 13, 1386866227 ]
def onIncomingCall(self,number): # Uncomment to accept all incoming calls # self.accept() pass
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def get_output_layers(net): layer_names = net.getLayerNames() output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()] return output_layers
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def letterbox_image(image, size): '''resize image with unchanged aspect ratio using padding''' import cv2 import numpy as np iw, ih = image.shape[0:2][::-1] w, h = size scale = min(w/iw, h/ih) nw = int(iw*scale) nh = int(ih*scale) image = cv2.resize(image, (nw,nh), interpolation=cv2....
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def recognize_tflite(i,r): import tflite_runtime.interpreter as tflite import cv2 import PIL.Image import PIL.ImageOps import PIL.ImageFilter invoke_time = time.time() i = PIL.Image.open(io.BytesIO(i)) pilimg=i i=i.filter(PIL.ImageFilter.GaussianBlur(1)) i=PIL.ImageOps.autocontr...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def on_service_state_change(zeroconf, service_type, name, state_change): with httplock: info = zeroconf.get_service_info(service_type, name) if not info: return if state_change is ServiceStateChange.Added: httpservices.append((tuple(sorted( [socket.ine...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def onMotionBegin(self, *a, **k): self.mcb(True)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def onPresenceValue(self, v): self.presenceval(v)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def onBarcode(self, *a, **k): self.bcb(*a, **k)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def getGstreamerSourceData(self, s, cfg,un,pw): self.config = cfg self.h264source = self.mp3src = False self.syncFile = False # The source is an HLS stream if s.endswith(".m3u8") and s.startswith("http"): self.addElement("souphttpsrc", location=s) self.ad...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def putTrashInBuffer(self): "Force a wake up of a thread sitting around waiting for the pipe" if os.path.exists(self.rawFeedPipe): import select try: f = os.open(self.rawFeedPipe, flags=os.O_NONBLOCK | os.O_APPEND) s = ...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def close(self): self.closed = True try: self.process.stop() except Exception: print(traceback.format_exc()) self.runWidgetThread = False try: self.putTrashInBuffer() except Exception: print(traceback.format_exc()) ...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def onRawTSData(self, data): pass
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def connect(self, config): if self.closed: return self.config = config if time.monotonic() - self.lastStart < 15: return # When we reconnect we stop the recording and motion self.set_data_point("record", False, None, automated_record_uuid) self.se...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def setsegmentDir(self, manual=False): with self.recordlock: # Manually triggered recordings should go in a different folder my_date = datetime.utcnow() date = my_date.replace( hour=0, minute=0, second=0, microsecond=0).isoformat() + "+00:00" t = ...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def onMultiFileSink(self, fn, *a, **k): with self.recordlock: self.moveSegments() d = os.path.join("/dev/shm/knvr_buffer/", self.name) ls = os.listdir(d) ls = list(sorted([i for i in ls if i.endswith(".ts")])) n = max(1,int((float(self.config.get('de...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def moveSegments(self): with self.recordlock: d = os.path.join("/dev/shm/knvr_buffer/", self.name) ls = os.listdir(d) ls = list(sorted([i for i in ls if i.endswith(".ts")])) if self.activeSegmentDir or self.segmentDir: # Ignore latest, that could ...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def commandState(self, v, t, a): with self.streamLock: if not v: if self.process: self.process.stop() self.runWidgetThread = False try: self.putTrashInBuffer() except Exception: ...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def motion(self, v): self.doMotionRecordControl(v) self.set_data_point("motion_detected", v)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def presencevalue(self, v): "Takes a raw presence value. Unfortunately it seems we need to do our own motion detection." self.set_data_point("raw_motion_value", v) self.motion(v > float(self.config.get( 'device.motion_threshold', 0.08)))
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def f(): # Wait longer if not already recording so that things that don't need to detect as much give up faster. # prioritize reliable start of record! #Cannot wait too long thogh because we nee to quickly fail back to motion only. # Thi...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def analysis(self, v): self.set_data_point("luma_average", v['luma-average']) self.set_data_point("luma_variance", v['luma-variance'])
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def __init__(self, name, data): devices.Device.__init__(self, name, data) try: self.runWidgetThread = True self.threadExited = True self.closed = False self.set_config_default("device.storage_dir", '~/NVR') self.set_config_default("device.loop...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def help_handler(t, s, p): p = p.strip() q = re.search('^(\-..\ )?\.?(.+)$', p) if q: rlang = q.groups()[0] if rlang: rlang = rlang[1:3] else: rlang = lang.getLang(s.jid) p = q.groups()[1] if p.startswith('.'): p = p[1:] else: rlang = lang.getLang(s.jid) p = '' if p: if p.startswith('.'): p = p[1:]...
TLemur/freq-bot
[ 7, 3, 7, 40, 1303910122 ]
def poll(cls, context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def poll(cls, context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def invoke(self,context,event): wm = context.window_manager return wm.invoke_props_dialog(self)
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def execute(self, context): obj = context.active_object if obj.data.shape_keys == None: obj.shape_key_add(name="Basis",from_mix=False)
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def poll(cls, context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def invoke(self,context,event): wm = context.window_manager return wm.invoke_confirm(self,event)
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def execute(self, context): obj = context.active_object
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def poll(cls, context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def invoke(self,context,event): obj = context.active_object idx = int(obj.coa_selected_shapekey) shape = obj.data.shape_keys.key_blocks[idx]
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def execute(self, context): obj = context.active_object idx = int(obj.coa_selected_shapekey) shape = obj.data.shape_keys.key_blocks[idx]
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def get_shapekeys(self,context): SHAPEKEYS = [] SHAPEKEYS.append(("NEW_KEY","New Shapekey","New Shapekey","NEW",0)) obj = context.active_object if obj.type == "MESH" and obj.data.shape_keys != None: i = 0 for i,shape in enumerate(obj.data.shape_keys.key_blocks): ...
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def poll(cls, context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def check(self,context): return True
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def draw(self,context): layout = self.layout col = layout.column() col.prop(self,"shapekeys") if self.shapekeys == "NEW_KEY": col.prop(self,"shapekey_name")
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def invoke(self,context,event): obj = context.active_object
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def set_most_driven_shapekey(self,obj): ### select most driven shapekey index = None value = 0.0 if obj != None and obj.data.shape_keys != None: for i,shape in enumerate(obj.data.shape_keys.key_blocks): if shape.value > value: index = i ...
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def execute(self, context): self.objs = [] if context.active_object == None or context.active_object.type != "MESH": self.report({"ERROR"},"Sprite is not selected. Cannot go in Edit Mode.") return{"CANCELLED"} obj = bpy.data.objects[context.active_object.name] if context....
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def exit_edit_mode(self,context,event,obj): ### remove draw handler on exiting modal mode bpy.types.SpaceView3D.draw_handler_remove(self.draw_handler, "WINDOW") for obj in context.selected_objects: obj.select = False self.sprite_object.coa_edit_shapekey = False self....
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def modal(self, context, event): obj = None obj_name = context.active_object.name if context.active_object != None else None obj = context.scene.objects[obj_name] if obj_name != None else None self.sprite_object = bpy.data.objects[self.sprite_object_name] self.armature = bpy.data...
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def draw_callback_px(self): draw_edit_mode(self,bpy.context,offset=2)
ndee85/coa_tools
[ 827, 128, 827, 118, 1457295769 ]
def __init__(self, dockarea): super(convertSub, self).__init__() self.obj_validation = Validation() self.obj_appconfig = Appconfig() self.obj_dockarea = dockarea
FOSSEE/eSim
[ 60, 60, 60, 27, 1426227114 ]
def logErr(failure): failure.printTraceback()
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def __init__(self): self._reg = {}
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def remove(self, listener): del self._reg[id(listener)]
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def iterListeners(self): for listener in self._reg.itervalues(): yield listener
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def __init__(self): self._garbageCollect()
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def feed(self, track, clear=False): if clear: self.data.clear() try: chunks = track.dataChunks(ITER_TIME) except IOError: log.err('{0} can not be read'.format(repr(track))) #self.onTrackFinished() raise else: self.c...
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def _timerUpdate(self): if self.currentSize == 0: self.onTimerUpdate(0) return remainingSize = sum(map(len, self.data)) progressPercent = int((self.currentSize - remainingSize ) * 100.0 / self.currentSize) # update timer self.onTimerUpdate(progressPercen...
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def stop(self): self.data = deque() self.history = deque() self.playing = False self.paused = False self.onStop()
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def resume(self): self.paused = False self.play() self.onPaused(False)
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def onStart(self): log.err('Player not attached')
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def onStop(self): log.err('Player not attached')
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def onPaused(self): log.err('Player not attached')
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def iterTrackUid(self): keys = sorted(self._order.keys()) for dposition in keys: trackUid = self._order[dposition] yield trackUid
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def playlistData(self): data = (track.meta for track in self.iterTrack()) data = [meta for meta in data if meta is not None] return data
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def _paths(self): return [track._path for track in self.iterTrack()]
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]
def mark(self): self._undos.append((dict(self._reg), dict(self._order))) self._redos.clear()
petrushev/txplaya
[ 1, 1, 1, 3, 1449794901 ]