check input imdbs, make sure they have same classes
427594
def _check_classes(self):
        
        try:
            self.classes = self.imdbs[0].classes
            self.num_classes = len(self.classes)
        except AttributeError:
            # fine, if no classes is provided
            pass

        if self.num_classes > 0:
            for db in self.imdbs:
                assert self.classes == db.classes, "Multiple imdb must have same classes"
396005
def _filter_classes(cls_list, cls_type):
    """"""
    for cls in cls_list:
        if isinstance(cls, type) and issubclass(cls, cls_type):
            if cls_type == TempyPlace and cls._base_place:
                pass
            else:
                yield cls
942103
function findInputs( elem ) {
	var nodeName = ( elem.nodeName || "" ).toLowerCase();
	if ( nodeName === "input" ) {
		fixDefaultChecked( elem );
	// Skip scripts, get other children
	} else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
		jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
	}
}
280105
def check(self, values, namespace):
        """"""
        is_tuplish_type = (issubclass(self._cls, tg.Tuple) or
                           issubclass(type(values), self._cls))
        if (not _is_sequence(values) or not is_tuplish_type or
                len(values) != len(self._checks)):
            return False
        for thischeck, thisvalue in zip(self._checks, values):
            if not thischeck(thisvalue, namespace):
                return False
        return True
1184780
def _check_base_classes(base_classes, check_for_type):
    
    return_value = False
    for base in base_classes:
        if base.__name__ == check_for_type:
            return_value = True
            break
        else:
            return_value = _check_base_classes(base.__bases__, check_for_type)
            if return_value is True:
                break

    return return_value
1172376
def _check_model(obj, models=None):
    """"""
    return isinstance(obj, type) and issubclass(obj, pw.Model) and hasattr(obj, '_meta')
1006645
def checkAndCreateClasses(self, classes):
        
        actual_classes = self['puppetclasses'].keys()
        for i in classes:
            if i not in actual_classes:
                self['puppetclasses'].append(i)
        self.reload()
        return set(classes).issubset(set((self['puppetclasses'].keys())))
1286930
def check_actors(self, actors):
        
        super(Tee, self).check_actors(actors)
        actor = self.first_active
        if actor is None:
            if self._requires_active_actors:
                raise Exception("No active actor!")
        elif not isinstance(actor, InputConsumer):
            raise Exception("First active actor does not accept input: " + actor.full_name)
1020017
private void checkDefaults() {
        Utils.require(m_continueAt == null || m_continueAfter == null, "Both continue-at and continue-after parameters cannot be set");
        //Utils.require((m_continueAt == null && m_continueAfter == null) || m_sortOrder == null, "continuation parameters cannot be set if sort order is set");
        if (m_pageSize == -1) m_pageSize = ServerParams.instance().getModuleParamInt("DoradusServer", "search_default_page_size", 100);
    }
202398
function selectAllMovies() {
  var movie = db.getSchema().table('Movie');
  db.select(movie.id, movie.title, movie.year).
      from(movie).exec().then(
      function(results) {
        var elapsed = Date.now() - startTime;
        $('#load_time').text(elapsed.toString() + 'ms');
        $('#master').bootstrapTable('load', results).
            on('click-row.bs.table', function(e, row, $element) {
              startTime = Date.now();
              generateDetails(row.id);
            });
      });
}
1171287
def must_be_same(self, klass):
        
        if isinstance(self, klass) or klass is Entry:
            return
        raise TypeError("Tried to lookup %s '%s' as a %s." %\
              (self.__class__.__name__, self.get_internal_path(), klass.__name__))
971536
void checkClasses(ClassFile cf, CPEntries entries) throws ConstantPoolException {
        for (ConstantPool.CONSTANT_Class_info ci : entries.classes) {
            String name = nameFromRefType(ci.getName());
            if (name != null) {
                DeprData dd = db.getTypeDeprecated(name);
                if (dd != null) {
                    printType("scan.out.usesclass", cf, name, dd.isForRemoval());
                }
            }
        }
    }
56413
def class_check(vector):
    
    for i in vector:
        if not isinstance(i, type(vector[0])):
            return False
    return True
556995
function(input) {
		var matches = this._matches;
		var watches = this._watches;
		var best = edb.InputPlugin._bestmatch(input.type, watches, true);
		if (best) {
			var oldinput = matches.filter(function(input) {
				return input.type === best;
			})[0];
			var index = matches.indexOf(oldinput);
			matches.splice(index, 1);
			this.done = this._done();
			if (!this.done) {
				input.revoked = true;
				this._updatehandlers(input);
			}
		}
	}
1323162
def __checkTextMatches(self, folders, items, buffer, windowInfo, immediate=False):
        
        itemMatches = []
        folderMatches = []

        for item in items:
            if item.check_input(buffer, windowInfo):
                if not item.prompt and immediate:
                    return item, None
                else:
                    itemMatches.append(item)

        for folder in folders:
            if folder.check_input(buffer, windowInfo):
                folderMatches.append(folder)
                break # There should never be more than one folder match anyway

        if self.__menuRequired(folderMatches, itemMatches, buffer):
            self.lastStackState = buffer
            #return (None, PopupMenu(self, folderMatches, itemMatches))
            return None, (folderMatches, itemMatches)
        elif len(itemMatches) == 1:
            self.lastStackState = buffer
            return itemMatches[0], None
        else:
            return None, None
948469
def _generate_examples(self, archive, directory):
    """"""
    reg = re.compile(os.path.join("^%s" % directory, "(?P<label>neg|pos)", ""))
    for path, imdb_f in archive:
      res = reg.match(path)
      if not res:
        continue
      text = imdb_f.read().strip()
      yield {
          "text": text,
          "label": res.groupdict()["label"],
      }
727352
def checkmagic(self):
        
        self.lib.seek(self.start)  # default - magic is at start of file

        if self.lib.read(len(self.MAGIC)) != self.MAGIC:
            raise ArchiveReadError("%s is not a valid %s archive file"
                                   % (self.path, self.__class__.__name__))

        if self.lib.read(len(self.pymagic)) != self.pymagic:
            raise ArchiveReadError("%s has version mismatch to dll" %
                (self.path))

        self.lib.read(4)