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
# Удобно спрашивать через шар экрана и https://www.online-python.com/ | |
import datetime | |
import math | |
import json | |
from typing import List | |
# 1. Создайте класс Студнт с полями Имя, Факультет, Дата Рождения | |
class Student(): | |
def __init__(self, name: str, faculty: str, birth_date: datetime.datetime): | |
self.name, self.faculty, self.birth_date = name, faculty, birth_date |
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 configparser | |
import os | |
import re | |
class Config: | |
MAX_THREADS = 5 | |
MAX_FILE_SIZE = 2**30 | |
#Other default options |
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 configparser | |
import os | |
import re | |
class Config: | |
MAX_THREADS = 5 | |
MAX_FILE_SIZE = 2**30 | |
#Other default options |
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 Evolution | |
def initialize(sample_array, quality_func) | |
#attr_accessor :sample_array, :quality_func, :population_size, :generations_count, :mutations_in_generation | |
@sample_array = sample_array | |
@quality_func = quality_func | |
@population = [] | |
@population_size = 1000 | |
@generations_count = 100 | |
@mutations_in_generation = 100 | |
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
// ShellWinApi.cpp: определяет точку входа для консольного приложения. | |
// | |
#include "stdafx.h" | |
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#include <iostream> |
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
// ShellWinApi.cpp: определяет точку входа для консольного приложения. | |
// | |
#include "stdafx.h" | |
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#include <iostream> |
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
require 'ruby-prof' | |
require 'factory_girl' | |
require 'date' | |
include FactoryGirl | |
class User | |
def initialize | |
@name= "jkjkj"+Random.rand(200).to_s | |
@birth = Date.today - Random.rand(3) | |
@num = Random.rand(600) |
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
require 'mini_magick' | |
require 'chunky_png' | |
def color_to_s(i) | |
dict = [' ', '.','`', ',', '^', '"',':','-','|','/','+','c','a','w','4','A','%','$','#','@'] | |
dict.reverse! | |
curr =dict.length | |
curr = (i/(4294967040/(dict.length-1))).floor if i!=0 | |
dict[curr] | |
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
class Network | |
attr_accessor :columns, :neurons_in_column,:connectedPerm,:desiredLocalActivity | |
def initialize | |
@minOverlap = 5 | |
@neurons_in_column = 5 | |
@connectedPerm = 0.5 #пороговое значение – минимальное значение перманентности при котором синапс считается «действующим» («подключенным») | |
@columns = Array.new(10){Column.new} | |
@desiredLocalActivity = 3 #Параметр контролирующий число колонок победителей после шага подавления. |
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
using UnityEngine; | |
using System.Collections; | |
//передача сообщений между браузером и сокет сервером через Юнити | |
using System.Collections.Generic; | |
using System; | |
public class SocketBrowserConnection : MonoBehaviour | |
{ |
NewerOlder