Skip to content

Instantly share code, notes, and snippets.

View tabuna's full-sized avatar

Alexandr Chernyaev tabuna

View GitHub Profile
@tabuna
tabuna / DemoPost.php
Created July 23, 2017 09:04
Behaviors
<?php
namespace App\Core\Behaviors\Many;
use Orchid\Behaviors\Many;
use Orchid\Http\Forms\Posts\BasePostForm;
use Orchid\Http\Forms\Posts\UploadPostForm;
class DemoPost extends Many
{
@tabuna
tabuna / Demo.php
Created October 31, 2017 21:19
Screen Draft
<?php
namespace App\Core\Screens;
use App\Core\Layout\TestColums;
use Illuminate\Http\Request;
use Orchid\Platform\Screen\Screen;
class Demo extends Screen
{
@tabuna
tabuna / NaiveBayes.md
Created November 29, 2017 07:31
Machine Learning: Naive Bayes

Machine learning is becoming more and more ubiquitous in our daily lives. From thermostats which know when you will be home, to smarter cars and the phone we have in our pocket. It seems like it is everywhere and that makes it an interesting field to explore! But what is machine learning? In general terms, it is a way for a system to learn and make predictions. This can be as simple as predicting relevant shopping items to as complex as a digital assistant.

With this blog post I will try to give an introduction into classification using the Naive Bayes classifier algorithm. It is an easy algorithm to implement while giving decent results. But it will need some statistic knowledge to understand, so bear with me. By the end of it you might see some applications and even try to implement it yourself!

S

@tabuna
tabuna / DiffXLF
Created April 24, 2018 11:22
Сравнение XLF
<?php
/**
* Class DiffXLF
*/
class DiffXLF
{
/**
* @var array
*/
@tabuna
tabuna / pre-commit-hook.sh
Last active May 28, 2018 07:57
php-cs-fixer pre commit hook
#!/usr/bin/env bash
echo "php-cs-fixer pre commit hook start"
PHP_CS_FIXER="vendor/bin/php-cs-fixer"
HAS_PHP_CS_FIXER=false
if [ -x vendor/bin/php-cs-fixer ]; then
HAS_PHP_CS_FIXER=true
fi
@tabuna
tabuna / index.php
Last active June 13, 2018 10:26
Lumen & React PHP
<?php
//"react/event-loop": "^0.4.3",
//"react/http": "^0.7.2",
//"symfony/psr-http-message-bridge": "^1.0"
/*
|--------------------------------------------------------------------------
| Create The Application
@tabuna
tabuna / example.php
Created August 7, 2018 12:56
PHP Bing
<?php
declare(ticks=1);
/**
* Class Bind
*/
class Bind
{
/**
@tabuna
tabuna / SimpleSearchTrait.php
Created October 1, 2018 08:05
SimpleSearchTrait
<?php
declare(strict_types=1);
namespace Orchid\Platform\Traits;
use Illuminate\Database\PostgresConnection;
trait SimpleSearchTrait
{
@tabuna
tabuna / UserEditLayout.php
Created January 14, 2019 19:23
UserEditLayout.php
<?php
declare(strict_types=1);
namespace App\Orchid\Layouts\User;
use Orchid\Screen\Layouts\Rows;
use Orchid\Screen\Fields\InputField;
class UserEditLayout extends Rows