Skip to content

Instantly share code, notes, and snippets.

@twmobius
twmobius / MultiTenantEntityManager.php
Created July 7, 2022 13:18
Multiple Doctrine EntityManagers for Multi Tenant Applications
<?php
namespace App\Doctrine;
use Doctrine\Common\EventManager;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\ORMException;
use Doctrine\ORM\Query\ResultSetMapping;
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import SGDClassifier
corpus = (
"In the circumstances of your case, I propose to convicted you of the offence of aggravated burglary and sentence you to a term of imprisonment of 18 months.",
"Sentence: 10 months imprisonment (302 days PSD) to be followed by a CCO of 2 years duration with unpaid community work, rehabilitative and supervision conditions.",
"The total overall sentence is therefore 11 months' imprisonment to be followed by a two year CCO, and I will go back over the conditions shortly.",
"I fix no minimum period so you will be required to serve 18 months.",
"Overall I have concluded the most appropriate sentence to punish you is a Community Correction Order and not an immediate term of imprisonment to be served, as sought by the Crown.",
if (typeof _netdata !== 'object') {
_netdata = [];
}
(function () {
'use strict';
var Netdata = function() {
var drawChart = function() {
alert("Drawing chart here");