Here's the actual class we're making.
436413
function(params) {
		var me = this;

		if (Object.keys(model.columns).length == 0) {
			logger.error("Attempting to initialize `" + model.ident + "` instance before filling schema!");
			return null;
		} else if (model.primary === undefined) {
			logger.error("No primary key found for `" + model.ident + "`!");
			return null;
		}

		Object.defineProperty(me, 'values', {
			value: {},
			enumerable: false,
			writable: true,
			configurable: true,
		}); // Raw column values, accessed by setter/getter functions.

		params = params || {};

		/* --- Instance Methods --- */

		/**
		 * Saves the object's properties corresponding to table columns into the database.
		 */
		function save() {
			var act = new NobleMachine(function() {
				setStrs = [];

				for (var key in model.columns) {
					if ([model.primary].indexOf(key) == -1 && me[key] !== undefined) {
						setStrs.push('`' + key + '`' + " = " + nrutil.serialize(me[key]));
					}
				}

				if (model.columns['updatedAt'])
					setStrs.push('`updatedAt` = NOW()');

				var sql;
				if (me[model.primary]) {
					sql = "UPDATE " + model.table
							+ " SET " + setStrs.join(',')
							+ " WHERE `" + model.primary + "` = " + me[model.primary];
				} else {
					if (model.columns['createdAt'])
						setStrs.push('`createdAt` = NOW()');

					sql = "INSERT"
							+ " INTO " + model.table
							+ " SET " + setStrs.join(',');
				}


				act.toNext(db_query(sql));
			});

			act.next(function(result) {
				//log.debug("RESULT: " + JSON.stringify(result));

				if (result.insert_id) {
					me[model.primary] = result.insert_id;
				} else if (!me[model.primary]) {
					act.toError("No insert_id, and no extant primary key!");
					return;
				}

				
				logger.log("Successfully saved `" + model.ident + "` record `" + me[model.primary] + "`");

				act.toNext(me);
			});

			act.error(function(err) {
				logger.error("Error saving `" + model.ident + "` record: " + JSON.stringify(err));
				act.emitError(err);
			});

			return act;
		}

		/**
		 * Reloads the object's properties with the current database values.
		 */
		function reload() {
			var params = {}

			params[model.primary] = me[model.primary]
		
			var act = new NobleMachine(model.find(params));

			act.next(function(newInst) {
				if (newInst) {
					for (var col in model.columns) {
						me[col] = newInst[col];
					}

					act.toNext(me);
				} else {
					for (var key in model.columns) {
						me[key] = undefined
					}

					act.toNext(null);
				}
			});

			return act;
		}

		/**
		 * Removes this object's corresponding database row.
		 */
		function destroy() {
			var act = new NobleMachine(function() {
				if (me.onDestroy) {
					var preact = me.onDestroy();
					if (preact && preact.start instanceof Function) {
						act.toNext(preact)
						return;
					}
				}
			});

			act.next(function() {
				var sql = "DELETE FROM " + model.table
						+ " WHERE `" + model.primary + "` = " + me[model.primary];

				act.toNext(db_query(sql));
			});

			act.next(function() {
				logger.log("Successfully deleted `" + model.ident + "` record `" + me[model.primary] + "`");

				for (var param in me) {
					delete me[param];	
				}
			});

			act.error(function(err) {
				logger.error("Error deleting `" + model.ident + "` record: " + JSON.stringify(err));
				act.emitError(err);
			});

			return act;
		}

		// Generic setter for SQL-correspondent values. Forces typecasting for database compatibility.
		function setValue(key, val) {
			//util.log(key + ": " + JSON.stringify(val));

			if (val === null) {
				me.values[key] = null;
			} else if (val === undefined) {
				me.values[key] = undefined;
			} else {
				type = model.columns[key]['DATA_TYPE'];

				switch (type) {
					case 'datetime':
					case 'timestamp':
						me.values[key] = new Date(val);
						break;
					case 'text':
					case 'varchar':
						me.values[key] = val.toString();
						break;
					case 'int':
					case 'tinyint':
						if (model.columns[key]['COLUMN_TYPE'] == 'tinyint(1)') {
							me.values[key] = !!val // Boolean
						} else {
							me.values[key] = parseInt(val);
						}
						break;
					default:
						me.values[key] = val;
				}
			}
		}

		// Generic getter for SQL-correspondent values.
		function getValue(key) {
			return me.values[key];
		}

		for (var key in model.columns) {
			me.__defineSetter__(key, setValue.bind(me, key));
			me.__defineGetter__(key, getValue.bind(me, key));

			if (params[key] !== undefined) {
				setValue(key, params[key]);
			}
		}

		_.extend(me, {
			save: save,
			reload: reload,
			destroy: destroy,
			setValue: setValue
		});

		if (defFunc !== undefined) {
			defFunc(me);
		}

		return me;
	}
305107
public function init()
    {
        parent::init();
        $classes = array('table');
        if (isset($this->type) && !empty($this->type)) {
            if (is_string($this->type)) {
                $this->type = explode(' ', $this->type);
            }

            foreach ($this->type as $type) {
                $classes[] = 'table-' . $type;
            }
        }
        if (!empty($classes)) {
            $classes = implode(' ', $classes);
            if (isset($this->itemsCssClass)) {
                $this->itemsCssClass .= ' ' . $classes;
            } else {
                $this->itemsCssClass = $classes;
            }
        }
    }
140047
def roundedSpecClass(self):
        
        try:
            classnumber = str(int(np.around(self.classNumber)))
        except TypeError:
            classnumber = str(self.classNumber)

        return self.classLetter + classnumber
112298
void showClass(String className) {
        PrintWriter pw = log.getWriter(WriterKind.NOTICE);
        pw.println("javac: show class: " + className);

        URL url = getClass().getResource('/' + className.replace('.', '/') + ".class");
        if (url != null) {
            pw.println("  " + url);
        }

        try (InputStream in = getClass().getResourceAsStream('/' + className.replace('.', '/') + ".class")) {
            final String algorithm = "MD5";
            byte[] digest;
            MessageDigest md = MessageDigest.getInstance(algorithm);
            try (DigestInputStream din = new DigestInputStream(in, md)) {
                byte[] buf = new byte[8192];
                int n;
                do { n = din.read(buf); } while (n > 0);
                digest = md.digest();
            }
            StringBuilder sb = new StringBuilder();
            for (byte b: digest)
                sb.append(String.format("%02x", b));
            pw.println("  " + algorithm + " checksum: " + sb);
        } catch (NoSuchAlgorithmException | IOException e) {
            pw.println("  cannot compute digest: " + e);
        }
    }
518547
static function ClassHasMany($parentclass, $foreignRef, $foreignKey = false, $foreignClass = 'ADODB_Active_Record')
	{
		$ar = new $parentclass();
		$ar->hasMany($foreignRef, $foreignKey, $foreignClass);
	}
689273
def _pred(aclass):
    
    isaclass = inspect.isclass(aclass)
    return isaclass and aclass.__module__ == _pred.__module__
939553
def finalize(self, **kwargs):
        
        # Set the title
        self.set_title(
            'Class Balance for {:,} Instances'.format(self.support_.sum())
        )

        # Set the x ticks with the class names or labels if specified
        labels = self.labels if self.labels is not None else self.classes_
        xticks = np.arange(len(labels))
        if self._mode == COMPARE:
            xticks = xticks + (0.35/2)

        self.ax.set_xticks(xticks)
        self.ax.set_xticklabels(labels)

        # Compute the ceiling for the y limit
        cmax = self.support_.max()
        self.ax.set_ylim(0, cmax + cmax* 0.1)
        self.ax.set_ylabel("support")

        # Remove the vertical grid
        self.ax.grid(False, axis="x")

        # Add the legend if in compare mode:
        if self._mode == COMPARE:
            self.ax.legend(frameon=True)
1229385
def init(self):
        """"""

        evclass_shape = [16, 40, 10]
        evtype_shape = [16, 16, 40, 10]
        evclass_psf_shape = [16, 40, 10, 100]
        evtype_psf_shape = [16, 16, 40, 10, 100]

        self._hists_eff = dict()
        self._hists = dict(evclass_on=np.zeros(evclass_shape),
                           evclass_off=np.zeros(evclass_shape),
                           evclass_alpha=np.zeros([16, 40, 1]),
                           evtype_on=np.zeros(evtype_shape),
                           evtype_off=np.zeros(evtype_shape),
                           evtype_alpha=np.zeros([16, 1, 40, 1]),
                           evclass_psf_on=np.zeros(evclass_psf_shape),
                           evclass_psf_off=np.zeros(evclass_psf_shape),
                           evtype_psf_on=np.zeros(evtype_psf_shape),
                           evtype_psf_off=np.zeros(evtype_psf_shape),
                           )
267165
def append_class (cls)
      return unless cls

      if c = html_options["class"]
        html_options["class"] << " " + cls.to_s
      else
        if c = has_option?("class")
          c << " " + cls.to_s
          cls = c
        end

        html_options["class"] = cls.to_s
      end
    end
1135438
def stats(self):
        
        printDebug("Classes.....: %d" % len(self.classes))
        printDebug("Properties..: %d" % len(self.properties))
1321881
private void generateUMLClass(ClassDoc[] classes, String pkgname) throws IOException {
        for (int i=0; i<classes.length; i++) {
            ClassDoc c = classes[i];
            out.println("    <UML:Class stereotype=\"\" " +
                                     "package=\"" + pkgname + "\" " +
                                     "xmi.id=\"" + i + "\" " +
                                     "abstract=\"0\" " +
                                     "documentation=\"\" " +
                                     "name=\"" + c.name() + "\" " +
                                     "scope=\"200\">");
            MethodDoc[] methods = c.methods();
            for (int j=0; j<methods.length; j++) {
                MethodDoc md = methods[j];
                out.println("     <UML:Operation stereotype=\"\" " +
                                                "xmi.id=\"" + (1000*i + j) + "\" " +
                                                "type=\"void\" " +
                                                "abstract=\"0\" " +
                                                "documentation=\"\" " +
                                                "name=\"" + md.name() + "\" " +
                                                "scope=\"200\" />");
            }
            out.println("    </UML:Class>");
        }
    }
3286
def make(self):
        
        log.setLevel(self.log_level)
        created = []
        self.set_class_dict()
        start = datetime.datetime.now()
        log.info(" # of classes to create: %s" % len(self.class_dict))
        log.debug(" creating classes that are not subclassed")

        for name, cls_defs in self.class_dict.items():
            # if name in ['bf_Organization', 'bf_Agent']:
            #     pdb.set_trace()
            if not self.class_dict[name].get('rdfs_subClassOf'):
                created.append(name)
                setattr(MODULE.rdfclass,
                        name,
                        types.new_class(name,
                                        (RdfClassBase,),
                                        {#'metaclass': RdfClassMeta,
                                         'cls_defs': cls_defs}))
        log.debug(" created %s classes in: %s",
                  len(created),
                  (datetime.datetime.now() - start))
        for name in created:
            del self.class_dict[name]
        left = len(self.class_dict)
        classes = []
        while left > 0:
            new = []
            for name, cls_defs in self.class_dict.items():
                # if name in ['bf_Organization', 'bf_Agent']:
                    # pdb.set_trace()
                parents = self.class_dict[name].get('rdfs_subClassOf')
                if not parents:
                    bases += (RdfClassBase, )
                else:
                    for parent in make_list(parents):
                        bases = tuple()
                        if parent in created or parent in classes:
                            if parent in classes:
                                bases += (RdfClassBase, )
                            else:
                                base = getattr(MODULE.rdfclass, parent)
                                bases += (base,) + base.__bases__
                if len(bases) > 0:
                    created.append(name)
                    setattr(MODULE.rdfclass,
                            name,
                            types.new_class(name,
                                            bases,
                                            {#'metaclass': RdfClassMeta,
                                             'cls_defs': cls_defs}))
            for name in created:
                try:
                    del self.class_dict[name]
                except KeyError:
                    pass
            if left == len(self.class_dict):
                # c_list = [self.class_dict[name].get('rdfs_subClassOf') \
                #           for name in self.class_dict]
                missing_parents = []
                for name in self.class_dict:
                    missing_parents += \
                            self.class_dict[name].get('rdfs_subClassOf', [])
                missing_parents = set(missing_parents)
                still_valid = set([name for name in self.class_dict
                                   if name not in missing_parents])
                classes = list(missing_parents.difference(\
                            set(self.class_dict.keys())))
                # classess = []
                # for cl in c_list:
                #     for item in cl:
                #         classes.append(item)

                for name in self.class_dict:
                    if name in classes:
                        classes.remove(name)
                    for p_name in self.class_dict[name].get('rdfs_subClassOf',
                                                            []).copy():
                        if p_name in classes:
                            self.class_dict[name]['rdfs_subClassOf'].remove(\
                                    p_name)
                # pdb.set_trace()
            left = len(self.class_dict)
        # self.tie_properties(created)
        log.info(" created all classes in %s",
                 (datetime.datetime.now() - start))
988933
function CSP(class1, class2) {
	var cov1 = stat.cov(class1);
	var cov2 = stat.cov(class2);
	this.V = numeric.eig(math.multiply(math.inv(math.add(cov1, cov2)), cov1)).E.x;
}
561979
def repr_def_class(self, class_data):
        
        classname = self.formatted_classname(class_data["classname"])
        if classname not in self.classes:
            self.lines.append("")
            self.lines.append("class %s(%s):" % (classname, self.basename))
            
            kwargs = list()
            setattr_arguments = list()
            for attr in self._classes[classname]:
                kwargs.append("%s=None" % attr)
                setattr_arguments.append(
                    self.Tab2 + "self.%s = %s" % (attr, attr))
            if len(kwargs):
                line = self.Tab + "def __init__(self, %s):" % ", ".join(kwargs)
            else:
                line = self.Tab + "def __init__(self):"
            self.lines.append(line)
            for setattr_argument in setattr_arguments:
                self.lines.append(setattr_argument)
            if len(setattr_arguments):
                self.lines.append("")
            self.classes.add(classname)
1209799
function processClass(clazz, computation) {
  if (!clazz.methods.method) {
    return;
  }
  if (clazz.methods.method instanceof Array) {

    clazz.methods.method.forEach(function(method) {
      ++computation.total;
      // Incremente the total number of methods if there were hits. Don't increment for no hit
      computation.passed = parseInt(method.hits) > 0 ? ++computation.passed : computation.passed;
    });

  } else { // That's the method object itself.
    ++computation.total;
    computation.passed = parseInt(clazz.methods.method.hits) > 0 ? ++computation.passed : computation.passed;
  }
}
552479
function generateClasses({ clrs, scale, typeScale, rem, borderWidth }) {
  return {
    ...colors(clrs),
    ...whitespace(scale),
    ...typography(typeScale),
    ...flexbox,
    ...dimensions(rem),
    ...border(rem, borderWidth),
    ...absolute(rem),
  };
}
683148
def response_class(self, cls):
        
        ubq = self._clone()
        ubq._response_class = cls
        return ubq