Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @id ClickerMonkeys
// @name Clicker Monkeys
// @namespace .
// @version 1.4.2801
// @authors Zininzinin, unv_annihilator
// @description Trying to automate ALL THE THINGS with clicker heroes
// @include http://www.clickerheroes.com/
// @grant none
// @require http://code.jquery.com/jquery-2.1.1.min.js
class Cell
{
Cell( PVector ul, PVector ur, PVector lr, PVector ll,
float vul, float vur, float vlr, float vll,
PVector v2Dvul, PVector v2Dvur, PVector v2Dvlr, PVector v2Dvll)
{
upperLeft = ul;
upperRight = ur;
lowerRight = lr;
lowerLeft = ll;
def mean(C):
m = np.array([0,0])
for c in C:
m += c
m = m * (1/len(C))
return m
def recalc(C, F, k, centroids):
sqe = 0
# assign features to clusters based on distance to centroids
class MyTagsHandler(xml.sax.handler.ContentHandler):
def __init__(self):
xml.sax.handler.ContentHandler.__init__(self)
self.tags = dict()
self.edges = dict()
self.k = 0
def assemble_tag_list(self, s):
s = s.replace("<", "")
s = s.replace(">", " ")
s = s.strip()
----------------------------------------------------------------------
C {0: [array([1, 1]), array([5, 2])], 1: [array([1, 2]), array([2, 2]), array([4, 4]), array([2, 5]), array([5, 5])]}
----------------------------------------------------------------------
iter 0 error 4.0
iter 0 error 9.0
iter 1 error 11.0
iter 1 error 12.0
iter 1 error 17.0
iter 1 error 21.0
iter 1 error 34.0
(3, 15.000000000000004, {0: [array([1, 1]), array([1, 2]), array([2, 2])], 1: [array([5, 2]), array([4, 4]), array([2, 5]), array([5, 5])]}, array([[1, 1],
[4, 4]]))
@daemonfire300
daemonfire300 / asg4.cpp
Last active August 29, 2015 14:10
Universität Heidelberg Scientific Visualization (SciVis) VTK
#include "vtkPointData.h"
#include "vtkArrayCalculator.h"
#include "vtkPlane.h"
#include "vtkCutter.h"
#include "vtkScalarBarActor.h"
#include "vtkOutlineFilter.h"
import igraph as ig
#from networkx import *
f = open('facebook-links.txt.anon', 'r')
def largest_graph(cur_graph):
if not is_connected(cur_graph):
# get a list of unconnected networks
sub_graphs = list(connected_component_subgraphs(cur_graph))
// Copyright (C) 2011-2014 Vincent Heuveline
//
// HiFlow3 is free software: you can redistribute it and/or modify it under the
// terms of the GNU Lesser General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version.
//
// HiFlow3 is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
// A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
// GENERATED CODE - DO NOT EDIT
package main
import (
"flag"
"reflect"
"github.com/revel/revel"
_ "bitbucket.org/daemonfire300/pleyus-alpha//app"
_ "bitbucket.org/daemonfire300/pleyus-alpha//app/ontrollers"
tests "bitbucket.org/daemonfire300/pleyus-alpha//tests"