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
get_2d_projection: () -> | |
data = "" | |
$.ajax | |
async: false | |
dataType: 'json' | |
url: "http://0.0.0.0:3000/point_projection/calculate_point_screen_projection?x=#{@x}&y=#{@y}&z=#{@z}&a=#{@a}&b=#{@b}&c=#{@c}¢ral_project=#{@central_project}" | |
success: (my_data) -> | |
data = my_data | |
return data |
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
def get_human_with_place(thresholed_frame, start_frame) | |
components = thresholed_frame.components | |
mask = components.largest.erode(10).conditional(255, 0) | |
x = lazy( *start_frame.shape ) {|i,j| i} | |
y = lazy( *start_frame.shape ) {|i,j| j} | |
if x.mask(mask).empty? || y.mask(mask).empty? | |
return start_frame | |
else | |
x_range = x.mask(mask).range | |
y_range = y.mask(mask).range |
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
class Product | |
define_index do | |
# ... | |
has %( | |
( | |
SELECT GROUP_CONCAT(IFNULL(parent.`id`, '0') SEPARATOR ',') | |
FROM `categories` AS node, | |
`categories` AS parent | |
WHERE node.`merchant_id` = `products`.`merchant_id` AND | |
parent.`merchant_id` = `products`.`merchant_id` AND |
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
module BinaryTree | |
class Node | |
attr_reader :word, :count, :left, :right | |
include Enumerable | |
def initialize(word) | |
@word, @count = word, 1 | |
end |
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
-module(lab). | |
-compile(export_all). | |
send_message( GetMsg_PID, Message ) -> | |
GetMsg_PID ! {message, Message}, | |
io:format(lists:concat(["Sending message ", Message, "\n"]), []). | |
send_message( GetMsg_PID, Message, Queue_PID ) -> | |
Queue_PID ! {push, Message, "Sending"}, | |
GetMsg_PID ! {message, Message}, |
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
# http://habrahabr.ru/post/105302/ | |
# http://www.machinelearning.ru/wiki/index.php?title=%D0%9C%D1%83%D1%80%D0%B0%D0%B2%D1%8C%D0%B8%D0%BD%D1%8B%D0%B5_%D0%B0%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC%D1%8B | |
# http://myprograms.3dn.ru/load | |
# http://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms | |
require 'set' | |
require 'graphviz' | |
class Node | |
attr_accessor :name | |
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
# Backpropogation algorithm | |
# http://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D0%BE%D0%B4_%D0%BE%D0%B1%D1%80%D0%B0%D1%82%D0%BD%D0%BE%D0%B3%D0%BE_%D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%BE%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F_%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B8 | |
# http://galaxy.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html | |
# http://ai4r.rubyforge.org/neuralNetworks.html | |
# http://ai4r.rubyforge.org/rdoc/classes/Ai4r/NeuralNetwork/Backpropagation.html | |
class NeuralNetwork | |
#[2, 3, 3] - NN with 2 neurons in input layer, 1 hidden layer with 3 neurons and output layer with 3 neurons | |
#[2, 3, 3, 3] - NN with 2 neurons in input layer, 2 hidden layers with 3 neurons in each and output layer with 3 neurons | |
attr_accessor :weights, :outputs, :deltas |
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
void print_matrix( int **matrix, int count ) | |
{ | |
for( int i = 0; i < count; i++ ) | |
{ | |
printf("\n"); | |
for( int j = 0; j < count; j++ ) | |
printf(" %d ", matrix[i][j]); | |
} | |
printf("\n"); | |
} |
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
/* http://www.software.unn.ac.ru/ccam/files/HTML_Version/part4.html */ | |
/* http://en.wikipedia.org/wiki/Odd%E2%80%93even_sort */ | |
/* http://bit.ly/NWfuT6 */ | |
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <mpi.h> | |
const int ROOT_NODE = 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
mineralka@mineralka-borjomietc/openvpn$ cat server.conf | |
################################################# | |
# Sample OpenVPN 2.0 config file for # | |
# multi-client server. # | |
# # | |
# This file is for the server side # | |
# of a many-clients <-> one-server # | |
# OpenVPN configuration. # | |
# # | |
# OpenVPN also supports # |
OlderNewer