Skip to content

Instantly share code, notes, and snippets.

@kurtov
kurtov / model.ipynb
Last active December 23, 2021 22:52
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{"location_type":"client","uuid":"013274e6-c0e2-445e-be95-0e1862dc0077","lat":"51.820125","lon":"55.17730096"},
{"location_type":"client","uuid":"01a6faba-fe19-4ac5-8834-2c00fd0afe30","lat":"51.816083","lon":"55.136185"},
{"location_type":"client","uuid":"02df0d1e-6d5d-43ef-94c5-f6e617d70725","lat":"51.7842971","lon":"55.07058547"},
{"location_type":"client","uuid":"039fe5bb-55f3-4918-9b2c-d229873e3fcb","lat":"51.75739734","lon":"55.11456031"},
{"location_type":"client","uuid":"03dd73ca-7940-4c65-9896-c418ce4edf4c","lat":"51.811741","lon":"55.17147"},
{"location_type":"client","uuid":"040a33d2-a214-4fd4-9ec4-98dd5bd90b33","lat":"51.77125097","lon":"55.14606899"},
{"location_type":"client","uuid":"053260e1-a102-4d66-8971-c8b3f4223dd8","lat":"51.815452","lon":"55.109008"},
{"location_type":"client","uuid":"05e77f0f-8985-4a00-a412-8c6aac9c2364","lat":"51.83968769","lon":"55.14656111"},
{"location_type":"client","uuid":"0606140b-38e7-4429-b7a9-bb2c8d4d0491","lat":"51.769135","lon":"55.177856"},
def random_vector(available_assigns)
available_assigns.map do |stage_available_assigns|
stage_available_assigns[rand(stage_available_assigns.size)]
end
end
def create_neighbor(current, available_assigns:, p_mutation:)
current.map.with_index do |employee_index, index|
if rand() < p_mutation
stage_available_assigns = available_assigns[index]
{
// The plugin looks for a .jshintrc file in the same directory as the source
// file you're prettifying (or any directory above if it doesn't exist, or in
// your home folder if everything else fails) and uses those options along
// the default ones.
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
// Documentation: http://www.jshint.com/docs/options/
"browser": true,
@kurtov
kurtov / SignIn.js
Last active April 3, 2016 20:23
Sign In
$(function () {
var Account = Backbone.Model.extend({
url: 'test_url.json',
toPrettyName: function() {
var res;
if (this.get('last_name')) {
res = this.get('last_name');
}
if (this.get('first_name')) {
@kurtov
kurtov / concat-images.rb
Created March 1, 2016 07:53 — forked from rodrigoalvesvieira/concat-images.rb
Concatenate multiple images into one using ImageMagick and Ruby
#!/usr/bin/env ruby
=begin
Rodrigo Alves
Februrary 26, 2013
A program to concatenate multiple images into one
Call it from the command line and pass it n parameters, the first n-1 parameters
are the names of the images from which you wanna create another image and the n-th
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись подтверждена. Теперь вы вошли в систему."
send_instructions: "В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: "Если ваш адрес email есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:
already_authenticated: "Вы уже вошли в систему."
inactive: "Ваша учётная запись ещё не активирована."
invalid: "Неверный адрес email или пароль."