Best Python code snippet using fMBT_python
autoskyflat.py
Source: autoskyflat.py
...105 tel.slewToRaDec(Position.altAzToRaDec(Position.fromAltAz(Coord.fromD(self["flat_alt"]),106 Coord.fromD(self["flat_az"])),107 site['latitude'], site.LST()))108 if tracking:109 self._startTracking()110 else:111 self._stopTracking()112 except:113 self.log.debug("Error moving the telescope")114 def _stopTracking(self):115 """116 disables telescope tracking117 """118 tel = self._getTel()119 try:120 self.log.debug("Skyflat is stopping telescope tracking")121 tel.stopTracking()122 except:123 self.log.debug("Error stopping the telescope")124 def _startTracking(self, wait=True):125 """126 enables telescope tracking127 """128 tel = self._getTel()129 try:130 self.log.debug("Skyflat is restarting telescope tracking")131 tel.startTracking()132 if wait:133 while 1:134 if tel.isTracking():135 return136 except:137 self.log.debug("Error starting the telescope")138 def getFlats(self, filter_id, n_flats=None, request=None):...
main.py
Source: main.py
...91 self.enableBox(self.settingsBox, True)92 self.msg("Logged in.")93 def start(self):94 self._startListening()95 self._startTracking()96 def stop(self):97 self._stopTracking()98 def setfolder(self):99 result = FileDialogs.request_old_directory("Open Directory:", default_dir = DirRef(self.folder.text))100 self.folder.text = "%s/%s" % (result.dir.path, result.name)101 def getProjectId(self, name):102 return filter(lambda e: e['name'] == name, self.projectData)[0]['_id']103 def _startTracking(self):104 project = RemoteProject(be, self.getProjectId(self.projects.value), self.host.text)105 project.deleteServerFrames(self._startTracking2)106 def _startTracking2(self, project):107 scene = SceneFolder(self.folder.text, self.extension.text)108 self.files = scene.collectAllFrameFiles()109 if len(self.files) > 0:110 project.uploadFrames(self.files, self.watchFolder)111 else:112 self.watchFolder(project, [])113 def _stopTracking(self):114 if self.observer:115 self.observer.stop()116 def _startListening(self):117 be.socket.on('progress', self._onProgress)...
__init__.py
Source: __init__.py
1from ._LoadRecognitionDB import *2from ._Recognition import *3from ._RecognitionRegister import *4from ._SaveRecognitionDB import *5from ._StartTracking import *6from ._StopTracking import *...
Check out the latest blogs from LambdaTest on this topic:
Collecting and examining data from multiple sources can be a tedious process. The digital world is constantly evolving. To stay competitive in this fast-paced environment, businesses must frequently test their products and services. While it’s easy to collect raw data from multiple sources, it’s far more complex to interpret it properly.
Hola Testers! Hope you all had a great Thanksgiving weekend! To make this time more memorable, we at LambdaTest have something to offer you as a token of appreciation.
When I started writing tests with Cypress, I was always going to use the user interface to interact and change the application’s state when running tests.
So, now that the first installment of this two fold article has been published (hence you might have an idea of what Agile Testing is not in my opinion), I’ve started feeling the pressure to explain what Agile Testing actually means to me.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!