text
stringlengths
4
1.02M
meta
dict
"""Test Payment for Family Camp Bookings. Usage: test_pay_for_camp.py <email> <adults> <children> <infants> Options: -d,--debug Turn on debug output. -h,--help Show this screen. --version Show version. """ from splinter import Browser from time import sleep from docopt import docopt URL = "...
{ "content_hash": "c80476d94bb6b175e3ee514e7b0a02af", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 92, "avg_line_length": 27.439393939393938, "alnum_prop": 0.5764770844837107, "repo_name": "hippysurfer/family-camp", "id": "6ea129904fb7b31f78667e19ef649a9d07960f71", "size...
import logging import os from time import time from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST from djangomako.shortcuts import render_to_response from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_protect from django.c...
{ "content_hash": "6db88660708b95af3929253232308d03", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 53, "avg_line_length": 25.072727272727274, "alnum_prop": 0.6656997824510514, "repo_name": "duoduo369/django-scaffold", "id": "303d7da56e7ae57428156dca1e177e269d148e42", "si...
from rest_framework.decorators import detail_route from rest_framework.response import Response from rest_framework.serializers import HyperlinkedModelSerializer from rest_framework.viewsets import ReadOnlyModelViewSet from rest_framework_gis.serializers import GeoFeatureModelSerializer from django.core.exceptions impo...
{ "content_hash": "0691ad7855772303f3eeb5a7c19df792", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 77, "avg_line_length": 32.06, "alnum_prop": 0.64504054897068, "repo_name": "chris48s/UK-Polling-Stations", "id": "0b8696d863c2ead353e0b09b8d83548afda4334f", "size": "1603",...
import numpy as np import itertools from copy import copy import regreg.atoms.seminorms as S import regreg.api as rr import nose.tools as nt def ac(x,y, msg=None): try: v = np.linalg.norm(x-y) <= 1.0e-04 * max([1, np.linalg.norm(x), np.linalg.norm(y)]) except: print 'check failed for msg: ', m...
{ "content_hash": "b9afd9138c56ae6de13d9e5582632599", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 156, "avg_line_length": 40.411483253588514, "alnum_prop": 0.5950745915226142, "repo_name": "klingebj/regreg", "id": "8ed42034ed508a11f539cf28b20de695751574a5", "size": "84...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('excerptexport', '0031_add_types_field_20160518_1307'), ] operations = [ migrations...
{ "content_hash": "b5258537d5ffe419086e1e49714adac7", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 168, "avg_line_length": 28.95, "alnum_prop": 0.6683937823834197, "repo_name": "geometalab/osmaxx-frontend", "id": "c78779c0a95008cc78f9dd748ba8fd7027c4c7ea", "size": "651",...
import json import operator, itertools import numpy as np from shared import config from shared.indexes import Index from shared import functions class ReadDataFile: def __init__(self, _type, first_n_items=20): self._dict = dict() f = open(config.task_dataset_path + _type + '.txt', 'r') l...
{ "content_hash": "d887aff1c6840a6021a2df6ea09911d9", "timestamp": "", "source": "github", "line_count": 405, "max_line_length": 138, "avg_line_length": 46.40246913580247, "alnum_prop": 0.5582929814292555, "repo_name": "matifq/eve", "id": "11d317865cc3075ceb2fbd914d0f5f12871655bf", "size": "18793", ...
import os import re from crud_object import main BUCKET = os.environ['CLOUD_STORAGE_BUCKET'] def test_main(capsys): main(BUCKET, __file__) out, err = capsys.readouterr() assert not re.search(r'Downloaded file [!]=', out) assert re.search(r'Uploading.*Fetching.*Deleting.*Done', out, re.DOTALL)
{ "content_hash": "3626e005d4fb6a7dfb912c0dae606d83", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 76, "avg_line_length": 22.5, "alnum_prop": 0.6857142857142857, "repo_name": "canglade/NLP", "id": "d2798a43649999478d1ca626f8f0174b5a244085", "size": "890", "binary": fal...
from django.conf.urls.defaults import * from django_filters.tests.models import Book urlpatterns = patterns('', (r'^books/$', 'django_filters.views.object_filter', {'model': Book}), )
{ "content_hash": "a0be0320b80585021b984cfad3d82602", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 73, "avg_line_length": 27.142857142857142, "alnum_prop": 0.7052631578947368, "repo_name": "bhaugen/localecon", "id": "4181de1198b93710b718a4dcb21118aa1121f7ac", "size": "190...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('neighborhood', '0004_auto_20160916_1800'), ] operations = [ migrations.AlterField( model_name='agent', name='image', ...
{ "content_hash": "9f794bc0fab294e8fc557b01ef2ef579", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 92, "avg_line_length": 28.821428571428573, "alnum_prop": 0.5762081784386617, "repo_name": "josephkane/neighborhood", "id": "5431938bc05b8daec13223f55fecf0b511729c9f", "size...
import unittest import datetime from mongoengine import connect from mongoengine import Document from mongoengine import StringField from mongoengine import EmailField from mongoengine import DateTimeField from mongoengine import ValidationError from mongoengine.connection import get_db, get_connection from models.use...
{ "content_hash": "d51f82a98861e60c870759cd3faa3591", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 85, "avg_line_length": 27.75, "alnum_prop": 0.6130867709815079, "repo_name": "JFK/spider", "id": "9f4d80fc1bd96d8eecde12440e0fa0a982044be8", "size": "2204", "binary": fal...
from builtins import zip import os.path import tempfile import shutil from pype9.cmd import plot, simulate import neo import ninemlcatalog if __name__ == '__main__': from pype9.utils.testing import DummyTestCase as TestCase # @UnusedImport else: from unittest import TestCase # @Reimport import matplotlib ...
{ "content_hash": "08b44523020ffa10da24e0064acbdee6", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 79, "avg_line_length": 41.75, "alnum_prop": 0.5359946773120425, "repo_name": "CNS-OIST/PyPe9", "id": "cfd7cbcf2c9ffcb95ecdcccaa0cab5af5e8d3275", "size": "7515", "binary"...
@login_required def openid_form (request): class OpenIDManipulator (formfields.Manipulator): def __init__ (self): self.fields = (formfields.TextField (field_name="url", length=30, maxlength=50, is_required=True),) manipulator = OpenIDManipulator () errors = dict () if request....
{ "content_hash": "9623b770fd4ea677ced7a0d2f8b2ef9d", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 112, "avg_line_length": 42.68627450980392, "alnum_prop": 0.5838309600367478, "repo_name": "GinnyN/towerofdimensions-django", "id": "dde811b84667f14bf8595beb1eceec4c86211c40",...
from django import forms from .models.points import GeoPoint class GeoPointForm(forms.ModelForm): """ Form to handle geolocation for any entity """ class Meta: model = GeoPoint fields = ( 'latitude', 'longitude' ) widgets = { 'latitude': form...
{ "content_hash": "41fa726495487cccc7436d83eceb660d", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 69, "avg_line_length": 23.392857142857142, "alnum_prop": 0.583206106870229, "repo_name": "suselrd/django-geolocation", "id": "e41b456a687ecaadcfcbff1bdc884b6d41292a75", "si...
import IPy import DNS import string import socket import sys class dns_reverse(): def __init__(self, range, verbose=True): self.range = range self.iplist = '' self.results = [] self.verbose = verbose try: DNS.ParseResolvConf("/etc/resolv.conf") name...
{ "content_hash": "3ef7f5e2c7e58127428a205538a95e9a", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 91, "avg_line_length": 29.370967741935484, "alnum_prop": 0.499725425590335, "repo_name": "JeyZeta/Dangerous", "id": "6767b72103da6817b65c062ca558aa79690260b7", "size": "36...
revision = '11' down_revision = '10' from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from geopy.geocoders import Nominatim from geopy.distance import vincenty import numpy as np import math import json def radian_to_degree...
{ "content_hash": "27f7c33d879761f9ce3278883b4a2562", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 121, "avg_line_length": 38.196850393700785, "alnum_prop": 0.6456400742115028, "repo_name": "mourningsun75/openmoves", "id": "f63bacb053a4c1f02a635e7e83f9f8c2ee9a22e6", "si...
LEVELS = ["Fogna","Dungeon","Inferno",] N_TILES = [1,1,5] def get_pathname(livello, tipo, sufx = 1): if (tipo != "Muro"): return "img/Tile/%s/%s_%s.png" % (livello, tipo, sufx) else: return "img/Tile/%s/%s_%s.png" % (livello, tipo, sufx) def create_tilelist(livello): tiles = list() for i in xrange(1, 3): ti...
{ "content_hash": "2af72af9f94ffd54f000b9b00e1b473e", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 88, "avg_line_length": 30.454545454545453, "alnum_prop": 0.6965174129353234, "repo_name": "ff-/Turn-Off-the-Darkness", "id": "2a1fe0ef107a11a9b7e3920c08304c6810e5c92f", "si...
""" Simple example of setting network and CPU parameters NOTE: link params limit BW, add latency, and loss. There is a high chance that pings WILL fail and that iperf will hang indefinitely if the TCP handshake fails to complete. """ from mininet.topo import Topo from mininet.net import Mininet from mininet.node impo...
{ "content_hash": "5d12bef3786e74ed984d261107b7f3c4", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 67, "avg_line_length": 31.53191489361702, "alnum_prop": 0.6336032388663968, "repo_name": "hsnlab/escape", "id": "1da4b66c1b2c7b990ffec14647bcfd5aa6f52934", "size": "1501", ...
import re from . import __version__ as VERSION from .__all__ import get_all_cli from .cli import CLI from .wandbox import Wandbox from .wandbox_compile_response import WandboxCompileResponse from .utils import text_transform from argparse import ArgumentParser class StatusCLI: def __init__(self): self....
{ "content_hash": "6a6b6666726553cfc7b82ea3b8323442", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 116, "avg_line_length": 26.90909090909091, "alnum_prop": 0.5411547911547911, "repo_name": "srz-zumix/wandbox-api", "id": "646cd65343cc3241768c1e5a3a0d2cdfec1da8e4", "size"...
"""Environment plugin.""" import os import pwd import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') from otopi import util from otopi import plugin from ovirt_engine_setup import constants as osetupcons from ovirt_engine_setup.engine_common \ import constants as oengcommcons ...
{ "content_hash": "e9d6f6f529f59bb06c0dc84589038b11", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 73, "avg_line_length": 27.56896551724138, "alnum_prop": 0.6529080675422139, "repo_name": "phoenixsbk/kvmmgr", "id": "ed54c6dc95bdd9cd659fa3fb33cc75debe1fdfe9", "size": "222...
import expect import os.path from glslc_test_framework import inside_glslc_testsuite from placeholder import FileShader, StdinShader, TempFileName @inside_glslc_testsuite('File') class SimpleFileCompiled(expect.ValidObjectFile): """Tests whether or not a simple glsl file compiles.""" shader = FileShader('#ve...
{ "content_hash": "8f404a1ac1db7c1a9e741860b0f03ce0", "timestamp": "", "source": "github", "line_count": 315, "max_line_length": 81, "avg_line_length": 39.076190476190476, "alnum_prop": 0.6831586643919083, "repo_name": "MasonLeeBack/PolyEngine", "id": "21209a884228c78b8297610e8221738ecdbee158", "siz...
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def pyunit_unique(): iris = h2o.import_file(pyunit_utils.locate("smalldata/iris/iris.csv")) uniques = iris[4].unique() rows, cols = uniques.dim assert rows == 3 and cols == 1, "Expected 3 rows and 1 column, but got {0}...
{ "content_hash": "bcd7240cfa99dafd789404eda55f4a77", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 120, "avg_line_length": 30.696969696969695, "alnum_prop": 0.6604146100691016, "repo_name": "mathemage/h2o-3", "id": "979280e9a0183d1eb6c3a4a206c3458b8fa47879", "size": "101...
"""Annotations used by the static analizer.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from enum import Enum class NoValue(Enum): def __repr__(self): return self.name class NodeAnno(NoValue): """Additionnal annotations used by the stati...
{ "content_hash": "79f2b3d59a6fb7411ff7f6b39ac6f1ef", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 79, "avg_line_length": 32.22727272727273, "alnum_prop": 0.7073342736248237, "repo_name": "Xeralux/tensorflow", "id": "5254b83ca7c775867fc2ad5ef0a0ad93ac483ba0", "size": "21...
from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 version 3 of the License, or # (at you...
{ "content_hash": "5d1104c2c5e75dc8cae0941fec2ff10e", "timestamp": "", "source": "github", "line_count": 355, "max_line_length": 109, "avg_line_length": 30.354929577464787, "alnum_prop": 0.579992576095026, "repo_name": "thaim/ansible", "id": "59e4d8b6ae42b63bce34a59a6976952c8e270071", "size": "10794...
import torch import torch.nn as nn import torchvision.datasets as dsets import torchvision.transforms as transforms from torch.autograd import Variable from binary.modules import * # Hyper Parameters num_epochs = 50 batch_size = 100 lr_start = 1e-3 lr_end = 1e-4 lr_decay = (lr_end / lr_start) ** (1. / num_epochs) m...
{ "content_hash": "bf65dc5c855852283bb837753c35c473", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 99, "avg_line_length": 29.327731092436974, "alnum_prop": 0.5595988538681949, "repo_name": "Fuchai/Philosophy-Machine", "id": "c2ce0bd141177271ef0e696398a7c2abeb939f03", "s...
from opserver.plugins.alarm_base import * from opserver.sandesh.alarmgen_ctrl.sandesh_alarm_base.ttypes import * import json class BgpConnectivity(AlarmBase): """BGP peer mismatch. Not enough BGP peers are up in BgpRouterState.num_up_bgp_peer""" def __init__(self): AlarmBase.__init__(self, AlarmBase....
{ "content_hash": "28ccbf6b901d63b652fda9194eb1be63", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 71, "avg_line_length": 34.529411764705884, "alnum_prop": 0.5877342419080068, "repo_name": "sajuptpm/contrail-controller", "id": "ef42f39a1122079d9d78e03d857eac34afe48e38", ...
from __future__ import absolute_import from collections import namedtuple import tornado import tornado.gen from tchannel.messages import common from tornado.iostream import StreamClosedError from tchannel import retry from ..glossary import DEFAULT_TIMEOUT from ..messages import ErrorCode from ..messages.common im...
{ "content_hash": "0f7df44e13fe1fc97433d4e77dd221ec", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 78, "avg_line_length": 31.276041666666668, "alnum_prop": 0.5945045795170691, "repo_name": "uber/tchannel-python", "id": "4f9734165224d9b89b9cb3b1fb0c328deb1ad9d0", "size":...
import stmDriver import time import multiprocessing import math import localisation input_command_queue = multiprocessing.Queue() reply_to_fsm_queue = multiprocessing.Queue() reply_to_localization_queue = multiprocessing.Queue() request_source = 'fsm' start_time = time.time() check_time = False current_coordinatess =...
{ "content_hash": "992cc03dc03df16276c39f2e346cf29c", "timestamp": "", "source": "github", "line_count": 799, "max_line_length": 238, "avg_line_length": 33.943679599499376, "alnum_prop": 0.6039600309723093, "repo_name": "SkRobo/Eurobot-2017", "id": "7a9db5c50647b0b52a281cd588557c2735c8e2a2", "size":...
from setuptools import setup, find_packages setup( name='panya-tube', version='0.0.2', description='Panya tube(channel, show, clip) app.', long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(), author='Praekelt Foundation', autho...
{ "content_hash": "d9c6bfbe2fd045f7eef05e259f14e4e1", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 124, "avg_line_length": 32.064516129032256, "alnum_prop": 0.5885311871227364, "repo_name": "praekelt/panya-tube", "id": "455ee044c5d8e6ead0b3fab517ca4f7e6bde57d6", "size": ...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.db.models.manager class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ('cms', '0055_merge_20171031_1713'), ] operation...
{ "content_hash": "c5fbdc193979c4a88b10be372d341375", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 553, "avg_line_length": 51.78431372549019, "alnum_prop": 0.5963650132525559, "repo_name": "onepercentclub/bluebottle", "id": "814e54e0e53dad76d97c902961169c05e2e119b3", "si...
import sys import math import re # un arreglo para nombrar las unidades # descenas y centenas nomtrio = [["uno ", "dos ", "tres ", "cuatro ", "cinco ", "seis ", "siete ", "ocho ", "nueve "], ["dieci", "veinti", "treinta y ", "cuarenta y ", "cincuenta y ", "sesenta y ", "setenta y ...
{ "content_hash": "40c77bd3d169e4bbcc50bbe9fde4efe3", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 90, "avg_line_length": 36.94472361809045, "alnum_prop": 0.5552230685527747, "repo_name": "programingfrik/NumerosLetras", "id": "70df15d9aed73dbfcbd0695d9d781dcf54bcf11d", ...
import os import sys import setuptools from quantumclient.openstack.common import setup Name = 'python-quantumclient' Url = "https://launchpad.net/quantum" Version = setup.get_post_version('quantumclient') License = 'Apache License 2.0' Author = 'OpenStack Quantum Project' AuthorEmail = 'openstack-dev@lists.launchpad...
{ "content_hash": "e9270da31df522ac7c54654181f59ce2", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 65, "avg_line_length": 23.796296296296298, "alnum_prop": 0.7198443579766537, "repo_name": "akushwah/python-quantumclient-n1kv", "id": "7681059b0fe01bbb12038fdd20abdd9c29be693...
from copy import copy import pytz import pandas as pd import numpy as np from datetime import datetime from itertools import groupby, ifilter from operator import attrgetter from zipline.errors import ( UnsupportedSlippageModel, OverrideSlippagePostInit, UnsupportedCommissionModel, OverrideCommissio...
{ "content_hash": "ea834205181b637535d6d377905936cf", "timestamp": "", "source": "github", "line_count": 532, "max_line_length": 79, "avg_line_length": 36.42293233082707, "alnum_prop": 0.6075759921556485, "repo_name": "davidastephens/zipline", "id": "1c3310046683c750c56af215bc29b813ac883595", "size"...
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VirtualMachineFileLayoutSnapshotLayout(vim, *args, **kwargs): '''Enumerates the set of...
{ "content_hash": "5ae711803456d52241bc10c3ca2150eb", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 124, "avg_line_length": 33.25, "alnum_prop": 0.6109022556390977, "repo_name": "xuru/pyvisdk", "id": "256548f673e4f532877690cfa386bdbf2abb0f1c", "size": "1065", "binary": ...
import sys import os import argparse import re import sqlite3 import datetime as dt from datetime import datetime, date, timedelta import gconf from classes import ProgressBar, Redmine # Main config will load here CONFIG = None # Constants DEFAULT_DB = os.path.expanduser("~/.local/share/hamster-applet/hamster.db...
{ "content_hash": "d5e20730d52554cac2541c42e15bbfcb", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 79, "avg_line_length": 27.127962085308056, "alnum_prop": 0.5517120894479385, "repo_name": "jacob1237/hamster-redmine", "id": "4e9e850e6d4b7020daf392278461483e54088b75", "s...
import 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 'Title' db.create_table('karma_title', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=...
{ "content_hash": "88b5cf24d3de90a02a0cbe3b6a0fc201", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 182, "avg_line_length": 58.24561403508772, "alnum_prop": 0.5632530120481928, "repo_name": "feer56/Kitsune1", "id": "2d2daa060adc1e1d942871da059b0682fbeb430e", "size": "666...
from django.contrib.gis.db import models from django.contrib.gis.geos import MultiPolygon, Polygon from django.utils import timezone from pyproj import Geod WGS84_GEOD = Geod(ellps='WGS84') class TimeStampedModelGis(models.Model): created = models.DateTimeField(blank=True, null=True) modified = models.DateT...
{ "content_hash": "650e9dc6b8e8541afb7a75c960647a70", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 78, "avg_line_length": 31.463414634146343, "alnum_prop": 0.6426356589147287, "repo_name": "eclectic-boy/rhodonea_mapper", "id": "6712b897c58f991f72315078d71abefa69a4e8f1", ...
import os import json from tornado import gen from tornado.escape import json_encode, json_decode, url_escape from tornado.httpclient import HTTPClient, AsyncHTTPClient, HTTPError from notebook.services.kernels.kernelmanager import MappingKernelManager from notebook.services.sessions.sessionmanager import ( Sessi...
{ "content_hash": "44222593585fc83b292e2723e8dd1bff", "timestamp": "", "source": "github", "line_count": 476, "max_line_length": 96, "avg_line_length": 37.65966386554622, "alnum_prop": 0.5985161218342073, "repo_name": "riceda195/kernel_gateway_demos", "id": "bc6e185f4369a446d339c76cd31b231515f7d473", ...
import sys import warnings from redlib.api.misc import Singleton from .commandparser import CommandParser from . import const from .command_collection import _CommandCollection class _MoveCollection(_CommandCollection): def __init__(self, prog=None, _to_hyphen=True, warning=True): super(_MoveCollection, self)._...
{ "content_hash": "bfa98789944c3810e99dde38ccceb5f4", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 88, "avg_line_length": 22.93103448275862, "alnum_prop": 0.6947368421052632, "repo_name": "amol9/redcmd", "id": "d90add49b0d4aefbb0cc4f6cf0557bede67e59af", "size": "1330", ...
from nagare.i18n import _ from nagare import component, editor, i18n, security, var, validator as nagare_validator from kansha import title from kansha import events from kansha import exceptions from kansha.toolbox import popin, overlay from kansha.card import Card, NewCard from .models import DataColumn class Col...
{ "content_hash": "5a6c1ea2f7c1798692dba5605af62d7a", "timestamp": "", "source": "github", "line_count": 355, "max_line_length": 112, "avg_line_length": 32.138028169014085, "alnum_prop": 0.569375054781313, "repo_name": "bcroq/kansha", "id": "3d645e5381f04c68e58b44896a5ac9bba7ef7437", "size": "11654"...
from sortedcontainers import SortedSet from .entity import Entity MISSING = object() class World(object): """World coordinates the entities, components and systems.""" def __init__(self): self._highest_id_seen = 0 self._database = {} self._entities = [] self._entities_by_comp...
{ "content_hash": "2b2b39076398006871e245704a314b53", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 150, "avg_line_length": 35.65771812080537, "alnum_prop": 0.6324110671936759, "repo_name": "chromy/essence", "id": "34c8ba9a61b833927a454d0c3d138be81a90936a", "size": "5313...
import os from typing import Optional from apns2.client import APNsClient, NotificationPriority from apns2.credentials import TokenCredentials from apns2.errors import BadDeviceToken, Unregistered from apns2.payload import Payload from bugsnag import Client from palaverapi.models import Device, database TOPIC = 'com...
{ "content_hash": "5d719baf380dd4d1ff0d0ebdbb155e35", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 86, "avg_line_length": 26.207207207207208, "alnum_prop": 0.6352698521828807, "repo_name": "cocodelabs/api.palaverapp.com", "id": "a45d7be270e43a06cbd38351a6e42c78740181f8", ...
import os import collections import time from multiprocessing import pool from invest_natcap import raster_utils CSV_DIR = os.path.join("C:\\", "Users", "rich", "Desktop", "forest_edge_output") eco_name_set = collections.defaultdict(float) ecode_name_set = collections.defaultdict(float) wwf_htnam_set = collections.d...
{ "content_hash": "bf59fff39a18f320b9824fd362680408", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 191, "avg_line_length": 39.46153846153846, "alnum_prop": 0.6135477582846004, "repo_name": "richpsharp/forest_carbon_edge_effects", "id": "8863aae14aaef35ba87cd00285534d608f7...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('upcs', '0006_auto_20150226_1615'), ] operations = [ migrations.AlterField( model_name='upcitem', name='upc', fie...
{ "content_hash": "ed23508f2f6e5caf3fa6201c1d51695e", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 63, "avg_line_length": 22.157894736842106, "alnum_prop": 0.5866983372921615, "repo_name": "CMU-Robotics-Club/roboticsclub.org", "id": "6e20b0db8e0cf132a85b0d2db8193ea36bda7a6...
import datetime import uuid from django.db import models from django.forms import ModelForm from django.forms import DateInput from Child import Child """The model for Medical Exam Part 2 stores the second half the medical exam, primarily observations on the child's physical and mental health. Also notes any treatm...
{ "content_hash": "f4a99719f8822563f943a6ad14e1fbd2", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 77, "avg_line_length": 39.53080568720379, "alnum_prop": 0.5793070375254765, "repo_name": "sscalpone/HBI", "id": "1da3cb3f6fe4b196d8eacb8655c8d4f907af0174", "size": "8360",...
''' * TeleStax, Open Source Cloud Communications * Copyright 2011-2016, Telestax Inc and individual contributors * by the @authors tag. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; ei...
{ "content_hash": "20abf22991d9e25e6a9cffa21efbd74c", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 104, "avg_line_length": 34.56, "alnum_prop": 0.6431327160493827, "repo_name": "Mobicents/restcomm-sdk-python", "id": "d590aa390343ca32f00bbbb968c87d7926f31977", "size": "25...
import glob import json import os import sys if len(sys.argv) < 2: print("usage: %s [json files or directory of json files ...]" % os.path.basename(sys.argv[0])) sys.exit(1) files = [] for arg in sys.argv[1:]: if not os.access(arg, os.F_OK): raise Exception("File \"%s\" not found" % arg) elif ...
{ "content_hash": "5f49b2483c48f9122e77ff947cd37d96", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 98, "avg_line_length": 25.931818181818183, "alnum_prop": 0.6126205083260298, "repo_name": "hxxft/lynx-native", "id": "53660318ddce3ba78cbb0696a217581960f91012", "size": "24...
""" Tests the purity module. """ import unittest import numpy as np import pandas as pd import mock from .context import purity from .context import config from .context import generator from .context import util from .context import test_utils as tu class PurityTestCase(unittest.TestCase): def setUp(self): ...
{ "content_hash": "52edfdfffd66698f4b8a7f3ab659e0b2", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 82, "avg_line_length": 35.770270270270274, "alnum_prop": 0.6184359652436721, "repo_name": "jjbrophy47/sn_spam", "id": "84e02fca0d036167a628ce7ccaa3aa81ac345a29", "size": "...
from gevent import monkey monkey.patch_all() from threading import Thread import time from datetime import datetime import logging from flask import Flask, send_from_directory from flask.ext.socketio import SocketIO, emit import os import fermenter logging.basicConfig() ##############################################...
{ "content_hash": "d128b497d740fafc17259a917274700b", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 87, "avg_line_length": 43.668539325842694, "alnum_prop": 0.45169175350572494, "repo_name": "lietk12/fermentor", "id": "e423fa013e78b4080589447de77287999768231d", "size": "...
from __future__ import absolute_import from newrelic.agent import ( FunctionTrace, ObjectWrapper, callable_name, current_transaction, set_transaction_name, ) # In agent configuration file add: # # [import-hook:nap.rest.publisher] # enabled = true # execute = nap.newrelic:instrument_django_nap_publisher def...
{ "content_hash": "1d32274352476abc2ee45b07d913d9f5", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 69, "avg_line_length": 24.81578947368421, "alnum_prop": 0.672322375397667, "repo_name": "limbera/django-nap", "id": "4b395e2b6ba710531d80968dec008ee5e7e195a1", "size": "943...
from six import moves import chainer from chainer.backends import cuda from chainer import function_node from chainer.utils import type_check from chainer import variable def _pair(x): if hasattr(x, '__getitem__'): return x return x, x class LocalConvolution2DFunction(function_node.FunctionNode): ...
{ "content_hash": "daa0bb4f7f090953634ea6229f0d0059", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 79, "avg_line_length": 37.63492063492063, "alnum_prop": 0.5020385210178546, "repo_name": "rezoo/chainer", "id": "f2e1f6ac51868d2f8271de6054dadf8db65457e6", "size": "7113",...
from google.net.proto import ProtocolBuffer import array import dummy_thread as thread __pychecker__ = """maxreturns=0 maxbranches=0 no-callinit unusednames=printElemNumber,debug_strs no-special""" if hasattr(ProtocolBuffer, 'ExtendableProtocolMessage'): _extension_runtime = True _ExtendablePro...
{ "content_hash": "7ab43bb65d1e883403a7282c2236b4c1", "timestamp": "", "source": "github", "line_count": 2040, "max_line_length": 255, "avg_line_length": 29.25980392156863, "alnum_prop": 0.6425531914893617, "repo_name": "ychen820/microblog", "id": "aa102eb0177af5244c3ee05adc458025b36dcd20", "size": ...
from __future__ import unicode_literals from rest_framework import permissions, filters, viewsets, status from rest_framework.response import Response from rest_framework_bulk import ListBulkCreateUpdateDestroyAPIView from .models import GroceryList, GroceryItem from .serializers import GroceryListSerializer, \ Gr...
{ "content_hash": "c810fa14651ee969a4d16ef48c5bc8a7", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 81, "avg_line_length": 35.671875, "alnum_prop": 0.7130968024529128, "repo_name": "rustymyers/OpenEats", "id": "4259f63526725d3434b65797ec98189e0d66c83e", "size": "2323", ...
from enum import Enum class Edge: """Edge class contains the connection from a node to a node. a Node can be a host port, output of async_fifo, port in a socket, or a device port. """ def __init__(self, us, ds): self.us = us self.ds = ds def __repr__(self): return "U(...
{ "content_hash": "4d32a08cb9c1e259e0e0d21af2fb95e9", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 74, "avg_line_length": 26.8, "alnum_prop": 0.6028784648187633, "repo_name": "alainmarcel/Surelog", "id": "1c43fa71bbb82846c555d0bca310adf074f93a62", "size": "2024", "bina...
__author__ = 'Jack River' import local_settings DEBUG = local_settings.DEBUG REDIS_CONNECTION = local_settings.REDIS_CONNECTION STATIC_ROOT = local_settings.STATIC_ROOT URL_CODE_REDIS_BASE_NAME = 'redirect:urlcode:{code}' URL_CODE_ID_REDIS_NAME = 'redirect:url:id' URL_CODE_SET_NAME = 'redirect:url:all' URL_REDIRE...
{ "content_hash": "b08c03daf8ad211b7a2857ba37f478dc", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 80, "avg_line_length": 24.58823529411765, "alnum_prop": 0.7535885167464115, "repo_name": "ritksm/lohr", "id": "c0e48c0375886ad0c6ebf2eea1cf45b5370d30f2", "size": "465", "...
from argparse import Namespace from idb.cli.commands.target import get_destination from idb.common.types import TCPAddress from idb.utils.testing import TestCase, ignoreTaskLeaks @ignoreTaskLeaks class TestParser(TestCase): async def test_get_destination_from_host_and_port(self) -> None: namespace = Name...
{ "content_hash": "c5e9986eef0cc9bf9c5826cff83bf007", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 68, "avg_line_length": 35.42307692307692, "alnum_prop": 0.6959826275787188, "repo_name": "facebook/FBSimulatorControl", "id": "f347fa8af3d49e3bc32db019672e624f4940fc64", "s...
import datetime import os import re import subprocess import sys PROJECT_NAME = "pulsar" PROJECT_DIRECTORY = os.path.join(os.path.dirname(__file__), "..") MOD_DIRECTORY = os.path.join(PROJECT_DIRECTORY, PROJECT_NAME) def main(argv): version = argv[1] history_path = os.path.join(PROJECT_DIRECTORY, "HISTORY.r...
{ "content_hash": "0758ee675ee39f67c1d0e3ea77340946", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 65, "avg_line_length": 28.17948717948718, "alnum_prop": 0.5787079162875342, "repo_name": "ssorgatem/pulsar", "id": "c82ce99ddc9a01638df9cc33825c83e7223de4d7", "size": "1141...
import wx from ui import PictureShowFrame from crawler import WebCrawler __author__ = 'DavidYang' def getCrawler(name, frame, url, dir_path, src_name): if name == 'WebCrawler': return WebCrawler.WebCrawler(frame, url, dir_path, src_name, 5) else: return None class PictureShowApp(wx.App): ...
{ "content_hash": "30707974bb73a39c98d553c58528d833", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 88, "avg_line_length": 23, "alnum_prop": 0.6312399355877617, "repo_name": "yangdw/PyRepo", "id": "1691b77bf966b5502f3d33efc6d2df916d6ea7cb", "size": "637", "binary": fals...
import sys from cratis.generators.module import SettingsModuleFile from cratis.generators.requirements import add_to_requirements from pkg_resources import load_entry_point, iter_entry_points import re from collections import namedtuple from cratis.bootstrap import run_env_command Url = namedtuple('Url', ['feature...
{ "content_hash": "7212c66edc27d7be8669615be67731b4", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 140, "avg_line_length": 26.371794871794872, "alnum_prop": 0.6242100145843461, "repo_name": "django-cratis/cratis", "id": "8292b95647b78f97a75574f60265b0c98891ea4c", "size":...
import re from datetime import datetime from tower import ugettext_lazy as _ # Add-on and File statuses. STATUS_NULL = 0 STATUS_UNREVIEWED = 1 STATUS_PENDING = 2 STATUS_NOMINATED = 3 STATUS_PUBLIC = 4 STATUS_DISABLED = 5 _STATUS_LISTED = 6 # Deprecated. See bug 616242 STATUS_BETA = 7 STATUS_LITE = 8 STATUS_LITE_AND...
{ "content_hash": "edc76b32a116fc153f31a4fb016b42ad", "timestamp": "", "source": "github", "line_count": 487, "max_line_length": 78, "avg_line_length": 30.22381930184805, "alnum_prop": 0.6828588898702358, "repo_name": "clouserw/olympia", "id": "4f7fe425c9cb1e7098bd7222d09dd33715c7c5cc", "size": "147...
from factor import * def is_primiitve(number,mod): factorsOfToitent = factor(mod-1) for prime in factorsOfToitent: for exp in xrange(1,factorsOfToitent[prime]+1): if prime**exp == mod-1: return True if number**(prime**exp)%mod == 1: return False return True
{ "content_hash": "83abca7fcafe40ba39449a041c21f2b0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 49, "avg_line_length": 25.636363636363637, "alnum_prop": 0.6843971631205674, "repo_name": "Bedrock02/General-Coding", "id": "a2cd908d28a0f1e03e1695688cb2e4ca9052c27a", "siz...
from __future__ import unicode_literals import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('layers', '0001_initial'), ] operations = [ migrations.AlterField( model_name='layer', nam...
{ "content_hash": "0e3ae85b120a0c0c707fc9028ada58b1", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 83, "avg_line_length": 22.68421052631579, "alnum_prop": 0.6241299303944315, "repo_name": "RubenSchmidt/giscademy", "id": "3112e8a1abb7f0673716390f033cf91ae65572f3", "size":...
from .. import Provider as BaseProvider class Provider(BaseProvider): # jobs parsed from a list provided by State Treasury: # http://www.valtiokonttori.fi/download/noname/%7BF69EA5BD-C919-49FE-8D51-91434E4B030D%7D/82158 jobs = [ "Agrologi", "Aikuiskoulutusjohtaja", "Aineenopettaja"...
{ "content_hash": "1bb7d1c6aa11f436ce4ea71cac758716", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 99, "avg_line_length": 29.762376237623762, "alnum_prop": 0.5853293413173652, "repo_name": "joke2k/faker", "id": "afa65f07d499e4acc12f9c9d37f8609a28f58687", "size": "6120",...
import json import os import chardet import subprocess from typing import ( Dict, Any, Optional ) from pmfp.const import PMFPRC_PATH, PLATFORM def install( config: Dict[str, Any], package: Optional[str] = None, dev: bool = False) -> bool: """python 安装依赖. Args: conf...
{ "content_hash": "0b958fec0c81f1792c339d69ee4ce678", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 69, "avg_line_length": 30.82191780821918, "alnum_prop": 0.5222222222222223, "repo_name": "Python-Tools/pmfp", "id": "d044835a72a4a08df764fe1bc2f87451e3c9fd3b", "size": "241...
import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../')) # -- General con...
{ "content_hash": "81ef5b6f3b2e2f3fc998fd7be26662c9", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 80, "avg_line_length": 32.69257950530035, "alnum_prop": 0.7047124945957631, "repo_name": "beylsp/appletea", "id": "48501267c210950e9a3ff6f7cd922dbfe776052e", "size": "9673...
__all__ = ['Distribution'] import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist import itertools from collections import defaultdict from distutils.errors import ( DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError, ...
{ "content_hash": "5121eb706644855d0c43943c4badde18", "timestamp": "", "source": "github", "line_count": 988, "max_line_length": 79, "avg_line_length": 40.1417004048583, "alnum_prop": 0.6050932929904186, "repo_name": "Kamik423/uni_plan", "id": "9a034db553b8bf1d9bc3d1efe73b7e3e73e398c7", "size": "396...
"""Tests for LossScaleOptimizer.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from absl.testing import parameterized from tensorflow.python.distribute import distribution_strategy_context from tensorflow.python.distribute import mirrored_s...
{ "content_hash": "121ac1956aa4f5524ce2a70d0101e925", "timestamp": "", "source": "github", "line_count": 306, "max_line_length": 90, "avg_line_length": 43.52287581699346, "alnum_prop": 0.6930470040546629, "repo_name": "alsrgv/tensorflow", "id": "90e17283e3b42dd88be8464c49db9b294f3b76af", "size": "14...
import io import os import sys import time from IOST_Basic import * from IOST_Config import *
{ "content_hash": "cf5dd18245a43d392137ed5904f19abd", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 44, "avg_line_length": 19.142857142857142, "alnum_prop": 0.5522388059701493, "repo_name": "HPPTECH/hpp_IOSTressTest", "id": "3709fa2d3ab67261b26930d14f4a9dffdbdbf30a", "size...
''' Translates a source file using a translation model. ''' import argparse import numpy import cPickle as pkl from nmt import (build_sampler, init_params) from mixer import * from multiprocessing import Process, Queue def gen_sample(tparams, f_inits, f_nexts, x, options, trng=None, k=1, maxlen=500,...
{ "content_hash": "a8e879a588181ebdcd9c513805af9338", "timestamp": "", "source": "github", "line_count": 330, "max_line_length": 114, "avg_line_length": 34.56363636363636, "alnum_prop": 0.5540066631597405, "repo_name": "nyu-dl/dl4mt-cdec", "id": "b6bc227d0d974984fccb736c24f7f3efb4ab662e", "size": "1...
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("MLPRegressor" , "freidman3" , "hive")
{ "content_hash": "8d2a85e6b292bb30b3b550b98c271bc8", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 66, "avg_line_length": 31.75, "alnum_prop": 0.7637795275590551, "repo_name": "antoinecarme/sklearn2sql_heroku", "id": "92a0fbbc347cd35341f54dbe0494734f97dbb022", "size": "12...
import ConfigParser import os import glob from tworpus import settings def get_converter_dirs(): pathname = settings.CONVERTERS_DIR dirs = [] for dir in os.walk(pathname): if os.path.isdir(dir[0]) and dir[0] is not pathname: cfgfile = glob.glob(os.path.join(dir[0], "config.cfg")) ...
{ "content_hash": "7bbd2061a00e134c3fd4e49b8c3f04d8", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 77, "avg_line_length": 30.58823529411765, "alnum_prop": 0.5826923076923077, "repo_name": "markusmichel/Tworpus-Client", "id": "320686906bae202589d594d6573a61e678a74264", "s...
from sys import argv, stderr from drawer import * from kmeans import kmeans def read_vectors(file_name): result = None with open(file_name, 'r') as input_file: vector_length = int(input_file.readline()) vectors = list(map(lambda line: tuple(map(int, line.split())), input_file.readlines())) ...
{ "content_hash": "e5c2c46b942ef945f2b44969c1fa1e58", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 95, "avg_line_length": 29.375, "alnum_prop": 0.6153191489361702, "repo_name": "vanashimko/k-means", "id": "e5afbd08b5d0e66a38de890fdbebcc196fe220ae", "size": "1175", "bin...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['RelativeDifference'] , ['PolyTrend'] , ['Seasonal_WeekOfYear'] , ['ARX'] );
{ "content_hash": "38c66821cfb80370e16b3d5fd7f90406", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 98, "avg_line_length": 42.75, "alnum_prop": 0.7309941520467836, "repo_name": "antoinecarme/pyaf", "id": "6d4d68c1ba4de181f26eb5f66de524a15dd2879f", "size": "171", "binary"...
from django import forms from django.utils.translation import ugettext_lazy as _ class DateRangeField(forms.DateField): def to_python(self, value): if not value: return None values = value.split(' - ') from_date = super(DateRangeField, self).to_python(values[0]) if le...
{ "content_hash": "cf30dc2b1446475d29cf306c11bddd8c", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 87, "avg_line_length": 36.11504424778761, "alnum_prop": 0.5329576084293065, "repo_name": "jorgecarleitao/public-contracts", "id": "1648f16a19b43c61b9a74fdd4cfa9eb4f023becf",...
''' Deletion functionality. ''' from __future__ import with_statement from os.path import join as path_join from message import Messager def delete_document(collection, document): Messager.error("Document deletion not supported in this version.") return {} def delete_collection(collection): Messager.err...
{ "content_hash": "e3423b6ff687054f70ef5658c5315f72", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 72, "avg_line_length": 23.352941176470587, "alnum_prop": 0.7329974811083123, "repo_name": "wolfe-pack/moro", "id": "851e4650f229689ca4219cdcb8c4dee2c53d2e53", "size": "544"...
from BTL.platform import bttime def minctx(a,b): A = B = 0 if a.rate > 0: A = a.offset_amount / a.rate if b.rate > 0: B = b.offset_amount / b.rate if A <= B: return a return b class Dummy(object): def __init__(self, next): self.next_upload = next def sen...
{ "content_hash": "74ff2aa8ad392c1befc8eb5d172c890f", "timestamp": "", "source": "github", "line_count": 179, "max_line_length": 82, "avg_line_length": 35.03351955307262, "alnum_prop": 0.4951363418912454, "repo_name": "rabimba/p2pScrapper", "id": "5f5652875d6eca184022272074ffa9655f5a1085", "size": "...
""" Created on Sat Aug 24 16:01:26 2019. @author: tageldim """ import numpy as np from shapely.geometry.polygon import Polygon from shapely.ops import cascaded_union from histomicstk.annotations_and_masks.masks_to_annotations_handler import \ _parse_annot_coords from histomicstk.annotations_and_masks.pyrtree.rtr...
{ "content_hash": "1eb4c2efe4e9a39020032c35c2bfc744", "timestamp": "", "source": "github", "line_count": 284, "max_line_length": 79, "avg_line_length": 39.563380281690144, "alnum_prop": 0.509878960484158, "repo_name": "DigitalSlideArchive/HistomicsTK", "id": "72bebf1f5559e3710610a17f0cb599bebffb95d3",...
from ..Qt import QtGui, QtCore from ..templates import ui_plotTemplate as plotTemplate from ..utilities.expeyesWidgetsNew import expeyesWidgets import sys,time,functools,os _translate = QtCore.QCoreApplication.translate class AppWindow(QtGui.QWidget, plotTemplate.Ui_Form,expeyesWidgets): subsection = 'apps' helpfi...
{ "content_hash": "f32f24ad80ac8ed5da1c44c69d4e9486", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 191, "avg_line_length": 39.92307692307692, "alnum_prop": 0.7463070006422607, "repo_name": "csparkresearch/ExpEYES17-Qt", "id": "695335bbeebd956ed1941a760db54e87a2fa660b", "...
""" This is a Media Backend that allows you to access the cool and cute pictures from lolcats.com. This is mainly meant as a Sample Media Backend to learn how to write a Media Backend. So. You are still reading which allows me to assume that you want to learn how to write a Media Backend for Coherence. NICE :) . Once...
{ "content_hash": "8dfa94b27b52c38add4469234ef60a46", "timestamp": "", "source": "github", "line_count": 337, "max_line_length": 146, "avg_line_length": 40.29080118694362, "alnum_prop": 0.6486964206805126, "repo_name": "coherence-project/Coherence", "id": "0d74e7c62ffbc90602cab55f860af64239b15eae", ...
from tpg.program import Program from tpg.action_object import ActionObject import numpy as np from tpg.utils import flip import random import collections import uuid import copy """ A team has multiple learners, each learner has a program which is executed to produce the bid value for this learner's action. """ class ...
{ "content_hash": "d261a80de76be9389fc30747648b2fba", "timestamp": "", "source": "github", "line_count": 280, "max_line_length": 196, "avg_line_length": 32.10357142857143, "alnum_prop": 0.6016242073645567, "repo_name": "Ryan-Amaral/PyTPG", "id": "f31c4dde55eaf34cb2a4c739290c9e85696445fb", "size": "8...
"""Motor controller SI7021 hardware monitor configuration.""" from makani.avionics.firmware.drivers import si7021_types from makani.avionics.firmware.serial import motor_serial_params as rev si7021_default = { 'name': '', 'address': -1, 'resolution': si7021_types.kSi7021ResolutionRh12BitTemp14Bit, } gin_...
{ "content_hash": "43b3db6cbf42999c4c05b8fccea6e8b0", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 70, "avg_line_length": 30.17391304347826, "alnum_prop": 0.7046109510086456, "repo_name": "google/makani", "id": "16f95f5bc347f684f7df5041c12e65b7ba1f5157", "size": "1283", ...
"""Counts the vocabulary. Used by the other input formatting scripts.""" from __future__ import absolute_import, division, print_function from argparse import ArgumentParser from collections import Counter from emLam.utils import openall def parse_arguments(): parser = ArgumentParser( description='Count...
{ "content_hash": "bf2f4475d1e9b34b30af14afc54682ac", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 81, "avg_line_length": 29.877551020408163, "alnum_prop": 0.6024590163934426, "repo_name": "DavidNemeskey/emLam", "id": "31082e1135cf5a766225e7f0dc2a81128eca7be2", "size": "...
from flask.ext.classy import FlaskView, route from flask import render_template, request, abort, flash, current_app from flask_menu.classy import classy_menu_item from flask_login import login_required, current_user from .forms import ( StarForm, EditImages, UploadImages, RemoveContributor, AddCon...
{ "content_hash": "2f4f0f93a61098ad93de748ac0c78203", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 99, "avg_line_length": 32.72185430463576, "alnum_prop": 0.5958308034810768, "repo_name": "nickw444/ShowCSE", "id": "b57ad597c775dcca09c63351b0a3b0b431d35a8c", "size": "494...
import urllib2 import sys, getopt import base64 from urlparse import urlparse import json from pprint import pprint import cdhRest yarn_json = ' { "items" : [ { "name" : "yarn_nodemanager_resource_cpu_vcores", "value" : "8" }, { "name" : "yarn_nodemanager_resource_memory_mb", "value" : "8192" } ] }' content_header = ...
{ "content_hash": "ba5a2fbe9958a6f7058d24b24907a75a", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 169, "avg_line_length": 39.436619718309856, "alnum_prop": 0.6160714285714286, "repo_name": "doronve/myrep", "id": "3ce2b3933382b31b28c9fcfc52c41f5de36e94a4", "size": "2820"...
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("DummyClassifier" , "FourClass_100" , "postgresql")
{ "content_hash": "861d975045a705d55996d5fb64a48183", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 72, "avg_line_length": 37, "alnum_prop": 0.7905405405405406, "repo_name": "antoinecarme/sklearn2sql_heroku", "id": "0003899124b36e0f28d3b8ee7503af9c3b44342e", "size": "148",...
""" datumio.buffering --------- Functions that wrap around generators to enable buffering. Buffering loads the `n` generator calls into memory on one call. Copied and modified from Kaggle National Data Science Bowl's 1st place winners. Original in: https://github.com/benanne/kaggle-ndsb/blob/master/buffering.py """ im...
{ "content_hash": "be096edbadf572ae067e22bf96753a30", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 79, "avg_line_length": 32.0722891566265, "alnum_prop": 0.66190833959429, "repo_name": "longubu/datumio", "id": "8e8a706600ce9a9310bc4406a426a7c032b181ef", "size": "4092", ...
DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'whippedtest' } } ROOT_URLCONF = 'whippedcream.runtests.urls' SECRET_KEY = 'not a secret' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ...
{ "content_hash": "4fab6f484168014abfd139be6821f350", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 69, "avg_line_length": 29.652173913043477, "alnum_prop": 0.7133431085043989, "repo_name": "paulcwatts/django-whippedcream", "id": "20e227a55c4654b3df63f34464551a1db59e6390", ...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/earring/shared_earring_s13.iff" result.attribute_template_id = 11 result.stfName("wearables_name","earring_s13") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "3bccaada0647af0efee29614f4f6504f", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 77, "avg_line_length": 24.153846153846153, "alnum_prop": 0.7070063694267515, "repo_name": "obi-two/Rebelion", "id": "9351c683808e01ddbe76b6a286720bcadafae4c0", "size": "459...
""" Test parsing of complex date and times """ import unittest, time, datetime import parsedatetime as pdt class test(unittest.TestCase): @pdt.tests.assertEqualWithComparator def assertExpectedResult(self, result, check, **kwargs): return pdt.tests.compareResultByTimeTuplesAndFlags(result, check, **k...
{ "content_hash": "2d971a4ec9dcbb1f4cc1edea4bd589fc", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 111, "avg_line_length": 56.35526315789474, "alnum_prop": 0.6346019145458791, "repo_name": "cpatulea/parsedatetime", "id": "07bd095507080ae6ffbcde9bed033eadc6144399", "size"...
from __future__ import division, unicode_literals from py2neo.batch.core import Batch class ReadBatch(Batch): """ Generic batch execution facility for data read requests, """ def __init__(self, graph): Batch.__init__(self, graph) def stream(self): for result in self.graph.batch.stre...
{ "content_hash": "c11890671a592c67178a16c01fd1b634", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 75, "avg_line_length": 25.666666666666668, "alnum_prop": 0.6558441558441559, "repo_name": "pombreda/py2neo", "id": "b72e96204c5202f07a6851161a1b0e1ce848b8c3", "size": "1092...
from . import AWSHelperFn, AWSObject, AWSProperty from .validators import boolean, network_port, positive_integer class DBInstance(AWSObject): resource_type = "AWS::RDS::DBInstance" props = { 'AllocatedStorage': (positive_integer, True), 'AllowMajorVersionUpgrade': (boolean, False), '...
{ "content_hash": "69836e787fa3dd8371b9610ec8c8e951", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 67, "avg_line_length": 33.1078431372549, "alnum_prop": 0.6183002665087356, "repo_name": "iblazevic/troposphere", "id": "e365ce57d54df61204e8733813a168689a3d91a1", "size": ...
import base64 import os from django import test from mysqlapi.api.decorators import basic_auth_required class BasicAuthTestCase(test.TestCase): @classmethod def setUpClass(cls): cls.factory = test.RequestFactory() def setenvs(self): os.environ["API_USERNAME"] = self.username = "api" ...
{ "content_hash": "93bfc7c964feaf4f838cf790f02a847a", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 76, "avg_line_length": 33.62626262626262, "alnum_prop": 0.5989786722739562, "repo_name": "caio-nas/tsuru-mysql", "id": "94b7c6fc5d7e226748b9eba427967b81fc738d7d", "size": "...
import xml.sax import hashlib import base64 from boto.connection import AWSQueryConnection from boto.mws.exception import ResponseErrorFactory from boto.mws.response import ResponseFactory, ResponseElement from boto.handler import XmlHandler import boto.mws.response __all__ = ['MWSConnection'] api_version_path = { ...
{ "content_hash": "8cb2fb700334e41d70b20d13cbd2e74d", "timestamp": "", "source": "github", "line_count": 705, "max_line_length": 79, "avg_line_length": 41.59716312056737, "alnum_prop": 0.6066289299597627, "repo_name": "darcyliu/storyboard", "id": "bfb0d29a2116f973490ad243aaeac375d1193adf", "size": "...
from datetime import timedelta from py4j.java_gateway import JavaClass, get_java_class, JavaObject from py4j.protocol import Py4JJavaError from pyflink.java_gateway import get_gateway def to_jarray(j_type, arr): """ Convert python list to java type array :param j_type: java type of element in array ...
{ "content_hash": "bb97989fdfb33542afcb82000900f148", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 99, "avg_line_length": 37.67741935483871, "alnum_prop": 0.675656392694064, "repo_name": "godfreyhe/flink", "id": "baea98a294c5117b78ad517525221b7cec790ea4", "size": "7967"...
import json # format `print` def printf(msg): pass def json_encode(obj): try: return json.dumps(obj) except ValueError: return obj def json_decode(obj): try: return json.loads(obj) except ValueError: return obj
{ "content_hash": "903e8647ee2c3a5de0c2a794b1679c48", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 30, "avg_line_length": 13.5, "alnum_prop": 0.5962962962962963, "repo_name": "MrKiven/PAsync", "id": "e359f7dbf0560a6326ac10a462b53241b9fd1eeb", "size": "295", "binary": f...
from builtins import range import time import unittest import redpipe # test harness from unit_test_setup import generate_uuid # test-harness from setup_redis import ( hbom, clear_redis_testdata, default_redis_connection, skip_if_redis_disabled, TEST_DIR, redislite, ) class TTSave(hbom.Redis...
{ "content_hash": "f3ed11d6ded6b3d3b1a0a334de2fa661", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 80, "avg_line_length": 24.976878612716764, "alnum_prop": 0.6056468410090257, "repo_name": "happybits/hbom", "id": "c8e610d4919b71f7d630bca47f2f28947c4c7ea3", "size": "4383...
from unittest import mock from oslo_utils import uuidutils import six import webtest import wsme from wsme import types as wtypes from magnum.api.controllers.v1 import types from magnum.common import exception from magnum.common import utils from magnum.tests.unit.api import base class TestDNSListType(base.Functio...
{ "content_hash": "2f1c812197225b60dafc278a20c8eb0c", "timestamp": "", "source": "github", "line_count": 265, "max_line_length": 79, "avg_line_length": 35.633962264150945, "alnum_prop": 0.629037382187864, "repo_name": "openstack/magnum", "id": "f086310f178efc2890c63203b5bf1d6566638f7d", "size": "100...
# Functions have two parts: a header and a body. The header # of a function is made up of the keyword 'def' followed by # the function name, parameters in parenthesis, and a colon. # The body is indented 4 spaces after the header. def function_name(parameters): print "This is the body!!!" # ...
{ "content_hash": "7553d6ea08a0dd5a9c4fb8744e4e6d55", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 62, "avg_line_length": 25.476190476190474, "alnum_prop": 0.6512149532710281, "repo_name": "PableraShow/Learn-to-program-with-Python-guide", "id": "b432b42847a1175f3a16b87e95...
__author__ = 'jdaniel' __all__ = ['algorithm_base', 'serial', 'primary', 'islands', 'spheres']
{ "content_hash": "c3695d40458552c328c6d5f9624f9ffe", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 71, "avg_line_length": 47.5, "alnum_prop": 0.5894736842105263, "repo_name": "jldaniel/Gaia", "id": "1c40b66784a192ff97eac9525ebb9ebdbb668b97", "size": "95", "binary": fals...
# vim:set ts=2 sw=2 sts=2 et # ***** BEGIN LICENSE BLOCK ***** # Version: MIT # # Portions created by Alan Antonuk are Copyright (c) 2012-2013 # Alan Antonuk. All Rights Reserved. # # Portions created by VMware are Copyright (c) 2007-2012 VMware, Inc. # All Rights Reserved. # # Portions created by Tony Garnock-Jones ar...
{ "content_hash": "7afd524c69df88965ed9651f9bd071fe", "timestamp": "", "source": "github", "line_count": 784, "max_line_length": 149, "avg_line_length": 33.38647959183673, "alnum_prop": 0.6108118433619867, "repo_name": "junaidnasir/nginx-rtmp-HLS-rabbitmq", "id": "500745f08b2b681c1745d1daf492d5e91c571...
from trainer.trainer import TrainerParams from evaluator.evaluator import EvaluatorParams # Fine tune from 184587 steps. step3_1 = TrainerParams( feature_extractor='vgg_16', model_name='ssd512', fine_tune_fe=True, train_dir='../experiments/ssd512_voc0712_29-11-2017/logs/finetune_person', checkpoin...
{ "content_hash": "bb1b3a8229a819de848cbc3cd52a1890", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 119, "avg_line_length": 37.25, "alnum_prop": 0.7315436241610739, "repo_name": "fisheess/modular_SSD_tensorflow", "id": "d6cfa01a6e19abe64d42ad7c5c835c4d79f7367f", "size": "...