to generate test file head -c 100000 /dev/urandom > t.txt
was used
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
<?php | |
require_once __DIR__.'/bootstrap.php.cache'; | |
require_once __DIR__.'/AppKernel.php'; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Symfony\Component\Console\Output\ConsoleOutput; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; |
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
<div class="pull-left" data-social-auth> | |
<span class="btn btn-link btn-connect facebook" title="Login with your facebook account" data-ng-click="connect('facebook')">Facebook</span> | |
<span class="btn btn-link btn-connect google" title="Login with your google account" data-ng-click="connect('google')">G+</span> | |
<span class="btn btn-link btn-connect twitter" title="Login with your twitter account" data-ng-click="connect('twitter')">Twitter</span> | |
</div> |
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
app.directive('autogrow', function () { | |
// styles that influence on text | |
var props = [ | |
'webkitBoxSizing', '-webkit-box-sizing', 'padding', 'font', 'width', 'textIndent', | |
'whiteSpace', 'wordSpacing', 'wordWrap', 'textAlign' | |
]; | |
return { |
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
<?php | |
namespace App\ApiBundle\Security\Authentication; | |
use App\CoreBundle\Entity\User; | |
use App\ApiBundle\Security\ApiToken; | |
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; | |
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | |
use Symfony\Component\Security\Core\Exception\AuthenticationException; | |
use Symfony\Component\Security\Core\User\UserProviderInterface; |
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
<?php | |
require_once __DIR__.'/../vendor/autoload.php'; | |
$app = new Silex\Application(); | |
$app['debug'] = true; | |
$app->register(new Silex\Provider\DoctrineServiceProvider(), array( | |
*** |
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
<?php | |
// подключение нам не интересно | |
$link = new mysqli ($host, $username, $password, $db); | |
if ($mysqli->connect_errno) { | |
die ('Ошибка! Не удалось подключиться к базе данных!' . $mysqli->connect_errno); | |
} | |
/** | |
* Простенький провайдер данных |
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 Image | |
import Queue | |
def select_label(used): | |
""" | |
:type used: set | |
:return: int | |
""" | |
prev = 0 |
Реализация выделения связанных объектов с 4-х связностью, последющим выделением признаков и класстеризацией.
Точка входа - main.py. Класстеризация - clustering.py поиск объектов и вычисление характеристик - connected_components.py работа с цветом - color.py
##Преимущества k-medoids относительно k-means
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
<?php | |
trait Serialization | |
{ | |
protected function serialize($data, $groups = null) | |
{ | |
$context = new SerializationContext($groups); | |
return $this->serializer->serialize($data, $context); | |
} |
OlderNewer