Skip to content

Instantly share code, notes, and snippets.

View Kwentar's full-sized avatar
💭
🏄🏼‍♂️

Aleksey Kwentar

💭
🏄🏼‍♂️
View GitHub Profile
@Kwentar
Kwentar / BayesGenerator.py
Last active July 25, 2018 20:57
BayesGenerator
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import multivariate_normal as mvn
from keras.datasets import mnist
class BayesClassifier:
def fit(self, X, Y):
self.K = len(set(Y))
self.gaussians = []
@Kwentar
Kwentar / scripts.py
Last active May 23, 2018 21:03
Cats vs dogs script
from keras import Model
from keras import Sequential
from keras.applications import InceptionV3
from keras.layers import Dense
from keras.preprocessing.image import ImageDataGenerator
from keras.preprocessing import image
import numpy as np
def get_model(count_classes):
inception_model = InceptionV3(pooling='max') # предобученная модель
@Kwentar
Kwentar / GensimMisspelling.py
Last active January 20, 2020 11:16
GensimMisspelling
import gensim
from keras.preprocessing.text import text_to_word_sequence
import pymorphy2
from tqdm import tqdm
morph = pymorphy2.MorphAnalyzer()
necessary_part = {"NOUN", "ADJF", "ADJS", "VERB", "INFN", "PRTF", "PRTS", "GRND"}
with open('text.txt', 'r', encoding='utf8') as f:
using UnityEngine;
using System.Collections;
using Microsoft.Kinect.VisualGestureBuilder;
using Microsoft.Kinect;
public class KinectManagerScript : MonoBehaviour
{
VisualGestureBuilderDatabase _dbGestures;
Windows.Kinect.KinectSensor _kinect;
VisualGestureBuilderFrameSource _gestureFrameSource;
using UnityEngine;
using System.Collections;
public class MainSphereScript : MonoBehaviour {
bool moving = false;
int countMovingFrames = 100; //время движения в кадрах
int currentCountFrames = 0;
bool reverse = false; //флаг прямого/обратного движения
void Start ()