1087ba3b4bf530f7b3e30042c4421bcf8067fad1,mmsdk/mmdatasdk/computational_sequence/computational_sequence.py,computational_sequence,_initialize,#computational_sequence#Any#Any#,45

Before Change


			return initBlank(rootName)
		//reading from url - mainFile is where the data should go and resource is the url
		else:
			try:
				if validators.url(resource):
					readURL(resource,destination)
					self.mainFile=destination		
					self.resource=resource
				else:
					self.mainFile=resource
				return readCSD(self.mainFile)
		
			except:
				log.error("Resource %s is not a valid .csd object"%resource)

	//checking if the data and metadata are in correct format
	//stops the program if the integrity is not ok
	def _checkIntegrity(self,error=True):
		if not hasattr(self,"metadata") or not hasattr(self,"data"):
			log.error("computational sequence is blank (data or metadata is missing)")
		log.status("Checking the integrity of the <%s> computational sequence ..."%self.metadata["root name"])

After Change


	//	try:
			if validators.url(resource):
				//user would like to store to the current directory
				if destination is None or destination == "":
					destination=os.path.join("./",resource.split("/")[-1])
				//user has chosen a different directory
				elif ".csd" not in destination:
					destination=os.path.join(destination,resource.split("/")[-1])
				readURL(resource,destination)
				self.mainFile=destination
				self.resource=resource
			else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: A2Zadeh/CMU-MultimodalSDK
Commit Name: 1087ba3b4bf530f7b3e30042c4421bcf8067fad1
Time: 2018-07-17
Author: abagherz@cs.cmu.edu
File Name: mmsdk/mmdatasdk/computational_sequence/computational_sequence.py
Class Name: computational_sequence
Method Name: _initialize


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 9a53bf54eef6cad69d223076b27f920a99432288
Time: 2017-12-18
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QAMarket.py
Class Name: QA_Market
Method Name: warp_market


Project Name: CamDavidsonPilon/lifelines
Commit Name: 21cec6ac2b1852e470a14ac5a333113a31e61034
Time: 2020-07-13
Author: cam.davidson.pilon@gmail.com
File Name: lifelines/fitters/__init__.py
Class Name: RegressionFitter
Method Name: _compute_central_values_of_raw_training_data