This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------- | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "vtkPointData.h" | |
#include "vtkArrayCalculator.h" | |
#include "vtkPlane.h" | |
#include "vtkCutter.h" | |
#include "vtkScalarBarActor.h" | |
#include "vtkOutlineFilter.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//WASD to orbit, left Ctrl/Alt to zoom | |
using UnityEngine; | |
public class KeyboardIsometric : MonoBehaviour | |
{ | |
public float speed = 29.0F; | |
public float rotationSpeed = 100.0F; | |
public GameObject target; | |
public GameObject gLight; | |
public bool isController = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{set . "title" "Register"}} | |
{{template "header.html" .}} | |
<h1>Register:</h1> | |
<form action="{{url "UserController.Register"}}" method="POST"> | |
{{with $field := field "user.Username" .}} | |
<p class="{{$field.ErrorClass}}"> | |
<strong>Username:</strong> | |
<input type="text" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct Point | |
{ | |
int x; | |
int y; | |
}; | |
double inc_and_add(Point& p) | |
{ | |
p.x++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import random | |
def wikipedia_partition(list_set, left_end_index, right_end_index, pivot_index): | |
pivot_val = list_set[pivot_index] | |
list_set[pivot_index], list_set[right_end_index] = list_set[right_end_index], list_set[pivot_index] | |
temp_index = left_end_index | |
for i in range(left_end_index, right_end_index-1): | |
if pivot_val > list_set[i]: | |
list_set[temp_index], list_set[i] = list_set[i], list_set[temp_index] |