text:
from django.views.generic import View,ListView, DetailView, CreateView, \
    DeleteView, UpdateView, \
    ArchiveIndexView, DateDetailView, \
    DayArchiveView, MonthArchiveView, \
    TodayArchiveView, WeekArchiveView, \
    YearArchiveView
from django.shortcuts import *
from students.models import *
from django.db.models import *
from baseapp.models import *
from progress.models import *
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.core.paginator import Paginator, PageNotAnInteger
from django import template
from django.contrib import messages
from excel_response import ExcelResponse
from django.utils import simplejson
import os
from django.conf import settings
from django.core.files.base import ContentFile

class School_level_progress_report(View):
    def get(self,request,**kwargs):
        user_access_level=[4,3,2,1]
        school=self.kwargs['pk']
        school_id=School.objects.get(id=school)
        emis_students=School_child_count.objects.get(school_id=school_id)
        emis_count_one=emis_students.one
        emis_count_two=emis_students.two
        emis_count_three=emis_students.three
        emis_count_four=emis_students.four
        emis_count_five=emis_students.five
        emis_count_six=emis_students.six
        emis_count_seven=emis_students.seven
        emis_count_eight=emis_students.eight
        emis_count_nine=emis_students.nine
        emis_count_ten=emis_students.ten
        emis_count_eleven=emis_students.eleven
        emis_count_twelve=emis_students.twelve
        emis_count_total_count=emis_students.total_count
        return render(request,'school/school_progress_report.html',locals())

class Block_level_progress_report(View):
    def get(self,request,**kwargs):
        user_access_level=[4,3,2]
        block=self.kwargs['pk']
        block_name=Block.objects.get(id=block)
        school_list=School.objects.filter(block_id=block).order_by('management_id')
        emis_count=School_child_count.objects.filter(school_id__in=school_list)
        block_emis_one=emis_count.aggregate(Sum('one')).values()[0]
        block_emis_two=emis_count.aggregate(Sum('two')).values()[0]
        block_emis_three=emis_count.aggregate(Sum('three')).values()[0]
        block_emis_four=emis_count.aggregate(Sum('four')).values()[0]
        block_emis_five=emis_count.aggregate(Sum('five')).values()[0]
        block_emis_six=emis_count.aggregate(Sum('six')).values()[0]
        block_emis_seven=emis_count.aggregate(Sum('seven')).values()[0]
        block_emis_eight=emis_count.aggregate(Sum('eight')).values()[0]
        block_emis_nine=emis_count.aggregate(Sum('nine')).values()[0]
        block_emis_ten=emis_count.aggregate(Sum('ten')).values()[0]
        block_emis_eleven=emis_count.aggregate(Sum('eleven')).values()[0]
        block_emis_twelve=emis_count.aggregate(Sum('twelve')).values()[0]
        block_emis_total_count=emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'block/block_progress_report.html',locals())

class District_level_progress_report(View):
    def get(self,request,**kwargs):
        user_access_level=[4,3]
        user=self.kwargs['pk']
        district=District.objects.get(id=user)
        blocks=Block.objects.filter(district_id=user)
        block_ids=[]
        block_names=[]
        block_emis_one=[]
        block_emis_two=[]
        block_emis_three=[]
        block_emis_four=[]
        block_emis_five=[]
        block_emis_six=[]
        block_emis_seven=[]
        block_emis_eight=[]
        block_emis_nine=[]
        block_emis_ten=[]
        block_emis_eleven=[]
        block_emis_twelve=[]
        block_emis_total_count=[]
        for i in blocks:
            block_ids.append(str(i.id))
            block_names.append(i.block_name)
            school_list=School.objects.filter(block_id=i.id)
            emis_count=School_child_count.objects.filter(school_id__in=school_list)
            block_emis_total_one=emis_count.aggregate(Sum('one'))
            block_emis_total_two=emis_count.aggregate(Sum('two'))
            block_emis_total_three=emis_count.aggregate(Sum('three'))
            block_emis_total_four=emis_count.aggregate(Sum('four'))
            block_emis_total_five=emis_count.aggregate(Sum('five'))
            block_emis_total_six=emis_count.aggregate(Sum('six'))
            block_emis_total_seven=emis_count.aggregate(Sum('seven'))
            block_emis_total_eight=emis_count.aggregate(Sum('eight'))
            block_emis_total_nine=emis_count.aggregate(Sum('nine'))
            block_emis_total_ten=emis_count.aggregate(Sum('ten'))
            block_emis_total_eleven=emis_count.aggregate(Sum('eleven'))
            block_emis_total_twelve=emis_count.aggregate(Sum('twelve'))
            block_emis_total_total_count=emis_count.aggregate(Sum('total_count'))
            block_emis_one+=block_emis_total_one.values()
            block_emis_two+=block_emis_total_two.values()
            block_emis_three+=block_emis_total_three.values()
            block_emis_four+=block_emis_total_four.values()
            block_emis_five+=block_emis_total_five.values()
            block_emis_six+=block_emis_total_six.values()
            block_emis_seven+=block_emis_total_seven.values()
            block_emis_eight+=block_emis_total_eight.values()
            block_emis_nine+=block_emis_total_nine.values()
            block_emis_ten+=block_emis_total_ten.values()
            block_emis_eleven+=block_emis_total_eleven.values()
            block_emis_twelve+=block_emis_total_twelve.values()
            block_emis_total_count+=block_emis_total_total_count.values()
        mylist=zip(block_ids,block_names,block_emis_one,block_emis_two,block_emis_three,block_emis_four,block_emis_five,block_emis_six,block_emis_seven,block_emis_eight,block_emis_nine,block_emis_ten,block_emis_eleven,block_emis_twelve,block_emis_total_count)
        school_list=School.objects.filter(district_id=district)
        emis_count=School_child_count.objects.filter(school_id__in=school_list)
        district_emis_one=emis_count.aggregate(Sum('one')).values()[0]
        district_emis_two=emis_count.aggregate(Sum('two')).values()[0]
        district_emis_three=emis_count.aggregate(Sum('three')).values()[0]
        district_emis_four=emis_count.aggregate(Sum('four')).values()[0]
        district_emis_five=emis_count.aggregate(Sum('five')).values()[0]
        district_emis_six=emis_count.aggregate(Sum('six')).values()[0]
        district_emis_seven=emis_count.aggregate(Sum('seven')).values()[0]
        district_emis_eight=emis_count.aggregate(Sum('eight')).values()[0]
        district_emis_nine=emis_count.aggregate(Sum('nine')).values()[0]
        district_emis_ten=emis_count.aggregate(Sum('ten')).values()[0]
        district_emis_eleven=emis_count.aggregate(Sum('eleven')).values()[0]
        district_emis_twelve=emis_count.aggregate(Sum('twelve')).values()[0]
        district_emis_total_count=emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'district/district_progress_report.html',locals())

class State_level_progress_report(View):
    def get(self,request,**kwargs):
        districts=District.objects.all()
        district_ids=[]
        district_names=[]
        district_emis_one=[]
        district_emis_two=[]
        district_emis_three=[]
        district_emis_four=[]
        district_emis_five=[]
        district_emis_six=[]
        district_emis_seven=[]
        district_emis_eight=[]
        district_emis_nine=[]
        district_emis_ten=[]
        district_emis_eleven=[]
        district_emis_twelve=[]
        district_emis_total_count=[]
        for i in districts:
            district_ids.append(str(i.id))
            district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id)
            emis_count=School_child_count.objects.filter(school_id__in=school_list)
            district_emis_total_one=emis_count.aggregate(Sum('one'))
            district_emis_total_two=emis_count.aggregate(Sum('two'))
            district_emis_total_three=emis_count.aggregate(Sum('three'))
            district_emis_total_four=emis_count.aggregate(Sum('four'))
            district_emis_total_five=emis_count.aggregate(Sum('five'))
            district_emis_total_six=emis_count.aggregate(Sum('six'))
            district_emis_total_seven=emis_count.aggregate(Sum('seven'))
            district_emis_total_eight=emis_count.aggregate(Sum('eight'))
            district_emis_total_nine=emis_count.aggregate(Sum('nine'))
            district_emis_total_ten=emis_count.aggregate(Sum('ten'))
            district_emis_total_eleven=emis_count.aggregate(Sum('eleven'))
            district_emis_total_twelve=emis_count.aggregate(Sum('twelve'))
            district_emis_total_total_count=emis_count.aggregate(Sum('total_count'))
            district_emis_one+=district_emis_total_one.values()
            district_emis_two+=district_emis_total_two.values()
            district_emis_three+=district_emis_total_three.values()
            district_emis_four+=district_emis_total_four.values()
            district_emis_five+=district_emis_total_five.values()
            district_emis_six+=district_emis_total_six.values()
            district_emis_seven+=district_emis_total_seven.values()
            district_emis_eight+=district_emis_total_eight.values()
            district_emis_nine+=district_emis_total_nine.values()
            district_emis_ten+=district_emis_total_ten.values()
            district_emis_eleven+=district_emis_total_eleven.values()
            district_emis_twelve+=district_emis_total_twelve.values()
            district_emis_total_count+=district_emis_total_total_count.values()
        mylist=zip(district_ids,district_names,district_emis_one,district_emis_two,district_emis_three,district_emis_four,district_emis_five,district_emis_six,district_emis_seven,district_emis_eight,district_emis_nine,district_emis_ten,district_emis_eleven,district_emis_twelve,district_emis_total_count)
        emis_count=School_child_count.objects.all()
        state_emis_one=emis_count.aggregate(Sum('one')).values()[0]
        state_emis_two=emis_count.aggregate(Sum('two')).values()[0]
        state_emis_three=emis_count.aggregate(Sum('three')).values()[0]
        state_emis_four=emis_count.aggregate(Sum('four')).values()[0]
        state_emis_five=emis_count.aggregate(Sum('five')).values()[0]
        state_emis_six=emis_count.aggregate(Sum('six')).values()[0]
        state_emis_seven=emis_count.aggregate(Sum('seven')).values()[0]
        state_emis_eight=emis_count.aggregate(Sum('eight')).values()[0]
        state_emis_nine=emis_count.aggregate(Sum('nine')).values()[0]
        state_emis_ten=emis_count.aggregate(Sum('ten')).values()[0]
        state_emis_eleven=emis_count.aggregate(Sum('eleven')).values()[0]
        state_emis_twelve=emis_count.aggregate(Sum('twelve')).values()[0]
        state_emis_total_count=emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'state/state_progress_report.html',locals())

class State_level_progress_report_man_dee1(View):
    def get(self,request,**kwargs):
        dee_mis_match_ids=[7250,7249,7937,43284,7251,24041,7252,7173,7174,7175,44424,58071,7278,7280,7171,7279,7285,41949,18907,18835]
        districts=District.objects.all()
        dee_district_ids=[]
        dee_district_names=[]
        dee_district_emis_one=[]
        dee_district_emis_two=[]
        dee_district_emis_three=[]
        dee_district_emis_four=[]
        dee_district_emis_five=[]
        dee_district_emis_six=[]
        dee_district_emis_seven=[]
        dee_district_emis_eight=[]
        dee_district_emis_nine=[]
        dee_district_emis_ten=[]
        dee_district_emis_eleven=[]
        dee_district_emis_twelve=[]
        dee_district_emis_total_count=[]
        for i in districts:
            dee_district_ids.append(str(i.id))
            dee_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[1,2,3,4,5,6,8],category_id__in=[1,2,4,11])
            dee_emis_count=School_child_count.objects.filter(school_id__in=school_list).exclude(school_id__in=dee_mis_match_ids)
            dee_district_emis_total_one=dee_emis_count.aggregate(Sum('one'))
            dee_district_emis_total_two=dee_emis_count.aggregate(Sum('two'))
            dee_district_emis_total_three=dee_emis_count.aggregate(Sum('three'))
            dee_district_emis_total_four=dee_emis_count.aggregate(Sum('four'))
            dee_district_emis_total_five=dee_emis_count.aggregate(Sum('five'))
            dee_district_emis_total_six=dee_emis_count.aggregate(Sum('six'))
            dee_district_emis_total_seven=dee_emis_count.aggregate(Sum('seven'))
            dee_district_emis_total_eight=dee_emis_count.aggregate(Sum('eight'))
            dee_district_emis_total_nine=dee_emis_count.aggregate(Sum('nine'))
            dee_district_emis_total_ten=dee_emis_count.aggregate(Sum('ten'))
            dee_district_emis_total_eleven=dee_emis_count.aggregate(Sum('eleven'))
            dee_district_emis_total_twelve=dee_emis_count.aggregate(Sum('twelve'))
            dee_district_emis_total_total_count=dee_emis_count.aggregate(Sum('total_count'))
            dee_district_emis_one+=dee_district_emis_total_one.values()
            dee_district_emis_two+=dee_district_emis_total_two.values()
            dee_district_emis_three+=dee_district_emis_total_three.values()
            dee_district_emis_four+=dee_district_emis_total_four.values()
            dee_district_emis_five+=dee_district_emis_total_five.values()
            dee_district_emis_six+=dee_district_emis_total_six.values()
            dee_district_emis_seven+=dee_district_emis_total_seven.values()
            dee_district_emis_eight+=dee_district_emis_total_eight.values()
            dee_district_emis_nine+=dee_district_emis_total_nine.values()
            dee_district_emis_ten+=dee_district_emis_total_ten.values()
            dee_district_emis_eleven+=dee_district_emis_total_eleven.values()
            dee_district_emis_twelve+=dee_district_emis_total_twelve.values()
            dee_district_emis_total_count+=dee_district_emis_total_total_count.values()
        dee_mylist=zip(dee_district_ids,dee_district_names,dee_district_emis_one,dee_district_emis_two,dee_district_emis_three,dee_district_emis_four,dee_district_emis_five,dee_district_emis_six,dee_district_emis_seven,dee_district_emis_eight,dee_district_emis_nine,dee_district_emis_ten,dee_district_emis_eleven,dee_district_emis_twelve,dee_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[1,2,3,4,5,6,8],category_id__in=[1,2,4,11])
        dee_emis_count=School_child_count.objects.filter(school_id__in=school_list).exclude(school_id__in=dee_mis_match_ids)
        dee_state_emis_one=dee_emis_count.aggregate(Sum('one')).values()[0]
        dee_state_emis_two=dee_emis_count.aggregate(Sum('two')).values()[0]
        dee_state_emis_three=dee_emis_count.aggregate(Sum('three')).values()[0]
        dee_state_emis_four=dee_emis_count.aggregate(Sum('four')).values()[0]
        dee_state_emis_five=dee_emis_count.aggregate(Sum('five')).values()[0]
        dee_state_emis_six=dee_emis_count.aggregate(Sum('six')).values()[0]
        dee_state_emis_seven=dee_emis_count.aggregate(Sum('seven')).values()[0]
        dee_state_emis_eight=dee_emis_count.aggregate(Sum('eight')).values()[0]
        dee_state_emis_nine=dee_emis_count.aggregate(Sum('nine')).values()[0]
        dee_state_emis_ten=dee_emis_count.aggregate(Sum('ten')).values()[0]
        dee_state_emis_eleven=dee_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_state_emis_twelve=dee_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_state_emis_total_count=dee_emis_count.aggregate(Sum('total_count')).values()[0]
        # panchayath
        districts=District.objects.all()
        dee_pan_district_ids=[]
        dee_pan_district_names=[]
        dee_pan_district_emis_one=[]
        dee_pan_district_emis_two=[]
        dee_pan_district_emis_three=[]
        dee_pan_district_emis_four=[]
        dee_pan_district_emis_five=[]
        dee_pan_district_emis_six=[]
        dee_pan_district_emis_seven=[]
        dee_pan_district_emis_eight=[]
        dee_pan_district_emis_nine=[]
        dee_pan_district_emis_ten=[]
        dee_pan_district_emis_eleven=[]
        dee_pan_district_emis_twelve=[]
        dee_pan_district_emis_total_count=[]
        for i in districts:
            dee_pan_district_ids.append(str(i.id))
            dee_pan_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[3],category_id__in=[1,2,4])
            dee_pan_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_pan_district_emis_total_one=dee_pan_emis_count.aggregate(Sum('one'))
            dee_pan_district_emis_total_two=dee_pan_emis_count.aggregate(Sum('two'))
            dee_pan_district_emis_total_three=dee_pan_emis_count.aggregate(Sum('three'))
            dee_pan_district_emis_total_four=dee_pan_emis_count.aggregate(Sum('four'))
            dee_pan_district_emis_total_five=dee_pan_emis_count.aggregate(Sum('five'))
            dee_pan_district_emis_total_six=dee_pan_emis_count.aggregate(Sum('six'))
            dee_pan_district_emis_total_seven=dee_pan_emis_count.aggregate(Sum('seven'))
            dee_pan_district_emis_total_eight=dee_pan_emis_count.aggregate(Sum('eight'))
            dee_pan_district_emis_total_nine=dee_pan_emis_count.aggregate(Sum('nine'))
            dee_pan_district_emis_total_ten=dee_pan_emis_count.aggregate(Sum('ten'))
            dee_pan_district_emis_total_eleven=dee_pan_emis_count.aggregate(Sum('eleven'))
            dee_pan_district_emis_total_twelve=dee_pan_emis_count.aggregate(Sum('twelve'))
            dee_pan_district_emis_total_total_count=dee_pan_emis_count.aggregate(Sum('total_count'))
            dee_pan_district_emis_one+=dee_pan_district_emis_total_one.values()
            dee_pan_district_emis_two+=dee_pan_district_emis_total_two.values()
            dee_pan_district_emis_three+=dee_pan_district_emis_total_three.values()
            dee_pan_district_emis_four+=dee_pan_district_emis_total_four.values()
            dee_pan_district_emis_five+=dee_pan_district_emis_total_five.values()
            dee_pan_district_emis_six+=dee_pan_district_emis_total_six.values()
            dee_pan_district_emis_seven+=dee_pan_district_emis_total_seven.values()
            dee_pan_district_emis_eight+=dee_pan_district_emis_total_eight.values()
            dee_pan_district_emis_nine+=dee_pan_district_emis_total_nine.values()
            dee_pan_district_emis_ten+=dee_pan_district_emis_total_ten.values()
            dee_pan_district_emis_eleven+=dee_pan_district_emis_total_eleven.values()
            dee_pan_district_emis_twelve+=dee_pan_district_emis_total_twelve.values()
            dee_pan_district_emis_total_count+=dee_pan_district_emis_total_total_count.values()
        dee_pan_mylist=zip(dee_pan_district_ids,dee_pan_district_names,dee_pan_district_emis_one,dee_pan_district_emis_two,dee_pan_district_emis_three,dee_pan_district_emis_four,dee_pan_district_emis_five,dee_pan_district_emis_six,dee_pan_district_emis_seven,dee_pan_district_emis_eight,dee_pan_district_emis_nine,dee_pan_district_emis_ten,dee_pan_district_emis_eleven,dee_pan_district_emis_twelve,dee_pan_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[3],category_id__in=[1,2,4])
        dee_pan_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_pan_state_emis_one=dee_pan_emis_count.aggregate(Sum('one')).values()[0]
        dee_pan_state_emis_two=dee_pan_emis_count.aggregate(Sum('two')).values()[0]
        dee_pan_state_emis_three=dee_pan_emis_count.aggregate(Sum('three')).values()[0]
        dee_pan_state_emis_four=dee_pan_emis_count.aggregate(Sum('four')).values()[0]
        dee_pan_state_emis_five=dee_pan_emis_count.aggregate(Sum('five')).values()[0]
        dee_pan_state_emis_six=dee_pan_emis_count.aggregate(Sum('six')).values()[0]
        dee_pan_state_emis_seven=dee_pan_emis_count.aggregate(Sum('seven')).values()[0]
        dee_pan_state_emis_eight=dee_pan_emis_count.aggregate(Sum('eight')).values()[0]
        dee_pan_state_emis_nine=dee_pan_emis_count.aggregate(Sum('nine')).values()[0]
        dee_pan_state_emis_ten=dee_pan_emis_count.aggregate(Sum('ten')).values()[0]
        dee_pan_state_emis_eleven=dee_pan_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_pan_state_emis_twelve=dee_pan_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_pan_state_emis_total_count=dee_pan_emis_count.aggregate(Sum('total_count')).values()[0]
        # municipal
        dee_mpl_district_ids=[]
        dee_mpl_district_names=[]
        dee_mpl_district_emis_one=[]
        dee_mpl_district_emis_two=[]
        dee_mpl_district_emis_three=[]
        dee_mpl_district_emis_four=[]
        dee_mpl_district_emis_five=[]
        dee_mpl_district_emis_six=[]
        dee_mpl_district_emis_seven=[]
        dee_mpl_district_emis_eight=[]
        dee_mpl_district_emis_nine=[]
        dee_mpl_district_emis_ten=[]
        dee_mpl_district_emis_eleven=[]
        dee_mpl_district_emis_twelve=[]
        dee_mpl_district_emis_total_count=[]
        for i in districts:
            dee_mpl_district_ids.append(str(i.id))
            dee_mpl_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[5],category_id__in=[1,2,4])
            dee_mpl_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_mpl_district_emis_total_one=dee_mpl_emis_count.aggregate(Sum('one'))
            dee_mpl_district_emis_total_two=dee_mpl_emis_count.aggregate(Sum('two'))
            dee_mpl_district_emis_total_three=dee_mpl_emis_count.aggregate(Sum('three'))
            dee_mpl_district_emis_total_four=dee_mpl_emis_count.aggregate(Sum('four'))
            dee_mpl_district_emis_total_five=dee_mpl_emis_count.aggregate(Sum('five'))
            dee_mpl_district_emis_total_six=dee_mpl_emis_count.aggregate(Sum('six'))
            dee_mpl_district_emis_total_seven=dee_mpl_emis_count.aggregate(Sum('seven'))
            dee_mpl_district_emis_total_eight=dee_mpl_emis_count.aggregate(Sum('eight'))
            dee_mpl_district_emis_total_nine=dee_mpl_emis_count.aggregate(Sum('nine'))
            dee_mpl_district_emis_total_ten=dee_mpl_emis_count.aggregate(Sum('ten'))
            dee_mpl_district_emis_total_eleven=dee_mpl_emis_count.aggregate(Sum('eleven'))
            dee_mpl_district_emis_total_twelve=dee_mpl_emis_count.aggregate(Sum('twelve'))
            dee_mpl_district_emis_total_total_count=dee_mpl_emis_count.aggregate(Sum('total_count'))
            dee_mpl_district_emis_one+=dee_mpl_district_emis_total_one.values()
            dee_mpl_district_emis_two+=dee_mpl_district_emis_total_two.values()
            dee_mpl_district_emis_three+=dee_mpl_district_emis_total_three.values()
            dee_mpl_district_emis_four+=dee_mpl_district_emis_total_four.values()
            dee_mpl_district_emis_five+=dee_mpl_district_emis_total_five.values()
            dee_mpl_district_emis_six+=dee_mpl_district_emis_total_six.values()
            dee_mpl_district_emis_seven+=dee_mpl_district_emis_total_seven.values()
            dee_mpl_district_emis_eight+=dee_mpl_district_emis_total_eight.values()
            dee_mpl_district_emis_nine+=dee_mpl_district_emis_total_nine.values()
            dee_mpl_district_emis_ten+=dee_mpl_district_emis_total_ten.values()
            dee_mpl_district_emis_eleven+=dee_mpl_district_emis_total_eleven.values()
            dee_mpl_district_emis_twelve+=dee_mpl_district_emis_total_twelve.values()
            dee_mpl_district_emis_total_count+=dee_mpl_district_emis_total_total_count.values()
        dee_mpl_mylist=zip(dee_mpl_district_ids,dee_mpl_district_names,dee_mpl_district_emis_one,dee_mpl_district_emis_two,dee_mpl_district_emis_three,dee_mpl_district_emis_four,dee_mpl_district_emis_five,dee_mpl_district_emis_six,dee_mpl_district_emis_seven,dee_mpl_district_emis_eight,dee_mpl_district_emis_nine,dee_mpl_district_emis_ten,dee_mpl_district_emis_eleven,dee_mpl_district_emis_twelve,dee_mpl_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[5],category_id__in=[1,2,4])
        dee_mpl_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_mpl_state_emis_one=dee_mpl_emis_count.aggregate(Sum('one')).values()[0]
        dee_mpl_state_emis_two=dee_mpl_emis_count.aggregate(Sum('two')).values()[0]
        dee_mpl_state_emis_three=dee_mpl_emis_count.aggregate(Sum('three')).values()[0]
        dee_mpl_state_emis_four=dee_mpl_emis_count.aggregate(Sum('four')).values()[0]
        dee_mpl_state_emis_five=dee_mpl_emis_count.aggregate(Sum('five')).values()[0]
        dee_mpl_state_emis_six=dee_mpl_emis_count.aggregate(Sum('six')).values()[0]
        dee_mpl_state_emis_seven=dee_mpl_emis_count.aggregate(Sum('seven')).values()[0]
        dee_mpl_state_emis_eight=dee_mpl_emis_count.aggregate(Sum('eight')).values()[0]
        dee_mpl_state_emis_nine=dee_mpl_emis_count.aggregate(Sum('nine')).values()[0]
        dee_mpl_state_emis_ten=dee_mpl_emis_count.aggregate(Sum('ten')).values()[0]
        dee_mpl_state_emis_eleven=dee_mpl_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_mpl_state_emis_twelve=dee_mpl_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_mpl_state_emis_total_count=dee_mpl_emis_count.aggregate(Sum('total_count')).values()[0]
        # Aided
        dee_aid_district_ids=[]
        dee_aid_district_names=[]
        dee_aid_district_emis_one=[]
        dee_aid_district_emis_two=[]
        dee_aid_district_emis_three=[]
        dee_aid_district_emis_four=[]
        dee_aid_district_emis_five=[]
        dee_aid_district_emis_six=[]
        dee_aid_district_emis_seven=[]
        dee_aid_district_emis_eight=[]
        dee_aid_district_emis_nine=[]
        dee_aid_district_emis_ten=[]
        dee_aid_district_emis_eleven=[]
        dee_aid_district_emis_twelve=[]
        dee_aid_district_emis_total_count=[]
        for i in districts:
            dee_aid_district_ids.append(str(i.id))
            dee_aid_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[6],category_id__in=[1,2,4])
            dee_aid_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_aid_district_emis_total_one=dee_aid_emis_count.aggregate(Sum('one'))
            dee_aid_district_emis_total_two=dee_aid_emis_count.aggregate(Sum('two'))
            dee_aid_district_emis_total_three=dee_aid_emis_count.aggregate(Sum('three'))
            dee_aid_district_emis_total_four=dee_aid_emis_count.aggregate(Sum('four'))
            dee_aid_district_emis_total_five=dee_aid_emis_count.aggregate(Sum('five'))
            dee_aid_district_emis_total_six=dee_aid_emis_count.aggregate(Sum('six'))
            dee_aid_district_emis_total_seven=dee_aid_emis_count.aggregate(Sum('seven'))
            dee_aid_district_emis_total_eight=dee_aid_emis_count.aggregate(Sum('eight'))
            dee_aid_district_emis_total_nine=dee_aid_emis_count.aggregate(Sum('nine'))
            dee_aid_district_emis_total_ten=dee_aid_emis_count.aggregate(Sum('ten'))
            dee_aid_district_emis_total_eleven=dee_aid_emis_count.aggregate(Sum('eleven'))
            dee_aid_district_emis_total_twelve=dee_aid_emis_count.aggregate(Sum('twelve'))
            dee_aid_district_emis_total_total_count=dee_aid_emis_count.aggregate(Sum('total_count'))
            dee_aid_district_emis_one+=dee_aid_district_emis_total_one.values()
            dee_aid_district_emis_two+=dee_aid_district_emis_total_two.values()
            dee_aid_district_emis_three+=dee_aid_district_emis_total_three.values()
            dee_aid_district_emis_four+=dee_aid_district_emis_total_four.values()
            dee_aid_district_emis_five+=dee_aid_district_emis_total_five.values()
            dee_aid_district_emis_six+=dee_aid_district_emis_total_six.values()
            dee_aid_district_emis_seven+=dee_aid_district_emis_total_seven.values()
            dee_aid_district_emis_eight+=dee_aid_district_emis_total_eight.values()
            dee_aid_district_emis_nine+=dee_aid_district_emis_total_nine.values()
            dee_aid_district_emis_ten+=dee_aid_district_emis_total_ten.values()
            dee_aid_district_emis_eleven+=dee_aid_district_emis_total_eleven.values()
            dee_aid_district_emis_twelve+=dee_aid_district_emis_total_twelve.values()
            dee_aid_district_emis_total_count+=dee_aid_district_emis_total_total_count.values()
        dee_aid_mylist=zip(dee_aid_district_ids,dee_aid_district_names,dee_aid_district_emis_one,dee_aid_district_emis_two,dee_aid_district_emis_three,dee_aid_district_emis_four,dee_aid_district_emis_five,dee_aid_district_emis_six,dee_aid_district_emis_seven,dee_aid_district_emis_eight,dee_aid_district_emis_nine,dee_aid_district_emis_ten,dee_aid_district_emis_eleven,dee_aid_district_emis_twelve,dee_aid_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[6],category_id__in=[1,2,4])
        dee_aid_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_aid_state_emis_one=dee_aid_emis_count.aggregate(Sum('one')).values()[0]
        dee_aid_state_emis_two=dee_aid_emis_count.aggregate(Sum('two')).values()[0]
        dee_aid_state_emis_three=dee_aid_emis_count.aggregate(Sum('three')).values()[0]
        dee_aid_state_emis_four=dee_aid_emis_count.aggregate(Sum('four')).values()[0]
        dee_aid_state_emis_five=dee_aid_emis_count.aggregate(Sum('five')).values()[0]
        dee_aid_state_emis_six=dee_aid_emis_count.aggregate(Sum('six')).values()[0]
        dee_aid_state_emis_seven=dee_aid_emis_count.aggregate(Sum('seven')).values()[0]
        dee_aid_state_emis_eight=dee_aid_emis_count.aggregate(Sum('eight')).values()[0]
        dee_aid_state_emis_nine=dee_aid_emis_count.aggregate(Sum('nine')).values()[0]
        dee_aid_state_emis_ten=dee_aid_emis_count.aggregate(Sum('ten')).values()[0]
        dee_aid_state_emis_eleven=dee_aid_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_aid_state_emis_twelve=dee_aid_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_aid_state_emis_total_count=dee_aid_emis_count.aggregate(Sum('total_count')).values()[0]
        # Nursery
        dee_nur_district_ids=[]
        dee_nur_district_names=[]
        dee_nur_district_emis_one=[]
        dee_nur_district_emis_two=[]
        dee_nur_district_emis_three=[]
        dee_nur_district_emis_four=[]
        dee_nur_district_emis_five=[]
        dee_nur_district_emis_six=[]
        dee_nur_district_emis_seven=[]
        dee_nur_district_emis_eight=[]
        dee_nur_district_emis_nine=[]
        dee_nur_district_emis_ten=[]
        dee_nur_district_emis_eleven=[]
        dee_nur_district_emis_twelve=[]
        dee_nur_district_emis_total_count=[]
        for i in districts:
            dee_nur_district_ids.append(str(i.id))
            dee_nur_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[8],category_id__in=[11])
            dee_nur_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_nur_district_emis_total_one=dee_nur_emis_count.aggregate(Sum('one'))
            dee_nur_district_emis_total_two=dee_nur_emis_count.aggregate(Sum('two'))
            dee_nur_district_emis_total_three=dee_nur_emis_count.aggregate(Sum('three'))
            dee_nur_district_emis_total_four=dee_nur_emis_count.aggregate(Sum('four'))
            dee_nur_district_emis_total_five=dee_nur_emis_count.aggregate(Sum('five'))
            dee_nur_district_emis_total_six=dee_nur_emis_count.aggregate(Sum('six'))
            dee_nur_district_emis_total_seven=dee_nur_emis_count.aggregate(Sum('seven'))
            dee_nur_district_emis_total_eight=dee_nur_emis_count.aggregate(Sum('eight'))
            dee_nur_district_emis_total_nine=dee_nur_emis_count.aggregate(Sum('nine'))
            dee_nur_district_emis_total_ten=dee_nur_emis_count.aggregate(Sum('ten'))
            dee_nur_district_emis_total_eleven=dee_nur_emis_count.aggregate(Sum('eleven'))
            dee_nur_district_emis_total_twelve=dee_nur_emis_count.aggregate(Sum('twelve'))
            dee_nur_district_emis_total_total_count=dee_nur_emis_count.aggregate(Sum('total_count'))
            dee_nur_district_emis_one+=dee_nur_district_emis_total_one.values()
            dee_nur_district_emis_two+=dee_nur_district_emis_total_two.values()
            dee_nur_district_emis_three+=dee_nur_district_emis_total_three.values()
            dee_nur_district_emis_four+=dee_nur_district_emis_total_four.values()
            dee_nur_district_emis_five+=dee_nur_district_emis_total_five.values()
            dee_nur_district_emis_six+=dee_nur_district_emis_total_six.values()
            dee_nur_district_emis_seven+=dee_nur_district_emis_total_seven.values()
            dee_nur_district_emis_eight+=dee_nur_district_emis_total_eight.values()
            dee_nur_district_emis_nine+=dee_nur_district_emis_total_nine.values()
            dee_nur_district_emis_ten+=dee_nur_district_emis_total_ten.values()
            dee_nur_district_emis_eleven+=dee_nur_district_emis_total_eleven.values()
            dee_nur_district_emis_twelve+=dee_nur_district_emis_total_twelve.values()
            dee_nur_district_emis_total_count+=dee_nur_district_emis_total_total_count.values()
        dee_nur_mylist=zip(dee_nur_district_ids,dee_nur_district_names,dee_nur_district_emis_one,dee_nur_district_emis_two,dee_nur_district_emis_three,dee_nur_district_emis_four,dee_nur_district_emis_five,dee_nur_district_emis_six,dee_nur_district_emis_seven,dee_nur_district_emis_eight,dee_nur_district_emis_nine,dee_nur_district_emis_ten,dee_nur_district_emis_eleven,dee_nur_district_emis_twelve,dee_nur_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[8],category_id__in=[11])
        dee_nur_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_nur_state_emis_one=dee_nur_emis_count.aggregate(Sum('one')).values()[0]
        dee_nur_state_emis_two=dee_nur_emis_count.aggregate(Sum('two')).values()[0]
        dee_nur_state_emis_three=dee_nur_emis_count.aggregate(Sum('three')).values()[0]
        dee_nur_state_emis_four=dee_nur_emis_count.aggregate(Sum('four')).values()[0]
        dee_nur_state_emis_five=dee_nur_emis_count.aggregate(Sum('five')).values()[0]
        dee_nur_state_emis_six=dee_nur_emis_count.aggregate(Sum('six')).values()[0]
        dee_nur_state_emis_seven=dee_nur_emis_count.aggregate(Sum('seven')).values()[0]
        dee_nur_state_emis_eight=dee_nur_emis_count.aggregate(Sum('eight')).values()[0]
        dee_nur_state_emis_nine=dee_nur_emis_count.aggregate(Sum('nine')).values()[0]
        dee_nur_state_emis_ten=dee_nur_emis_count.aggregate(Sum('ten')).values()[0]
        dee_nur_state_emis_eleven=dee_nur_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_nur_state_emis_twelve=dee_nur_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_nur_state_emis_total_count=dee_nur_emis_count.aggregate(Sum('total_count')).values()[0]
        # pvt aided
        dee_pvt_district_ids=[]
        dee_pvt_district_names=[]
        dee_pvt_district_emis_one=[]
        dee_pvt_district_emis_two=[]
        dee_pvt_district_emis_three=[]
        dee_pvt_district_emis_four=[]
        dee_pvt_district_emis_five=[]
        dee_pvt_district_emis_six=[]
        dee_pvt_district_emis_seven=[]
        dee_pvt_district_emis_eight=[]
        dee_pvt_district_emis_nine=[]
        dee_pvt_district_emis_ten=[]
        dee_pvt_district_emis_eleven=[]
        dee_pvt_district_emis_twelve=[]
        dee_pvt_district_emis_total_count=[]
        for i in districts:
            dee_pvt_district_ids.append(str(i.id))
            dee_pvt_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[8],category_id__in=[1,2,4])
            dee_pvt_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_pvt_district_emis_total_one=dee_pvt_emis_count.aggregate(Sum('one'))
            dee_pvt_district_emis_total_two=dee_pvt_emis_count.aggregate(Sum('two'))
            dee_pvt_district_emis_total_three=dee_pvt_emis_count.aggregate(Sum('three'))
            dee_pvt_district_emis_total_four=dee_pvt_emis_count.aggregate(Sum('four'))
            dee_pvt_district_emis_total_five=dee_pvt_emis_count.aggregate(Sum('five'))
            dee_pvt_district_emis_total_six=dee_pvt_emis_count.aggregate(Sum('six'))
            dee_pvt_district_emis_total_seven=dee_pvt_emis_count.aggregate(Sum('seven'))
            dee_pvt_district_emis_total_eight=dee_pvt_emis_count.aggregate(Sum('eight'))
            dee_pvt_district_emis_total_nine=dee_pvt_emis_count.aggregate(Sum('nine'))
            dee_pvt_district_emis_total_ten=dee_pvt_emis_count.aggregate(Sum('ten'))
            dee_pvt_district_emis_total_eleven=dee_pvt_emis_count.aggregate(Sum('eleven'))
            dee_pvt_district_emis_total_twelve=dee_pvt_emis_count.aggregate(Sum('twelve'))
            dee_pvt_district_emis_total_total_count=dee_pvt_emis_count.aggregate(Sum('total_count'))
            dee_pvt_district_emis_one+=dee_pvt_district_emis_total_one.values()
            dee_pvt_district_emis_two+=dee_pvt_district_emis_total_two.values()
            dee_pvt_district_emis_three+=dee_pvt_district_emis_total_three.values()
            dee_pvt_district_emis_four+=dee_pvt_district_emis_total_four.values()
            dee_pvt_district_emis_five+=dee_pvt_district_emis_total_five.values()
            dee_pvt_district_emis_six+=dee_pvt_district_emis_total_six.values()
            dee_pvt_district_emis_seven+=dee_pvt_district_emis_total_seven.values()
            dee_pvt_district_emis_eight+=dee_pvt_district_emis_total_eight.values()
            dee_pvt_district_emis_nine+=dee_pvt_district_emis_total_nine.values()
            dee_pvt_district_emis_ten+=dee_pvt_district_emis_total_ten.values()
            dee_pvt_district_emis_eleven+=dee_pvt_district_emis_total_eleven.values()
            dee_pvt_district_emis_twelve+=dee_pvt_district_emis_total_twelve.values()
            dee_pvt_district_emis_total_count+=dee_pvt_district_emis_total_total_count.values()
        dee_pvt_mylist=zip(dee_pvt_district_ids,dee_pvt_district_names,dee_pvt_district_emis_one,dee_pvt_district_emis_two,dee_pvt_district_emis_three,dee_pvt_district_emis_four,dee_pvt_district_emis_five,dee_pvt_district_emis_six,dee_pvt_district_emis_seven,dee_pvt_district_emis_eight,dee_pvt_district_emis_nine,dee_pvt_district_emis_ten,dee_pvt_district_emis_eleven,dee_pvt_district_emis_twelve,dee_pvt_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[8],category_id__in=[1,2,4])
        dee_pvt_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_pvt_state_emis_one=dee_pvt_emis_count.aggregate(Sum('one')).values()[0]
        dee_pvt_state_emis_two=dee_pvt_emis_count.aggregate(Sum('two')).values()[0]
        dee_pvt_state_emis_three=dee_pvt_emis_count.aggregate(Sum('three')).values()[0]
        dee_pvt_state_emis_four=dee_pvt_emis_count.aggregate(Sum('four')).values()[0]
        dee_pvt_state_emis_five=dee_pvt_emis_count.aggregate(Sum('five')).values()[0]
        dee_pvt_state_emis_six=dee_pvt_emis_count.aggregate(Sum('six')).values()[0]
        dee_pvt_state_emis_seven=dee_pvt_emis_count.aggregate(Sum('seven')).values()[0]
        dee_pvt_state_emis_eight=dee_pvt_emis_count.aggregate(Sum('eight')).values()[0]
        dee_pvt_state_emis_nine=dee_pvt_emis_count.aggregate(Sum('nine')).values()[0]
        dee_pvt_state_emis_ten=dee_pvt_emis_count.aggregate(Sum('ten')).values()[0]
        dee_pvt_state_emis_eleven=dee_pvt_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_pvt_state_emis_twelve=dee_pvt_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_pvt_state_emis_total_count=dee_pvt_emis_count.aggregate(Sum('total_count')).values()[0]
        # corporation
        dee_cor_district_ids=[]
        dee_cor_district_names=[]
        dee_cor_district_emis_one=[]
        dee_cor_district_emis_two=[]
        dee_cor_district_emis_three=[]
        dee_cor_district_emis_four=[]
        dee_cor_district_emis_five=[]
        dee_cor_district_emis_six=[]
        dee_cor_district_emis_seven=[]
        dee_cor_district_emis_eight=[]
        dee_cor_district_emis_nine=[]
        dee_cor_district_emis_ten=[]
        dee_cor_district_emis_eleven=[]
        dee_cor_district_emis_twelve=[]
        dee_cor_district_emis_total_count=[]
        for i in districts:
            dee_cor_district_ids.append(str(i.id))
            dee_cor_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[4],category_id__in=[1,2,4])
            dee_cor_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_cor_district_emis_total_one=dee_cor_emis_count.aggregate(Sum('one'))
            dee_cor_district_emis_total_two=dee_cor_emis_count.aggregate(Sum('two'))
            dee_cor_district_emis_total_three=dee_cor_emis_count.aggregate(Sum('three'))
            dee_cor_district_emis_total_four=dee_cor_emis_count.aggregate(Sum('four'))
            dee_cor_district_emis_total_five=dee_cor_emis_count.aggregate(Sum('five'))
            dee_cor_district_emis_total_six=dee_cor_emis_count.aggregate(Sum('six'))
            dee_cor_district_emis_total_seven=dee_cor_emis_count.aggregate(Sum('seven'))
            dee_cor_district_emis_total_eight=dee_cor_emis_count.aggregate(Sum('eight'))
            dee_cor_district_emis_total_nine=dee_cor_emis_count.aggregate(Sum('nine'))
            dee_cor_district_emis_total_ten=dee_cor_emis_count.aggregate(Sum('ten'))
            dee_cor_district_emis_total_eleven=dee_cor_emis_count.aggregate(Sum('eleven'))
            dee_cor_district_emis_total_twelve=dee_cor_emis_count.aggregate(Sum('twelve'))
            dee_cor_district_emis_total_total_count=dee_cor_emis_count.aggregate(Sum('total_count'))
            dee_cor_district_emis_one+=dee_cor_district_emis_total_one.values()
            dee_cor_district_emis_two+=dee_cor_district_emis_total_two.values()
            dee_cor_district_emis_three+=dee_cor_district_emis_total_three.values()
            dee_cor_district_emis_four+=dee_cor_district_emis_total_four.values()
            dee_cor_district_emis_five+=dee_cor_district_emis_total_five.values()
            dee_cor_district_emis_six+=dee_cor_district_emis_total_six.values()
            dee_cor_district_emis_seven+=dee_cor_district_emis_total_seven.values()
            dee_cor_district_emis_eight+=dee_cor_district_emis_total_eight.values()
            dee_cor_district_emis_nine+=dee_cor_district_emis_total_nine.values()
            dee_cor_district_emis_ten+=dee_cor_district_emis_total_ten.values()
            dee_cor_district_emis_eleven+=dee_cor_district_emis_total_eleven.values()
            dee_cor_district_emis_twelve+=dee_cor_district_emis_total_twelve.values()
            dee_cor_district_emis_total_count+=dee_cor_district_emis_total_total_count.values()
        dee_cor_mylist=zip(dee_cor_district_ids,dee_cor_district_names,dee_cor_district_emis_one,dee_cor_district_emis_two,dee_cor_district_emis_three,dee_cor_district_emis_four,dee_cor_district_emis_five,dee_cor_district_emis_six,dee_cor_district_emis_seven,dee_cor_district_emis_eight,dee_cor_district_emis_nine,dee_cor_district_emis_ten,dee_cor_district_emis_eleven,dee_cor_district_emis_twelve,dee_cor_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[4],category_id__in=[1,2,4])
        dee_cor_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_cor_state_emis_one=dee_cor_emis_count.aggregate(Sum('one')).values()[0]
        dee_cor_state_emis_two=dee_cor_emis_count.aggregate(Sum('two')).values()[0]
        dee_cor_state_emis_three=dee_cor_emis_count.aggregate(Sum('three')).values()[0]
        dee_cor_state_emis_four=dee_cor_emis_count.aggregate(Sum('four')).values()[0]
        dee_cor_state_emis_five=dee_cor_emis_count.aggregate(Sum('five')).values()[0]
        dee_cor_state_emis_six=dee_cor_emis_count.aggregate(Sum('six')).values()[0]
        dee_cor_state_emis_seven=dee_cor_emis_count.aggregate(Sum('seven')).values()[0]
        dee_cor_state_emis_eight=dee_cor_emis_count.aggregate(Sum('eight')).values()[0]
        dee_cor_state_emis_nine=dee_cor_emis_count.aggregate(Sum('nine')).values()[0]
        dee_cor_state_emis_ten=dee_cor_emis_count.aggregate(Sum('ten')).values()[0]
        dee_cor_state_emis_eleven=dee_cor_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_cor_state_emis_twelve=dee_cor_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_cor_state_emis_total_count=dee_cor_emis_count.aggregate(Sum('total_count')).values()[0]
        # adw
        dee_adw_district_ids=[]
        dee_adw_district_names=[]
        dee_adw_district_emis_one=[]
        dee_adw_district_emis_two=[]
        dee_adw_district_emis_three=[]
        dee_adw_district_emis_four=[]
        dee_adw_district_emis_five=[]
        dee_adw_district_emis_six=[]
        dee_adw_district_emis_seven=[]
        dee_adw_district_emis_eight=[]
        dee_adw_district_emis_nine=[]
        dee_adw_district_emis_ten=[]
        dee_adw_district_emis_eleven=[]
        dee_adw_district_emis_twelve=[]
        dee_adw_district_emis_total_count=[]
        for i in districts:
            dee_adw_district_ids.append(str(i.id))
            dee_adw_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[2],category_id__in=[1,2,4])
            dee_adw_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_adw_district_emis_total_one=dee_adw_emis_count.aggregate(Sum('one'))
            dee_adw_district_emis_total_two=dee_adw_emis_count.aggregate(Sum('two'))
            dee_adw_district_emis_total_three=dee_adw_emis_count.aggregate(Sum('three'))
            dee_adw_district_emis_total_four=dee_adw_emis_count.aggregate(Sum('four'))
            dee_adw_district_emis_total_five=dee_adw_emis_count.aggregate(Sum('five'))
            dee_adw_district_emis_total_six=dee_adw_emis_count.aggregate(Sum('six'))
            dee_adw_district_emis_total_seven=dee_adw_emis_count.aggregate(Sum('seven'))
            dee_adw_district_emis_total_eight=dee_adw_emis_count.aggregate(Sum('eight'))
            dee_adw_district_emis_total_nine=dee_adw_emis_count.aggregate(Sum('nine'))
            dee_adw_district_emis_total_ten=dee_adw_emis_count.aggregate(Sum('ten'))
            dee_adw_district_emis_total_eleven=dee_adw_emis_count.aggregate(Sum('eleven'))
            dee_adw_district_emis_total_twelve=dee_adw_emis_count.aggregate(Sum('twelve'))
            dee_adw_district_emis_total_total_count=dee_adw_emis_count.aggregate(Sum('total_count'))
            dee_adw_district_emis_one+=dee_adw_district_emis_total_one.values()
            dee_adw_district_emis_two+=dee_adw_district_emis_total_two.values()
            dee_adw_district_emis_three+=dee_adw_district_emis_total_three.values()
            dee_adw_district_emis_four+=dee_adw_district_emis_total_four.values()
            dee_adw_district_emis_five+=dee_adw_district_emis_total_five.values()
            dee_adw_district_emis_six+=dee_adw_district_emis_total_six.values()
            dee_adw_district_emis_seven+=dee_adw_district_emis_total_seven.values()
            dee_adw_district_emis_eight+=dee_adw_district_emis_total_eight.values()
            dee_adw_district_emis_nine+=dee_adw_district_emis_total_nine.values()
            dee_adw_district_emis_ten+=dee_adw_district_emis_total_ten.values()
            dee_adw_district_emis_eleven+=dee_adw_district_emis_total_eleven.values()
            dee_adw_district_emis_twelve+=dee_adw_district_emis_total_twelve.values()
            dee_adw_district_emis_total_count+=dee_adw_district_emis_total_total_count.values()
        dee_adw_mylist=zip(dee_adw_district_ids,dee_adw_district_names,dee_adw_district_emis_one,dee_adw_district_emis_two,dee_adw_district_emis_three,dee_adw_district_emis_four,dee_adw_district_emis_five,dee_adw_district_emis_six,dee_adw_district_emis_seven,dee_adw_district_emis_eight,dee_adw_district_emis_nine,dee_adw_district_emis_ten,dee_adw_district_emis_eleven,dee_adw_district_emis_twelve,dee_adw_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[2],category_id__in=[1,2,4])
        dee_adw_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_adw_state_emis_one=dee_adw_emis_count.aggregate(Sum('one')).values()[0]
        dee_adw_state_emis_two=dee_adw_emis_count.aggregate(Sum('two')).values()[0]
        dee_adw_state_emis_three=dee_adw_emis_count.aggregate(Sum('three')).values()[0]
        dee_adw_state_emis_four=dee_adw_emis_count.aggregate(Sum('four')).values()[0]
        dee_adw_state_emis_five=dee_adw_emis_count.aggregate(Sum('five')).values()[0]
        dee_adw_state_emis_six=dee_adw_emis_count.aggregate(Sum('six')).values()[0]
        dee_adw_state_emis_seven=dee_adw_emis_count.aggregate(Sum('seven')).values()[0]
        dee_adw_state_emis_eight=dee_adw_emis_count.aggregate(Sum('eight')).values()[0]
        dee_adw_state_emis_nine=dee_adw_emis_count.aggregate(Sum('nine')).values()[0]
        dee_adw_state_emis_ten=dee_adw_emis_count.aggregate(Sum('ten')).values()[0]
        dee_adw_state_emis_eleven=dee_adw_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_adw_state_emis_twelve=dee_adw_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_adw_state_emis_total_count=dee_adw_emis_count.aggregate(Sum('total_count')).values()[0]
        # gov
        dee_gov_district_ids=[]
        dee_gov_district_names=[]
        dee_gov_district_emis_one=[]
        dee_gov_district_emis_two=[]
        dee_gov_district_emis_three=[]
        dee_gov_district_emis_four=[]
        dee_gov_district_emis_five=[]
        dee_gov_district_emis_six=[]
        dee_gov_district_emis_seven=[]
        dee_gov_district_emis_eight=[]
        dee_gov_district_emis_nine=[]
        dee_gov_district_emis_ten=[]
        dee_gov_district_emis_eleven=[]
        dee_gov_district_emis_twelve=[]
        dee_gov_district_emis_total_count=[]
        for i in districts:
            dee_gov_district_ids.append(str(i.id))
            dee_gov_district_names.append(i.district_name)
            school_list=School.objects.filter(district_id=i.id,management_id__in=[1],category_id__in=[1,2,4])
            dee_gov_emis_count=School_child_count.objects.filter(school_id__in=school_list)
            dee_gov_district_emis_total_one=dee_gov_emis_count.aggregate(Sum('one'))
            dee_gov_district_emis_total_two=dee_gov_emis_count.aggregate(Sum('two'))
            dee_gov_district_emis_total_three=dee_gov_emis_count.aggregate(Sum('three'))
            dee_gov_district_emis_total_four=dee_gov_emis_count.aggregate(Sum('four'))
            dee_gov_district_emis_total_five=dee_gov_emis_count.aggregate(Sum('five'))
            dee_gov_district_emis_total_six=dee_gov_emis_count.aggregate(Sum('six'))
            dee_gov_district_emis_total_seven=dee_gov_emis_count.aggregate(Sum('seven'))
            dee_gov_district_emis_total_eight=dee_gov_emis_count.aggregate(Sum('eight'))
            dee_gov_district_emis_total_nine=dee_gov_emis_count.aggregate(Sum('nine'))
            dee_gov_district_emis_total_ten=dee_gov_emis_count.aggregate(Sum('ten'))
            dee_gov_district_emis_total_eleven=dee_gov_emis_count.aggregate(Sum('eleven'))
            dee_gov_district_emis_total_twelve=dee_gov_emis_count.aggregate(Sum('twelve'))
            dee_gov_district_emis_total_total_count=dee_gov_emis_count.aggregate(Sum('total_count'))
            dee_gov_district_emis_one+=dee_gov_district_emis_total_one.values()
            dee_gov_district_emis_two+=dee_gov_district_emis_total_two.values()
            dee_gov_district_emis_three+=dee_gov_district_emis_total_three.values()
            dee_gov_district_emis_four+=dee_gov_district_emis_total_four.values()
            dee_gov_district_emis_five+=dee_gov_district_emis_total_five.values()
            dee_gov_district_emis_six+=dee_gov_district_emis_total_six.values()
            dee_gov_district_emis_seven+=dee_gov_district_emis_total_seven.values()
            dee_gov_district_emis_eight+=dee_gov_district_emis_total_eight.values()
            dee_gov_district_emis_nine+=dee_gov_district_emis_total_nine.values()
            dee_gov_district_emis_ten+=dee_gov_district_emis_total_ten.values()
            dee_gov_district_emis_eleven+=dee_gov_district_emis_total_eleven.values()
            dee_gov_district_emis_twelve+=dee_gov_district_emis_total_twelve.values()
            dee_gov_district_emis_total_count+=dee_gov_district_emis_total_total_count.values()
        dee_gov_mylist=zip(dee_gov_district_ids,dee_gov_district_names,dee_gov_district_emis_one,dee_gov_district_emis_two,dee_gov_district_emis_three,dee_gov_district_emis_four,dee_gov_district_emis_five,dee_gov_district_emis_six,dee_gov_district_emis_seven,dee_gov_district_emis_eight,dee_gov_district_emis_nine,dee_gov_district_emis_ten,dee_gov_district_emis_eleven,dee_gov_district_emis_twelve,dee_gov_district_emis_total_count)
        school_list=School.objects.filter(management_id__in=[1],category_id__in=[1,2,4])
        dee_gov_emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dee_gov_state_emis_one=dee_gov_emis_count.aggregate(Sum('one')).values()[0]
        dee_gov_state_emis_two=dee_gov_emis_count.aggregate(Sum('two')).values()[0]
        dee_gov_state_emis_three=dee_gov_emis_count.aggregate(Sum('three')).values()[0]
        dee_gov_state_emis_four=dee_gov_emis_count.aggregate(Sum('four')).values()[0]
        dee_gov_state_emis_five=dee_gov_emis_count.aggregate(Sum('five')).values()[0]
        dee_gov_state_emis_six=dee_gov_emis_count.aggregate(Sum('six')).values()[0]
        dee_gov_state_emis_seven=dee_gov_emis_count.aggregate(Sum('seven')).values()[0]
        dee_gov_state_emis_eight=dee_gov_emis_count.aggregate(Sum('eight')).values()[0]
        dee_gov_state_emis_nine=dee_gov_emis_count.aggregate(Sum('nine')).values()[0]
        dee_gov_state_emis_ten=dee_gov_emis_count.aggregate(Sum('ten')).values()[0]
        dee_gov_state_emis_eleven=dee_gov_emis_count.aggregate(Sum('eleven')).values()[0]
        dee_gov_state_emis_twelve=dee_gov_emis_count.aggregate(Sum('twelve')).values()[0]
        dee_gov_state_emis_total_count=dee_gov_emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'state/state_progress_report_dee.html',locals())

class District_dse_progress_report(View):
    def get(self,request,**kwargs):
        district=self.kwargs['pk']
        district_name=District.objects.get(id=district)
        school_list=School.objects.filter(district_id=district,category_id__in=[3,5,6,7,8,9,10],management_id__in=[1,2,3,4,5,6,8]).order_by('management_id')
        emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dist_dse_total_emis_one=emis_count.aggregate(Sum('one')).values()[0]
        dist_dse_total_emis_two=emis_count.aggregate(Sum('two')).values()[0]
        dist_dse_total_emis_three=emis_count.aggregate(Sum('three')).values()[0]
        dist_dse_total_emis_four=emis_count.aggregate(Sum('four')).values()[0]
        dist_dse_total_emis_five=emis_count.aggregate(Sum('five')).values()[0]
        dist_dse_total_emis_six=emis_count.aggregate(Sum('six')).values()[0]
        dist_dse_total_emis_seven=emis_count.aggregate(Sum('seven')).values()[0]
        dist_dse_total_emis_eight=emis_count.aggregate(Sum('eight')).values()[0]
        dist_dse_total_emis_nine=emis_count.aggregate(Sum('nine')).values()[0]
        dist_dse_total_emis_ten=emis_count.aggregate(Sum('ten')).values()[0]
        dist_dse_total_emis_eleven=emis_count.aggregate(Sum('eleven')).values()[0]
        dist_dse_total_emis_twelve=emis_count.aggregate(Sum('twelve')).values()[0]
        dist_dse_total_emis_total_count=emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'district/district_dse_progress_report.html',locals())

class District_matric_progress_report(View):
    def get(self,request,**kwargs):
        district=self.kwargs['pk']
        district_name=District.objects.get(id=district)
        school_list=School.objects.filter(district_id=district,management_id=9).order_by('management_id')
        emis_count=School_child_count.objects.filter(school_id__in=school_list)
        dist_matric_total_emis_one=emis_count.aggregate(Sum('one')).values()[0]
        dist_matric_total_emis_two=emis_count.aggregate(Sum('two')).values()[0]
        dist_matric_total_emis_three=emis_count.aggregate(Sum('three')).values()[0]
        dist_matric_total_emis_four=emis_count.aggregate(Sum('four')).values()[0]
        dist_matric_total_emis_five=emis_count.aggregate(Sum('five')).values()[0]
        dist_matric_total_emis_six=emis_count.aggregate(Sum('six')).values()[0]
        dist_matric_total_emis_seven=emis_count.aggregate(Sum('seven')).values()[0]
        dist_matric_total_emis_eight=emis_count.aggregate(Sum('eight')).values()[0]
        dist_matric_total_emis_nine=emis_count.aggregate(Sum('nine')).values()[0]
        dist_matric_total_emis_ten=emis_count.aggregate(Sum('ten')).values()[0]
        dist_matric_total_emis_eleven=emis_count.aggregate(Sum('eleven')).values()[0]
        dist_matric_total_emis_twelve=emis_count.aggregate(Sum('twelve')).values()[0]
        dist_matric_total_emis_total_count=emis_count.aggregate(Sum('total_count')).values()[0]
        return render(request,'district/district_matric_progress_report.html',locals())


text:
class AddTiwtterLinkToUsers < ActiveRecord::Migration[5.1]
  def change
    add_column :users, :twitter_link, :text
  end
end

redpajama_set_name: RedPajamaGithub


text:
package org.kuali.kfs.module.cg.document;

import java.sql.Date;

import org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase;

/**
 * Instances of CloseDocument indicate dates on which the {@link CloseBatchStep} should be executed.
 */
public class CloseDocument extends FinancialSystemTransactionalDocumentBase {

    protected Date userInitiatedCloseDate;
    protected Date closeOnOrBeforeDate;

    /**
     * The {@link CloseBatchStep} will close out {@link Proposal}s and {@link Award}s not yet closed and created before the date
     * returned from this method.
     *
     * @return the date to use for comparison. See method description.
     */
    public Date getUserInitiatedCloseDate() {
        return userInitiatedCloseDate;
    }

    /**
     * The {@link CloseBatchStep} will close out {@link Proposal}s and {@link Award}s not yet closed and created before the date
     * passed into this method.
     *
     * @param closeOnOrBeforeDate the date to use for comparison. See method description.
     */
    public void setUserInitiatedCloseDate(Date userInitiatedCloseDate) {
        this.userInitiatedCloseDate = userInitiatedCloseDate;
    }

    /**
     * Gets the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
     *
     * @return the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
     */
    public Date getCloseOnOrBeforeDate() {
        return closeOnOrBeforeDate;
    }

    /**
     * Sets the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
     *
     * @param userInitiatedCloseDate the date on which this instance should trigger the CloseBatchStep to close out
     *        {@link {Proposal}s and {@link Award}s.
     */
    public void setCloseOnOrBeforeDate(Date closeOnOrBeforeDate) {
        this.closeOnOrBeforeDate = closeOnOrBeforeDate;
    }

}


text:
require 'rails/generators'

module SwaggerUiGenerator
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      desc 'Generate Swagger UI API documentation viewer'
      source_root ::File.expand_path('../templates', __FILE__)

      class_option :title, type: :string, aliases: "-t", desc: "Title for the API Docs page", default: "API Docs"
      class_option :api_spec_path, type: :string, aliases: "-p", desc: "Path to Swagger JSON API spec", default: "/swagger/api-docs.json"

      def copy_lib
        @title         = options[:title]
        @api_spec_path = options[:api_spec_path]

        template  "public/api-docs.html.erb",     "public/api-docs.html"
        copy_file "public/swagger/swagger-ui.js", "public/swagger/swagger-ui.js"
        directory "public/swagger"
      end
    end
  end
end


text:
/*
 * Utility file that provides various conversion methods for chaging objects
 * back and forth between C and Java JNI.
 */

#include <stdio.h>
#include <stdlib.h>
#include <pcap.h>
#include <jni.h>

#ifndef WIN32
#include <errno.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <unistd.h>
#endif /*WIN32*/

#include "nio_jmemory.h"
#include "jnetpcap_utils.h"
#include "jnetpcap_ids.h"
#include "org_jnetpcap_nio_JMemory.h"
#include "export.h"

/****************************************************************
 * **************************************************************
 *
 * NON Java declared native functions. Private scan function
 *
 * **************************************************************
 ****************************************************************/

/****************************************************************
 * **************************************************************
 *
 * Java declared native functions for jMemory class
 *
 * **************************************************************
 ****************************************************************/

jclass jmemoryClass = 0;
jclass jmemoryPoolClass = 0;
jclass jmemoryRefClass = 0;

jmethodID jmemoryToDebugStringMID = 0;
jmethodID jmemoryMaxDirectMemoryBreachMID = 0;
jmethodID jmemorySoftDirectMemoryBreachMID = 0;
jmethodID jmemoryCleanupMID = 0;
jmethodID jmemoryPeer0MID = 0;
jmethodID jmemoryAllocateMID = 0;
jmethodID jmemorySetSize0MID = 0;

jfieldID jmemoryPhysicalFID = 0;
jfieldID jmemoryRefAddressFID = 0;
jfieldID jmemorySizeFID = 0;
jfieldID jmemoryOwnerFID = 0;
jfieldID jmemoryKeeperFID = 0;
jfieldID jmemoryPOINTERFID = 0;
jfieldID jmemoryRefFID = 0;

jobject jmemoryPOINTER_CONST;

jmethodID jmemoryPoolAllocateExclusiveMID = 0;
jmethodID jmemoryPoolDefaultMemoryPoolMID = 0;
jmethodID jmemoryCreateReferenceMID = 0;

jobject defaultMemoryPool = NULL;

/*
 * Global memory usage statistics for jmemory class
 */
memory_usage_t memory_usage;

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    initIDs
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemory_initIDs
(JNIEnv *env, jclass clazz) {

	memset(&memory_usage, 0, sizeof(memory_usage_t));

	jclass c;

	if ( (jmemoryClass = c = findClass(env, "org/jnetpcap/nio/JMemory")) == NULL) {
		throwException(env, CLASS_NOT_FOUND_EXCEPTION,
				"Unable to initialize class org.jnetpcap.JMemory");
		return;
	}

	if ( ( jmemoryPhysicalFID = env->GetFieldID(c, "physical", "J")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.physical:long");
		return;
	}

	if ( ( jmemorySizeFID = env->GetFieldID(c, "size", "I")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.size:int");
		return;
	}

	if ( ( jmemoryOwnerFID = env->GetFieldID(c, "owner", "Z")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.owner:boolean");
		return;
	}

	if ( ( jmemoryKeeperFID = env->GetFieldID(c, "keeper", "Ljava/lang/Object;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.keeper:Object");
		return;
	}

	if ( ( jmemoryRefFID = env->GetFieldID(c, "ref", "Lorg/jnetpcap/nio/JMemoryReference;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.ref:JMemoryReference");
		fprintf(stderr, "Unable to initialize field JMemory.ref");
		return;
	}

	if ( ( jmemoryCleanupMID = env->GetMethodID(c, "cleanup", "()V")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.cleanup()");
		fprintf(stderr, "Unable to initialize method JMemory.cleanup()");
		return;
	}

	if ( ( jmemoryAllocateMID = env->GetMethodID(c, "allocate", "(I)J")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.allocate()");
		fprintf(stderr, "Unable to initialize method JMemory.allocate()");
		return;
	}

	if ( ( jmemoryPeer0MID = env->GetMethodID(c, "peer0", "(JILjava/lang/Object;)I")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.peer0()");
		fprintf(stderr, "Unable to initialize method JMemory.peer0()");
		return;
	}

	if ( ( jmemoryCreateReferenceMID = env->GetMethodID(c, "createReference", "(JJ)Lorg/jnetpcap/nio/JMemoryReference;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.createReference()");
		fprintf(stderr, "Unable to initialize method JMemory.createReference()");
		return;
	}

	if ( ( jmemorySetSize0MID = env->GetMethodID(c, "setSize0", "(I)V")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.setSize()");
		fprintf(stderr, "Unable to initialize method JMemory.setSize()");
		return;
	}

	if ( ( jmemoryMaxDirectMemoryBreachMID = env->GetStaticMethodID(c, "maxDirectMemoryBreached", "()V")) == NULL) {
		throwException(env, NO_SUCH_METHOD_EXCEPTION,
				"Unable to initialize method JMemory.maxDirectMemoryBreached()");
		fprintf(stderr, "Unable to initialize method JMemory.maxDirectMemoryBreached()");
		return;
	}
	if ( ( jmemorySoftDirectMemoryBreachMID = env->GetStaticMethodID(c, "softDirectMemoryBreached", "()V")) == NULL) {
		throwException(env, NO_SUCH_METHOD_EXCEPTION,
				"Unable to initialize method JMemory.softDirectMemoryBreached()");
		fprintf(stderr, "Unable to initialize method JMemory.softDirectMemoryBreached()");
		return;
	}

	if ( ( jmemoryToDebugStringMID = env->GetMethodID(c, "toDebugString", "()Ljava/lang/String;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemory.toDebugString():String");
		fprintf(stderr, "Unable to initialize method JMemory.toDebugString():String");
		return;
	}

	jclass typeClass;
	if ( (typeClass = findClass(env, "org/jnetpcap/nio/JMemory$Type")) == NULL) {
		throwException(env, CLASS_NOT_FOUND_EXCEPTION,
				"Unable to find class JMemory.Type");
		fprintf(stderr, "Unable to find class JMemory.Type");
		return;
	}

	if ( ( jmemoryPOINTERFID = env->GetStaticFieldID(
							typeClass, "POINTER",
							"Lorg/jnetpcap/nio/JMemory$Type;")) == NULL) {

		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemory.Type.POINTER:JMemory.Type");
		fprintf(stderr, "Unable to initialize field JMemory.Type.POINTER:JMemory.Type");
		return;
	}

	jmemoryPOINTER_CONST = env->NewGlobalRef(
			env->GetStaticObjectField(typeClass, jmemoryPOINTERFID));

	if ( (jmemoryPoolClass = c = findClass(env, "org/jnetpcap/nio/JMemoryPool")) == NULL) {
		throwException(env, CLASS_NOT_FOUND_EXCEPTION,
				"Unable to initialize class org.jnetpcap.JMemoryPool");
		return;
	}

	if ( ( jmemoryPoolAllocateExclusiveMID = env->GetMethodID(c, "allocateExclusive", "(I)Lorg/jnetpcap/nio/JMemory;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemoryPool.allocateExlusive():JMemory");
		fprintf(stderr, "Unable to initialize method JMemoryPool.allocateExlusive():JMemory");
		return;
	}

	if ( ( jmemoryPoolDefaultMemoryPoolMID = env->GetStaticMethodID(c, "defaultMemoryPool", "()Lorg/jnetpcap/nio/JMemoryPool;")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize method JMemoryPool.defaultMemoryPool():JMemoryPool");
		fprintf(stderr, "Unable to initialize method JMemoryPool.defaultMemoryPool():JMemoryPool");
		return;
	}

	if ( (jmemoryRefClass = c = findClass(env, "org/jnetpcap/nio/JMemoryReference")) == NULL) {
		throwException(env, CLASS_NOT_FOUND_EXCEPTION,
				"Unable to initialize class org.jnetpcap.nio.JMemoryReference");
		fprintf(stderr, "Unable to initialize class org.jnetpcap.nio.JMemoryReference");
		return;
	}

	if ( ( jmemoryRefAddressFID = env->GetFieldID(c, "address", "J")) == NULL) {
		throwException(env, NO_SUCH_FIELD_EXCEPTION,
				"Unable to initialize field JMemoryReference.address:long");
		return;
	}

#ifdef DEBUG
	printf("initIds() - SUCCESS");
#endif

	/*
	 * Now initialize some jmemory state that is needed for global memory allocation
	 */
	init_jmemory(env);
}

void init_jmemory(JNIEnv *env) {

	defaultMemoryPool = env->CallStaticObjectMethod(jmemoryPoolClass, jmemoryPoolDefaultMemoryPoolMID);

	if (defaultMemoryPool == NULL) {
		fprintf(stderr, "unable to get default memory pool\n");
		fflush(stderr);
	}
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    allocate0
 * Signature: (I)J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_allocate0
  (JNIEnv *env, jclass clazz, jint size) {

#ifdef DEBUG
	printf("\n%p JMemory_allocate0() ENTER\n", env); fflush(stdout);
#endif
	if (memory_usage.available_direct < size) {
		/*
		 * Try to free up memory - blocking
		 */

		env->CallStaticVoidMethod(jmemoryClass, jmemoryMaxDirectMemoryBreachMID);

		if (memory_usage.available_direct < size) {
			throwException(env, OUT_OF_MEMORY_ERROR, "");
			return 0L;
		}
	} else if (memory_usage.reserved_direct > memory_usage.soft_direct) {
		/*
		 * Try to free up memory - non-blocking
		 * Also can only be invoked consecutively after a certain amount of time
		 */
		env->CallStaticVoidMethod(jmemoryClass, jmemorySoftDirectMemoryBreachMID);
	}

	memory_usage.available_direct -= size;
	memory_usage.reserved_direct += size;

#ifdef DEBUG
	printf("%p JMemory_allocate0() malloc size=%d\n", env, size); fflush(stdout);
#endif
	void *mem = malloc(size);
	if (mem == NULL) {
//		printf("%p EXCEPTION mem==NULL\n", env); fflush(stdout);
		throwException(env, OUT_OF_MEMORY_ERROR, "");
		return 0L;
	}

#ifdef DEBUG
	printf("%p jmemoryAllocate() usage\n", env); fflush(stdout);
#endif
	memory_usage.total_allocated += size;
	memory_usage.total_allocate_calls ++;

	if (size <= 255) {
		memory_usage.seg_0_255_bytes ++;
	} else {
		memory_usage.seg_256_or_above_bytes ++;
	}
#ifdef DEBUG
	printf("%p jmemoryAllocate() EXIT\n", env); fflush(stdout);
#endif
	return (jlong) toLong(mem);
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    availableDirectMemory
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_availableDirectMemory
  (JNIEnv *env, jclass clazz) {
	return (jlong) memory_usage.available_direct;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    reservedDirectMemory
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_reservedDirectMemory
  (JNIEnv *env, jclass clazz) {
	return (jlong) memory_usage.reserved_direct;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    setMaxDirectMemorySize
 * Signature: (J)V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemory_setMaxDirectMemorySize
  (JNIEnv *env, jclass clazz, jlong size) {

	int64_t delta = ((int64_t)size - (int64_t)memory_usage.max_direct);
	memory_usage.max_direct = size;
	memory_usage.available_direct += delta;

}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    setSoftDirectMemorySize
 * Signature: (J)V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemory_setSoftDirectMemorySize
  (JNIEnv *env, jclass clazz, jlong size) {

	memory_usage.soft_direct = size;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalAllocateCalls
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalAllocateCalls(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.total_allocate_calls;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalAllocated
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalAllocated(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.total_allocated;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalAllocatedSegments0To255Bytes
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalAllocatedSegments0To255Bytes(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.seg_0_255_bytes;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalAllocatedSegments256OrAbove
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalAllocatedSegments256OrAbove(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.seg_256_or_above_bytes;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalDeAllocateCalls
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalDeAllocateCalls(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.total_deallocate_calls;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    totalDeAllocated
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_jnetpcap_nio_JMemory_totalDeAllocated(
		JNIEnv *obj, jclass clazz) {
	return (jlong) memory_usage.total_deallocated;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    allocate
 * Signature: (I)V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemory_allocate
(JNIEnv *env, jobject obj, jint jsize) {

	jmemoryAllocate(env, (size_t) jsize, obj);
}

/*
 * Class:     org_jnetpcap_nio_JMemoryReference
 * Method:    disposeNative0
 * Signature: (JJ)V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemoryReference_disposeNative0
(JNIEnv *env, jobject obj, jlong address, jlong size) {

	void * ptr = toPtr(address);

	if (ptr != NULL) {
		memory_usage.total_deallocated += size;
		memory_usage.total_deallocate_calls ++;
		memory_usage.available_direct += size;
		memory_usage.reserved_direct -= size;

		free(ptr);
	}
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    cleanup
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_org_jnetpcap_nio_JMemory_cleanup
(JNIEnv *env, jobject obj) {

	jmemoryCleanup(env, obj);
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    nativePeer
 * Signature: (Ljava/nio/ByteBuffer;)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_peer(JNIEnv *env,
		jobject obj, jobject jbytebuffer) {

	if (jbytebuffer == NULL || byteBufferIsDirectMID == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	if (env->CallBooleanMethod(jbytebuffer, byteBufferIsDirectMID) == JNI_FALSE) {
		throwException(env, ILLEGAL_ARGUMENT_EXCEPTION,
				"Can only peer with direct ByteBuffer objects");
		return -1;
	}

	void *mem = getJMemoryPhysical(env, obj);
	if (mem != NULL) {
		Java_org_jnetpcap_nio_JMemory_cleanup(env, obj);
	}

	jint position = env->CallIntMethod(jbytebuffer, bufferGetPositionMID);
	jint limit = env->CallIntMethod(jbytebuffer, bufferGetLimitMID);

	char *b = (char *) env->GetDirectBufferAddress(jbytebuffer);
	setJMemoryPhysical(env, obj, toLong(b + position));

	env->SetIntField(obj, jmemorySizeFID, (jint)(limit - position));
	env->SetObjectField(obj, jmemoryKeeperFID, jbytebuffer);
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    transferFrom
 * Signature: ([BIII)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_transferFrom___3BIII(
		JNIEnv *env, jobject obj, jbyteArray sa, jint soffset, jint len,
		jint doffset) {

	jbyte *src = (jbyte *) getJMemoryPhysical(env, obj);
	if (src == NULL || sa == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	env->GetByteArrayRegion(sa, soffset, len, (src + doffset));

	return len;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    transferFromDirect
 * Signature: (Ljava/nio/ByteBuffer;I)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_transferFromDirect(
		JNIEnv *env, jobject obj, jobject jbytebuffer, jint offset) {

	char *dst = (char *) getJMemoryPhysical(env, obj);
	if (dst == NULL || jbytebuffer == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	jint position = env->CallIntMethod(jbytebuffer, bufferGetPositionMID);
	jint limit = env->CallIntMethod(jbytebuffer, bufferGetLimitMID);
	jsize len = limit - position;

	size_t size = env->GetIntField(obj, jmemorySizeFID);

#ifdef DEBUG
	printf("JMemory.transferFrom(ByteBuffer): position=%d limit=%d len=%d\n",
			position, limit, len);
	fflush(stdout);
#endif

	if (size < len) {
		throwVoidException(env, BUFFER_UNDERFLOW_EXCEPTION);
		return -1;
	}

	char *b = (char *) env->GetDirectBufferAddress(jbytebuffer);

	memcpy((void *) (dst + offset), b + position, len);

	env->CallObjectMethod(jbytebuffer, bufferSetPositionMID, position + len);

	return len;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    transferTo0
 * Signature: (J[BIII)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_transferTo0
(JNIEnv *env, jclass clazz, jlong address, jbyteArray da, jint soffset, jint len,
		jint doffset) {

	jbyte *src = (jbyte *)toPtr(address);

	env->SetByteArrayRegion(da, doffset, len, (src + soffset));

	return len;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    transferTo
 * Signature: (Lorg/jnetpcap/JMemory;III)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_transferTo__Lorg_jnetpcap_nio_JMemory_2III(
		JNIEnv *env, jobject obj, jobject jdst, jint jsrcOffset, jint jlen,
		jint jdstOffset) {

	char *src = (char *) getJMemoryPhysical(env, obj);
	if (src == NULL || jdst == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	char *dst = (char *) getJMemoryPhysical(env, jdst);
	if (dst == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	size_t srcLen = env->GetIntField(obj, jmemorySizeFID);
	size_t dstLen = env->GetIntField(jdst, jmemorySizeFID);

	if (jsrcOffset < 0 || jdstOffset < 0 || jsrcOffset + jlen > srcLen
			|| jdstOffset + jlen > dstLen) {

		throwException(env, INDEX_OUT_OF_BOUNDS_EXCEPTION, "");
		return -1;
	}

	jlen = (dstLen < jlen) ? dstLen : jlen;

//	printf("\nJMemory_2III() dst=%p off=%d src=%p off=%d len=%d",
//			dst, jdstOffset,
//			src, jsrcOffset,
//			jlen);
//	fflush(stdout);

	memcpy((void *) (dst + jdstOffset), (void *) (src + jsrcOffset), jlen);

	return jlen;
}

/*
 * Class:     org_jnetpcap_nio_JMemory
 * Method:    transferToDirect
 * Signature: (Ljava/nio/ByteBuffer;II)I
 */
JNIEXPORT jint JNICALL Java_org_jnetpcap_nio_JMemory_transferToDirect__Ljava_nio_ByteBuffer_2II(
		JNIEnv *env, jobject obj, jobject jbytebuffer, jint jsrcOffset,
		jint len) {

	char *src = (char *) getJMemoryPhysical(env, obj);
	if (src == NULL || jbytebuffer == NULL) {
		throwException(env, NULL_PTR_EXCEPTION, "");
		return -1;
	}

	//	jint capacity = env->CallIntMethod(jbytebuffer, bufferGetCapacityMID);
	jint limit = env->CallIntMethod(jbytebuffer, bufferGetLimitMID);
	jint position = env->CallIntMethod(jbytebuffer, bufferGetPositionMID);
	jsize dstLen = limit - position;
	size_t srcLen = env->GetIntField(obj, jmemorySizeFID);

	if (jsrcOffset < 0 || (jsrcOffset + len) > srcLen) {
		throwVoidException(env, BUFFER_UNDERFLOW_EXCEPTION);

		return -1;
	}

	if (dstLen < len) {
		throwVoidException(env, BUFFER_OVERFLOW_EXCEPTION);
		return -1;
	}

	char *b = (char *) env->GetDirectBufferAddress(jbytebuffer);

	memcpy(b + position, (void *) (src + jsrcOffset), len);
#ifdef DEBUG
	printf("JMemory.transferTo(ByteBuffer): position=%d limit=%d len=%d\n",
			position, limit, len);
#endif

	env->CallObjectMethod(jbytebuffer, bufferSetPositionMID, position + len);

	return len;
}

void *getJMemoryPhysical(JNIEnv *env, jobject obj) {

	jlong pt = env->GetLongField(obj, jmemoryPhysicalFID);
	return toPtr(pt);
}

void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value) {
	/*
	 * Make sure we clean up any previous allocations before we set new ptr
	 * and loose track of the old memory. In essence, this call in this function
	 * makes all JMemory.peer functions call JMemory.cleanup ;)
	 */
	jmemoryCleanup(env, obj);

	env->SetLongField(obj, jmemoryPhysicalFID, value);

//	printf("setJMemoryPhysical() obj=%p mem=%p\n", obj, toPtr(value));fflush(stdout);
//	char buf[1024];
//	printf("%s\n", jmemoryToDebugString(env, obj, buf));
}

/**
 * Function calls on the java JMemory.createReference method and passes it the
 * address of this jmemory native pointer (usually memory pointer). The java
 * method may be overriden or returns the default new instance of
 * JMemoryReference object. The function is marked static to prevent anyone else
 * outside of nio_jmemory method using it. It would be very dangerous to try
 * and create new JMemoryReference objects outside. This should only be done
 * from jmemoryAllocate and from transferOwnership methods.
 */
static jobject jmemoryCreateReference(JNIEnv *env, jobject obj, void *address, size_t size) {
	return env->CallObjectMethod(
			obj,
			jmemoryCreateReferenceMID,
			toLong(address),
			(jlong)size);
}

char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf) {
	jstring jstr = (jstring) env->CallObjectMethod(obj, jmemoryToDebugStringMID);
	if (jstr == NULL) {
		return (char *)"ERROR in jmemoryToDebugString";
	}

	int len = env->GetStringUTFLength(jstr);
	const char *str = env->GetStringUTFChars(jstr, NULL);
	buf[len] = '\0';
	strncpy(buf, str, len);
	env->ReleaseStringUTFChars(jstr, str);

	return buf;
}

void jmemoryCleanup(JNIEnv *env, jobject obj) {
	env->CallVoidMethod(obj, jmemoryCleanupMID);
}

/**
 * Change the size of the peered object. The physicalSize remains unchanged.
 */
void jmemoryResize(JNIEnv *env, jobject obj, size_t size) {
	env->CallVoidMethod(obj, jmemorySetSize0MID, (jint) size);
}

/**
 * Provides a flexible peer method that can be called from JNI code
 */
jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length,
		jobject owner) {

	return env->CallIntMethod(obj, jmemoryPeer0MID,
			(jlong) toLong((void *) ptr), (jint) length, owner);
}

/**
 * Allocates a memory block that is JMemory managed. The memory is allocated
 * under the control of the global memory pool (a java object).
 *
 * @param env
 * 	   java environment
 * @param size
 *     amount of memory to allocate in bytes
 * @param obj_ref
 *     a pointer to where store the JMemory object reference that owns the
 *     allocated memory block
 */
char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref) {

	*obj_ref = env->CallObjectMethod(jmemoryPoolClass, jmemoryPoolAllocateExclusiveMID, (jint) size);

	return (char *) getJMemoryPhysical(env, *obj_ref);
}

/**
 * Allocates a single memory block for the java obj as its owner.
 *
 * @param env
 * 	   java environment
 * @param size
 *     amount of memory to allocate in bytes
 * @param obj
 *     obj under which to allocate the memory
 */
char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj) {
	return (char *)toPtr(env->CallLongMethod(obj, jmemoryAllocateMID, size));
}


text:
namespace Slash.Unity.Editor.Common.Utils
{
    using System.Collections;
    using System.IO;
    using System.Reflection;

    using UnityEditor;

    using UnityEditorInternal;
#if UNITY_2018_1_OR_NEWER
    using ProfilerColumn = UnityEditorInternal.Profiling.ProfilerColumn;
    using ProfilerViewType = UnityEditorInternal.Profiling.ProfilerViewType;
#endif

    public class ProfilerUtil
    {
        private const string HtmlOutputPath = "profiler.html";

        [MenuItem("Slash/Profiler/Dump selected profiler frame to HTML")]
        public static void DumpProfilerFrame()
        {
            var property = new ProfilerProperty();
            property.SetRoot(GetSelectedFrame(), ProfilerColumn.TotalPercent, ProfilerViewType.Hierarchy);
            property.onlyShowGPUSamples = false;

            if (File.Exists(HtmlOutputPath))
            {
                File.Delete(HtmlOutputPath);
            }
            var stream = File.OpenWrite(HtmlOutputPath);
            var writer = new StreamWriter(stream);

            writer.WriteLine(@"

<title>Unity Profiler Data</title>

Path	Total	Self	Calls	GC Alloc	Total ms	Self ms

");

            while (property.Next(true))
            {
                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.FunctionName));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.TotalPercent));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.SelfPercent));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.Calls));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.GCMemory));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.TotalTime));
                writer.Write("	");

                writer.Write("");
                writer.Write(property.GetColumn(ProfilerColumn.SelfTime));
                writer.Write("	");

                writer.WriteLine("
");
            }

            writer.WriteLine(@"

");

            writer.Close();
        }

        private static int GetSelectedFrame()
        {
            var editorAssembly = Assembly.GetAssembly(typeof(EditorApplication));
            var profilerWindowType = editorAssembly.GetType("UnityEditor.ProfilerWindow");
            var profilerWindowsField = profilerWindowType.GetField("m_ProfilerWindows",
                BindingFlags.NonPublic | BindingFlags.Static);
            var firstProfilerWindow = ((IList) profilerWindowsField.GetValue(null))[0];
            var getFrameMethod = profilerWindowType.GetMethod("GetActiveVisibleFrameIndex");
            return (int) getFrameMethod.Invoke(firstProfilerWindow, null);
        }
    }
}


text:
package com.jessieamorris.httpserver.exceptions;

/**
 * Created by jessie.
 */
public class InternalServerException extends HttpException {
	public InternalServerException(Exception e) {
		this.httpStatusCode = 500;
		this.httpStatusMessage = "Internal Server Error";

		this.httpBody = getStackTraceString(e);
	}

	public static String getStackTraceString(Throwable throwable) {
		String ret = "";
		StackTraceElement[] stack = throwable.getStackTrace();
		for (StackTraceElement s : stack) {
			ret = ret + s.toString() + "\n\t\t";
		}

		return ret;
	}
}


text:
START_ATF_NAMESPACE
    namespace Detail
    {
        Info::_darkhole_real_msg_inform_zoclsize2_ptr _darkhole_real_msg_inform_zoclsize2_next(nullptr);
        Info::_darkhole_real_msg_inform_zoclsize2_clbk _darkhole_real_msg_inform_zoclsize2_user(nullptr);

        int _darkhole_real_msg_inform_zoclsize2_wrapper(struct _darkhole_real_msg_inform_zocl* _this)
        {
           return _darkhole_real_msg_inform_zoclsize2_user(_this, _darkhole_real_msg_inform_zoclsize2_next);
        };

        ::std::array<hook_record, 1> _darkhole_real_msg_inform_zocl_functions =
        {
            _hook_record {
                (LPVOID)0x14026f910L,
                (LPVOID *)&_darkhole_real_msg_inform_zoclsize2_user,
                (LPVOID *)&_darkhole_real_msg_inform_zoclsize2_next,
                (LPVOID)cast_pointer_function(_darkhole_real_msg_inform_zoclsize2_wrapper),
                (LPVOID)cast_pointer_function((int(_darkhole_real_msg_inform_zocl::*)())&_darkhole_real_msg_inform_zocl::size)
            },
        };
    }; // end namespace Detail
END_ATF_NAMESPACE


text:
package org.lielas.dataloggerstudio.pc;

import java.awt.EventQueue;

import org.lielas.dataloggerstudio.lib.crc.Crc16;
import org.lielas.dataloggerstudio.pc.gui.MainFrame;

public class DataloggerStudio {

	/**
	 *
	 */

	public static void main(String[] args){

		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainFrame frame = new MainFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public DataloggerStudio() {
	}

}