text
stringlengths
4
1.02M
meta
dict
from django.test import TestCase from django.contrib.auth.models import User from .models import UserSecret class UserRegistrationTestCase(TestCase): def setUp(self): print ">>>creating an instance of User" User.objects.create(username='test_username', password='test_password', email='[email protected]', first_nam...
{ "content_hash": "d28f8db94fa41a6138a3960260495f7a", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 135, "avg_line_length": 33.52173913043478, "alnum_prop": 0.7405966277561609, "repo_name": "michaelhenry/codebehind", "id": "d81111c95618ff196719e1c2db88d08a8aabb282", "size...
from pyspark.streaming.dstream import DStream from pyspark.streaming.util import TransformFunction from pyspark.sql.snappy import SnappyContext from pyspark.sql.types import StructType class SchemaDStream(DStream): """ A SQL based DStream with support for schema/Product This class offers the ability to ...
{ "content_hash": "106a54e8764916c5de5ee371e357455b", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 70, "avg_line_length": 38.03333333333333, "alnum_prop": 0.7099035933391762, "repo_name": "vjr/snappydata", "id": "ef63418896005ea113769986865ff44b19126549", "size": "1781",...
import sys """ functionモジュールのsensor_update関数をテストする """ sys.path.append('../PFoE/functions') sys.path.append('../PFoE/class_definition') from functions import sensor_update import class_definition mouse1=class_definition.Robot(sensor=4,choice=3)
{ "content_hash": "9d2cfbee0106b7616de4b490fa8f71e6", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 48, "avg_line_length": 20.75, "alnum_prop": 0.7751004016064257, "repo_name": "kato-masahiro/particle_filter_on_episode", "id": "9c04eb1b4b1c357db12053fd258ae859bca7b59d", "...
SPEW_SCROLL_RATE = 1 import sys import os import time import signal import random import socket import hashlib import threading from BitTornado.Client.download_bt1 import BT1Download, defaults, \ parse_params, get_usage, get_metainfo from BitTornado.Network.RawServer import RawServer from BitTornado.Network.Socket...
{ "content_hash": "102ca89a0df480a7f8863a849c16bdd1", "timestamp": "", "source": "github", "line_count": 387, "max_line_length": 79, "avg_line_length": 39.92506459948321, "alnum_prop": 0.5310335900588958, "repo_name": "jakesyl/BitTornado", "id": "f82d470bac480eedf4d34eecf91b0814fab79cc8", "size": "1...
from __future__ import with_statement import os import sys from datetime import datetime from libcloud.utils.iso8601 import UTC from libcloud.utils.py3 import httplib from libcloud.compute.drivers.ec2 import EC2NodeDriver from libcloud.compute.drivers.ec2 import EC2USWestNodeDriver from libcloud.compute.drivers.ec2 ...
{ "content_hash": "f6610f220f1e0d1ba511c5343d7884b6", "timestamp": "", "source": "github", "line_count": 1804, "max_line_length": 119, "avg_line_length": 42.676829268292686, "alnum_prop": 0.6125940069360558, "repo_name": "jimbobhickville/libcloud", "id": "79b5dc530b548c634c313405f41cc28a1eabe274", "...
from __future__ import absolute_import, division # from io import StringIO from glob import glob import os.path as op import tempfile import simplejson as json from pandas.api import types import numpy as np import pandas as pd # from _common import cooler_cmp from click.testing import CliRunner import cooler import p...
{ "content_hash": "a63a5a31d3ce04a2593b1b333b041864", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 95, "avg_line_length": 33.35217391304348, "alnum_prop": 0.5716334245861036, "repo_name": "mirnylab/cooler", "id": "4ec4646ab421c4169b87b27a4682c52167ec8578", "size": "7671...
from cleo import Output from webdevops.command import DoitCommand from webdevops.taskloader import DockerPushTaskLoader class DockerPushCommand(DoitCommand): """ Push images to registry/hub docker:push {docker images?* : Docker images (whitelist)} {--dry-run : show on...
{ "content_hash": "4bddd61872e68a915e0ce98b26073182", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 72, "avg_line_length": 28.615384615384617, "alnum_prop": 0.5833333333333334, "repo_name": "webdevops/Dockerfile", "id": "85912b5b7c5973dc2f59e8269d77d4d8bb4efd8c", "size": ...
import unittest from openprocurement.api.tests.base import snitch from openprocurement.tender.belowthreshold.tests.complaint import TenderComplaintResourceTestMixin from openprocurement.tender.belowthreshold.tests.complaint_blanks import ( # TenderComplaintDocumentResourceTest not_found, create_tender_com...
{ "content_hash": "ea0ef5861e3342d1a0a3821fa19367b1", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 98, "avg_line_length": 36.506493506493506, "alnum_prop": 0.6976165065812878, "repo_name": "openprocurement/openprocurement.tender.openeu", "id": "9a5b87de1a2394ceb4346ff84c5c...
from biplist import * from biplist import PlistWriter import datetime import io import os #from cStringIO import StringIO import subprocess import tempfile from test_utils import * import unittest try: unicode except NameError: unicode = str class TestWritePlist(unittest.TestCase): def setUp(self): ...
{ "content_hash": "3f1bc7816fa1cd8e7b9dcef132e2772c", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 133, "avg_line_length": 36.881278538812786, "alnum_prop": 0.5535471090751517, "repo_name": "ForrestAlfred/biplist", "id": "2998941ef18e83d7e0f19377255ba3c5dfaac297", "size...
from ..Qt import QtCore, QtGui, QtWidgets class DockDrop(object): """Provides dock-dropping methods""" def __init__(self, allowedAreas=None): object.__init__(self) if allowedAreas is None: allowedAreas = ['center', 'right', 'left', 'top', 'bottom'] self.allowedAreas = set(al...
{ "content_hash": "c9985a362422180ba678519ad9730887", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 91, "avg_line_length": 32.14173228346457, "alnum_prop": 0.5159235668789809, "repo_name": "mylxiaoyi/mypyqtgraph-qt5", "id": "f21b8c252dad0cf1c0aa68b7bb59acc0e3f69efa", "si...
from django.core import mail from django.contrib.auth.models import User, Group from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from projector.models import Task, Team, Membership class EmailTest(TestCase): fixtures = ['test_data.json'] def...
{ "content_hash": "314494aa4d0f4757e8c78705b5b4da40", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 79, "avg_line_length": 35.48571428571429, "alnum_prop": 0.6137949543746645, "repo_name": "lukaszb/django-projector", "id": "ab4a5eff842e207fc54aba433e8ddeef86379569", "siz...
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('.')) import juliadoc i...
{ "content_hash": "fcd3ca850a98a56755cf8b313800e33c", "timestamp": "", "source": "github", "line_count": 251, "max_line_length": 79, "avg_line_length": 31.816733067729082, "alnum_prop": 0.7062359128474831, "repo_name": "JuliaPackageMirrors/MarketData.jl", "id": "ad6969bbe9d5284f3cbe0ae920e8334970a7352...
import os import sys import datetime import time import azure.batch.batch_service_client as batch import azure.batch.batch_auth as batchauth import azure.batch.models as batchmodels from azure.storage.table import TableService, TableBatch from azure.storage.blob import BlockBlobService def get_search_state(all_tasks_...
{ "content_hash": "08009ccc0f7283936399dbc53c5b17c6", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 89, "avg_line_length": 36.125984251968504, "alnum_prop": 0.5961203138622494, "repo_name": "djolent/WebApp", "id": "0965d16d937dcf3c101f0b04716f04a6b41b6bfc", "size": "4588...
from django.contrib import admin from .models import SupportTicket class SupportTicketAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'phone_number') admin.site.register(SupportTicket, SupportTicketAdmin)
{ "content_hash": "95dba8dcc2b3e58f120bdd7e75313b31", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 54, "avg_line_length": 22.1, "alnum_prop": 0.7737556561085973, "repo_name": "TwilioDevEd/browser-calls-django", "id": "17436f8534d16882ef0b873fefe653da405166c4", "size": "2...
from .app import app import multiapp.routes
{ "content_hash": "97865344e09c1d0355ade721e6421391", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 22, "avg_line_length": 11.5, "alnum_prop": 0.782608695652174, "repo_name": "opendatadurban/multi-app", "id": "d64cb9db5a48fcdc7b1be019d3e95b7110424f7e", "size": "46", "bin...
import sys import os import os.path import subprocess import xml.etree.ElementTree as xml scriptDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append( scriptDir + "/GeneratorUtils" ) import xml2objects import generatedCode as gen import containerWidget as cw import dialogWidget as dw import commonWidget ...
{ "content_hash": "2376688bca02748cce4a2a22b7256007", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 142, "avg_line_length": 42.61616161616162, "alnum_prop": 0.6854704906375918, "repo_name": "ADVANTECH-Corp/node-alljoyn", "id": "58361fc591dc8a64b71c498a3b3edf9c0f4fd770", "...
"""Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the file specified on the command line. Do a simple split() on whitespace to obtain all the words in the file. Rather than read the file line by line, it's easier to read it into one giant string and split it once. Build a "mimic" dic...
{ "content_hash": "071b716da7da1e8164b3fb88f4112216", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 78, "avg_line_length": 29.735294117647058, "alnum_prop": 0.718595450049456, "repo_name": "cordjr/wttd-exercise", "id": "708dddc43258148e25b5df30e94ee8a4e1b7c1f0", "size": "...
import os.path from subprocess import PIPE from ovm.drivers.storage.generic import StorageDriver from ovm.exceptions import DriverError from ovm.utils.logger import logger from ovm.utils.compat23 import Popen, etree __all__ = ['LvmDriver'] class LvmDriver(StorageDriver): DISK_FORMAT = 'raw' def __init__(...
{ "content_hash": "fdcfa6e6185cca36464682954f14d5b7", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 72, "avg_line_length": 31.819444444444443, "alnum_prop": 0.6006110868616324, "repo_name": "lightcode/OVM", "id": "a8f86c1f41941f1a3f0c913f785915c5c82e3eef", "size": "2339",...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pdfapp', '0036_auto_20170331_0223'), ('pdfapp', '0037_auto_20170331_0207'), ] operations = [ ]
{ "content_hash": "24d6edf31312f05454b5d51bc93ebd99", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 46, "avg_line_length": 18.785714285714285, "alnum_prop": 0.6311787072243346, "repo_name": "NumberZeroSoftware/PDFINVEST", "id": "f5036bdc5f0ae8819eef43ab4b4777e722335c88", ...
""" Helper funcs for tests """ import os from .inputfiles import get_filepath from junit2htmlreport import runner def run_runner(tmpdir, filename, *extra): """ Run the junit2html program against the given report and produce a html doc :param tmpdir: :param filename: :param extra: addtional argumen...
{ "content_hash": "2c94ed9da4030b45dd7ff57505457901", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 78, "avg_line_length": 26.03125, "alnum_prop": 0.6662665066026411, "repo_name": "inorton/junit2html", "id": "564002ab1042b52bc4c0c6e921c1d6cd4e65a487", "size": "833", "bi...
import time from collections import defaultdict class TimeIt(object): def __init__(self, prefix=''): self.prefix = prefix self.start_times = dict() self.elapsed_times = defaultdict(int) def start(self, name): assert(name not in self.start_times) self.start_times[name] =...
{ "content_hash": "b6617570da1d3bd82132fba36c03e820", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 99, "avg_line_length": 38.61363636363637, "alnum_prop": 0.5609181871689229, "repo_name": "berkeleydeeprlcourse/homework", "id": "7751ac7df3d61c57eb74ae9d2e60ecaccecd1948", ...
""" PhraseApp PhraseApp API for the interaction with the PhraseApp localization platform OpenAPI spec version: 2.0 Contact: [email protected] Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class Translatio...
{ "content_hash": "bb6eaf2f90dda74af6cddb563d4e3e05", "timestamp": "", "source": "github", "line_count": 512, "max_line_length": 303, "avg_line_length": 26.599609375, "alnum_prop": 0.5728761289375137, "repo_name": "phrase/phraseapp-apispec", "id": "bba43a312b91a7c24ba5967f0522d14e9c15b980", "size": ...
import argparse from target_interaction_finder import TargetInteractionFinder def main(): parser = argparse.ArgumentParser( description='''Extract subgraph(s) from XGMML network(s).''') parser.add_argument('ids', type=str, help='identifier or file path ...
{ "content_hash": "025d5a5f8319c5ab9f3edd5c745de68c", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 85, "avg_line_length": 36.75806451612903, "alnum_prop": 0.49758666081614744, "repo_name": "ariutta/target-interaction-finder", "id": "965988667a0cd5b85c46d70d87bad052b4693d33...
import logging import time from collections import namedtuple States = namedtuple('States', ['STARTING', 'DELETED', 'RUNNING', 'STOPPED', 'FAILED']) INSTANCE_STATUS = States('starting', 'deleted', 'running', 'stopped', 'failed') class PersistenceManager(object): """ wrapper ar...
{ "content_hash": "62b511c1013488f6421d83819b4864f3", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 79, "avg_line_length": 34.62264150943396, "alnum_prop": 0.6343324250681199, "repo_name": "BeneDicere/metahosting-worker", "id": "9436ca2d4c7c9fe1b77c7af336298dd7c6cba56b", ...
"""Tests for importing model evaluations.""" import json import os from unittest import mock import google.auth from google.cloud import aiplatform from google_cloud_pipeline_components.container.experimental.evaluation.import_model_evaluation import main from google_cloud_pipeline_components.container.experimental.e...
{ "content_hash": "175e1fee6937af93e0bc76c365dbd472", "timestamp": "", "source": "github", "line_count": 551, "max_line_length": 129, "avg_line_length": 36.421052631578945, "alnum_prop": 0.5691150089695037, "repo_name": "kubeflow/pipelines", "id": "9b440d4a27750461c9f6fb93960458e19f5397e4", "size": ...
""" Django settings for count_word_api project. Generated by 'django-admin startproject' using Django 1.10.4. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ im...
{ "content_hash": "034bd96564f1588b765218896c374ad3", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 79, "avg_line_length": 26.350746268656717, "alnum_prop": 0.6726139903709997, "repo_name": "rafaelhenrique/count_word_api", "id": "4ea47769a27643776ebfeb9231a0cb9f293226cb", ...
from .singlepageobjectbase import SinglePageObjectBase from .locator import Locator from . import commands class PageObject(SinglePageObjectBase): """Main general-purpose page object class.""" DEFAULT_ROOT_NAME = 'page_object' """Default name for a root page object.""" def __init__(self, locator, c...
{ "content_hash": "237f50051896258f8042cfc72aeed63f", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 76, "avg_line_length": 32.88135593220339, "alnum_prop": 0.668041237113402, "repo_name": "lukas-linhart/pageobject", "id": "3c67e8cab420e8a6775cc85ed0e6a6addc1b4eb3", "size"...
''' Alerts ====== The following methods allow for interaction into the Tenable.sc `Alert <https://docs.tenable.com/sccv/api/Alert.html>`_ API. Methods available on ``sc.alerts``: .. rst-class:: hide-signature .. autoclass:: AlertAPI :members: .. _iCal Date-Time: https://tools.ietf.org/html/rfc5545#section-3...
{ "content_hash": "965a660469a37d323cba29e1d8404896", "timestamp": "", "source": "github", "line_count": 325, "max_line_length": 87, "avg_line_length": 36.53230769230769, "alnum_prop": 0.5123389202391981, "repo_name": "tenable/pyTenable", "id": "939c8b159e8a3ec413c0365f772fe408c83df803", "size": "11...
from time import sleep, time from redis.exceptions import ResponseError import inspect from functools import wraps import sys from nose.plugins.skip import SkipTest from nose.plugins.attrib import attr import redis import redis.client import fakeredis from datetime import datetime, timedelta PY2 = sys.version_info[0...
{ "content_hash": "2749ab01971592c448f1e39d670dd95a", "timestamp": "", "source": "github", "line_count": 2032, "max_line_length": 96, "avg_line_length": 40.57381889763779, "alnum_prop": 0.5650607670475221, "repo_name": "sam-untapt/fakeredis", "id": "9b8fe79f25e47ab59d05c28b241c38215df61e08", "size":...
from __future__ import unicode_literals import re import urlparse import scrapy from scrapy.exceptions import CloseSpider from scrapy.loader import ItemLoader from ..items import Link def should_follow(url): bits = urlparse.urlparse(url) if bits.hostname in ('baseballprospectus.com', ...
{ "content_hash": "db5a2b5ef0f7053c3804b83ba357188b", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 75, "avg_line_length": 31.34640522875817, "alnum_prop": 0.5565054211843202, "repo_name": "mattdennewitz/baseball-pagerank", "id": "f91f00a000606fcc3d2189656c896f894330bbb3",...
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) # This module should be kept compatible with P...
{ "content_hash": "01b930954fb153119838c428f001f568", "timestamp": "", "source": "github", "line_count": 638, "max_line_length": 111, "avg_line_length": 35.88871473354232, "alnum_prop": 0.5243918417259903, "repo_name": "MalloyPower/parsing-python", "id": "d2064a29f34b69827f422e1fbb9b88ebf5d81ebf", "...
import io import json import sqlite3 input = io.open("metadata/FCBH/volume_list.txt", mode="r", encoding="utf-8") data = input.read() try: volumes = json.loads(data) except Exception, err: print "Could not parse volume_list.txt", str(err) input.close() assetIds = set() for volume in volumes: damId = volume["dam_id...
{ "content_hash": "0b2aefdf477cd974632b0252ea9f0b13", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 83, "avg_line_length": 20.46511627906977, "alnum_prop": 0.675, "repo_name": "garygriswold/Bible.js", "id": "4c3d406d984eb2ec91154bf0d34bf00a6fca91d4", "size": "1070", "bi...
import requests import shutil import tempfile import os class Restclient(object): def __init__(self,host,username,password): self.host = host self.auth = (username,password) def download_study_file(self,studyid,directory=None): headers = {'Accept':'application/x-hdf'} URL = '...
{ "content_hash": "a73b4b63406dcc14925697320571e787", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 87, "avg_line_length": 37.12, "alnum_prop": 0.6007543103448276, "repo_name": "timeu/gwaportal-analysis-pipeline", "id": "bb742885db07fddd6ea8e1fb49114c9d60a7023b", "size": ...
""" Upload handlers to test the upload API. """ from django.core.files.uploadhandler import FileUploadHandler, StopUpload class QuotaUploadHandler(FileUploadHandler): """ This test upload handler terminates the connection if more than a quota (5MB) is uploaded. """ QUOTA = 5 * 2 ** ...
{ "content_hash": "996cd93b3070f0660e12e71c060ae745", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 75, "avg_line_length": 26.83783783783784, "alnum_prop": 0.6404833836858006, "repo_name": "yephper/django", "id": "4fd6d1e1e426b9d8a1e1f2f818056e3f80913061", "size": "993", ...
""" flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from threading import RLock fro...
{ "content_hash": "fde7e0942f6e5b74c531d970af8aae3c", "timestamp": "", "source": "github", "line_count": 902, "max_line_length": 83, "avg_line_length": 40.45676274944567, "alnum_prop": 0.628740545873068, "repo_name": "FinixLei/flask", "id": "9c85fa00e4a5b602b529ee81bd710e1312d11ef8", "size": "36516"...
from django.core.management.base import BaseCommand, CommandError from ctd.models import CtdVariable, CtdSampleVolume, CtdBottleTrigger from main.models import CtdCast, Person, Event, Leg import csv from django.db.utils import IntegrityError from django.core.exceptions import ObjectDoesNotExist import glob import os im...
{ "content_hash": "368fc9eea3113bc5fda7cf283f47db3f", "timestamp": "", "source": "github", "line_count": 329, "max_line_length": 143, "avg_line_length": 29.544072948328267, "alnum_prop": 0.608127572016461, "repo_name": "cpina/science-cruise-data-management", "id": "634bd924ab6c010b425264d9ab2ddc201543...
"""Network Hosts are responsible for allocating ips and setting up network. There are multiple backend drivers that handle specific types of networking topologies. All of the network commands are issued to a subclass of :class:`NetworkManager`. """ import datetime import functools import itertools import math impor...
{ "content_hash": "4a4b04c4e419671dd51f68d81b0a8dd2", "timestamp": "", "source": "github", "line_count": 2136, "max_line_length": 89, "avg_line_length": 44.18445692883895, "alnum_prop": 0.5511665854330459, "repo_name": "sajeeshcs/nested_quota_latest", "id": "1ac503714f25867caa755457d41337a2949305ae", ...
from net_system.models import NetworkDevice import django def main(): django.setup() devices=NetworkDevice.objects.all() for device in devices: print device.device_name if __name__ == "__main__": main()
{ "content_hash": "dd71573fc022413d67ddbcf3ed8ca976", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 43, "avg_line_length": 20.818181818181817, "alnum_prop": 0.6593886462882096, "repo_name": "patrebert/pynet_cert", "id": "cc3b578fc2bea8a6756801107a766cb9fb02b1d8", "size": ...
from .base import BaseReporter class ReasonsReporter(BaseReporter): title = 'Reasons' def run(self, error): return getattr(error, 'reasons', None)
{ "content_hash": "7d16d4d06e35c54945e8167ee3f8ea29", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 46, "avg_line_length": 18.555555555555557, "alnum_prop": 0.6826347305389222, "repo_name": "grappa-py/grappa", "id": "c1c72ebbe75c2a0629d403d96227abe39223df8e", "size": "191"...
import subprocess import os.path import socket import time import sys import os from shutil import copyfile # # Configuration variables # package_name = os.environ["PACKAGE_NAME"] main_activity = os.environ["ACTIVITY_NAME"] shared_library_dir = os.environ["SHARED_LIB_PATH"] android_ndk_gdb = os.environ["...
{ "content_hash": "03aa7bccfd79dcb3acf3bb8266577bf5", "timestamp": "", "source": "github", "line_count": 238, "max_line_length": 108, "avg_line_length": 34.168067226890756, "alnum_prop": 0.6519921298573537, "repo_name": "DavidLanderosAlcala/Native-Debugging-Tools", "id": "7c7233366069299e01f0f9b5dabef...
class _Processor(): def _init_helper(self, vars_): """Overwrite defaults (if they exist) with arguments passed to constructor""" for k in vars_: if k == 'kwargs': for kwarg in vars_[k]: setattr(self, kwarg, vars_[k][kwarg]) elif k != 'self'...
{ "content_hash": "e8cf2b9ec35877f6882233786dd9bc87", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 85, "avg_line_length": 35.421052631578945, "alnum_prop": 0.5260029717682021, "repo_name": "azavea/python-omgeo", "id": "1dd2a62dbba001617ad8971770515b5707f33964", "size": "...
""" *~ Pokus expansion 1.2 ~* av Gaute og Nikolas """ #Start med å importere alle de nødvendige delfilene. from klasser import * from grafikk import * from quests import * from prosedyrer import * from troll import generer_troll from gnom import generer_gno...
{ "content_hash": "094828e6022954507f399def92e50b3c", "timestamp": "", "source": "github", "line_count": 596, "max_line_length": 168, "avg_line_length": 44.104026845637584, "alnum_prop": 0.5633417028075782, "repo_name": "nikolhm/Pokus", "id": "abc71e6da585ee615c3baf6022e3a96eb4cbb9a4", "size": "2639...
from __future__ import absolute_import, unicode_literals from django import forms from django.conf import settings from django.test.client import RequestFactory from django.template import loader, Template from drf_toolbox.renderers import APIRenderer from rest_framework import generics, serializers, viewsets from rest...
{ "content_hash": "1c6960cb4e66c55bbc08aa957e5462ab", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 73, "avg_line_length": 40.30555555555556, "alnum_prop": 0.6650585802894555, "repo_name": "pombredanne/drf-toolbox", "id": "de9eec474bb9424b263e636a166ae0a31a3381ec", "size"...
import tensorflow as tf import os import fnmatch import numpy as np def get_image_paths(im_dir, fname_pattern): ''' Recusively get all file paths ending with `image_suffix` under `dir` dir: directory path return: list of image paths ''' paths = [] for root, dirnames, filenames in os.walk(i...
{ "content_hash": "c741245c6abf14947be22e9c4e6fe270", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 81, "avg_line_length": 39.575, "alnum_prop": 0.4883133291219204, "repo_name": "roytseng-tw/DCGAN-tf", "id": "be2a9e358db36f04a56f9b39586c52608ea7f906", "size": "1583", "b...
from Tkinter import Tk from RC_UI import RC_UI from CommandSender import CommandSender def main(): root = Tk() #root.geometry("250x150+300+300") sender = CommandSender() app = RC_UI(root, sender) root.mainloop() if __name__ == '__main__': main()
{ "content_hash": "163be0d205cebd20d334d5deba259138", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 39, "avg_line_length": 19.571428571428573, "alnum_prop": 0.6313868613138686, "repo_name": "xfleckx/BeMoBI_Tools", "id": "7ddbff38642bf7ade59ca750f6a6c240a34f710a", "size": ...
"""Config sub-commands""" import getpass import locale import logging import os import platform import subprocess import sys from typing import Optional from urllib.parse import urlsplit, urlunsplit import requests import tenacity from rich.console import Console from airflow import configuration from airflow.cli.sim...
{ "content_hash": "29d722e5fc0e03623d41fbef8deff005", "timestamp": "", "source": "github", "line_count": 409, "max_line_length": 109, "avg_line_length": 33.7359413202934, "alnum_prop": 0.6146542977243079, "repo_name": "DinoCow/airflow", "id": "9a325202e435e203d2dcc52a24a43ad0a1515658", "size": "1458...
from django.conf.urls import patterns, include, url from django.contrib import admin from site_ctf import views from django.views.defaults import page_not_found admin.autodiscover() handler404 = 'site_ctf.templates.404' urlpatterns = patterns('', # Examples: # url(r'^$', 'k6.views.home', name='home'), # u...
{ "content_hash": "facd660bc36ef24bb19c70b3d5a325c6", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 51, "avg_line_length": 26.529411764705884, "alnum_prop": 0.6718403547671841, "repo_name": "Crypt0-M3lon/k6", "id": "341b12a34b4148e74a6f5c92a0ebac69a9fd2619", "size": "451"...
""" WSGI config for slideshare 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.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
{ "content_hash": "508e6db4199ee087090bf17f63c35b6f", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 24.8125, "alnum_prop": 0.7732997481108312, "repo_name": "bahattincinic/django-101", "id": "a37253867c9cffaf5c5961dc8bb34fcc3cbcd86f", "size": "397", ...
"""Very low-level nginx config parser based on pyparsing.""" import string from pyparsing import ( Literal, White, Word, alphanums, CharsNotIn, Forward, Group, Optional, OneOrMore, Regex, ZeroOrMore, pythonStyleComment) class RawNginxParser(object): # pylint: disable=expression-not-assigned """A clas...
{ "content_hash": "39b32583a34283296948fd00b9a112aa", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 80, "avg_line_length": 30.97761194029851, "alnum_prop": 0.5832329559142375, "repo_name": "digideskio/lets-encrypt-preview", "id": "f24455d5999c19a67e45f66465c4ed876cc28ec9",...
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('auditlog', '0001_initial'), ] operations = [ migrations.AlterField( model_name='logentry', name='object_id', field=models.BigIntegerField(db_index=True, ...
{ "content_hash": "e7af8ddd422a59b827a980add05af50a", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 105, "avg_line_length": 24.1875, "alnum_prop": 0.5943152454780362, "repo_name": "kbussell/django-auditlog", "id": "42f8620a57b71d7b93a39effc85a380ccd18f10b", "size": "411",...
import contextlib import copy import itertools import mock from oslo.config import cfg import testtools from webob import exc import webtest from quantum.api import extensions from quantum.api.rpc.agentnotifiers import l3_rpc_agent_api from quantum.api.v2 import attributes from quantum.common import config from quant...
{ "content_hash": "fc59807538fe22c71710a6dbe65c7fe1", "timestamp": "", "source": "github", "line_count": 1656, "max_line_length": 79, "avg_line_length": 48.380434782608695, "alnum_prop": 0.4667116003894256, "repo_name": "yamt/neutron", "id": "22c199a8f0503237660da4268e0081dda8232bf4", "size": "80842...
BOT_NAME = 'stock_scraper' SPIDER_MODULES = ['stock_scraper.spiders'] NEWSPIDER_MODULE = 'stock_scraper.spiders' # Crawl responsibly by identifying yourself (and your website) on the user-agent #USER_AGENT = 'stock_scraper (+http://www.yourdomain.com)' # Obey robots.txt rules ROBOTSTXT_OBEY = True # Configure maxi...
{ "content_hash": "f488d91470525f441f103f7d999f9f78", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 109, "avg_line_length": 34.91139240506329, "alnum_prop": 0.7697606961566352, "repo_name": "zlalvani/stock-scraper", "id": "114951eab5c47e3d67421ab824df7d85076c2b73", "size"...
"""pdfminer_xml_bindings.py: Provides functions to convert the DOM tree generated by pdfminer to proper Python objects. """ import operator import unicodedata from confopy.pdfextract import xml_util # Constants SVG_HEADER = u"""<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "ht...
{ "content_hash": "8dab0e70826a135ac41c068b2d9c219b", "timestamp": "", "source": "github", "line_count": 561, "max_line_length": 144, "avg_line_length": 32.90730837789661, "alnum_prop": 0.5522452738204864, "repo_name": "ooz/Confopy", "id": "d199854c477bfdec5e1aaf5ae83a2b96e126802f", "size": "18481",...
""" This example: 1. Connects to the current model 2. Deploy a local charm with a oci-image resource and waits until it reports itself active 3. Destroys the unit and application """ from juju import jasyncio from juju.model import Model from pathlib import Path async def main(): model = Model() print('C...
{ "content_hash": "58ad25afb088908083f73ced7843ba57", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 76, "avg_line_length": 26.152173913043477, "alnum_prop": 0.6134663341645885, "repo_name": "juju/python-libjuju", "id": "fe58649ad9ceeeb9f62d20060425dd3569d75c0b", "size": "...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type def is_quoted(data): return len(data) > 1 and data[0] == data[-1] and data[0] in ('"', "'") and data[-2] != '\\' def unquote(data): ''' removes first and last quotes from a string, if the string starts and ends with the s...
{ "content_hash": "6c3bec1c21e0eaa0540f1c4ec9c4c01d", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 107, "avg_line_length": 33.416666666666664, "alnum_prop": 0.6259351620947631, "repo_name": "abtreece/ansible", "id": "7b94f906538d8bb90cb50387f5f2b6babf7c28a9", "size": "11...
import os, sys import numpy as np import pickle from config import Config import itk from possum import pos_itk_core # ----------------------------------------------- # Load constatnts from the config file # ----------------------------------------------- CONFIG = Config(file(sys.argv[1])) def read_itk_image(image_f...
{ "content_hash": "07353ad374dd2d657c8cf691d0f8bfdf", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 88, "avg_line_length": 36.850515463917525, "alnum_prop": 0.6949223667645824, "repo_name": "pmajka/poSSum", "id": "adbb909321568c60bbbb075ea7d1ba3c126e7908", "size": "7149"...
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from django.conf import settings from advertisements.urls import providerpatterns urlpatterns = patterns('', url(r'^data/', include('advertisements.urls', namespace='advert')), url(r'^admin/', include(a...
{ "content_hash": "f0ad634fdb3e7ba2ad4c99af4ce25236", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 103, "avg_line_length": 30.38095238095238, "alnum_prop": 0.6943573667711599, "repo_name": "OpenAds/OpenAds", "id": "d7a7e6b42e7fc85088902f10600b37e5d8df9937", "size": "638"...
""" Copyright 2012 GroupDocs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
{ "content_hash": "cb995cfc11394968f506764c44634b02", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 77, "avg_line_length": 31.594594594594593, "alnum_prop": 0.6569717707442259, "repo_name": "liosha2007/temporary-groupdocs-python3-sdk", "id": "c9f65bb514d27e45e510e44bc0adde1...
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 index on 'Release', fields ['order'] db.create_index('packages_release', ['order']) def backwards(self, orm): ...
{ "content_hash": "fe4c7a3d467c40ca738351bb6897ca4b", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 197, "avg_line_length": 75.18897637795276, "alnum_prop": 0.5541941564561734, "repo_name": "crateio/crate.web", "id": "7effebdd830b1293fd36fc34ee2e968fedd98b62", "size": "9...
"""ThreatConnect TI Intrusion Set""" # standard library from typing import TYPE_CHECKING # first-party from tcex.api.tc.v2.threat_intelligence.mappings.group.group import Group if TYPE_CHECKING: # first-party from tcex.api.tc.v2.threat_intelligence.threat_intelligence import ThreatIntelligence class Intrusi...
{ "content_hash": "11ee5cb6fc1259bd2a63676210139237", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 94, "avg_line_length": 31.7, "alnum_prop": 0.6561514195583596, "repo_name": "ThreatConnect-Inc/tcex", "id": "c97eea3c89cf29c5abe1601259f5831987ba5e0e", "size": "951", "bi...
""" Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.21 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class BlogCategoryListResponse(object): """ NOTE: This class is auto gen...
{ "content_hash": "5ed3d36d23e017e1b6a3b984a5f35f0f", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 77, "avg_line_length": 26.23134328358209, "alnum_prop": 0.5351351351351351, "repo_name": "kinow-io/kinow-python-sdk", "id": "a9853ab3bbfe4f747c20ceadd9871e1270569f58", "si...
class FormatDef: """ Format (internal) definition """ def __init__(self, name, mimetype, rdflibMapping=None): self.name = name self.mimetype = mimetype self.rdflibMapping = rdflibMapping def __str__(self): return "%s[%s]" % (self.name, self.mimetype) def __cmp_...
{ "content_hash": "b1ccbbb4e9fa8c5744eaf9a6a37c2df4", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 79, "avg_line_length": 31.38157894736842, "alnum_prop": 0.5744234800838575, "repo_name": "redlink-gmbh/redlink-python-sdk", "id": "97e96a66abb63eb1793aee15bb4a48d59c3be435", ...
"""This script sends a route from a GPX file to the Android emulator. usage: routing [-h] [-s HOST] [-p PORT] [-x SPEED] [-t STEP] gpx positional arguments: gpx A GPX file containing routing information optional arguments: -h, --help show this help message and exit -s HOST, --host ...
{ "content_hash": "7dcaf70f142b3b9671bbfbd7ec165733", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 73, "avg_line_length": 29.046875, "alnum_prop": 0.5750403442711135, "repo_name": "ChasingPictures/front-end", "id": "a1c09e5f24139cc1a3ab73894b4101f4db054927", "size": "37...
from pyramid.view import view_config from pyramid_sqlalchemy import Session from ..models.news import NewsModel from ..models.forum import ForumTopicModel from ..models.link import LinkModel @view_config(route_name='home', renderer='templates/home.jinja2') def home_view(request): news_list = Session.query(NewsMod...
{ "content_hash": "2f3407bbfca84aa739afb97de24913af", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 97, "avg_line_length": 46.07692307692308, "alnum_prop": 0.7495826377295493, "repo_name": "fosstp/fosstp", "id": "3ac7eae6fe391cb4530be41a2d0bbbd1ee0c1057", "size": "599", ...
_base_ = [ '../_base_/models/faster_rcnn_r50_fpn.py', '../_base_/datasets/voc0712.py', '../_base_/default_runtime.py' ] model = dict(roi_head=dict(bbox_head=dict(num_classes=20))) CLASSES = ('aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', ...
{ "content_hash": "3f699245283a5ae3a1234440fc514a62", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 79, "avg_line_length": 33.653333333333336, "alnum_prop": 0.5919175911251982, "repo_name": "open-mmlab/mmdetection", "id": "12eee2c1ecdaa5f9e84a3bd2084b00493f2f76c0", "size"...
""" This module contains tests samples to be called by the real unittest, in order to check against unittest """ __author__ = "Benjamin Schubert, [email protected]"
{ "content_hash": "c158b28f552ff2a8cbab7ee9c5ad0bff", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 104, "avg_line_length": 34.6, "alnum_prop": 0.7398843930635838, "repo_name": "BenjaminSchubert/NitPycker", "id": "377fe12f458b9aa8ae8f8368b4a14b4cf15bb96d", "size": "173", ...
'''This module contains some glue code encapsulating a "main" process. The code here wraps the most common tasks involved in creating and, especially, training a neural network model. ''' import climate import os from . import graph logging = climate.get_logger(__name__) class Experiment: '''This class encaps...
{ "content_hash": "7473ed8f34b446e97c809d18d785f1d2", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 80, "avg_line_length": 36.174311926605505, "alnum_prop": 0.6218615267562769, "repo_name": "devdoer/theanets", "id": "08e61644d920384123894c126632b7548bac9abe", "size": "39...
import struct import timeit from constants import PacketIDs, PacketSizes, PacketFormats, Blocks, TransparentBlocks, TreeShape from math import floor from util import notch_to_string, string_to_notch from md5 import md5 from twisted.internet.protocol import Protocol def unpack_byte(byte): return struct.unpack("B",b...
{ "content_hash": "0c7698e92a3006ef74d6390aa4a0b1d2", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 97, "avg_line_length": 39.729468599033815, "alnum_prop": 0.5397616731517509, "repo_name": "TazeTSchnitzel/SchnitzelCraft", "id": "550e881e4a70eb6b02a58fe29de64315b285f89a", ...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'sketching.views.home', name='home'), # url(r'^sketching/', include('sketching.foo.urls')), ...
{ "content_hash": "2b22c20e3c8a8829f083350e51a62c03", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 102, "avg_line_length": 40.59090909090909, "alnum_prop": 0.6606942889137738, "repo_name": "ajfisher/sketching-conf-demo", "id": "a2d0c62966ac104d78c96b38212b2a20de25e1e2", ...
from django.conf.urls.defaults import * from django.views.generic import list_detail, create_update from models import * import views from django.core.urlresolvers import reverse classrule_info = { 'queryset': ClassRule.objects.all(), 'template_name': 'display_classrule.html', } classrule_form = { 'form_c...
{ "content_hash": "a40481a5c8a2af526b72999ec6e79aa2", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 199, "avg_line_length": 66.29411764705883, "alnum_prop": 0.6498077491866312, "repo_name": "rytis/IP-address-management-tool", "id": "096ba6092a0f29ada8ab3952f8bad52474fa52ad"...
from django.conf.urls.defaults import * from disciplines.models import Discipline urlpatterns = patterns('disciplines.views', url(r'^$', 'disciplines', name='discipline_list'), url(r'^my_expertise/$', 'my_expertise', name="my_expertise"), url(r'^discipline/(?P<slug>[-\w]+)/$', 'discipline', name="d...
{ "content_hash": "94005d50d4cdfd84f2a16d44951ee889", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 83, "avg_line_length": 38.22222222222222, "alnum_prop": 0.6627906976744186, "repo_name": "caseywstark/colab", "id": "3306a04d94abaf6020bbd8b403ebca21b8921a9f", "size": "344"...
"""Package contenant l'éditeur 'hedit'. Si des redéfinitions de contexte-éditeur standard doivent être faites, elles seront placées dans ce package Note importante : ce package contient la définition d'un éditeur, mais celui-ci peut très bien être étendu par d'autres modules. Au quel cas, les extensions n'apparaîtront...
{ "content_hash": "0f5dfe9c6d58cba72aa76661aee42c82", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 80, "avg_line_length": 40.8099173553719, "alnum_prop": 0.5826245443499393, "repo_name": "stormi/tsunami", "id": "150f4ad78dd051a5e8c2562a878fa4f028289e83", "size": "6555",...
import shlex from operator import mul import os.path import numpy as np from functools import reduce class GameReader(object): ''' Read games from different file formats (.nfg payoff, .nfg outcome), see http://www.gambit-project.org/doc/formats.html for more information. ''' def __init__(self): ...
{ "content_hash": "ca7b87a718b0e11a4b92b428699a565c", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 116, "avg_line_length": 35.90833333333333, "alnum_prop": 0.5351589695985147, "repo_name": "Artimi/neng", "id": "074be62b3255962869c1e3cf47439f3488af3d4a", "size": "5451", ...
"""Setup file for installing the BLE.""" import os import pathlib import setuptools from setuptools.command import build_py from setuptools.command import develop current_directory = pathlib.Path(__file__).parent description = (current_directory / 'README.md').read_text() core_requirements = [ 'absl-py', 'dop...
{ "content_hash": "c7d7699e242f610cd5f93fe439650545", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 76, "avg_line_length": 23.042105263157893, "alnum_prop": 0.6500685244403838, "repo_name": "google/balloon-learning-environment", "id": "345e34a7d6bf14a08366aa0aaaefde67070a65...
""" Django settings for djangoisfsite project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import...
{ "content_hash": "8a6d62309c9fee4f1dac030799cb47c5", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 91, "avg_line_length": 26.305785123966942, "alnum_prop": 0.6927426955702167, "repo_name": "letuananh/intsem.fx", "id": "908962e4c73caa69a2be9c8cdb6e1f57f4499bb6", "size": ...
from ftw import logchecker, testrunner import pytest import random class LoggerTestObj(logchecker.LogChecker): def __init__(self): self.do_nothing = False def generate_random_logs(self): if self.do_nothing: return [] else: return [str(self.start) + ' rule-id-' ...
{ "content_hash": "8654785d58a398106bfa2c8f143c11ce", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 60, "avg_line_length": 24.425, "alnum_prop": 0.6438075742067554, "repo_name": "CRS-support/ftw", "id": "d414384ebd69685c1f3ecfbce838908cd246f47f", "size": "977", "binary"...
#!/usr/bin/env python import os import csv, sys, json def run_rnaseq_docker(basename_I, host_dirname_I, organism_I, host_indexes_dir_I, host_dirname_O, paired_I='paired', threads_I=2,trim3_I=3, library_type_I='fr-firststrand', index_type_I = '.gtf', ...
{ "content_hash": "6ae88741c6773f82a8557beb435e0064", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 375, "avg_line_length": 53.78395061728395, "alnum_prop": 0.6277975438999197, "repo_name": "dmccloskey/sequencing_utilities", "id": "f3e7e0379e2b37b46657bfb212e4c43285396b9c"...
import sys import json import codecs import unicodecsv as csv import metautils from dbsettings import settings actualcategories = [] if (len(sys.argv)<2): print 'Usage: datagov-ckan-getDataFromSettlements all|portal datagovJSONDump.json [list,of,portals,to,exclude]' exit() with open(sys.argv[2], 'rb') as j...
{ "content_hash": "4becf45ce980938c725cec384a962e4d", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 141, "avg_line_length": 36.330935251798564, "alnum_prop": 0.6253465346534653, "repo_name": "okfde/odm-datenerfassung", "id": "c04dc3d07bf19bef5e9cd5f9e16f1286789e522d", "s...
from bndl.util.callsite import *
{ "content_hash": "bdd8d544c01753ed0be60ff223368e2f", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 32, "avg_line_length": 33, "alnum_prop": 0.7878787878787878, "repo_name": "bndl/bndl", "id": "74b80ac00cb32f8b064576502bbc714e01faae6c", "size": "578", "binary": false, ...
''' Module provides and registers checksum strategy classes for the context class. ''' from ..checksum import Checksum from .luhn10 import Luhn10 from .fact137 import Fact137 from .mod9710 import Mod9710 from .mod31 import Mod31 from .verhoeff import Verhoeff from .fact12 import Fact12 Checksum.register_strategy(Luhn...
{ "content_hash": "152b200895d90252d7572204df69004e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 78, "avg_line_length": 27.88888888888889, "alnum_prop": 0.8247011952191236, "repo_name": "vaiski/checksum", "id": "09509e98dd4173342a97edb2c5c2d73333a4d7a7", "size": "527",...
from __future__ import unicode_literals __reversion__ = "$Revision: 20 $" __author__ = "$Author: holtwick $" __date__ = "$Date: 2007-10-09 12:58:24 +0200 (Di, 09 Okt 2007) $" from sx.pisa3 import pisa from sx.pisa3 import pisa_pdf if __name__=="__main__": pdf = pisa_pdf.pisaPDF() subPdf = pisa.pis...
{ "content_hash": "9136e677671ea2598f611bf441952d4c", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 70, "avg_line_length": 24.885714285714286, "alnum_prop": 0.6153846153846154, "repo_name": "22rostislav/xhtml2pdf", "id": "0a93ef8ed80a27a8e65c4f776d982db3eeeec3ce", "size":...
from helper import greeting greeting('Hello')
{ "content_hash": "2522a10c657098f23af7e0c6674f1459", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 27, "avg_line_length": 15.333333333333334, "alnum_prop": 0.8043478260869565, "repo_name": "MRaiti/cs3240-labdemo", "id": "992441a8d88b48117f013cb11d8592ce7ab0b705", "size": ...
try: import ROOT ROOTfound=True except ImportError: ROOTfound=False print("WARNING make_histo_ofallpixels.py: ROOT not found") import numpy as np import numpy as np from dicom_tools.hist_match import match_all # from tabulate import tabulate def make_histo_ofallpixels(data, suffix="", verbose=False...
{ "content_hash": "9264fa94f1b8a3498367c1ad2f08645d", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 86, "avg_line_length": 24.352941176470587, "alnum_prop": 0.6316425120772947, "repo_name": "carlomt/dicom_tools", "id": "1f05d864077a5c49802baeb633cab1509ea61db2", "size": "...
import numpy as np from chainer import Variable from chainer import optimizers from chainer import cuda from model.dqn_agent import Q import chainer.functions as F from model.agent import Agent class DQNTrainer(Agent): def __init__(self, agent, memory_size=10**4, ...
{ "content_hash": "5c656218eb08c0aac9c2dd58476b9951", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 118, "avg_line_length": 36.425, "alnum_prop": 0.5487302676733014, "repo_name": "icoxfog417/chainer_pong", "id": "a0fd1e57d4f1cb570c1f66c0b911b5e5dd3849dd", "size": "5828",...
from __future__ import unicode_literals, absolute_import import os import django DEBUG = True USE_TZ = True # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "==================================================" DATABASES = { "default": { "ENGINE": "django.db.backends.sqlit...
{ "content_hash": "b938a87a62fdb61c4cb4bc223422a995", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 66, "avg_line_length": 18.428571428571427, "alnum_prop": 0.5906976744186047, "repo_name": "AlessioBazzanella/django-dandelion", "id": "c7beb3ba640173059f1574bbc126b9e6d5655fe...
from test_framework.test_framework import DankcoinTestFramework from test_framework.util import ( start_nodes, start_node, assert_equal, connect_nodes_bi, ) import os import shutil class WalletHDTest(DankcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_c...
{ "content_hash": "acf9aa6429df25445a7071f6b0c6ca01", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 91, "avg_line_length": 36.51219512195122, "alnum_prop": 0.5988643954575819, "repo_name": "dankcoin/dankcoin", "id": "3b33f8599a23e92198aa32b03c1014e7b256cb65", "size": "320...
"""Performance tests for mask_password. """ import timeit from oslo_utils import strutils # A moderately sized input (~50K) string # http://paste.openstack.org/raw/155864/ # infile = '155864.txt' # Untruncated version of the above (~310K) # http://dl.sileht.net/public/payload.json.gz infile = 'large_json_payload.tx...
{ "content_hash": "af905749243c18897e7ae02335cfc47f", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 59, "avg_line_length": 24.942857142857143, "alnum_prop": 0.6403207331042382, "repo_name": "openstack/oslo.utils", "id": "677f67e3e5b225d455e257f959c6c17299b1da4a", "size": ...
from __future__ import absolute_import, division, with_statement from revolver.core import run from revolver import contextmanager as ctx from revolver import directory as dir from revolver import file, package from revolver.tool import php_build, php_phpenv def install(version, fpm=False, xdebug=False): php_bui...
{ "content_hash": "380d2723c347eca246a45d4f31c5ae0e", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 79, "avg_line_length": 33.9125, "alnum_prop": 0.6336159233321047, "repo_name": "michaelcontento/revolver", "id": "e9bb43094a6c8b40c4fe21561cc69bc1eda7e0c8", "size": "2738",...
from wdom.tag import NewTagClass as NewTag from wdom.themes import * name = 'INK' project_url = 'http://ink.sapo.pt/' project_repository = 'https://github.com/sapo/Ink/' license = 'MIT License' license_url = 'https://github.com/sapo/Ink/blob/develop/LICENSE' css_files = [ '//fastly.ink.sapo.pt/3.1.10/css/ink.css'...
{ "content_hash": "03cc67f6f6fc0d462a3afef3903cacfc", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 96, "avg_line_length": 33.38202247191011, "alnum_prop": 0.6486031639178728, "repo_name": "miyakogi/wdom", "id": "8c08109b1692557571e119db01297a4103e0cedf", "size": "3034", ...
"""Test p4lib.py's interface to 'p4 client'.""" import os import unittest import testsupport from p4lib import P4, P4LibError class ClientTestCase(unittest.TestCase): #TODO: # - test expected error from trying to change a locked client from a # user that is not the owner # - have the super user ch...
{ "content_hash": "d0390e7e5c8f7d48d4560fa9ea9e8a20", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 74, "avg_line_length": 32.42261904761905, "alnum_prop": 0.5342390306590784, "repo_name": "Mokona/python-p4lib", "id": "0134a04c2406cdb02787eb1dc0747b192d5d0e5c", "size": "...
import sys import time from itertools import * from colorama import * from fuzzywuzzy import fuzz from fuzzywuzzy import process import matplotlib import matplotlib.pyplot as plt import numpy as np import csv from playhouse.csv_loader import * from bs4 import * from db import * cg=Fore.GREEN cr=Fore.RED rs=Style.RESET...
{ "content_hash": "f4cbb622368b0eb63512ba18e79f0ac6", "timestamp": "", "source": "github", "line_count": 437, "max_line_length": 168, "avg_line_length": 34.27231121281464, "alnum_prop": 0.5944448153835882, "repo_name": "memorial-ece/teaching-equivalencies", "id": "b283e5dfcc5d43c9d6b1d645f6a6e01d5da37...
from tensorforce.environments import Environment class StateSettableEnvironment(Environment): """ An Environment that implements the set_state method to set the current state to some new state using setter instructions. """ def set_state(self, **kwargs): """ Sets the current state ...
{ "content_hash": "ef64736cd584ddb89c0f3c6a503c1e7d", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 109, "avg_line_length": 39.65, "alnum_prop": 0.669609079445145, "repo_name": "lefnire/tensorforce", "id": "dc679c808854e5a6d69e8da671bf6293360914aa", "size": "1473", "bin...
import scrapy import os import datetime from scrapy.selector import Selector from dmm_joke.items import DVDDetailListItem from scrapy.spiders import CrawlSpider,Rule from scrapy.linkextractors import LinkExtractor from scrapy_redis.spiders import RedisCrawlSpider class DvdListSpiderSpider(CrawlSpider): name = "d...
{ "content_hash": "0187b9955b65afefc7f5c0697bd2d1b9", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 115, "avg_line_length": 42.85294117647059, "alnum_prop": 0.6170212765957447, "repo_name": "counsellors/scrapy_dmm_dvd", "id": "0f8577395bcada1e514327785811621e672d972d", "s...
import cherrypy import uuid import os from urllib.parse import parse_qs, urlsplit from ConfigManager.ConfigArgs import ConfigArg, ConfigArgs from ConfigManager.ConfigManager import ConfigManager from rf2db.utils import urlutil from rf2db.parameterparser.ParmParser import booleanparam _curdir = os.path.join(os.getcwd(...
{ "content_hash": "e29a112899c26c6530d8337e7d61837a", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 114, "avg_line_length": 37.3421052631579, "alnum_prop": 0.6811134601832276, "repo_name": "cts2/ihtsdoauth", "id": "e425cd06d6df9fc34e73e595b9f9819a33424cf0", "size": "4415"...
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1Da...
{ "content_hash": "cd8e0bd48d789d2d681d1c22714b081a", "timestamp": "", "source": "github", "line_count": 152, "max_line_length": 105, "avg_line_length": 28.32894736842105, "alnum_prop": 0.570599163957269, "repo_name": "mbohlool/client-python", "id": "004c46a74aafc1428801c8f1bfdb070272a57933", "size"...
""" Simple Training CLI. """ import argparse import json import os import pickle import random import shutil import sys from contextlib import ExitStack from typing import Optional, Dict import mxnet as mx import numpy as np from sockeye.log import setup_main_logger, log_sockeye_version from sockeye.utils import acqu...
{ "content_hash": "415588a6f611c677da111598f8d0ee7e", "timestamp": "", "source": "github", "line_count": 324, "max_line_length": 120, "avg_line_length": 53.04012345679013, "alnum_prop": 0.5356415478615071, "repo_name": "KellenSunderland/sockeye", "id": "3409e98662f96d07b07c3e5e42e5579cc473a9ab", "si...
import discord from discord.ext import commands import asyncio import sys,hashlib import traceback ############################################################### # # BOT FOR DISCORD # music and shet # ############################################################### #Compare has value for UserSetting to ...
{ "content_hash": "ddad6cdc9d609c0c8dba82f75c4cbb28", "timestamp": "", "source": "github", "line_count": 271, "max_line_length": 467, "avg_line_length": 35.981549815498155, "alnum_prop": 0.6330632755614809, "repo_name": "ttran49/DISCORDBOT", "id": "44838b9589364fb324ad34aa65fcd6fd2874c369", "size": ...
""" Constraint Layer Array (CLA) Class ================================== .. autoclass:: CLA :members: """ ##################################################################### #This file is part of RGPA. #Foobar is free software: you can redistribute it and/or modify #it under the terms of the GNU General Publi...
{ "content_hash": "c19d9d9c9132598d45f4b1880c55918a", "timestamp": "", "source": "github", "line_count": 1525, "max_line_length": 259, "avg_line_length": 36.18229508196721, "alnum_prop": 0.4783428177896988, "repo_name": "pylayers/pylayers", "id": "b3546a25574289efd36dd594d17d7bbea1fb23fa", "size": "...
import logging from telemetry import decorators from telemetry.core import exceptions from telemetry.core import util from telemetry.core.backends.chrome import cros_test_case class CrOSCryptohomeTest(cros_test_case.CrOSTestCase): @decorators.Enabled('chromeos') def testCryptohome(self): """Verifies cryptoho...
{ "content_hash": "2b5b70f4cb57a7c66af5edb45be7371c", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 76, "avg_line_length": 37.13385826771653, "alnum_prop": 0.6923240033927057, "repo_name": "sgraham/nope", "id": "93b20f33bc9062f33eb5749b919a67515ac34d78", "size": "4879", ...
"""Helper functions""" from datetime import date, datetime, timedelta __all__ = [ "date_from_iso_week", "find_slots", "PicklableSlotMixin", ] def date_from_iso_week(year, week, day_of_week=None): if day_of_week is None: day_of_week = 1 if not 1 <= day_of_week <= 7: raise ValueEr...
{ "content_hash": "f99f4eafcda244e683efcf4330220bfe", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 81, "avg_line_length": 25.213483146067414, "alnum_prop": 0.570855614973262, "repo_name": "runfalk/spans", "id": "af0b9c1a5ce9b7a4c39c173650aaae080c7f0602", "size": "2244", ...