code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
import numpy as np
import pandas as pd
import cgi, urllib, urllib2
import xlrd
import datetime, time
import logging
import StringIO
import pytz
from django.utils import timezone
from acacia import settings
logger = logging.getLogger(__name__)
from generator import Generator
from acacia.data import __version__
class... | [
[
1,
0,
0.0019,
0.0019,
0,
0.66,
0,
954,
0,
1,
0,
0,
954,
0,
0
],
[
1,
0,
0.0037,
0.0019,
0,
0.66,
0.0256,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0056,
0.0019,
0,
... | [
"import numpy as np",
"import pandas as pd",
"import cgi, urllib, urllib2",
"import xlrd",
"import datetime, time",
"import logging",
"import StringIO",
"import pytz",
"from django.utils import timezone",
"from acacia import settings",
"logger = logging.getLogger(__name__)",
"from generator im... |
import logging
import numpy as np
import datetime
logger = logging.getLogger(__name__)
from generator import Generator
def date_parser(dt):
''' date parser for pandas read_csv '''
return np.array([datetime.datetime.strptime(t,'%Y-%m-%d %H:%M:%S') for t in dt if t is not None])
class NMCPro(Generator):
... | [
[
1,
0,
0.0175,
0.0175,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0351,
0.0175,
0,
0.66,
0.125,
954,
0,
1,
0,
0,
954,
0,
0
],
[
1,
0,
0.0526,
0.0175,
0,
0... | [
"import logging",
"import numpy as np",
"import datetime",
"logger = logging.getLogger(__name__)",
"from generator import Generator",
"def date_parser(dt):\n ''' date parser for pandas read_csv '''\n return np.array([datetime.datetime.strptime(t,'%Y-%m-%d %H:%M:%S') for t in dt if t is not None])",
... |
import logging
logger = logging.getLogger(__name__)
from generator import Generator
COL_LOOKUP = {'L': 'Watermeter Bron1 Uit 1 [0.1 m3]', 'M': 'Watermeter Bron1 Uit 2 [0.1 m3]', 'N': 'Watermeter Bron1 Uit 3 [0.1 m3]', 'O': 'Watermeter Bron1 Uit 4 [0.1 m3]',
'P': 'Watermeter Bron2 Uit 1 [0.1 m3]', 'Q': ... | [
[
1,
0,
0.0227,
0.0227,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
14,
0,
0.0455,
0.0227,
0,
0.66,
0.2,
532,
3,
1,
0,
0,
71,
10,
1
],
[
1,
0,
0.0909,
0.0227,
0,
0.... | [
"import logging",
"logger = logging.getLogger(__name__)",
"from generator import Generator",
"COL_LOOKUP = {'L': 'Watermeter Bron1 Uit 1 [0.1 m3]', 'M': 'Watermeter Bron1 Uit 2 [0.1 m3]', 'N': 'Watermeter Bron1 Uit 3 [0.1 m3]', 'O': 'Watermeter Bron1 Uit 4 [0.1 m3]',\n 'P': 'Watermeter Bron2 Uit... |
'''
Created on Jan 29, 2013
@author: theo
'''
#from ...data.util import find_files
import zipfile,os,fnmatch
import logging
from acacia.data.generators.generator import Generator
logger = logging.getLogger(__name__)
def find_files(pattern, root=os.curdir):
for path, dirs, files in os.walk(os.path.... | [
[
8,
0,
0.016,
0.0266,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0372,
0.0053,
0,
0.66,
0.125,
93,
0,
3,
0,
0,
93,
0,
0
],
[
1,
0,
0.0426,
0.0053,
0,
0.66,
... | [
"'''\nCreated on Jan 29, 2013\n\n@author: theo\n'''",
"import zipfile,os,fnmatch",
"import logging",
"from acacia.data.generators.generator import Generator",
"logger = logging.getLogger(__name__)",
"def find_files(pattern, root=os.curdir):\n for path, dirs, files in os.walk(os.path.abspath(root)):\n ... |
'''
Created on Jan 24, 2014
@author: theo
'''
import logging, re, os
import urlparse
import StringIO
import datetime
import numpy as np
logger = logging.getLogger(__name__)
from generator import Generator
#for incremental downloads downlaoded files are saved with unique name and all files are added to the datasourc... | [
[
8,
0,
0.0155,
0.0259,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0311,
0.0052,
0,
0.66,
0.0833,
715,
0,
3,
0,
0,
715,
0,
0
],
[
1,
0,
0.0363,
0.0052,
0,
0.66... | [
"'''\nCreated on Jan 24, 2014\n\n@author: theo\n'''",
"import logging, re, os",
"import urlparse",
"import StringIO",
"import datetime",
"import numpy as np",
"logger = logging.getLogger(__name__)",
"from generator import Generator",
"INCREMENTAL_DOWNLOAD = False",
"class Meteo(Generator):\n ''... |
from __future__ import absolute_import
from celery.utils.log import get_task_logger
from celery import shared_task, current_task
from django.shortcuts import get_object_or_404
logger = get_task_logger(__name__)
from .models import MeetLocatie, Series, Datasource
from acacia.management.commands import update
@shared_ta... | [
[
1,
0,
0.0175,
0.0175,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0351,
0.0175,
0,
0.66,
0.0714,
161,
0,
1,
0,
0,
161,
0,
0
],
[
1,
0,
0.0526,
0.0175,
0,
... | [
"from __future__ import absolute_import",
"from celery.utils.log import get_task_logger",
"from celery import shared_task, current_task",
"from django.shortcuts import get_object_or_404",
"logger = get_task_logger(__name__)",
"from .models import MeetLocatie, Series, Datasource",
"from acacia.management... |
from .version import __version__ | [
[
1,
0,
1,
1,
0,
0.66,
0,
623,
0,
1,
0,
0,
623,
0,
0
]
] | [
"from .version import __version__"
] |
from django.views.generic.list import ListView
from django.views.generic import DetailView
from django.views.generic.base import TemplateView
from django.template import RequestContext
from django.template.loader import render_to_string
from django.shortcuts import get_object_or_404, redirect, render, render_to_respons... | [
[
1,
0,
0.0031,
0.0031,
0,
0.66,
0,
818,
0,
1,
0,
0,
818,
0,
0
],
[
1,
0,
0.0063,
0.0031,
0,
0.66,
0.0244,
201,
0,
1,
0,
0,
201,
0,
0
],
[
1,
0,
0.0094,
0.0031,
0,
... | [
"from django.views.generic.list import ListView",
"from django.views.generic import DetailView",
"from django.views.generic.base import TemplateView",
"from django.template import RequestContext",
"from django.template.loader import render_to_string",
"from django.shortcuts import get_object_or_404, redir... |
'''
Created on Jan 23, 2015
@author: theo
'''
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_... | [
[
8,
0,
0.06,
0.1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.12,
0.02,
0,
0.66,
0.1667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.16,
0.02,
0,
0.66,
0.3333,... | [
"'''\nCreated on Jan 23, 2015\n\n@author: theo\n'''",
"import re",
"from django.utils.text import compress_string",
"from django.utils.cache import patch_vary_headers",
"from django import http",
"try:\n import settings \n XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS\n XS_SHAR... |
'''
Created on Feb 26, 2014
@author: theo
'''
from knmi.models import NeerslagStation, Station
from .models import Datasource, Generator
import math
def distance(obj, pnt):
dx = obj.location.x - pnt.x
dy = obj.location.y - pnt.y
return math.sqrt(dx*dx+dy*dy)
def closest_object(query,target):
closest ... | [
[
8,
0,
0.0395,
0.0658,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0789,
0.0132,
0,
0.66,
0.1667,
288,
0,
2,
0,
0,
288,
0,
0
],
[
1,
0,
0.0921,
0.0132,
0,
0.66... | [
"'''\nCreated on Feb 26, 2014\n\n@author: theo\n'''",
"from knmi.models import NeerslagStation, Station",
"from .models import Datasource, Generator",
"import math",
"def distance(obj, pnt):\n dx = obj.location.x - pnt.x\n dy = obj.location.y - pnt.y\n return math.sqrt(dx*dx+dy*dy)",
" dx = ob... |
'''
Created on Jan 28, 2015
@author: theo
'''
import logging
from acacia.data.models import Datasource
class AutoFlushLoggingAdapter(logging.LoggerAdapter):
def flush(self):
''' call flush() on all handlers '''
if self.logger is not None:
for h in self.logger.handlers:
... | [
[
8,
0,
0.0455,
0.0758,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0909,
0.0152,
0,
0.66,
0.2,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.1061,
0.0152,
0,
0.66,
... | [
"'''\nCreated on Jan 28, 2015\n\n@author: theo\n'''",
"import logging",
"from acacia.data.models import Datasource",
"class AutoFlushLoggingAdapter(logging.LoggerAdapter):\n\n def flush(self):\n ''' call flush() on all handlers '''\n if self.logger is not None:\n for h in self.logg... |
import os
from acacia.data.models import Project, ProjectLocatie, MeetLocatie, Datasource, SourceFile, Generator
from acacia.data.models import Parameter, Series, DataPoint, Chart, ChartSeries, Dashboard, DashboardChart, TabGroup, TabPage
from acacia.data.models import Variable, Formula, Webcam, Notification
from djan... | [
[
1,
0,
0.0028,
0.0028,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0057,
0.0028,
0,
0.66,
0.0167,
686,
0,
6,
0,
0,
686,
0,
0
],
[
1,
0,
0.0085,
0.0028,
0,
... | [
"import os",
"from acacia.data.models import Project, ProjectLocatie, MeetLocatie, Datasource, SourceFile, Generator",
"from acacia.data.models import Parameter, Series, DataPoint, Chart, ChartSeries, Dashboard, DashboardChart, TabGroup, TabPage",
"from acacia.data.models import Variable, Formula, Webcam, Not... |
'''
Created on Jun 1, 2014
@author: theo
'''
import os, pandas as pd, numpy as np
from django.db import models
from django.contrib.gis.db import models as geo
from django.core.urlresolvers import reverse
from acacia.data.models import Datasource, Series, SourceFile
from acacia.data import util
class Network(models.Mo... | [
[
8,
0,
0.0105,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.021,
0.0035,
0,
0.66,
0.0625,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.0245,
0.0035,
0,
0.66,... | [
"'''\nCreated on Jun 1, 2014\n\n@author: theo\n'''",
"import os, pandas as pd, numpy as np",
"from django.db import models",
"from django.contrib.gis.db import models as geo",
"from django.core.urlresolvers import reverse",
"from acacia.data.models import Datasource, Series, SourceFile",
"from acacia.da... |
from django.test import TestCase
# Create your tests here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
944,
0,
1,
0,
0,
944,
0,
0
]
] | [
"from django.test import TestCase"
] |
from django.conf.urls import patterns, url
from .views import NetworkView, WellView, ScreenView, WellChartView
urlpatterns = patterns('acacia.meetnet.views',
url(r'^$', NetworkView.as_view(), name='home'),
url(r'^(?P<pk>\d+)$', NetworkView.as_view(), name='network-detail'),
url(r'^well/(?P<pk>\d+)$', WellV... | [
[
1,
0,
0.0909,
0.0909,
0,
0.66,
0,
528,
0,
2,
0,
0,
528,
0,
0
],
[
1,
0,
0.1818,
0.0909,
0,
0.66,
0.5,
547,
0,
4,
0,
0,
547,
0,
0
],
[
14,
0,
0.6818,
0.7273,
0,
0.... | [
"from django.conf.urls import patterns, url",
"from .views import NetworkView, WellView, ScreenView, WellChartView",
"urlpatterns = patterns('acacia.meetnet.views',\n url(r'^$', NetworkView.as_view(), name='home'),\n url(r'^(?P<pk>\\d+)$', NetworkView.as_view(), name='network-detail'),\n url(r'^well/(?... |
'''
Created on Jun 3, 2014
@author: theo
'''
from .models import Well, Screen
import logging
import matplotlib.pyplot as plt
from matplotlib import rcParams
from StringIO import StringIO
rcParams['font.family'] = 'sans-serif'
rcParams['font.size'] = '8'
logger = logging.getLogger(__name__)
def chart_for_screen(scre... | [
[
8,
0,
0.0429,
0.0714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0857,
0.0143,
0,
0.66,
0.0769,
495,
0,
2,
0,
0,
495,
0,
0
],
[
1,
0,
0.1,
0.0143,
0,
0.66,
... | [
"'''\nCreated on Jun 3, 2014\n\n@author: theo\n'''",
"from .models import Well, Screen",
"import logging",
"import matplotlib.pyplot as plt",
"from matplotlib import rcParams",
"from StringIO import StringIO",
"rcParams['font.family'] = 'sans-serif'",
"rcParams['font.size'] = '8'",
"logger = logging... |
'''
Created on Jul 8, 2014
@author: theo
'''
import os
from django.utils.text import slugify
from .util import make_chart
def make_wellcharts(modeladmin, request, queryset):
for w in queryset:
if not w.has_data():
continue
if w.chart.name is None:
w.chart.name = os.path.jo... | [
[
8,
0,
0.075,
0.125,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.15,
0.025,
0,
0.66,
0.1429,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.175,
0.025,
0,
0.66,
0... | [
"'''\nCreated on Jul 8, 2014\n\n@author: theo\n'''",
"import os",
"from django.utils.text import slugify",
"from .util import make_chart",
"def make_wellcharts(modeladmin, request, queryset):\n for w in queryset:\n if not w.has_data():\n continue\n if w.chart.name is None:\n ... |
'''
Created on Feb 13, 2014
@author: theo
'''
import datetime
from optparse import make_option
from django.core.management.base import BaseCommand
from ...models import Network, Well
#from ...dino import Dino
from acacia.data.generators.dino import Dino
from django.contrib.gis.geos import Point
def parsenum(text,num=... | [
[
8,
0,
0.038,
0.0633,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0759,
0.0127,
0,
0.66,
0.125,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0886,
0.0127,
0,
0.66,
... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"import datetime",
"from optparse import make_option",
"from django.core.management.base import BaseCommand",
"from ...models import Network, Well",
"from acacia.data.generators.dino import Dino",
"from django.contrib.gis.geos import Point",
"def p... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Network.bound'
db.add_column(u'meetnet_network', 'bound',... | [
[
1,
0,
0.0076,
0.0038,
0,
0.66,
0,
46,
0,
1,
0,
0,
46,
0,
0
],
[
1,
0,
0.0114,
0.0038,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0152,
0.0038,
0,
0.66... | [
"from south.utils import datetime_utils as datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding field 'Network.bound'\n db.add_column(u'meetnet_network', 'boun... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Network.bound'
db.alter_column(u'meetnet_network', 'bo... | [
[
1,
0,
0.0077,
0.0038,
0,
0.66,
0,
46,
0,
1,
0,
0,
46,
0,
0
],
[
1,
0,
0.0115,
0.0038,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0153,
0.0038,
0,
0.66... | [
"from south.utils import datetime_utils as datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n\n # Changing field 'Network.bound'\n db.alter_column(u'meetnet_network',... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Network.homepage'
db.add_column(u'meetnet_network', 'home... | [
[
1,
0,
0.0076,
0.0038,
0,
0.66,
0,
46,
0,
1,
0,
0,
46,
0,
0
],
[
1,
0,
0.0114,
0.0038,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0152,
0.0038,
0,
0.66... | [
"from south.utils import datetime_utils as datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding field 'Network.homepage'\n db.add_column(u'meetnet_network', 'h... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Network'
db.create_table(u'meetnet_network', (
... | [
[
1,
0,
0.0051,
0.0026,
0,
0.66,
0,
46,
0,
1,
0,
0,
46,
0,
0
],
[
1,
0,
0.0077,
0.0026,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0103,
0.0026,
0,
0.66... | [
"from south.utils import datetime_utils as datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'Network'\n db.create_table(u'meetnet_network', (\n ... |
'''
Created on Jun 3, 2014
@author: theo
'''
from django.views.generic import DetailView, TemplateView
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from models import Network, Well, Screen
import json, logging, time
import pandas ... | [
[
8,
0,
0.0179,
0.0298,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0357,
0.006,
0,
0.66,
0.0714,
201,
0,
2,
0,
0,
201,
0,
0
],
[
1,
0,
0.0417,
0.006,
0,
0.66,
... | [
"'''\nCreated on Jun 3, 2014\n\n@author: theo\n'''",
"from django.views.generic import DetailView, TemplateView",
"from django.template.loader import render_to_string",
"from django.http import HttpResponse",
"from django.core.urlresolvers import reverse",
"from models import Network, Well, Screen",
"im... |
'''
Created on Jun 1, 2014
@author: theo
'''
from .models import Network, Well, Photo, Screen, Datalogger, LoggerDatasource
from acacia.data.models import Series
from django.conf import settings
from django.contrib import admin
from django.contrib.gis import admin as geo
USE_GOOGLE_TERRAIN_TILES = False
from django.... | [
[
8,
0,
0.0217,
0.0362,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0435,
0.0072,
0,
0.66,
0.0455,
495,
0,
6,
0,
0,
495,
0,
0
],
[
1,
0,
0.0507,
0.0072,
0,
0.66... | [
"'''\nCreated on Jun 1, 2014\n\n@author: theo\n'''",
"from .models import Network, Well, Photo, Screen, Datalogger, LoggerDatasource",
"from acacia.data.models import Series",
"from django.conf import settings",
"from django.contrib import admin",
"from django.contrib.gis import admin as geo",
"USE_GOOG... |
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'acacia.settings')
app = Celery('acacia')
# Using a string here means the worker will not h... | [
[
1,
0,
0.0476,
0.0476,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1429,
0.0476,
0,
0.66,
0.125,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2381,
0.0476,
0,
0... | [
"from __future__ import absolute_import",
"import os",
"from celery import Celery",
"from django.conf import settings",
"os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'acacia.settings')",
"app = Celery('acacia')",
"app.config_from_object('django.conf:settings')",
"app.autodiscover_tasks(lambda: sett... |
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'acacia.views.home', name='home'),
url(r'^cam/(?P<how>\w+)?$', 'acacia.views.cam', name='c... | [
[
1,
0,
0.0222,
0.0222,
0,
0.66,
0,
528,
0,
3,
0,
0,
528,
0,
0
],
[
1,
0,
0.0444,
0.0222,
0,
0.66,
0.1667,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.0667,
0.0222,
0,
... | [
"from django.conf.urls import patterns, include, url",
"from django.conf.urls.static import static",
"from django.conf import settings",
"from django.contrib import admin",
"admin.autodiscover()",
"urlpatterns = patterns('',\n url(r'^$', 'acacia.views.home', name='home'),\n url(r'^cam/(?P<how>\\w+)?... |
'''
Created on Feb 13, 2014
@author: theo
'''
from django.core.management.base import BaseCommand
from acacia.data.models import SourceFile
class Command(BaseCommand):
args = ''
help = 'Deletes empty sourcefiles'
def handle(self, *args, **options):
files = SourceFile.objects.filter(rows=0)
... | [
[
8,
0,
0.15,
0.25,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3,
0.05,
0,
0.66,
0.3333,
931,
0,
1,
0,
0,
931,
0,
0
],
[
1,
0,
0.35,
0.05,
0,
0.66,
0.6667,... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"from django.core.management.base import BaseCommand",
"from acacia.data.models import SourceFile",
"class Command(BaseCommand):\n args = ''\n help = 'Deletes empty sourcefiles'\n\n def handle(self, *args, **options):\n files = SourceFile.o... |
'''
Created on Feb 13, 2014
@author: theo
'''
from django.core.management.base import BaseCommand
from optparse import make_option
from acacia.data.models import Datasource, Formula
import logging
from acacia.data.loggers import DatasourceAdapter
class Command(BaseCommand):
args = ''
help = 'Downloads data fr... | [
[
8,
0,
0.0203,
0.0338,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0405,
0.0068,
0,
0.66,
0.1667,
931,
0,
1,
0,
0,
931,
0,
0
],
[
1,
0,
0.0473,
0.0068,
0,
0.66... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"from django.core.management.base import BaseCommand",
"from optparse import make_option",
"from acacia.data.models import Datasource, Formula",
"import logging",
"from acacia.data.loggers import DatasourceAdapter",
"class Command(BaseCommand):\n ... |
'''
Created on Feb 13, 2014
@author: theo
'''
import os
from django.core.management.base import BaseCommand, CommandError
from acacia.data.models import Project, ProjectLocatie, MeetLocatie, Datasource, Parameter, Series
from acacia import settings
class Command(BaseCommand):
args = ''
help = 'Deletes unused ... | [
[
8,
0,
0.0857,
0.1429,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1714,
0.0286,
0,
0.66,
0.2,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2,
0.0286,
0,
0.66,
... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"import os",
"from django.core.management.base import BaseCommand, CommandError",
"from acacia.data.models import Project, ProjectLocatie, MeetLocatie, Datasource, Parameter, Series",
"from acacia import settings",
"class Command(BaseCommand):\n arg... |
'''
Created on Feb 13, 2014
@author: theo
'''
from django.core.management.base import BaseCommand
from acacia.data.models import SourceFile
from optparse import make_option
import os
class Command(BaseCommand):
args = ''
help = 'Checks existence of sourcefiles'
option_list = BaseCommand.option_list + (
... | [
[
8,
0,
0.0667,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.2,
931,
0,
1,
0,
0,
931,
0,
0
],
[
1,
0,
0.1556,
0.0222,
0,
0.66,
... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"from django.core.management.base import BaseCommand",
"from acacia.data.models import SourceFile",
"from optparse import make_option",
"import os",
"class Command(BaseCommand):\n args = ''\n help = 'Checks existence of sourcefiles'\n option_l... |
'''
Created on Oct 9, 2014
@author: theo
'''
import os
from django.core.management.base import BaseCommand, CommandError
from acacia.data.models import DataPoint, SourceFile
from acacia import settings
from django.utils import timezone
def make_aware(d,tz=timezone.UTC):
if d is not None:
if timezone.is_n... | [
[
8,
0,
0.0682,
0.1136,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1591,
0.0227,
0,
0.66,
0.125,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1818,
0.0227,
0,
0.66,... | [
"'''\nCreated on Oct 9, 2014\n\n@author: theo\n'''",
"import os",
"from django.core.management.base import BaseCommand, CommandError",
"from acacia.data.models import DataPoint, SourceFile",
"from acacia import settings",
"from django.utils import timezone",
"def make_aware(d,tz=timezone.UTC):\n if d... |
"""
Django settings for acacia project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | [
[
8,
0,
0.0254,
0.0457,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0609,
0.0051,
0,
0.66,
0.027,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.066,
0.0051,
0,
0.66,... | [
"\"\"\"\nDjango settings for acacia project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.dirname(__... |
from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
| [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
1,
0.2,
0,
0.66,
1,
100,
0,
1,
0,
0,
100,
0,
0
]
] | [
"from __future__ import absolute_import",
"from .celery import app as celery_app"
] |
"""
WSGI config for noot project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
import sys
import site
ALLDIRS = ['/home/theo/acaciadata.com/django/lib/python2.7/site-pa... | [
[
8,
0,
0.1154,
0.2051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2564,
0.0256,
0,
0.66,
0.0714,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2821,
0.0256,
0,
0.66... | [
"\"\"\"\nWSGI config for noot project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"import sys",
"import site",
"ALLDIRS = ['/home/theo/acaciad... |
from django.shortcuts import render_to_response, redirect
from django.http import HttpResponse
from django.template import RequestContext
import logging
logger = logging.getLogger(__name__)
def home(request):
return render_to_response('home.html',context_instance=RequestContext(request))
def spaarwater(request):... | [
[
1,
0,
0.0417,
0.0417,
0,
0.66,
0,
852,
0,
2,
0,
0,
852,
0,
0
],
[
1,
0,
0.0833,
0.0417,
0,
0.66,
0.125,
779,
0,
1,
0,
0,
779,
0,
0
],
[
1,
0,
0.125,
0.0417,
0,
0.... | [
"from django.shortcuts import render_to_response, redirect",
"from django.http import HttpResponse",
"from django.template import RequestContext",
"import logging",
"logger = logging.getLogger(__name__)",
"def home(request):\n return render_to_response('home.html',context_instance=RequestContext(reques... |
"""
Django settings for acacia project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | [
[
8,
0,
0.0299,
0.0539,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0719,
0.006,
0,
0.66,
0.0323,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0778,
0.006,
0,
0.66,... | [
"\"\"\"\nDjango settings for acacia project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.dirname(__... |
from django.db import models
# Create your models here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
]
] | [
"from django.db import models"
] |
from django.test import TestCase
# Create your tests here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
944,
0,
1,
0,
0,
944,
0,
0
]
] | [
"from django.test import TestCase"
] |
from django.conf.urls import patterns, url
from .views import SpaarwaterDetailView, DashGroupView
urlpatterns = patterns('',
url(r'^$', SpaarwaterDetailView.as_view(), name='spaarwater-home'),
url(r'^(?P<name>\w+)$', DashGroupView.as_view(), name='spaarwater-dashboard'),
#url(r'^(?P<name>\w+)$', DashView.a... | [
[
1,
0,
0.125,
0.125,
0,
0.66,
0,
528,
0,
2,
0,
0,
528,
0,
0
],
[
1,
0,
0.25,
0.125,
0,
0.66,
0.5,
547,
0,
2,
0,
0,
547,
0,
0
],
[
14,
0,
0.75,
0.625,
0,
0.66,
... | [
"from django.conf.urls import patterns, url",
"from .views import SpaarwaterDetailView, DashGroupView",
"urlpatterns = patterns('',\n url(r'^$', SpaarwaterDetailView.as_view(), name='spaarwater-home'),\n url(r'^(?P<name>\\w+)$', DashGroupView.as_view(), name='spaarwater-dashboard'),\n #url(r'^(?P<name>... |
from django.shortcuts import get_object_or_404
from acacia.data.views import ProjectDetailView
from acacia.data.models import Project, ProjectLocatie, Dashboard, TabGroup
COL_LOOKUP = {'L': 'Watermeter Bron1 Uit 1 [0.1 m3]', 'M': 'Watermeter Bron1 Uit 2 [0.1 m3]', 'N': 'Watermeter Bron1 Uit 3 [0.1 m3]', 'O': 'Watermet... | [
[
1,
0,
0.008,
0.008,
0,
0.66,
0,
852,
0,
1,
0,
0,
852,
0,
0
],
[
1,
0,
0.016,
0.008,
0,
0.66,
0.1111,
227,
0,
1,
0,
0,
227,
0,
0
],
[
1,
0,
0.024,
0.008,
0,
0.66,
... | [
"from django.shortcuts import get_object_or_404",
"from acacia.data.views import ProjectDetailView",
"from acacia.data.models import Project, ProjectLocatie, Dashboard, TabGroup",
"COL_LOOKUP = {'L': 'Watermeter Bron1 Uit 1 [0.1 m3]', 'M': 'Watermeter Bron1 Uit 2 [0.1 m3]', 'N': 'Watermeter Bron1 Uit 3 [0.1 m... |
from django.contrib import admin
# Register your models here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
302,
0,
1,
0,
0,
302,
0,
0
]
] | [
"from django.contrib import admin"
] |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "acacia.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.75,
0.6,
0,
0.66,
1,
0,
... | [
"import os",
"import sys",
"if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"acacia.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)",
" os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"acacia.... |
"""
Django settings for noorderzijlvest project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR,... | [
[
8,
0,
0.0259,
0.0466,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0622,
0.0052,
0,
0.66,
0.0286,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0674,
0.0052,
0,
0.6... | [
"\"\"\"\nDjango settings for noorderzijlvest project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.d... |
'''
Created on Feb 21, 2015
@author: theo
'''
| [
[
8,
0,
0.6,
1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
] | [
"'''\nCreated on Feb 21, 2015\n\n@author: theo\n'''"
] |
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from .views import HomeView
admin.autodiscover()
urlpatterns = patterns('noorderzijlvest.views',
url(r'^$', HomeView.as_view(), name='home'),
url(r'^... | [
[
1,
0,
0.0556,
0.0556,
0,
0.66,
0,
528,
0,
3,
0,
0,
528,
0,
0
],
[
1,
0,
0.1111,
0.0556,
0,
0.66,
0.1667,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.1667,
0.0556,
0,
... | [
"from django.conf.urls import patterns, include, url",
"from django.conf.urls.static import static",
"from django.conf import settings",
"from django.contrib import admin",
"from .views import HomeView",
"admin.autodiscover()",
"urlpatterns = patterns('noorderzijlvest.views',\n url(r'^$', HomeView.as... |
"""
WSGI config for noorderzijlvest project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "noorderzijlvest.settings")
fr... | [
[
8,
0,
0.3214,
0.5714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.7143,
0.0714,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.7857,
0.0714,
0,
0.66,
... | [
"\"\"\"\nWSGI config for noorderzijlvest project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"... |
'''
Created on Feb 21, 2015
@author: theo
'''
from acacia.meetnet.views import NetworkView
from acacia.meetnet.models import Network
class HomeView(NetworkView):
def get_object(self):
return Network.objects.get(name = 'Noorderzijlvest')
| [
[
8,
0,
0.25,
0.4167,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0833,
0,
0.66,
0.3333,
716,
0,
1,
0,
0,
716,
0,
0
],
[
1,
0,
0.5833,
0.0833,
0,
0.66,
... | [
"'''\nCreated on Feb 21, 2015\n\n@author: theo\n'''",
"from acacia.meetnet.views import NetworkView",
"from acacia.meetnet.models import Network",
"class HomeView(NetworkView):\n def get_object(self):\n return Network.objects.get(name = 'Noorderzijlvest')",
" def get_object(self):\n retu... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "noorderzijlvest.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.75,
0.6,
0,
0.66,
1,
0,
... | [
"import os",
"import sys",
"if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"noorderzijlvest.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)",
" os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", ... |
"""
WSGI config for berging project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
import sys
import site
ALLDIRS = ['/var/www/vhosts/acaciadata.com/httpdocs/django/lib/... | [
[
8,
0,
0.1154,
0.2051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2564,
0.0256,
0,
0.66,
0.0714,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2821,
0.0256,
0,
0.66... | [
"\"\"\"\nWSGI config for berging project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"import sys",
"import site",
"ALLDIRS = ['/var/www/vhosts... |
"""
Django settings for berging project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | [
[
8,
0,
0.0532,
0.0957,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1277,
0.0106,
0,
0.66,
0.0476,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.1383,
0.0106,
0,
0.6... | [
"\"\"\"\nDjango settings for berging project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.dirname(_... |
'''
Created on Sep 1, 2014
@author: theo
'''
from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
import pandas as pd
NEERSLAG = (('d','droog'),('g','gemiddeld'),)
BODEMTYPE = (('z','zand op klei'),)
KWALITEIT=(('f', 'zoet'),('b','brak'),('s','zout'))
IRRIGATIE=(('i', '... | [
[
8,
0,
0.05,
0.0833,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1,
0.0167,
0,
0.66,
0.1,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.1167,
0.0167,
0,
0.66,
0.2,... | [
"'''\nCreated on Sep 1, 2014\n\n@author: theo\n'''",
"from django.db import models",
"from django.core.validators import MaxValueValidator, MinValueValidator",
"import pandas as pd",
"NEERSLAG = (('d','droog'),('g','gemiddeld'),)",
"BODEMTYPE = (('z','zand op klei'),)",
"KWALITEIT=(('f', 'zoet'),('b','b... |
'''
Created on Sep 1, 2014
@author: theo
'''
from django import forms
from django.forms.widgets import RadioSelect
from .models import Scenario, Matrix
class ScenarioForm(forms.ModelForm):
class Meta:
model = Scenario
fields = ['neerslag', 'bodem', 'kwaliteit', 'irrigatie', 'reken', 'oppervlakte',... | [
[
8,
0,
0.0526,
0.0877,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1053,
0.0175,
0,
0.66,
0.2,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.1228,
0.0175,
0,
0.66,
... | [
"'''\nCreated on Sep 1, 2014\n\n@author: theo\n'''",
"from django import forms",
"from django.forms.widgets import RadioSelect",
"from .models import Scenario, Matrix",
"class ScenarioForm(forms.ModelForm):\n class Meta:\n model = Scenario\n fields = ['neerslag', 'bodem', 'kwaliteit', 'irri... |
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
import settings
admin.autodiscover()
urlpatterns = patterns('berging.views',
url(r'^$', 'home', name='home'),
url(r'^scenario', 'scenario_highchart', name='scenario'),
url(r'^gro... | [
[
1,
0,
0.0588,
0.0588,
0,
0.66,
0,
528,
0,
3,
0,
0,
528,
0,
0
],
[
1,
0,
0.1176,
0.0588,
0,
0.66,
0.2,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.1765,
0.0588,
0,
0.6... | [
"from django.conf.urls import patterns, include, url",
"from django.conf.urls.static import static",
"from django.contrib import admin",
"import settings",
"admin.autodiscover()",
"urlpatterns = patterns('berging.views',\n url(r'^$', 'home', name='home'),\n url(r'^scenario', 'scenario_highchart', na... |
"""
WSGI config for berging project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
import sys
import site
ALLDIRS = ['/var/www/vhosts/acaciadata.com/httpdocs/django/lib/... | [
[
8,
0,
0.1154,
0.2051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2564,
0.0256,
0,
0.66,
0.0714,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2821,
0.0256,
0,
0.66... | [
"\"\"\"\nWSGI config for berging project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"import sys",
"import site",
"ALLDIRS = ['/var/www/vhosts... |
'''
Created on Sep 1, 2014
@author: theo
'''
import os,json
import numpy as np
import pandas as pd
from django.shortcuts import render, render_to_response, get_object_or_404
from django.template.loader import render_to_string
import settings
from forms import ScenarioForm
from models import Matrix
def home(request)... | [
[
8,
0,
0.0173,
0.0289,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0347,
0.0058,
0,
0.66,
0.0588,
688,
0,
2,
0,
0,
688,
0,
0
],
[
1,
0,
0.0405,
0.0058,
0,
0.66... | [
"'''\nCreated on Sep 1, 2014\n\n@author: theo\n'''",
"import os,json",
"import numpy as np",
"import pandas as pd",
"from django.shortcuts import render, render_to_response, get_object_or_404",
"from django.template.loader import render_to_string",
"import settings",
"from forms import ScenarioForm",
... |
'''
Created on Jun 1, 2014
@author: theo
'''
from berging.models import Scenario, Matrix
from django.contrib import admin
class MatrixAdmin(admin.ModelAdmin):
def save_model(self, request, obj, form, change):
try:
f = request.FILES['file']
obj.get_dimensions(f)
except:
... | [
[
8,
0,
0.15,
0.25,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3,
0.05,
0,
0.66,
0.2,
259,
0,
2,
0,
0,
259,
0,
0
],
[
1,
0,
0.4,
0.05,
0,
0.66,
0.4,
30... | [
"'''\nCreated on Jun 1, 2014\n\n@author: theo\n'''",
"from berging.models import Scenario, Matrix",
"from django.contrib import admin",
"class MatrixAdmin(admin.ModelAdmin):\n def save_model(self, request, obj, form, change):\n try:\n f = request.FILES['file']\n obj.get_dimensi... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "berging.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.75,
0.6,
0,
0.66,
1,
0,
... | [
"import os",
"import sys",
"if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"berging.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)",
" os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"bergin... |
"""
WSGI config for texel project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
import sys
import site
ALLDIRS = ['/var/www/vhosts/acaciadata.com/httpdocs/django/lib/py... | [
[
8,
0,
0.1154,
0.2051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2564,
0.0256,
0,
0.66,
0.0714,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2821,
0.0256,
0,
0.66... | [
"\"\"\"\nWSGI config for texel project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"import sys",
"import site",
"ALLDIRS = ['/var/www/vhosts/a... |
"""
Django settings for texel project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impo... | [
[
8,
0,
0.0259,
0.0466,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0622,
0.0052,
0,
0.66,
0.0286,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0674,
0.0052,
0,
0.6... | [
"\"\"\"\nDjango settings for texel project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.dirname(__f... |
from django.db import models as db
from acacia.data import models as acacia
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.6667,
0.3333,
0,
0.66,
1,
24,
0,
1,
0,
0,
24,
0,
0
]
] | [
"from django.db import models as db",
"from acacia.data import models as acacia"
] |
'''
Created on Oct 20, 2014
@author: theo
'''
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'texel.settings')
app = Celery('texel')
# Us... | [
[
8,
0,
0.1154,
0.1923,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2308,
0.0385,
0,
0.66,
0.1111,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.3077,
0.0385,
0,
0.66... | [
"'''\nCreated on Oct 20, 2014\n\n@author: theo\n'''",
"from __future__ import absolute_import",
"import os",
"from celery import Celery",
"from django.conf import settings",
"os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'texel.settings')",
"app = Celery('texel')",
"app.config_from_object('django.co... |
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from .views import TexelHomeView, DashGroupView
admin.autodiscover()
urlpatterns = patterns('texel.views',
url(r'^$', TexelHomeView.as_view(), name='hom... | [
[
1,
0,
0.0238,
0.0238,
0,
0.66,
0,
528,
0,
3,
0,
0,
528,
0,
0
],
[
1,
0,
0.0476,
0.0238,
0,
0.66,
0.1429,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.0714,
0.0238,
0,
... | [
"from django.conf.urls import patterns, include, url",
"from django.conf.urls.static import static",
"from django.conf import settings",
"from django.contrib import admin",
"from .views import TexelHomeView, DashGroupView",
"admin.autodiscover()",
"urlpatterns = patterns('texel.views',\n url(r'^$', T... |
'''
Created on Oct 18, 2014
@author: theo
'''
from acacia.data.generators.generator import Generator
import zipfile, xlrd, datetime
import numpy as np
import pandas as pd
import re
def convert(dt):
tup = xlrd.xldate_as_tuple(dt, 0)
dt = datetime.datetime(*tup)
return dt
def date_parser(dt):
return np... | [
[
8,
0,
0.0157,
0.0262,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0314,
0.0052,
0,
0.66,
0.0909,
871,
0,
1,
0,
0,
871,
0,
0
],
[
1,
0,
0.0366,
0.0052,
0,
0.66... | [
"'''\nCreated on Oct 18, 2014\n\n@author: theo\n'''",
"from acacia.data.generators.generator import Generator",
"import zipfile, xlrd, datetime",
"import numpy as np",
"import pandas as pd",
"import re",
"def convert(dt):\n tup = xlrd.xldate_as_tuple(dt, 0)\n dt = datetime.datetime(*tup)\n retu... |
'''
Created on Oct 18, 2014
@author: theo
'''
from acacia.data.generators.generator import Generator
class Regenmeter(Generator):
''' Texel regenmeter: date+tick '''
def get_header(self, f):
return {'COLUMNS': ['Record', 'Datum', 'Puls'],}
def get_data(self, f, **kwargs):
hea... | [
[
8,
0,
0.0882,
0.1471,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1765,
0.0294,
0,
0.66,
0.3333,
871,
0,
1,
0,
0,
871,
0,
0
],
[
3,
0,
0.5147,
0.5882,
0,
0.66... | [
"'''\nCreated on Oct 18, 2014\n\n@author: theo\n'''",
"from acacia.data.generators.generator import Generator",
"class Regenmeter(Generator):\n ''' Texel regenmeter: date+tick '''\n\n def get_header(self, f):\n return {'COLUMNS': ['Record', 'Datum', 'Puls'],}\n \n def get_data(self, f... |
from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app | [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
1,
0.2,
0,
0.66,
1,
100,
0,
1,
0,
0,
100,
0,
0
]
] | [
"from __future__ import absolute_import",
"from .celery import app as celery_app"
] |
"""
WSGI config for texel project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "texel.settings")
from django.core.wsgi ... | [
[
8,
0,
0.3214,
0.5714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.7143,
0.0714,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.7857,
0.0714,
0,
0.66,
... | [
"\"\"\"\nWSGI config for texel project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"texel.sett... |
'''
Created on Oct 4, 2014
@author: theo
'''
from django.shortcuts import render_to_response, get_object_or_404
from django.views.generic.base import TemplateView
from acacia.data.models import Project, TabGroup
from acacia.data.views import ProjectDetailView
class TexelHomeView(ProjectDetailView):
template_name... | [
[
8,
0,
0.0882,
0.1471,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1765,
0.0294,
0,
0.66,
0.1667,
852,
0,
2,
0,
0,
852,
0,
0
],
[
1,
0,
0.2059,
0.0294,
0,
0.66... | [
"'''\nCreated on Oct 4, 2014\n\n@author: theo\n'''",
"from django.shortcuts import render_to_response, get_object_or_404",
"from django.views.generic.base import TemplateView",
"from acacia.data.models import Project, TabGroup",
"from acacia.data.views import ProjectDetailView",
"class TexelHomeView(Proje... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "texel.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.75,
0.6,
0,
0.66,
1,
0,
... | [
"import os",
"import sys",
"if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"texel.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)",
" os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"texel.se... |
"""
Django settings for gorinchem project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
... | [
[
8,
0,
0.0323,
0.0581,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0774,
0.0065,
0,
0.66,
0.0357,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0839,
0.0065,
0,
0.6... | [
"\"\"\"\nDjango settings for gorinchem project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/",
"import os",
"BASE_DIR = os.path.dirname(os.path.dirname... |
'''
Created on Jun 1, 2014
@author: theo
'''
import os, pandas as pd, numpy as np
from django.db import models
from django.contrib.gis.db import models as geo
from django.core.urlresolvers import reverse
from gorinchem import settings, util
from django.db.models.signals import post_save
from django.contrib.auth.models... | [
[
8,
0,
0.0091,
0.0152,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0182,
0.003,
0,
0.66,
0.0476,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.0213,
0.003,
0,
0.66,
... | [
"'''\nCreated on Jun 1, 2014\n\n@author: theo\n'''",
"import os, pandas as pd, numpy as np",
"from django.db import models",
"from django.contrib.gis.db import models as geo",
"from django.core.urlresolvers import reverse",
"from gorinchem import settings, util",
"from django.db.models.signals import po... |
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from gorinchem.views import NetworkView, WellView, ScreenView, ScreenChartView, WellChartView
admin.autodiscover()
urlpatterns = patterns('gorinchem.views',
... | [
[
1,
0,
0.0435,
0.0435,
0,
0.66,
0,
528,
0,
3,
0,
0,
528,
0,
0
],
[
1,
0,
0.087,
0.0435,
0,
0.66,
0.1667,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.1304,
0.0435,
0,
0... | [
"from django.conf.urls import patterns, include, url",
"from django.conf.urls.static import static",
"from django.conf import settings",
"from django.contrib import admin",
"from gorinchem.views import NetworkView, WellView, ScreenView, ScreenChartView, WellChartView",
"admin.autodiscover()",
"urlpatter... |
'''
Created on Feb 12, 2014
@author: theo
'''
import os, fnmatch, re
from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform
from django.contrib.gis.geos import Point
import logging
logger = logging.getLogger(__name__)
# EPSG codes
RDNEW=28992
RDOLD=28991
WEBMERC=3857
GOOGLE=900913
AMERSFOORT=4289
... | [
[
8,
0,
0.0732,
0.122,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1463,
0.0244,
0,
0.66,
0.0667,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.1707,
0.0244,
0,
0.66,... | [
"'''\nCreated on Feb 12, 2014\n\n@author: theo\n'''",
"import os, fnmatch, re",
"from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform",
"from django.contrib.gis.geos import Point",
"import logging",
"logger = logging.getLogger(__name__)",
"RDNEW=28992",
"RDOLD=28991",
"WEBMERC=38... |
'''
Created on Jul 8, 2014
@author: theo
'''
import os
from django.utils.text import slugify
from views import make_chart
import settings
def make_wellcharts(modeladmin, request, queryset):
for w in queryset:
if not w.has_data():
continue
if w.chart.name is None:
w.chart.n... | [
[
8,
0,
0.0732,
0.122,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1463,
0.0244,
0,
0.66,
0.125,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1707,
0.0244,
0,
0.66,
... | [
"'''\nCreated on Jul 8, 2014\n\n@author: theo\n'''",
"import os",
"from django.utils.text import slugify",
"from views import make_chart",
"import settings",
"def make_wellcharts(modeladmin, request, queryset):\n for w in queryset:\n if not w.has_data():\n continue\n if w.chart... |
'''
Created on Dec 5, 2014
@author: theo
'''
'''
Created on Feb 13, 2014
@author: theo
'''
import os, csv, datetime
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from gorinchem.models import Network, Well, Screen, LoggerDatasource
from gorinchem import settings
fr... | [
[
8,
0,
0.06,
0.1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.18,
0.1,
0,
0.66,
0.0833,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.24,
0.02,
0,
0.66,
0.1667,
... | [
"'''\nCreated on Dec 5, 2014\n\n@author: theo\n'''",
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"import os, csv, datetime",
"from optparse import make_option",
"from django.core.management.base import BaseCommand, CommandError",
"from gorinchem.models import Network, Well, Screen, LoggerDatasou... |
'''
Created on Feb 13, 2014
@author: theo
'''
import os, csv, datetime
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from gorinchem.models import Network, Well, Screen, DataPoint
from gorinchem import settings
from gorinchem.dino import Dino
from django.contrib.gis.... | [
[
8,
0,
0.0219,
0.0365,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0438,
0.0073,
0,
0.66,
0.125,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.0511,
0.0073,
0,
0.66,... | [
"'''\nCreated on Feb 13, 2014\n\n@author: theo\n'''",
"import os, csv, datetime",
"from optparse import make_option",
"from django.core.management.base import BaseCommand, CommandError",
"from gorinchem.models import Network, Well, Screen, DataPoint",
"from gorinchem import settings",
"from gorinchem.di... |
"""
WSGI config for gorinchem project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gorinchem.settings")
from django.co... | [
[
8,
0,
0.3214,
0.5714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.7143,
0.0714,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.7857,
0.0714,
0,
0.66,
... | [
"\"\"\"\nWSGI config for gorinchem project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"",
"import os",
"os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"gorinc... |
'''
Created on Jun 3, 2014
@author: theo
'''
from django.shortcuts import render, redirect
from django.template import RequestContext
from django.views.generic import DetailView, TemplateView
from django.views.generic.edit import FormView
from django.template.loader import render_to_string
from gorinchem.models import... | [
[
8,
0,
0.0107,
0.0179,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0214,
0.0036,
0,
0.66,
0.0357,
852,
0,
2,
0,
0,
852,
0,
0
],
[
1,
0,
0.025,
0.0036,
0,
0.66,... | [
"'''\nCreated on Jun 3, 2014\n\n@author: theo\n'''",
"from django.shortcuts import render, redirect",
"from django.template import RequestContext",
"from django.views.generic import DetailView, TemplateView",
"from django.views.generic.edit import FormView",
"from django.template.loader import render_to_s... |
'''
Created on Jan 29, 2013
@author: theo
'''
import zipfile,os,fnmatch
import logging
import pandas as pd
logger = logging.getLogger(__name__)
def find_files(pattern, root=os.curdir):
for path, dirs, files in os.walk(os.path.abspath(root)):
for filename in fnmatch.filter(files, pattern):
... | [
[
8,
0,
0.0246,
0.041,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0492,
0.0082,
0,
0.66,
0.1111,
93,
0,
3,
0,
0,
93,
0,
0
],
[
1,
0,
0.0574,
0.0082,
0,
0.66,
... | [
"'''\nCreated on Jan 29, 2013\n\n@author: theo\n'''",
"import zipfile,os,fnmatch",
"import logging",
"import pandas as pd",
"logger = logging.getLogger(__name__)",
"def find_files(pattern, root=os.curdir):\n for path, dirs, files in os.walk(os.path.abspath(root)):\n for filename in fnmatch.filte... |
'''
Created on Jun 1, 2014
@author: theo
'''
from gorinchem.models import Network, Well, Photo, Screen, Datalogger, LoggerDatasource, UserProfile
from acacia.data.models import Datasource, SourceFile, Series
from acacia.data.admin import DatasourceForm
from django.contrib import admin
from django import forms
from dj... | [
[
8,
0,
0.0186,
0.0311,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0373,
0.0062,
0,
0.66,
0.0312,
559,
0,
7,
0,
0,
559,
0,
0
],
[
1,
0,
0.0435,
0.0062,
0,
0.66... | [
"'''\nCreated on Jun 1, 2014\n\n@author: theo\n'''",
"from gorinchem.models import Network, Well, Photo, Screen, Datalogger, LoggerDatasource, UserProfile",
"from acacia.data.models import Datasource, SourceFile, Series",
"from acacia.data.admin import DatasourceForm",
"from django.contrib import admin",
... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gorinchem.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
4,
0,
0.75,
0.6,
0,
0.66,
1,
0,
... | [
"import os",
"import sys",
"if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"gorinchem.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)",
" os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"gori... |
#!/usr/bin/env python
# XMPP client utils for testing bot
from twisted.internet import reactor, defer
from twisted.internet.task import LoopingCall
from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client
from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindIn... | [
[
1,
0,
0.0113,
0.0023,
0,
0.66,
0,
937,
0,
2,
0,
0,
937,
0,
0
],
[
1,
0,
0.0135,
0.0023,
0,
0.66,
0.0667,
85,
0,
1,
0,
0,
85,
0,
0
],
[
1,
0,
0.0158,
0.0023,
0,
0.... | [
"from twisted.internet import reactor, defer",
"from twisted.internet.task import LoopingCall",
"from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client",
"from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindInitializer,\\\n SessionInitializer",
... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import sys
from twisted.internet import reactor
from twisted.names.srvconnect import SRVConnector
from twisted.words.xish import domish
from twisted.words.protocols.jabber import xmlstream, client, jid
class Client(object):
def __init__(self,... | [
[
1,
0,
0.0606,
0.0152,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0758,
0.0152,
0,
0.66,
0.1111,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.0909,
0.0152,
0,
... | [
"import sys",
"from twisted.internet import reactor",
"from twisted.names.srvconnect import SRVConnector",
"from twisted.words.xish import domish",
"from twisted.words.protocols.jabber import xmlstream, client, jid",
"class Client(object):\n def __init__(self, client_jid, secret):\n f = client.X... |
#!/usr/bin/env python
from twisted.internet import reactor
from twisted.words.xish import domish
from twisted.words.protocols.jabber import xmlstream
from wokkel import server
from kontalk.xmppserver.component import net
class NetConnector(object):
def __init__(self, host, port):
authenticator = net.XM... | [
[
1,
0,
0.0319,
0.0106,
0,
0.66,
0,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.0532,
0.0106,
0,
0.66,
0.1429,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.0638,
0.0106,
0,
... | [
"from twisted.internet import reactor",
"from twisted.words.xish import domish",
"from twisted.words.protocols.jabber import xmlstream",
"from wokkel import server",
"from kontalk.xmppserver.component import net",
"class NetConnector(object):\n def __init__(self, host, port):\n authenticator = n... |
#!/usr/bin/env python
from twisted.internet import reactor, defer
from twisted.internet.task import LoopingCall
from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client
from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindInitializer,\
SessionInitializer
f... | [
[
1,
0,
0.0141,
0.0035,
0,
0.66,
0,
937,
0,
2,
0,
0,
937,
0,
0
],
[
1,
0,
0.0176,
0.0035,
0,
0.66,
0.05,
85,
0,
1,
0,
0,
85,
0,
0
],
[
1,
0,
0.0211,
0.0035,
0,
0.66... | [
"from twisted.internet import reactor, defer",
"from twisted.internet.task import LoopingCall",
"from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client",
"from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindInitializer,\\\n SessionInitializer",
... |
#!/usr/bin/env python
# Copyright (c) 2007 Sander Marechal
# See jukebox/trunk/LICENSE for details
"""
This is a test server build on my twisted.words hacks
"""
from twisted.cred import portal
from twisted.cred import checkers
from twisted.internet import reactor
from twisted.words.xish import domish
from twisted.wo... | [
[
8,
0,
0.0593,
0.0254,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0847,
0.0085,
0,
0.66,
0.1,
847,
0,
1,
0,
0,
847,
0,
0
],
[
1,
0,
0.0932,
0.0085,
0,
0.66,
... | [
"\"\"\"\nThis is a test server build on my twisted.words hacks\n\"\"\"",
"from twisted.cred import portal",
"from twisted.cred import checkers",
"from twisted.internet import reactor",
"from twisted.words.xish import domish",
"from twisted.words.protocols.jabber import xmlstream",
"from xmppserver impor... |
#!/usr/bin/env python
# Testing bot for Kontalk XMPP
from twisted.internet import reactor
from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid, xmlstream, client
from wokkel import xmppim
import sys, time, demjson, base64, gpgme, gpgme.editutil
try:
from io import BytesIO
except... | [
[
1,
0,
0.0148,
0.003,
0,
0.66,
0,
937,
0,
1,
0,
0,
937,
0,
0
],
[
1,
0,
0.0178,
0.003,
0,
0.66,
0.0667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.0207,
0.003,
0,
0.6... | [
"from twisted.internet import reactor",
"from twisted.words.xish import domish",
"from twisted.words.protocols.jabber import jid, xmlstream, client",
"from wokkel import xmppim",
"import sys, time, demjson, base64, gpgme, gpgme.editutil",
"try:\n from io import BytesIO\nexcept ImportError:\n from St... |
import base64, socket, sys
from twisted.application import service
from twisted.internet import defer, protocol, reactor
from twisted.python import log
from twisted.words.protocols.jabber import client, error, jid, sasl, xmlstream
from twisted.words.xish import domish
XPATH_ALL = "//*"
XPATH_AUTH = "//auth[@xmlns='%s'... | [
[
1,
0,
0.0032,
0.0032,
0,
0.66,
0,
177,
0,
3,
0,
0,
177,
0,
0
],
[
1,
0,
0.0065,
0.0032,
0,
0.66,
0.04,
85,
0,
1,
0,
0,
85,
0,
0
],
[
1,
0,
0.0097,
0.0032,
0,
0.66... | [
"import base64, socket, sys",
"from twisted.application import service",
"from twisted.internet import defer, protocol, reactor",
"from twisted.python import log",
"from twisted.words.protocols.jabber import client, error, jid, sasl, xmlstream",
"from twisted.words.xish import domish",
"XPATH_ALL = \"//... |
#!/usr/bin/env python
from twisted.internet import reactor, defer
from twisted.internet.task import LoopingCall
from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client
from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindInitializer,\
SessionInitializer
f... | [
[
1,
0,
0.0081,
0.002,
0,
0.66,
0,
937,
0,
2,
0,
0,
937,
0,
0
],
[
1,
0,
0.0101,
0.002,
0,
0.66,
0.05,
85,
0,
1,
0,
0,
85,
0,
0
],
[
1,
0,
0.0121,
0.002,
0,
0.66,
... | [
"from twisted.internet import reactor, defer",
"from twisted.internet.task import LoopingCall",
"from twisted.words.protocols.jabber import xmlstream, sasl, sasl_mechanisms, jid, client",
"from twisted.words.protocols.jabber.client import CheckVersionInitializer, BindInitializer,\\\n SessionInitializer",
... |
# -*- coding: utf-8 -*-
'''twistd plugin for XMPP router.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ei... | [
[
8,
0,
0.0328,
0.0164,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1803,
0.2787,
0,
0.66,
0.1,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3607,
0.0164,
0,
0.66,
0... | [
"'''twistd plugin for XMPP router.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either ver... |
# -*- coding: utf-8 -*-
'''twistd plugin for Dropbox fileserver.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundat... | [
[
8,
0,
0.0345,
0.0172,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1897,
0.2931,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3793,
0.0172,
0,
0.66,
... | [
"'''twistd plugin for Dropbox fileserver.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, eit... |
# -*- coding: utf-8 -*-
'''twistd plugin for XMPP net.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, eithe... | [
[
8,
0,
0.0351,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.193,
0.2982,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.386,
0.0175,
0,
0.66,
... | [
"'''twistd plugin for XMPP net.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either versio... |
# -*- coding: utf-8 -*-
'''twistd plugin for XMPP c2s.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, eithe... | [
[
8,
0,
0.0345,
0.0172,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1897,
0.2931,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3793,
0.0172,
0,
0.66,
... | [
"'''twistd plugin for XMPP c2s.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either versio... |
# -*- coding: utf-8 -*-
'''twistd plugin for XMPP resolver.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ... | [
[
8,
0,
0.0377,
0.0189,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.2075,
0.3208,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.4151,
0.0189,
0,
0.66,
... | [
"'''twistd plugin for XMPP resolver.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either v... |
# -*- coding: utf-8 -*-
'''twistd plugin for XMPP s2s.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, eithe... | [
[
8,
0,
0.0351,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.193,
0.2982,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.386,
0.0175,
0,
0.66,
... | [
"'''twistd plugin for XMPP s2s.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either versio... |
# -*- coding: utf-8 -*-
"""Kontalk Dropbox file server."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, eith... | [
[
8,
0,
0.0101,
0.005,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0553,
0.0854,
0,
0.66,
0.0714,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1106,
0.005,
0,
0.66,
... | [
"\"\"\"Kontalk Dropbox file server.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, eit... |
# -*- coding: utf-8 -*-
"""Authentication utilities."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either ... | [
[
8,
0,
0.0123,
0.0061,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0675,
0.1043,
0,
0.66,
0.0625,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.135,
0.0061,
0,
0.66,
... | [
"\"\"\"Authentication utilities.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either... |
# -*- coding: utf-8 -*-
"""Upload services modules."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either v... | [
[
8,
0,
0.0333,
0.0167,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1833,
0.2833,
0,
0.66,
0.25,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3667,
0.0167,
0,
0.66,
... | [
"\"\"\"Upload services modules.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either ... |
# -*- coding: utf-8 -*-
"""Kontalk XMPP resolver component."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ... | [
[
8,
0,
0.0018,
0.0009,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0098,
0.0151,
0,
0.66,
0.0588,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0196,
0.0009,
0,
0.66,
... | [
"\"\"\"Kontalk XMPP resolver component.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation,... |
# -*- coding: utf-8 -*-
"""Kontalk XMPP router component."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ei... | [
[
8,
0,
0.0099,
0.0049,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0542,
0.0837,
0,
0.66,
0.1111,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1084,
0.0049,
0,
0.66,
... | [
"\"\"\"Kontalk XMPP router component.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, e... |
# -*- coding: utf-8 -*-
"""Kontalk XMPP sm component (part of c2s)."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foun... | [
[
8,
0,
0.0025,
0.0013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0138,
0.0213,
0,
0.66,
0.0556,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0275,
0.0013,
0,
0.66,
... | [
"\"\"\"Kontalk XMPP sm component (part of c2s).\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Fou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.