<commit_before>package com.mobilization.yamblz_timeline.data;

import android.content.Context;
import android.text.TextUtils;

import com.google.gson.Gson;
import com.mobilization.yamblz_timeline.data.model.DataJson;
import com.mobilization.yamblz_timeline.data.model.People;
import com.mobilization.yamblz_timeline.data.model.Schedule;
import com.mobilization.yamblz_timeline.domain.Event;
import com.mobilization.yamblz_timeline.domain.ScheduleProvider;
import com.mobilization.yamblz_timeline.domain.School;
import com.mobilization.yamblz_timeline.domain.Teacher;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import io.reactivex.Flowable;
import io.reactivex.Observable;

/**
 * Created by Алексей on 08.07.2017.
 */

public class ScheduleFromJson implements ScheduleProvider {

    private Context context;

    public ScheduleFromJson(Context context) {
        this.context = context;
    }

    @Override
    public Observable<List<Event>> getEvents() {
        StringBuilder buf=new StringBuilder();
        InputStream json= null;

        try {

            json = context.getAssets().open("bot-data.json");

            BufferedReader in =
                    new BufferedReader(new InputStreamReader(json, "UTF-8"));
            String str;

            while ((str = in.readLine()) != null) {
                buf.append(str);
            }

            in.close();
        } catch (IOException ioexception) {
            ioexception.printStackTrace();
        }
        Gson gson = new Gson();
        DataJson dataJson = gson.fromJson(buf.toString(), DataJson.class);

        List<Schedule> schedules = dataJson.getSchedules();



        List<Event> events = new ArrayList<>();

        List<People> peoples = dataJson.getPeoples();

        for (int i =0; i < schedules.size(); i++) {
            Schedule schedule = schedules.get(i);
            //2017-07-03 10:00:00+0300
           SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZZZ", Locale.ENGLISH);

            long timestamp = 0;

            try {
                timestamp = sdf.parse(schedule.getTime()).getTime();
            } catch (ParseException e) {
                e.printStackTrace();
            }

            List<School> schools = new ArrayList<>();

            for (String s : schedule.getSchools()) {
                schools.add(getSchoolFromString(s));

            }

            List<Teacher> teachers = new ArrayList<>();
<commit_msg>Исправил ошибку в формате даты в ScheduleProvider<commit_after>package com.mobilization.yamblz_timeline.data;

import android.content.Context;
import android.text.TextUtils;

import com.google.gson.Gson;
import com.mobilization.yamblz_timeline.data.model.DataJson;
import com.mobilization.yamblz_timeline.data.model.People;
import com.mobilization.yamblz_timeline.data.model.Schedule;
import com.mobilization.yamblz_timeline.domain.Event;
import com.mobilization.yamblz_timeline.domain.ScheduleProvider;
import com.mobilization.yamblz_timeline.domain.School;
import com.mobilization.yamblz_timeline.domain.Teacher;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import io.reactivex.Flowable;
import io.reactivex.Observable;

/**
 * Created by Алексей on 08.07.2017.
 */

public class ScheduleFromJson implements ScheduleProvider {

    private Context context;

    public ScheduleFromJson(Context context) {
        this.context = context;
    }

    @Override
    public Observable<List<Event>> getEvents() {
        StringBuilder buf=new StringBuilder();
        InputStream json= null;

        try {

            json = context.getAssets().open("bot-data.json");

            BufferedReader in =
                    new BufferedReader(new InputStreamReader(json, "UTF-8"));
            String str;

            while ((str = in.readLine()) != null) {
                buf.append(str);
            }

            in.close();
        } catch (IOException ioexception) {
            ioexception.printStackTrace();
        }
        Gson gson = new Gson();
        DataJson dataJson = gson.fromJson(buf.toString(), DataJson.class);

        List<Schedule> schedules = dataJson.getSchedules();



        List<Event> events = new ArrayList<>();

        List<People> peoples = dataJson.getPeoples();

        for (int i =0; i < schedules.size(); i++) {
            Schedule schedule = schedules.get(i);
            //2017-07-03 10:00:00+0300
           SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZZZZZ", Locale.ENGLISH);

            long timestamp = 0;

            try {
                timestamp = sdf.parse(schedule.getTime()).getTime();
            } catch (ParseException e) {
                e.printStackTrace();
            }

            List<School> schools = new ArrayList<>();

            for (String s : schedule.getSchools()) {
                schools.add(getSchoolFromString(s));

            }

            List<Teacher> teachers = new ArrayList<>();

{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.010776662950575994, 'mean_word_length': 2.6668937329700273, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4156689', 'n_tokens_mistral': 1643, 'n_tokens_neox': 1519, 'n_words': 309}