Skip to content

Instantly share code, notes, and snippets.

View Mixser's full-sized avatar

Mike Turchunovich Mixser

View GitHub Profile
class A(object):
obj = None
def __init__(self):
A.obj = self
if __name__ == '__main__':
from second import B
a = A()
@Mixser
Mixser / 1.py
Created March 20, 2015 07:51
pirson test
from math import pow
class PirsonTest(object):
def check(self,n, k, gen):
sequence = [gen.next for i in xrange(0, n)]
min_value = min(sequence)
max_value = max(sequence)
#include "Tests.h"
double PirsonTest::check() {
double minimum = min();
double maximum = max();
double h = (maximum - minimum) / m_k;
segments.push_back(minimum + h);
{
"user_actions": [
{
"user": {
"id": 1,
"username": "mike",
"first_name": "",
"last_name": "",
"avatar": "",
"email": "mike@mike.com",
import requests
EMAIL = "mike@razortheory.com"
PASSWORD = "123"
FILEPATH = "/home/mike/Music/sample.mp3"
# 1. Авторизуемся и получаем токен для дальнейших действий
r = requests.post("http://localhost:8000/api/signin", data={"email": EMAIL, "password": PASSWORD})
result = r.json()
AUTH_TOKEN = result['token']
@Mixser
Mixser / gist:026826a7b3273c148ab6
Created September 8, 2014 15:17
Задание
1) Тех. требования
2) Тех. задания
2 листа. Разобраться с гитом.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package taskjavaapp;
import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
@Mixser
Mixser / main.cpp
Created March 19, 2014 17:38
Hop hop hop
#include <iostream>
#include <math.h>
#define FROM 1
#define TO 3
#define EPS 10e-9
double function(double x)
{
return log(sin(x)*sin(x) + 3) / (x*x + 2 * x - 1);
#include <string>
#include <iostream>
#include <fstream>
using namespace std;
void UserInput(string&, string&, string&);
string ModifyLine(const string, const string, const string);
int main(int argc, char ** argv)
#include <iostream>
void ReadSizeOfMatrix(int & rows, int & cols) {
std::cout << "Please, enter count of cols and rows " << std::endl;
std::cout << "Rows: ";
std::cin >> rows;
std::cout << "Cols: ";
std::cin >> cols;
}