text
stringlengths
4
1.02M
meta
dict
from __future__ import unicode_literals import powerline as powerline_module import time from tests import TestCase from tests.lib import replace_item from tests.lib.config_mock import swap_attributes, get_powerline, pop_events from copy import deepcopy config = { 'config': { 'common': { 'dividers': { "left...
{ "content_hash": "92ed44ef9827276237ab571038e53f2c", "timestamp": "", "source": "github", "line_count": 294, "max_line_length": 133, "avg_line_length": 37.22789115646258, "alnum_prop": 0.6321608040201006, "repo_name": "keelerm84/powerline", "id": "282d611f3c1b4131549214ad27a61ad3d3b66b90", "size": ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest from contextlib import contextmanager from glob import glob, iglob __all__ = [ "CustomTestCase", "list_all_py_files", ] class CustomTestCase(unittest.TestCase): @contextmanager def assertNotRaises(self, exc_type): try:...
{ "content_hash": "a4671144eb56439ce183c7918eb8a85c", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 72, "avg_line_length": 22.323529411764707, "alnum_prop": 0.6034255599472991, "repo_name": "tensorflow/tensorrt", "id": "0da913988185b14e30c6a12c2fdad1b35a30f1a0", "size": "...
import sys, 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 configura...
{ "content_hash": "5f4acaacf379d7c79a984fd98b5f27a4", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 80, "avg_line_length": 32.33905579399141, "alnum_prop": 0.7040477770404777, "repo_name": "alixedi/semantic_parser", "id": "4e18b4aea879e9484f5d369e41829da0b94ae0f6", "size...
"""Classes and methods related to model_fn.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import six from tensorflow.python.estimator.export.export_output import ExportOutput from tensorflow.python.framework import ops from tensorf...
{ "content_hash": "97967903d8dbea730dfa934ff8ceb41d", "timestamp": "", "source": "github", "line_count": 285, "max_line_length": 80, "avg_line_length": 37.09473684210526, "alnum_prop": 0.6392357169882709, "repo_name": "abhitopia/tensorflow", "id": "ee5999c78bc97f05cf353a192d2d54eecc47e5b8", "size": ...
import json import argparse from google.cloud import bigquery from google.cloud.exceptions import NotFound, BadRequest parser = argparse.ArgumentParser() parser.add_argument('--dataset', type=str, default='nfhl') known_args, others = parser.parse_known_args() bq_tables = json.load(open('nfhl_layers.json')) bq_client...
{ "content_hash": "26b80647635535bd4b4c3b7b88f2ec87", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 88, "avg_line_length": 34.36923076923077, "alnum_prop": 0.6611459265890779, "repo_name": "GoogleCloudPlatform/solutions-geospatial-analytics", "id": "7ae609d6d7021678e53efecb...
import os import sys from distutils.version import LooseVersion import warnings from pyspark.sql.pandas.utils import require_minimum_pandas_version, require_minimum_pyarrow_version try: require_minimum_pandas_version() require_minimum_pyarrow_version() except ImportError as e: if os.environ.get("SPARK_TES...
{ "content_hash": "dc68f3dfe87131a99c940dc0b5a5367b", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 100, "avg_line_length": 30.873493975903614, "alnum_prop": 0.6442926829268293, "repo_name": "maropu/spark", "id": "12e54adba06a85a803238145988190fc69341dd0", "size": "5909"...
import re from django.template import Library from django.template.defaultfilters import stringfilter from django.utils import timezone from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register = Library() def _no_op(x): return x def _esc_func(autoescape): if ...
{ "content_hash": "db09ec819885d16646d5692bb0bb9c22", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 102, "avg_line_length": 22.010416666666668, "alnum_prop": 0.6256507335541883, "repo_name": "django-silk/silk", "id": "11145642dc668eb6d5fd08198e215cfe70db5e4a", "size": "21...
"""This example gets the current user.""" # Import appropriate modules from the client library. from googleads import ad_manager def main(client): # Initialize appropriate service. user_service = client.GetService('UserService', version='v202208') # Get current user. user = user_service.getCurrentUser() ...
{ "content_hash": "791e5d6fbde1e102d5e13d1087d312f2", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 68, "avg_line_length": 28.636363636363637, "alnum_prop": 0.6793650793650794, "repo_name": "googleads/googleads-python-lib", "id": "b193dbac3d19fb7bbf796b2bd30c923d690e4960", ...
""" 주석 부분 입력할거임. """ import os import platform ''' class ApWrapper: def __init__(self): self.hostapd = '' self.context = device_config_pb2.Devices.AccessPoint.Ap() def __getitem__(self, key): if not isinstance(key, int): return None return self.context.access_po...
{ "content_hash": "8cb396134cee81ac9537556aac9e560c", "timestamp": "", "source": "github", "line_count": 234, "max_line_length": 90, "avg_line_length": 25.67948717948718, "alnum_prop": 0.4876019304376768, "repo_name": "OpenWinCon/OpenWinNet", "id": "2450f392ce00bf7a38118145aaadefe0b68f0dfa", "size":...
from flask import Flask,render_template from micro_scrabble import app from micro_scrabble import db from forms import NewGameForm,PlayerForm,SwapLettersForm from models import GameArchive import game as scrabble #board config s = 50 def update_game(instance,archive): """Update SQL table""" player_list,letter...
{ "content_hash": "72fbcc0695b21904443b6ca45932847c", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 266, "avg_line_length": 42.02439024390244, "alnum_prop": 0.6869800735151866, "repo_name": "MG-Barnes/micro-scrabble", "id": "e00f912a053b783887c7c9fb8bb875757bfd6501", "si...
"""Python wrapper for the Block GRU Op.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.rnn.ops import gen_gru_ops from tensorflow.contrib.util import loader from tensorflow.python.framework import ops from tensorflow.python.ops im...
{ "content_hash": "bdaf286318a035b7fded20e5500adc30", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 82, "avg_line_length": 30.829383886255926, "alnum_prop": 0.6038431975403535, "repo_name": "tillahoffmann/tensorflow", "id": "bf74fd7544b8eb64fd19390b3a2af73aeb03f060", "si...
from google.cloud import aiplatform_v1beta1 async def sample_list_contexts(): # Create a client client = aiplatform_v1beta1.MetadataServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1beta1.ListContextsRequest( parent="parent_value", ) # Make the request ...
{ "content_hash": "e055df3ea7e278f0a95dc813348e8c13", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 71, "avg_line_length": 26.75, "alnum_prop": 0.7233644859813084, "repo_name": "googleapis/python-aiplatform", "id": "2c51a86f2194602249009643f42895c290eed70b", "size": "1932...
from setuptools import setup, find_packages setup( name="gcs", version="3.0.0", author="Marcus LaFerrera (@mlaferrera)", url="https://github.com/PUNCH-Cyber/stoq-plugins-public", license="Apache License 2.0", description="Read and write data to Google Cloud Storage", packages=find_packages(...
{ "content_hash": "18d0e1326427fff78b4a1c44c3bf786c", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 62, "avg_line_length": 29.666666666666668, "alnum_prop": 0.6882022471910112, "repo_name": "PUNCH-Cyber/stoq-plugins-public", "id": "fa77b4f44ee756e4e7c4b35e78f8bcba2a8eea0d",...
""" size tupes are always (height, width) so that image.shape == (height, width, :) coordinates are always (row, column) so that `image[row, column]` where `0 < row < height` """ import warnings import time from skimage import img_as_float, io, transform # Plotting import matplotlib.pyplot as plt from mpl_toolkits.m...
{ "content_hash": "6ae73909a06040aad4c11124d50c13e1", "timestamp": "", "source": "github", "line_count": 201, "max_line_length": 121, "avg_line_length": 41.42786069651741, "alnum_prop": 0.6273567911612826, "repo_name": "HearSys/pattern_finder_gpu", "id": "9631fa9503365aa60d475fbc1403d5bcfff6a336", "...
def user(): return dict(form=auth()) def download(): return response.download(request,db) def call(): return service() import time ### end requires def index(): redirect(URL('default', 'index')) @auth.requires_membership('admin') def add(): session.msg = '' form = SQLFORM.factory(Field('url', requires=I...
{ "content_hash": "69248ab2eb45729eeb8ffab9625f7384", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 443, "avg_line_length": 50.306666666666665, "alnum_prop": 0.5982860676738228, "repo_name": "atzorvas/droughtmeteo", "id": "96186d59c05c56c9fe6c48f01ce6a797994e2d7e", "size...
""" An extension to retry failed requests that are potentially caused by temporary problems such as a connection timeout or HTTP 500 error. You can change the behaviour of this middleware by modifing the scraping settings: RETRY_TIMES - how many times to retry a failed page RETRY_HTTP_CODES - which HTTP response codes...
{ "content_hash": "6a7daee90b93f0ef1aa9070fe4acefcc", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 100, "avg_line_length": 44.53846153846154, "alnum_prop": 0.6911341393206678, "repo_name": "elkingtowa/pyrake", "id": "def6a5f2e6b02275272cefd8d4189787903fcec6", "size": "34...
import unittest import sys import logging from unittest.mock import patch from data_mapper.data_mapper_interface import DataMapperInterface from data_mapper.exceptions import DataMapperError class TestDataMapper(unittest.TestCase): def setUp(self): self.logger = logging.getLogger() self.logger.le...
{ "content_hash": "37c52f6f3dfd114b1d492e077e182d51", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 104, "avg_line_length": 41.02325581395349, "alnum_prop": 0.6808390022675737, "repo_name": "lo100/MyRaspiHome", "id": "abdae80cbd8775903174619a4cbe51474703be23", "size": "17...
try: from django.apps import django_apps get_model = django_apps.get_model except ImportError: # Django < 1.7 from django.db.models import loading get_model = loading.get_model
{ "content_hash": "7cc7e846cce334799ee12aec3c10ae11", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 40, "avg_line_length": 28.142857142857142, "alnum_prop": 0.700507614213198, "repo_name": "miraculixx/plata", "id": "b6cd1b8b79815d1952b36fff242f6e4ba53407f5", "size": "197",...
import logging from django.core.serializers import serialize, deserialize from django.conf import settings from tictactoelib import compete from tictactoe.celery_app import app from .models import Fight, Entry, LatestEntry from .logic import winner logger = logging.getLogger(__name__) def fight(e1, e2): log...
{ "content_hash": "b32bcfbd56dcecd7a83b28293ce607d3", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 75, "avg_line_length": 31.348484848484848, "alnum_prop": 0.6283228612856452, "repo_name": "Motiejus/tictactoe", "id": "ca3fd8a6d2403b90e71f43a3453e321edbe3c547", "size": "2...
"""Create sample images given a font and text.""" __author__ = "roozbeh@google.com (Roozbeh Pournader)" import argparse import codecs import os from os import path import string from nototools import notoconfig from nototools.py23 import basestring from nototools.py23 import unichr import cairo import pango import ...
{ "content_hash": "9f08aef0980c52e7f0413e4777c2a0df", "timestamp": "", "source": "github", "line_count": 572, "max_line_length": 88, "avg_line_length": 32.01573426573427, "alnum_prop": 0.6073827335772403, "repo_name": "googlefonts/nototools", "id": "b5980a6b41f47ceca3b2921f9f68adfb1be88dd3", "size":...
import math import scipy.signal import numpy def result(): start = 0.5e-3 - 10e-5 # part used for amplitude calculation end = 0.5e-3 + 10e-5 # # ------------------------------------------------------------------------------ tauold=None for timesignal in results: ...
{ "content_hash": "91d9f2d83c09c0847653b04557284a19", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 104, "avg_line_length": 40.943396226415096, "alnum_prop": 0.5069124423963134, "repo_name": "mrosenstihl/PulsePrograms", "id": "84b2dfc4a9a5c839f19418a23157e8834a294a77", "s...
import re import urllib import time import os def getHtml(url): page = urllib.urlopen(url) html = page.read() return html def getnexturl(url): html = getHtml(url) reg = r'<a href="(\?page=.+?\&t=\d.*?)"' pageturl = re.compile(reg) page = re.findall(pageturl, html) if page: nexturl = pagelists[0] + page[(le...
{ "content_hash": "d9ecb951eefb3246c4330634325e28b8", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 49, "avg_line_length": 18.636363636363637, "alnum_prop": 0.6617886178861788, "repo_name": "sparrow629/Lofter-image-Crawler", "id": "3034b323c96caa460b399284e7fc54f8fb71af9c",...
from jinja2 import Template from IPython.display import IFrame, HTML import os import json from .base_plotter import IPlotter class C3Plotter(IPlotter): """Class for creating c3.js charts in ipython notebook.""" head = """ <!-- Load c3.css --> <link href='https://cdnjs.cloudflare.com/ajax/lib...
{ "content_hash": "cce4e0bd3a0dd985a67c11e70cceb323", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 115, "avg_line_length": 36.68421052631579, "alnum_prop": 0.5161406025824964, "repo_name": "niloch/iplotter", "id": "cb34cb9be92cf4b006cff468f38cf2db5baf4dd3", "size": "2788...
""" Objects relating to sourcing connections from environment variables """ import os from typing import Optional from airflow.secrets import BaseSecretsBackend CONN_ENV_PREFIX = "AIRFLOW_CONN_" VAR_ENV_PREFIX = "AIRFLOW_VAR_" class EnvironmentVariablesBackend(BaseSecretsBackend): """ Retrieves Connection ...
{ "content_hash": "46a241fae4c63ab8a037119824afe118", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 75, "avg_line_length": 26.181818181818183, "alnum_prop": 0.6643518518518519, "repo_name": "owlabs/incubator-airflow", "id": "c4d5754a857a5291613eec76a5252e78d9662596", "siz...
import csv from django.db import models from django.conf import settings import eveapi from core.models import Type, Location from API.models import CorpAPIKey from core.models import Corporation, Alliance from Map.models import System, MapSystem, Map from API import cache_handler as handler User = settings.AUTH_US...
{ "content_hash": "5915c0543623bd92a85a8162edb40ded", "timestamp": "", "source": "github", "line_count": 252, "max_line_length": 93, "avg_line_length": 40.82539682539682, "alnum_prop": 0.5541407465007776, "repo_name": "Zumochi/eve-wspace", "id": "247df7f3320ceebbb9cda233d2ee596ecc0f4a15", "size": "1...
''' Configure waf for worch. It is expected that any external tools that add worch features have already been loaded. ''' import os from glob import glob import waflib.Logs as msg from waflib import Context from . import util from . import pkgconf from . import envmunge def locate_config_files(pat): if os.path....
{ "content_hash": "3e36432a6ab6f248daeabe99491a595a", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 100, "avg_line_length": 29.423529411764704, "alnum_prop": 0.6205517792882846, "repo_name": "hwaf/hwaf", "id": "9a1a6d14db9b9ed74a7e24ce2188ae765cadfbbf", "size": "2523", ...
from .vectors import *
{ "content_hash": "c5bd195e0f16ebb7d3ac56ab3c30d4c1", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 22, "avg_line_length": 23, "alnum_prop": 0.7391304347826086, "repo_name": "cnlohr/bridgesim", "id": "f7556184ca5adbc935c9782a84f9c4ddeab2d577", "size": "23", "binary": fal...
"""LHN elements.""" # pylint: disable=not-callable # pylint: disable=not-an-iterable from selenium.common import exceptions as selenium_exception from lib import base, exception from lib.constants import locator from lib.page import extended_info from lib.utils import selenium_utils class _Tab(base.Tab): """Tab e...
{ "content_hash": "35dd4a5a437ce734e2e84da10911f59a", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 79, "avg_line_length": 31.142857142857142, "alnum_prop": 0.6898572884811417, "repo_name": "plamut/ggrc-core", "id": "ad2358a36f38f8e79b32fc05c74e521a307fb11a", "size": "40...
""" Grafeas API An API to insert and retrieve annotations on cloud artifacts. # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import grafeas from grafeas.models.api_alias_c...
{ "content_hash": "52105dfd6075dff25655d8e44190f48e", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 82, "avg_line_length": 22.657894736842106, "alnum_prop": 0.6829268292682927, "repo_name": "grafeas/client-python", "id": "0e53cbb4b2cae3b34c9fc789c49abcef2941d36f", "size":...
import asyncio import copy import discord import sys import time import datetime import traceback from discord.ext import commands from sys import argv class Loop: """ Loop events. """ def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) ...
{ "content_hash": "aaa5fb64305f85dccf7e7a70f089dc43", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 66, "avg_line_length": 16.266666666666666, "alnum_prop": 0.6290983606557377, "repo_name": "916253/Kurisu-Reswitched", "id": "e7972237ab0565ef7910f009d4b3e066729df94d", "siz...
from Adafruit_AMG88xx import Adafruit_AMG88xx from time import sleep #import Adafruit_AMG88xx.Adafruit_AMG88xx as AMG88 # Default constructor will pick a default I2C bus. # # For the Raspberry Pi this means you should hook up to the only exposed I2C bus # from the main GPIO header and the library will figure out the ...
{ "content_hash": "4ca0be1e3c11f08bf6ca8a465476b084", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 80, "avg_line_length": 27.4, "alnum_prop": 0.7562043795620438, "repo_name": "Quantonomist/Kitchen_Pi", "id": "3ac3228f5f48aed09cfc2cce0f1e3cdb097ba5bd", "size": "1926", "...
""" Base class for computation procedures """ import abc from ..interface.models import KVStore class BaseTasks(abc.ABC): def __init__(self, storage, logger): self.storage = storage self.logger = logger def submit_tasks(self, data): """ Creates results/procedures and tasks in...
{ "content_hash": "ad24a449a96efd942c65dcc8cd93c9d9", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 110, "avg_line_length": 33.58064516129032, "alnum_prop": 0.5766890810118476, "repo_name": "psi4/DatenQM", "id": "fb49a36f2301dba19c315ce082a2107ad079cb09", "size": "3123", ...
VERSION = (1, 7, 0, 'alpha', 0) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) def setup(): """ Configure the settings ...
{ "content_hash": "033e08cdd80fcd85619df87f4d18e06a", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 74, "avg_line_length": 32.142857142857146, "alnum_prop": 0.7037037037037037, "repo_name": "Beeblio/django", "id": "14c941601a148964a8925508e79d1fbe7e7e6537", "size": "675",...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
{ "content_hash": "9c9fa16cc5434b879c7a74778d049efe", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 91, "avg_line_length": 37.1875, "alnum_prop": 0.7002801120448179, "repo_name": "Quikling/gpdb", "id": "d2061f5580678e001a82ababea9bf2079b1a9841", "size": "1785", "binary"...
from __future__ import unicode_literals, division, absolute_import import logging import re import urllib from flexget import plugin, validator from flexget.entry import Entry from flexget.event import event from flexget.utils import requests from flexget.utils.soup import get_soup from flexget.utils.search import to...
{ "content_hash": "5efc94073b1090ca160e83bc71c6821f", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 118, "avg_line_length": 39.05882352941177, "alnum_prop": 0.47270331325301207, "repo_name": "spencerjanssen/Flexget", "id": "6b7fbbc0e524c45b063e0800add851e4b464aa17", "siz...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
{ "content_hash": "a74d3a262cc9149efb31efa4e6ac2211", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 72, "avg_line_length": 27.035714285714285, "alnum_prop": 0.7166446499339498, "repo_name": "sekikn/ambari", "id": "abb07dae7707fe65d19cfbea25a0f367211498af", "size": "1536",...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0008_remove_tag_blogpost'), ] operations = [ migrations.RemoveField( model_name='tag', name='id', ), ...
{ "content_hash": "f42422d2cc27aa6867a99048a2e9622c", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 85, "avg_line_length": 23.304347826086957, "alnum_prop": 0.5615671641791045, "repo_name": "GMadorell/djagolb", "id": "73200f5e9b2b363755cff32ff18d509e61f6bcd4", "size": "56...
import glob, importlib, inspect, os import peewee, playhouse from playhouse.migrate import MySQLMigrator, PostgresqlMigrator, SqliteMigrator from importlib import import_module from keydom.util import parse_uri from malibu.util import log modules = glob.glob(os.path.dirname(__file__) + "/*.py") __all__ = [os.path.base...
{ "content_hash": "f5ea50f1c895fb611351c534ecfbe34e", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 79, "avg_line_length": 33.16, "alnum_prop": 0.6188178528347407, "repo_name": "pirogoeth/keydom", "id": "f9ecb1f92e1e00544a15dc13688a570036bb7e5a", "size": "3316", "binar...
import boto3 import os import copy import time import json import datetime from boto3.dynamodb.conditions import Key, Attr def handler(event, context): # DynamoDB access dynamodb = boto3.resource('dynamodb') bill_table = dynamodb.Table(os.environ['DB_BILL_TABLE']) voter_table = dynamodb.Table(os.enviro...
{ "content_hash": "76c12d831ee46bc78b67f7bee49204a2", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 135, "avg_line_length": 34.9, "alnum_prop": 0.4990448901623687, "repo_name": "peter765/power-polls", "id": "cd18a6a2a88eea2d1f40cb64684b381f3aa1f9f5", "size": "2094", "bi...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 0);
{ "content_hash": "a9dc9893694a0f0fcb067d81d2fe9f5e", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 177, "avg_line_length": 39.57142857142857, "alnum_prop": 0.7184115523465704, "repo_name": "antoinecarme/pyaf", "id": "f76a3928e315a59961e2a7bb0a3d65a171719223", "size": "277...
import sys usage = "compare_multiple_sam.py <annotated SAM file1> <annotated SAM file2> <annotated SAM filen> <output file>" if len(sys.argv) < 3: print usage sys.exit(0) outputFile = sys.argv[len(sys.argv)-1] #print outputFile fileObjList = [] for n in range(0, len(sys.argv)-2): fileName = sys.argv[n+1] fileO...
{ "content_hash": "cff4da14f9d1dfeea10b7b2c94275ef5", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 113, "avg_line_length": 22.37037037037037, "alnum_prop": 0.6655629139072847, "repo_name": "chiulab/surpi", "id": "1af36c812a4824108e61284c3ac952086e07fff0", "size": "1564",...
import sys, os, datetime, requests, json, uuid, glob, argparse, copy, logging, time, io from time import sleep from sqlalchemy import Column, Integer, String, ForeignKey, Table, create_engine, MetaData, Date, DateTime, Float, cast, or_, and_, asc from src.common.env_loader import * from src.common.shellprinting ...
{ "content_hash": "7a805f8af250d7d598ef86b5f6b0b388", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 135, "avg_line_length": 36.54736842105263, "alnum_prop": 0.6414170506912442, "repo_name": "jay-johnson/sci-pype", "id": "c28d003fceb30cb5f0f26eb8f8f1f918efe885fb", "size": ...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'SourceFile', fields ['project', 'file_name'] db.delete_unique(u'...
{ "content_hash": "2f068e2da05891f65721e2648456d8ea", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 195, "avg_line_length": 82.67032967032966, "alnum_prop": 0.5531038149674332, "repo_name": "pebble/cloudpebble", "id": "2fa453df8c348d8691c65d97a1106b741a7a1071", "size": "...
import gc import logging import os.path temp = True if not os.path.exists("/sys/class/thermal/thermal_zone0/temp"): temp = False class CPUTemp(object): def __init__(self): gc.enable() @staticmethod def get_kind(): """ return sensor kind """ return "mpcputemp" ...
{ "content_hash": "63d0e16d2da6e498e57c420dd43129bb", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 112, "avg_line_length": 33.8, "alnum_prop": 0.4359870898332437, "repo_name": "MyPhate/PythonMiniProbe", "id": "6e9f836b419e935803cbb592ad4daa6b224bf515", "size": "5278", ...
from __future__ import print_function import os import time import glob import numpy as np import matplotlib.pyplot as plt import sys sys.path.insert(0, os.path.join( os.path.dirname(os.path.realpath(__file__)), "../")) from pyAudioAnalysis import utilities from pyAudioAnalysis import audioBasicIO from pyAudioAnaly...
{ "content_hash": "7f8fbfbf1f3bf652b16e0ea1b22681bb", "timestamp": "", "source": "github", "line_count": 377, "max_line_length": 80, "avg_line_length": 41.281167108753316, "alnum_prop": 0.5576045749534152, "repo_name": "tyiannak/pyAudioAnalysis", "id": "f764816f53ed9c33107e5b5ab19b9565af93858a", "si...
"""Module to provide implicit behavior based on enviroment. Allows the datastore package to infer the current dataset ID and connection from the enviroment. """ import os from gcloud._helpers import _app_engine_id from gcloud._helpers import _compute_engine_id from gcloud._helpers import _lazy_property_deco from gcl...
{ "content_hash": "f00d22b6f035d249995ae7185d36093e", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 77, "avg_line_length": 31.024844720496894, "alnum_prop": 0.6972972972972973, "repo_name": "blowmage/gcloud-python", "id": "fd5ba9e5b8f9623c99eed2fccfbd024d9d5096e2", "size...
from mock import Mock, patch from nose.tools import with_setup, raises from pretend import stub from django.core.exceptions import ImproperlyConfigured from django.db.models import Model as DjangoModel from neo4django import utils from neo4django.neo4jclient import EnhancedGraphDatabase from neo4django.db.models impo...
{ "content_hash": "d6a29b1ae5df222199b26b21aad4d5c5", "timestamp": "", "source": "github", "line_count": 366, "max_line_length": 79, "avg_line_length": 25.62568306010929, "alnum_prop": 0.6617976330099158, "repo_name": "mpetyx/django-rdfGraph", "id": "9f43f20db3dac5dea933594dbdd1fca664f7a672", "size"...
""" Sessions that persist in the database. Every L{SESSION_CLEAN_FREQUENCY} seconds, a pass is made over all persistent sessions, and those that are more than L{PERSISTENT_SESSION_LIFETIME} seconds old are deleted. Transient sessions die after L{TRANSIENT_SESSION_LIFETIME} seconds. These three globals can be overrid...
{ "content_hash": "e7a9271725cce723f2716b9c8afc6eac", "timestamp": "", "source": "github", "line_count": 392, "max_line_length": 84, "avg_line_length": 33.93877551020408, "alnum_prop": 0.6328171978352375, "repo_name": "twisted/mantissa", "id": "3b81a27c3b4345e5456a1d56a1960a7a83e42af8", "size": "134...
import calendar import datetime import json import logging import time from google.appengine.ext import blobstore from google.appengine.ext import db from google.appengine.ext import ndb BUILTIN_TYPES = (int, long, float, bool, dict, basestring, list) class SerializableMixin(object): def to_json_dict(self, in...
{ "content_hash": "0a321111a9f35aa6850f4b0604d7763d", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 70, "avg_line_length": 31.189873417721518, "alnum_prop": 0.554788961038961, "repo_name": "tylertreat/gaeutils", "id": "7b04433d975b6ff89b5024e4a3822e864bc61aa2", "size": "2...
import sqlite3
{ "content_hash": "b70399fc848fb0795041e3582e12f589", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 14, "avg_line_length": 15, "alnum_prop": 0.8666666666666667, "repo_name": "SocialNPHS/SocialNPHS", "id": "615a6b855fbf3c60f4367e95c85df536719dea4b", "size": "15", "binary"...
import fileinput import re # Process raw output from govsm.com, either House, Senate or Governors, or # campaigns for any of the three. Note that for campaigns for Governors, # you will need to insert a line # # Welcome to the Governors Campaigns # # above the section containing the campaigns for governor. campaigns...
{ "content_hash": "1214c3ae7a7a70831434c1ed9d1a1e0a", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 84, "avg_line_length": 29.88888888888889, "alnum_prop": 0.5659851301115242, "repo_name": "utcompling/textgrounder", "id": "d06bea45b846683a3093a68112b5749a73e79554", "size"...
from proboscis import test from trove.tests import PRE_INSTANCES from trove.tests.scenario import groups from trove.tests.scenario.groups.test_group import TestGroup from trove.tests.scenario.runners import test_runners GROUP = "scenario.instance_create_group" class InstanceCreateRunnerFactory(test_runners.RunnerF...
{ "content_hash": "fd45cdf8c1797de837c0aedb58544619", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 74, "avg_line_length": 34.292307692307695, "alnum_prop": 0.6888739344997756, "repo_name": "hplustree/trove", "id": "83a1f16b819638b10f8073878aae0693547c3238", "size": "508...
import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.trans...
{ "content_hash": "966196cfa453e62d77fea51c3c0ba26a", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 223, "avg_line_length": 43.11194029850746, "alnum_prop": 0.6540303502394553, "repo_name": "Azure/azure-sdk-for-python", "id": "b0fea33c0b20bf4146308a7c0df12def82cea402", "...
"""Unit testing for servmon.common.errorhandler.invalid_usage_handler""" from servmon import app from servmon.common import invalid_usage from servmon.common.errorhandler import invalid_usage_handler import json import pytest @pytest.fixture def app_mock(): """Returns a mock of the application""" app.config['T...
{ "content_hash": "cfbe956e82bcd8913eaefe4cad52aaf2", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 105, "avg_line_length": 42.56944444444444, "alnum_prop": 0.7017944535073409, "repo_name": "hpsuenaa/servmon", "id": "b74cc17f3cbc12e45e3ae8f0f6aabdbeb9721a8a", "size": "306...
""" HTMLParser-based link extractor """ from HTMLParser import HTMLParser from six.moves.urllib.parse import urljoin from w3lib.url import safe_url_string from pyrake.link import Link from pyrake.utils.python import unique as unique_list class HtmlParserLinkExtractor(HTMLParser): def __init__(self, tag="a", at...
{ "content_hash": "57fb5bff358b53a4367f97890a83e954", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 97, "avg_line_length": 33.093333333333334, "alnum_prop": 0.6087832393231265, "repo_name": "elkingtowa/pyrake", "id": "9c3c252253c54f11b56ad1c40054b178914a33f5", "size": "24...
from upload import *
{ "content_hash": "8c38c64d2ecb8ba39ed374f649cdfaed", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 20, "avg_line_length": 20, "alnum_prop": 0.8, "repo_name": "scottkleinman/WE1S", "id": "d16e60cff872a782b5a813a7dc1aa39c3a15421b", "size": "20", "binary": false, "copies...
""" http.py : Trovebox HTTP Access """ from __future__ import unicode_literals import sys import requests import requests_oauthlib import logging try: from urllib.parse import urlparse, urlunparse # Python3 except ImportError: from urlparse import urlparse, urlunparse # Python2 from trovebox.objects.trovebox_o...
{ "content_hash": "07cd4e225d8f646836ccf79e79b5e5a3", "timestamp": "", "source": "github", "line_count": 263, "max_line_length": 80, "avg_line_length": 38.27376425855513, "alnum_prop": 0.5661633220743095, "repo_name": "photo/openphoto-python", "id": "6021dcca17a22206b252eafd88c14528e6c06dec", "size"...
import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import ode import traceback import sys import warnings import scenes import games import players from graphics import render, init_graphics, lights, cameras, textures from math_classes.vectors import V...
{ "content_hash": "f65824cf5a21a8d83bb227636ea6fbb0", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 100, "avg_line_length": 28.309734513274336, "alnum_prop": 0.6505157861831823, "repo_name": "axelri/return-of-the-spheres", "id": "abe1543ca891b7e3043ff6c9cec6b09988f70b69", ...
from oslo.config import cfg from sqlalchemy.orm import exc from neutron.api.v2 import attributes from neutron.common import constants from neutron.common import utils from neutron.extensions import portbindings from neutron import manager from neutron.openstack.common import log as logging LOG = logging.getLogger(__...
{ "content_hash": "3af2c66d5ff0819e35bdde6452ae6668", "timestamp": "", "source": "github", "line_count": 232, "max_line_length": 79, "avg_line_length": 42.17672413793103, "alnum_prop": 0.5678078691875319, "repo_name": "netscaler/neutron", "id": "a8a2b4bf2ade48651785aa8efadad4a6fbcd1d70", "size": "10...
'''Process creation helper This script can be spawned as an intermediate process when creating a new process to be able to daemonize the result process, or setuid/setgid the result process. ''' import os import os.path import sys import time import itertools def find_gids_for_uid(uid): '''Find all GIDs of group...
{ "content_hash": "d68916e74671c3294be2969cae812a71", "timestamp": "", "source": "github", "line_count": 380, "max_line_length": 91, "avg_line_length": 35.41315789473684, "alnum_prop": 0.5403879022070298, "repo_name": "Jumpscale/core9", "id": "aa132be628bc0432c57c65bd53d85f9f323006e9", "size": "1345...
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import math import matplotlib import matplotlib.pyplot as pyplot import random import sys import brfss import myplot ...
{ "content_hash": "bced885ae2b55085816703ca5f8da552", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 72, "avg_line_length": 26.707865168539325, "alnum_prop": 0.5902397980647875, "repo_name": "flychen50/thinkstat", "id": "69a935028d4957b33ce1e55d3a5e772f5438b845", "size": "...
from devilry.apps.core import models from devilry.simplified import FieldSpec, FilterSpec, FilterSpecs, ForeignFilterSpec class SimplifiedSubjectMetaMixin(object): """ Defines the django model to be used, resultfields returned by search and which fields can be used to search for a Subject object using th...
{ "content_hash": "af91f90d6fb64a6691c4d56a667ec8cd", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 84, "avg_line_length": 44.916666666666664, "alnum_prop": 0.49814471243042674, "repo_name": "vegarang/devilry-django", "id": "04df9393ceee3bc6a0f57cf5f24aa1f816830b38", "siz...
''' A Simple API util which used to post test reports on Slack Channel. Steps to Use: 1. Generate Slack incoming webhook url by reffering our blog: https://qxf2.com/blog/post-pytest-test-results-on-slack/ & add url in our code 2. Generate test report log file by adding ">log/pytest_report.log" command at end of py.tes...
{ "content_hash": "5bb3f2e8db5288e14957c7c87b0c6865", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 171, "avg_line_length": 48.28260869565217, "alnum_prop": 0.6208914903196758, "repo_name": "qxf2/qxf2-page-object-model", "id": "94aea48676d6426b890361e68c29cc6c604882df", "...
from .base import ( FileBase, DirectoryBase, ) __all__ = ['EmptyFile', 'EmptyDirectory',] class EmptyFile(FileBase): pass class EmptyDirectory(DirectoryBase): pass
{ "content_hash": "95f97906406c14e2bc1d5ddab10c04a3", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 42, "avg_line_length": 13.214285714285714, "alnum_prop": 0.6648648648648648, "repo_name": "risuoku/wataru", "id": "02402868eff04d65789541dea57b06f82f3f11d8", "size": "185",...
import utils import torch import random from consts import DEVICE from torch.optim import Adam from sklearn.model_selection import train_test_split from sklearn.metrics import f1_score from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler from tqdm import tqdm from model_att.model im...
{ "content_hash": "5ccbb8ab2d345b861b3eeff58a1b84fe", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 130, "avg_line_length": 42.78861788617886, "alnum_prop": 0.6148584457533726, "repo_name": "xgeric/UCPhrase-exp", "id": "8786963d4b2df37c7ab7d5b23ce8e956c9e3bb89", "size": ...
import test_framework.loginit # # Test REST interface # from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from struct import * from io import BytesIO from codecs import encode import http.client import urllib.parse def deser_uint256(f): r = 0 for i in range(8):...
{ "content_hash": "003e926d20cfba95075c691cbf862dab", "timestamp": "", "source": "github", "line_count": 330, "max_line_length": 132, "avg_line_length": 45.61515151515152, "alnum_prop": 0.6134325383644457, "repo_name": "BitcoinUnlimited/BitcoinUnlimited", "id": "44309ac42022e093597bb464c0ce55782e01cca...
from py2neo.ext.spatial.exceptions import NodeNotFoundError from py2neo.ext.spatial.util import parse_lat_long from py2neo.ext.spatial.plugin import NAME_PROPERTY class TestBase(object): @staticmethod def _layer_exists(graph, layer_name): results = graph.cypher.execute( "MATCH (r { name:'s...
{ "content_hash": "fb85d71c620f7c2b2e930cbffefde526", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 76, "avg_line_length": 31.446153846153845, "alnum_prop": 0.6115459882583171, "repo_name": "fpieper/py2neo", "id": "93140d2682ae34eb4be468b6ee6a4ce291abce6c", "size": "2044"...
""" @author: Nicu Tofan <nicu.tofan@gmail.com> """ from types import BuiltinFunctionType, TypeType, IntType, LongType, DictType from types import FloatType, BooleanType, StringType, UnicodeType import numpy from PyQt4 import QtGui, QtCore from pylearn2.datasets.dataset import Dataset from pylearn2.datasets.dense_des...
{ "content_hash": "52b8de3b41388477f817b20fd9aaeff9", "timestamp": "", "source": "github", "line_count": 350, "max_line_length": 84, "avg_line_length": 35.25142857142857, "alnum_prop": 0.5175068892851353, "repo_name": "TNick/pyl2extra", "id": "007b6a6b1838ec4af03fad7ec34d4a7f7b06de56", "size": "1238...
""" sentry.db.models ~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from copy import copy import logging import six from bitfield.types import BitHandler from django.db import models...
{ "content_hash": "6193f6a1d6e44b79ace62335cf364b26", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 89, "avg_line_length": 28.74846625766871, "alnum_prop": 0.58898847631242, "repo_name": "looker/sentry", "id": "b5ca511f817f560b174f705d57acec0331154c2f", "size": "4686", ...
from scapy.all import * sniff(prn=lambda x: x.summary())
{ "content_hash": "5fb8a094a2ffd0bb38c81f34f33b6fac", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 32, "avg_line_length": 19.333333333333332, "alnum_prop": 0.7068965517241379, "repo_name": "krkini16/Floascope", "id": "6a422947a6cc2b2791b062c4fc8e0865ecdc54fe", "size": "58...
''' Regression tests for issue #69 ''' import parsl import pytest from parsl.app.app import App from parsl.tests.configs.local_threads import config parsl.clear() parsl.load(config) @App('bash') def echo_slow_message(msg, sleep=0, fu=None, outputs=[], stderr='std.err', stdout='std.out'): cmd_line = 'sleep {sle...
{ "content_hash": "7658d568122885e0516504e9925ef4b8", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 93, "avg_line_length": 26.07792207792208, "alnum_prop": 0.6254980079681275, "repo_name": "swift-lang/swift-e-lab", "id": "32b65f56143f2ce125fc19c27432423b9e120ad8", "size":...
import pytest from libqtile import layout import libqtile.manager import libqtile.config from ..conftest import no_xinerama from .layout_utils import assertFocused, assertFocusPath class BspConfig(object): auto_fullscreen = True main = None groups = [ libqtile.config.Group("a"), libqtile.c...
{ "content_hash": "3213af2ca18507dc9e82284e7cac52fa", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 80, "avg_line_length": 28.54, "alnum_prop": 0.6692361597757533, "repo_name": "kynikos/qtile", "id": "85fe5dab6ae689e1e5b309b7f52c82a4413730b2", "size": "2485", "binary": ...
"""empty message Revision ID: 4c32b038f2b Revises: None Create Date: 2016-01-10 18:17:13.253747 """ # revision identifiers, used by Alembic. revision = '4c32b038f2b' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
{ "content_hash": "494a3005889f89c867544705aaaa6aca", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 63, "avg_line_length": 18.692307692307693, "alnum_prop": 0.6790123456790124, "repo_name": "LIHTU/pythonCoderRepo", "id": "d43e67d1b6892d96b22d832e2cc05d8efee3751f", "size":...
''' Copyright (c) 2014, Helen Ramsden All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following ...
{ "content_hash": "03c3d1213c811dde4e9b1976790e4f39", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 186, "avg_line_length": 37.954337899543376, "alnum_prop": 0.7121029836381135, "repo_name": "MattNolanLab/Ramsden_MEC", "id": "ca69477c798dc29f82bb9baaa3c63573e118e042", "s...
from django.contrib.auth.models import User from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from entropy import base from polymorphic import PolymorphicModel CONTENT_MODELS = ['sk...
{ "content_hash": "fc388779a9a579fc24a0a3b54023508e", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 99, "avg_line_length": 26.9468085106383, "alnum_prop": 0.6829846032372681, "repo_name": "DarrenFrenkel/django-rea-people", "id": "604bae4aa7da34339816f9f76c747199040afcfc", ...
""" requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime import sys # Import encoding now, to avoid implicit import later. # Implicit import within threads may cause LookupError when standard library is in a ZIP, # such as in Embedded Py...
{ "content_hash": "43727a90b3f647f3af7f24c4dcea6b2a", "timestamp": "", "source": "github", "line_count": 946, "max_line_length": 119, "avg_line_length": 35.96828752642706, "alnum_prop": 0.583142302944807, "repo_name": "Code-In-Action/python-in-action", "id": "4254fbd20cff7316da191e54fe2e7b1559deafee",...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^login/$', views.login, name='login'), url(r'^signup/$', views.signup, name='signup'), url(r'^verify/$', views.verify, name='verify'), url(r'^message/$', views.send_message_admin, name='message'), url(r'^(\d+)/$', views.use...
{ "content_hash": "e8922759d2b88508e1323c5e70136a0a", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 65, "avg_line_length": 33.083333333333336, "alnum_prop": 0.6171284634760705, "repo_name": "pkumercury/pkucourier", "id": "3c6d814d50bdf0926bf2c8e3605a00d3e315ff4f", "size":...
from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.organization import OrganizationEndpoint from sentry.plugins import bindings class OrganizationConfigRepositoriesEndpoint(OrganizationEndpoint): def get(self, request, organization): provider_bindi...
{ "content_hash": "d57e7919b743b557a9b23592eece8627", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 73, "avg_line_length": 32, "alnum_prop": 0.5915948275862069, "repo_name": "ifduyue/sentry", "id": "6ad7946051aeb7e2f81a0b8b870e261164d03311", "size": "928", "binary": fal...
from rdr_service.model.code import CodeType from tests.helpers.unittest_base import BaseTestCase class CheckPpiDataApiTest(BaseTestCase): def setUp(self): super(CheckPpiDataApiTest, self).setUp(with_consent_codes=True) self.participant_summary = self.data_generator.create_database_participant_sum...
{ "content_hash": "caf3b9bc46bbc3a819a5edc6b50e43ba", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 116, "avg_line_length": 46.46666666666667, "alnum_prop": 0.6384505021520803, "repo_name": "all-of-us/raw-data-repository", "id": "50d98e987e224274b1078667760562e8b2be65ca", ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('image_collection', '0001_initial'), ] operations = [ migrations.AddField( model_name='imageslide', name='caption_headline', ...
{ "content_hash": "51e2b4281eef5f5224c53337c8d7f6e7", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 152, "avg_line_length": 34.32258064516129, "alnum_prop": 0.6033834586466166, "repo_name": "bitmazk/django-image-collection", "id": "1efe232a2cfdb9992d69494df656776670e75925",...
from kokemomo.plugins.engine.model.km_user_table import KMUser from kokemomo.plugins.engine.model.km_group_table import KMGroup from kokemomo.plugins.engine.model.km_role_table import KMRole class KMUserAdmin: @classmethod def save_user(cls, data): id = data.get_request_parameter("id") delete ...
{ "content_hash": "b90fbcafadb5f60ec28d0add1dafaf20", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 67, "avg_line_length": 30.897435897435898, "alnum_prop": 0.5900414937759336, "repo_name": "Kokemomo/Kokemomo", "id": "09edb3e54b74b932b00f8213c535ca9733de67d9", "size": "12...
""" WSGI config for hangout_project project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLIC...
{ "content_hash": "d8bc81abd6fbd7893f4d12817b4c7d43", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 79, "avg_line_length": 45.1875, "alnum_prop": 0.7946058091286307, "repo_name": "desecho/hangout-discontinued", "id": "fa1d7083c0919c961e1bdf27f0c39dfed766ad38", "size": "14...
import urllib import urllib2 import hashlib import random import email import email.message import email.encoders import StringIO import sys """""""""""""""""""" """""""""""""""""""" class NullDevice: def write(self, s): pass def submit(): print '==\n== [sandbox] Submitting Solutions \n==' (login, pa...
{ "content_hash": "626d9b3bae0a429f1144a17975a61711", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 114, "avg_line_length": 29.808641975308642, "alnum_prop": 0.6407123628080348, "repo_name": "ngr/sandbox", "id": "2c4a9a8e74bf7a7da8b02120ca9dff952f500882", "size": "4972",...
from __future__ import unicode_literals import common.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='emailuser', name='phone', ...
{ "content_hash": "aa4409bd4c87c80ee33865ec99202006", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 148, "avg_line_length": 25.05263157894737, "alnum_prop": 0.6239495798319328, "repo_name": "pannkotsky/groupmate", "id": "a79af35790732a909bd12f4a2840c465bca2ade3", "size": ...
import click from .BioCompass import download_hits from .BioCompass import download_mibig @click.group() def main(): pass @main.command(name="download-hits") @click.option('--outputdir', default='./', type=click.Path(exists=True), help="Path to save the NCBI clusters.") @click.argument('mgbfile', type=cl...
{ "content_hash": "1eb3dd4482586bf75d90c9f0f7807fcb", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 81, "avg_line_length": 34.41379310344828, "alnum_prop": 0.6973947895791583, "repo_name": "tiagolbiotech/BioCompass", "id": "df4db027f38fb1050acbdee15dd67e7590a56c77", "size...
from Child import Child from Node import Node # noqa: I201 GENERIC_NODES = [ # generic-where-clause -> 'where' requirement-list Node('GenericWhereClause', kind='Syntax', children=[ Child('WhereKeyword', kind='WhereToken'), Child('RequirementList', kind='GenericRequirementLis...
{ "content_hash": "1b75115e60a1b4a3ff61cd31ae5d6b8d", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 74, "avg_line_length": 39.394366197183096, "alnum_prop": 0.5609581694672864, "repo_name": "xedin/swift", "id": "e93a80b3bfe059374dd3a1e69d9020ff415e3436", "size": "2797", ...
import sys import numpy as np import tensorflow as tf import datetime #Start computational time counter startSimulationTime = datetime.datetime.now() #Conditions # 0 do with the full stack # 1 do the loop in function of the number of images # 2 do the loop in function of the threshold condition = 1 #Load data #Use w...
{ "content_hash": "e9f4a918a5bbe22746b8436d3f38d6f8", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 127, "avg_line_length": 34.6551724137931, "alnum_prop": 0.5876332622601279, "repo_name": "michaelStettler/HISI", "id": "f888dee5bc1d72d5e506976169d96761e68f7780", "size": ...
import os import sys import json import urllib2 from pprint import pprint from colorama import init from colorama import Fore, Back, Style init() filepath = "./word.md" f = open(filepath,"a+") baseurl = 'https://api.shanbay.com/bdc/search/?word=' class JSONObject: def __init__(self,d): self.__dict__ = d ...
{ "content_hash": "44c8015addb5e6c7fb1cf010ea461c76", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 100, "avg_line_length": 24.17948717948718, "alnum_prop": 0.6765641569459173, "repo_name": "JesseEisen/WordList", "id": "3b167639a185ea8673392b21c3d593be70b9d65d", "size": "...
import math import urllib import base64 import logging import datetime import tweepy from google.appengine.api import xmpp from google.appengine.api import urlfetch from django.conf import settings from django.http import HttpResponse from django.http import HttpResponseRedirect from django.core import serializers f...
{ "content_hash": "3e133f0b07bc6aa26689e528d3d7d286", "timestamp": "", "source": "github", "line_count": 345, "max_line_length": 79, "avg_line_length": 37.982608695652175, "alnum_prop": 0.603556166056166, "repo_name": "nycholas/ask-undrgz", "id": "de0198a816c37d151575870c79723273cc6088b8", "size": "...
"""Module houses class that implements ``BaseIO`` using Dask as an execution engine.""" from modin.core.io import BaseIO from modin.core.storage_formats.pandas.query_compiler import PandasQueryCompiler from modin.core.execution.dask.implementations.pandas_on_dask.dataframe.dataframe import ( PandasOnDaskDataframe,...
{ "content_hash": "3a77db52c3e6f8d2a9933bb79f095d6f", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 93, "avg_line_length": 36.19642857142857, "alnum_prop": 0.7296497286630489, "repo_name": "modin-project/modin", "id": "4130aa02e13d39735410086f000aae2051048ca9", "size": "2...
import sys from optparse import OptionParser def main(args=None): """The main routine.""" if args is None: args = sys.argv[1:] parser = OptionParser(usage="vagrant-playbook [OPTIONS]", description="Parser for declarative cluster definition for vagrant, aka vagrant playbooks, and generates a y...
{ "content_hash": "d70224ee89800b7d284ac7bcf8ed7d6c", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 157, "avg_line_length": 36.689655172413794, "alnum_prop": 0.6738721804511278, "repo_name": "fabriziopandini/vagrant-playbook", "id": "e3312d9f6b974c8b8c24c8a8ee752575d23a9fd4...
r"""\ A :class:`CII` object represents a CII message sent from server to client via the CSS-CII protocol. A :class:`TimelineOption` object describes a timeline selector and the tick rate of the timeline if that selector is used to request a timeline from the CSS-TS server. It is carried in a list in the :data:`~CII.ti...
{ "content_hash": "9f710648b356eefc51d5f0b8eb7416d6", "timestamp": "", "source": "github", "line_count": 440, "max_line_length": 170, "avg_line_length": 44.625, "alnum_prop": 0.6120193531958238, "repo_name": "bbc/pydvbcss", "id": "88505f12ae89a3265133980ee9423e4fddf7859f", "size": "20259", "binary...
from lib.RequestValidator import RequestValidator class Test(RequestValidator): rules = { 'request' : { 'method' : 'GET', 'protocol' : 'HTTPS', 'dns' : 'api.coupondunia.in', 'path' : '/timestamp', 'headers' : { 'custom_header': 'a...
{ "content_hash": "0f3e72911de335ffef09a5f496779280", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 52, "avg_line_length": 22.54054054054054, "alnum_prop": 0.44364508393285373, "repo_name": "ratanphayade/APIValidator", "id": "c2788c3c452f2a0f3f614203486ede1fcb02757a", "si...
from unittest import TestCase import json import os from werkzeug.wrappers import BaseResponse from werkzeug.test import Client from rxjson import Rx from rest_api_framework.controllers import WSGIDispatcher from .app import ApiApp HERE = os.path.dirname(os.path.abspath(__file__)) class TestSpore(TestCase): d...
{ "content_hash": "f02b4a05294d741e14fff48a7bf5274f", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 78, "avg_line_length": 35.61224489795919, "alnum_prop": 0.5925501432664756, "repo_name": "boblefrag/python-rest-api-framework", "id": "5c7458c663c3eee047f489944b0b0f77dab0671...
from federation_api.application.helper import StarFleetsHelper class PeopleHelper(StarFleetsHelper): pass
{ "content_hash": "8d609f069f3d4fe74dc63ea9eaac5a43", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 62, "avg_line_length": 22.4, "alnum_prop": 0.8303571428571429, "repo_name": "practo/federation", "id": "56b55f36411ab4f03fa2eee6184e6eb431feee44", "size": "112", "binary":...
"""Base class for the Project Euler problems in Python""" ##@file #@ingroup # # @brief # Base class for the Project Euler problems in Python # # # @version $$ # @details # # @b Description # This module implements a base class, that can be used # for all project eurler solutions. # # @b Usage # Usage: # Extend this cl...
{ "content_hash": "ee4e4f1e0b0d06d6e81448a87ccf958d", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 99, "avg_line_length": 23.65432098765432, "alnum_prop": 0.5652400835073069, "repo_name": "jakubczaplicki/projecteuler", "id": "30f2cf89b0ad5a516e768dc0436b47dcd532e78f", "s...
from io import BytesIO from .compat import py2to3 from .platform import IRONPYTHON from .robottypes import is_string _ERROR = 'No valid ElementTree XML parser module found' if not IRONPYTHON: try: from xml.etree import cElementTree as ET except ImportError: try: import cElementT...
{ "content_hash": "acf3708fad4e0475df0d60e246c2c39a", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 74, "avg_line_length": 29.08219178082192, "alnum_prop": 0.6090438059349976, "repo_name": "joongh/robotframework", "id": "5fbd81940fd798fb10b9f31e45625b41e301b5b5", "size": ...
""" 81. Search in Rotated Sorted Array II Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 ...
{ "content_hash": "a6e3c07f21122688a36b7017f22f8485", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 94, "avg_line_length": 24.883333333333333, "alnum_prop": 0.5311453449430676, "repo_name": "gengwg/leetcode", "id": "77eed413cc8ed583509659b1b9de7d388ae53ce1", "size": "1639...
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 conf...
{ "content_hash": "0017c162b60ac7f93825ceb779fd47f1", "timestamp": "", "source": "github", "line_count": 275, "max_line_length": 79, "avg_line_length": 33.38181818181818, "alnum_prop": 0.6992374727668845, "repo_name": "ucscHexmap/hexagram", "id": "e79fa1fd5c7f9a622749bb467a84ec11d41a7640", "size": "...
from zaqar.tests.functional import base class TestVersions(base.FunctionalTestBase): """Tests for Versions Resource.""" server_class = base.ZaqarServer def setUp(self): super(TestVersions, self).setUp() self.base_url = "{url}/".format(url=self.cfg.zaqar.url) self.client.set_base...
{ "content_hash": "5610cae73a6ce2fc29d66cc54ce7f3fd", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 63, "avg_line_length": 29.571428571428573, "alnum_prop": 0.6505636070853462, "repo_name": "openstack/zaqar", "id": "66540aeb16401084c46b380bc03773d0f5dd9d3e", "size": "1204...