text
stringlengths
4
1.02M
meta
dict
from ...utils import verbose from ..utils import (_data_path, _data_path_doc, _get_version, _version_doc) @verbose def data_path(path=None, force_update=False, update_path=False, download=True, verbose=None): # noqa: D103 return _data_path(path=path, force_update=force_update, ...
{ "content_hash": "d95174945e387befa017d0b5d5031f15", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 72, "avg_line_length": 33.65, "alnum_prop": 0.5780089153046062, "repo_name": "nicproulx/mne-python", "id": "bbd5df577737747c1f92bb2c17e28905ee47c9b2", "size": "872", "bin...
import json from sdcclient._common import _SdcCommon class ScanningAlertsClientV1(_SdcCommon): def __init__(self, token="", sdc_url='https://secure.sysdig.com', ssl_verify=True, custom_headers=None): super(ScanningAlertsClientV1, self).__init__(token, sdc_url, ssl_verify, custom_headers) self.pro...
{ "content_hash": "f75ba42b370e7d1553ce3992e7ef9d8a", "timestamp": "", "source": "github", "line_count": 381, "max_line_length": 196, "avg_line_length": 44.36482939632546, "alnum_prop": 0.5406140921729871, "repo_name": "draios/python-sdc-client", "id": "7c721d0307f74189e973d48be2ee0e388f41f6a1", "si...
__author__ = 'Jose Jimenez-Berni' import RPi.GPIO as GPIO import time import rospy from std_msgs.msg import Float32 class SonarControl(): def __init__(self): # Define Sonar Pin (same pin for both Ping and Echo self.gpio_sonar = 8 #use physical pin numbering GPIO.setmode(GPIO.BOAR...
{ "content_hash": "8b5ce8293847835b0b21edc26f2fbf58", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 81, "avg_line_length": 30.913793103448278, "alnum_prop": 0.5945343000557725, "repo_name": "jajberni/pi2go_ros", "id": "11bdc1fd5e7f44cf62dbf852a615dab5453f5455", "size": "1...
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="icicle.marker.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( plotly_name=plotly_name, ...
{ "content_hash": "7d10da90d8cffc5b72c591d6af6a99bd", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 87, "avg_line_length": 34.357142857142854, "alnum_prop": 0.6091476091476091, "repo_name": "plotly/plotly.py", "id": "5b104b90a66c9e0cab80a8505fe0863da609c369", "size": "481...
import os from pysteel import fs def setup(context): """ :type context: behave.runner.Context """ repo = os.path.join(context.project_dir, 'spring-cloud-config') fs.deltree(repo)
{ "content_hash": "a731d92964dda439f819e4a10cd3a0f0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 67, "avg_line_length": 18.363636363636363, "alnum_prop": 0.6584158415841584, "repo_name": "SteelToeOSS/Samples", "id": "8a17132b5f45fdb7c7b1c39a96eedf513f805e77", "size": "...
""" .. module: security_monkey.auditors.sns :platform: Unix .. version:: $$VERSION$$ .. moduleauthor:: Patrick Kelley <pkelley@netflix.com> @monkeysecurity """ from security_monkey.auditor import Auditor from security_monkey.watchers.sns import SNS from security_monkey.exceptions import InvalidARN from security_...
{ "content_hash": "5b4e54e05b8bfafed164aee2568e2ad8", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 100, "avg_line_length": 37.30769230769231, "alnum_prop": 0.5955817378497791, "repo_name": "guardian/security_monkey", "id": "5539ddb8fd17504029fd19ca8fffc2e2cc43a420", "siz...
import csv try: from StringIO import StringIO except ImportError: from io import StringIO # dmrx.net uses SSL SNI, which urllib2 doesn't support import requests from dmr_marc_users_cs750 import (get_groups_dci, get_groups_bm) MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv' # Neither of these form...
{ "content_hash": "f067547f70c5cb57e3b553ff5edceaf4", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 79, "avg_line_length": 28.796610169491526, "alnum_prop": 0.6280164802825191, "repo_name": "ajorg/DMR_contacts", "id": "b258b2baf11e05c0c4d8f9cf51ae12f8e8f0b629", "size": "1...
""" Filename: _downgrade.py From: Miguel Grinberg Description: Downgrade version to revert back. """ import sys sys.path.append('..') from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_...
{ "content_hash": "6aa49b36830e1f0d183702a283df8db3", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 70, "avg_line_length": 31.9375, "alnum_prop": 0.7808219178082192, "repo_name": "bsoe003/MWCH_Website", "id": "fe5196419f05d13bcb9b5a2be5073631787aea42", "size": "531", "b...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import sys from abc import abstractproperty from pants.util.memo import memoized from pants.util.meta import AbstractClass from pants.util.objects import datatype c...
{ "content_hash": "bb57aad7b127261779a4cad1eef87719", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 118, "avg_line_length": 37.83720930232558, "alnum_prop": 0.7267977873386601, "repo_name": "gmalmquist/pants", "id": "4e7a295cd93f4239a49c5f37b384ca7b6d3343e9", "size": "340...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tada.settings") sys.path.append(os.path.join(os.getcwd(), 'apps')) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
{ "content_hash": "a4a12615e33dcb22425c2420fad07c10", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 68, "avg_line_length": 28, "alnum_prop": 0.6928571428571428, "repo_name": "klpdotorg/tada", "id": "2359d51b693a7f4c50c24bbc329b5a814c093bb2", "size": "302", "binary": fal...
class T(object): def __init__(self, *objs): self.__objs = list(objs) def add(self, *objs): self.__objs.extend(objs) def add_objects(self, objs): self.__objs.extend(objs) def iterate(self): return Iterator(self) def list(self): return self.__objs def __geti...
{ "content_hash": "55e602f8cd967daed3be48d691188817", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 48, "avg_line_length": 25.466666666666665, "alnum_prop": 0.5039267015706806, "repo_name": "mollstam/UnrealPy", "id": "7d3c9ab70d73c1d76bf121f40ef18ae927219c1c", "size": "13...
import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, Resourc...
{ "content_hash": "7f875bcbc5d13f9e43a82f7f43badf3b", "timestamp": "", "source": "github", "line_count": 1155, "max_line_length": 224, "avg_line_length": 47.40692640692641, "alnum_prop": 0.6371838188293306, "repo_name": "Azure/azure-sdk-for-python", "id": "9028a2dcd0b01497001ed8febf7e099f2ebe301a", ...
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation, NearTestCase setOutDir(__name__) import unittest,re,codecs from reportlab.pdfbase import pdfdoc class PdfdocTestCase(NearTestCase): """Tests of expected Unicode and encoding behaviour """ def setUp(self): ...
{ "content_hash": "03a7227a2c71c5082205a890c94c3752", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 169, "avg_line_length": 49.70967741935484, "alnum_prop": 0.7027903958468527, "repo_name": "blampe/M2M", "id": "cba3ce747e393bfef3296128225fa8f9000c96b6", "size": "1541", ...
"""Test class for Ironic SSH power driver.""" import fixtures import mock import paramiko from ironic.common import boot_devices from ironic.common import driver_factory from ironic.common import exception from ironic.common import states from ironic.common import utils from ironic.conductor import task_manager from ...
{ "content_hash": "0f1951cdaed3bfd1cf5eedc660733a07", "timestamp": "", "source": "github", "line_count": 936, "max_line_length": 79, "avg_line_length": 48.14316239316239, "alnum_prop": 0.5698371133105499, "repo_name": "faizan-barmawer/openstack_ironic", "id": "d25f501d9ae1dade036e14c28e6d314b9287c094"...
import libsedml from matplotlib import pyplot as plt from matplotlib.collections import LineCollection from mpl_toolkits.mplot3d import Axes3D import numpy as np from random import gauss ## Base class for data description. class Data: ## @var id # A unique identifier. ## @var name # Name of this object. ## @...
{ "content_hash": "96a44d4bda31d6bfbe779d06fb5de0d5", "timestamp": "", "source": "github", "line_count": 581, "max_line_length": 80, "avg_line_length": 36.33390705679862, "alnum_prop": 0.6550923732828043, "repo_name": "TheCoSMoCompany/biopredyn", "id": "c0e5cbd18d4279767d0b6f0952164442bd0c9010", "si...
#------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # 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://w...
{ "content_hash": "bead382f2b2f9717ac7d31f011434529", "timestamp": "", "source": "github", "line_count": 13111, "max_line_length": 157, "avg_line_length": 53.52375867592098, "alnum_prop": 0.46596508728179553, "repo_name": "rjhunter8285/nsc-cloudproject-s22016", "id": "ebf3cda622a13bcff6d732bea1ca58243...
from dragon.core.tensor import Tensor import dragon.ops as ops def grad(cost, wrt, **kwargs): """Compute the gradients for variables with respect to the cost. Parameters ---------- cost : Tensor The cost. wrt : Tensor or list of Tensor The variables w.r.t the cost. Returns ...
{ "content_hash": "1cb25498d0021c8928aa3e23e531b793", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 69, "avg_line_length": 22.433333333333334, "alnum_prop": 0.5601783060921248, "repo_name": "neopenx/Dragon", "id": "d08c4d05bdceb50b2ef7780ce81e9c21d19ebee2", "size": "1535"...
"""This module contains logic for a 2048 board that doesnt calculate moves.""" from tfe_engine import MappedGameBoard class MappedTwentyFortyEight(MappedGameBoard): """This class adds 2048 specific logic to the MappedGameBoard class."""
{ "content_hash": "399c2225cc90460efbaf840b9b77aeb4", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 78, "avg_line_length": 40.5, "alnum_prop": 0.7860082304526749, "repo_name": "Kautenja/tfe_engine", "id": "c2ce4c73440ba6a9468b8ad4be573d8218a051ab", "size": "243", "binary...
from __future__ import absolute_import, print_function import os import jinja2 import plyxproto.parser as plyxproto import yaml from colorama import Fore import sys from . import jinja2_extensions from .proto2xproto import Proto2XProto from .xos2jinja import XOS2Jinja from .validator import XProtoValidator loader = ...
{ "content_hash": "7d55abbce0322d5f7f42b67c6976c59f", "timestamp": "", "source": "github", "line_count": 386, "max_line_length": 114, "avg_line_length": 35.33678756476684, "alnum_prop": 0.5296920821114369, "repo_name": "open-cloud/xos", "id": "d354f9a1336b1e16881c545b0ac07bc950bc669e", "size": "1423...
from unittest import mock from neutron_lib import constants as common_constants from neutron_lib import context from neutron_lib.db import constants as db_consts from neutron_lib.plugins.ml2 import ovs_constants from neutron_lib.services.qos import constants as qos_consts from oslo_utils import uuidutils from neutron...
{ "content_hash": "06b90439e408a980c8e2ec7123e5e72b", "timestamp": "", "source": "github", "line_count": 559, "max_line_length": 79, "avg_line_length": 43.0304114490161, "alnum_prop": 0.6166541947285274, "repo_name": "openstack/neutron", "id": "d5c6d4d52680c19753a839463939d4172e26678c", "size": "247...
""" Takes m8 blast files and generates a table of taxon hit counts for the given rank. Columns are input files and rows are taxa. If multiple ranks given (the default), multiple output files are produced, each with the rank name appended to the output file name. """ import sys import argparse import logging from urllib...
{ "content_hash": "043239f28a0c324ddfa3e6fececaeb5c", "timestamp": "", "source": "github", "line_count": 477, "max_line_length": 79, "avg_line_length": 37.43186582809224, "alnum_prop": 0.5451134136096332, "repo_name": "jmeppley/py-metagenomics", "id": "2024894fd5392d9785ae2c8cbf8ea6ca3da230a9", "siz...
""" Inventory Management A module to record inventories of items at a locations (sites), including Warehouses, Offices, Shelters & Hospitals """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----...
{ "content_hash": "ff6477d626ec7339cd1b61c3ba75304b", "timestamp": "", "source": "github", "line_count": 1738, "max_line_length": 141, "avg_line_length": 44.03912543153049, "alnum_prop": 0.44690357982754114, "repo_name": "ScottBuchanan/eden", "id": "3721db8d8df0806712199f899cb27a8c470acb96", "size":...
from flask import Flask, request, render_template import plivohelper import os response_server = Flask("ResponseServer") response_server.debug = True @response_server.errorhandler(404) def page_not_found(error): """error page""" print "404 page not found" return 'This URL does not exist', 404 @response...
{ "content_hash": "71462f2a983fe76aed47ae27897244ad", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 97, "avg_line_length": 36.677083333333336, "alnum_prop": 0.6219823913660891, "repo_name": "plivo/plivohelper-python", "id": "fa0f5d7458cc20332358ccb7556cb0ac5342d8b4", "siz...
from __future__ import division import numpy as np from pgmpy.factors.distributions import BaseDistribution from pgmpy.factors.distributions import GaussianDistribution class CanonicalDistribution(BaseDistribution): u""" The intermediate factors in a Gaussian network can be described compactly using a s...
{ "content_hash": "fc110d586b4097fd6cd6f95aff45f2ef", "timestamp": "", "source": "github", "line_count": 586, "max_line_length": 108, "avg_line_length": 32.60580204778157, "alnum_prop": 0.48762233736327, "repo_name": "jhonatanoliveira/pgmpy", "id": "8c26b1639c8f4d413a8bf1200068a1fea660c6f0", "size":...
from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest class NodeRunIntegrationTest(PantsRunIntegrationTest): def test_run_simple(self): command = [ "run", "contrib/node/examples/src/node/web-component-button", "--run-node-script-name=build", ...
{ "content_hash": "d8491581d398b94330ad895d4e0c7a10", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 77, "avg_line_length": 31.891304347826086, "alnum_prop": 0.580095432856169, "repo_name": "wisechengyi/pants", "id": "504fb336b7d3c0f8618a1f1d80803d5eedcdc025", "size": "159...
__author__ = 'JordSti' from PyQt4 import QtGui, QtCore import gui import resource_widget import resource_file import os class resource_file_widget(QtGui.QWidget, gui.Ui_resource_file_widget): def __init__(self, res_file, parent=None): super(resource_file_widget, self).__init__(parent) self.res_fi...
{ "content_hash": "b0a2a1ca5f59b58ace5c8672037cd97f", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 137, "avg_line_length": 27.011764705882353, "alnum_prop": 0.5871080139372822, "repo_name": "jordsti/stigame", "id": "f6b2fe86f8f459e26ba0d19f84ac935b2f1c0daa", "size": "229...
"""Print hex digits for seaborn colors""" import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn # Print the HEX codes of seaborn colors pal_hls = seaborn.hls_palette(12, l=.3, s=.8).as_hex() import seaborn as sns num_shades = 8 sns.palplot(sns.cubehelix_palette(num_shades)) plt.savef...
{ "content_hash": "125c2c52cf68dec2139fc73754bca5bf", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 54, "avg_line_length": 20.88235294117647, "alnum_prop": 0.7436619718309859, "repo_name": "dvklopfenstein/biocode", "id": "d158bd80ddb3bcd9b4101eb3e85fe8c266a52d3a", "size":...
import logging from django.conf import settings from django.core.urlresolvers import reverse from django.template import defaultfilters as filters from django.utils.http import urlencode from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from keystoneclient imp...
{ "content_hash": "3d167686ee0b0bb45e87d3c897e7b152", "timestamp": "", "source": "github", "line_count": 280, "max_line_length": 79, "avg_line_length": 33.25, "alnum_prop": 0.5818474758324382, "repo_name": "yeming233/horizon", "id": "d0b43db2e18728d6bfcf33cbef93813b5bf68cda", "size": "9944", "bina...
import pygtk pygtk.require('2.0') import gtk import gobject import fcntl import functools import os import select import signal import subprocess # Gleaned from <linux/cdrom.h> CDROMEJECT = 0x5309 CDROMCLOSETRAY = 0x5319 CDROM_DRIVE_STATUS = 0x5326 CDROM_LOCKDOOR = 0x5329 class RootWindow(object): icons = gtk.icon_...
{ "content_hash": "688ad75e23a0a472a47527762aa4bb61", "timestamp": "", "source": "github", "line_count": 576, "max_line_length": 170, "avg_line_length": 28.09548611111111, "alnum_prop": 0.7007353395538528, "repo_name": "endrift/mplayer-wrapper", "id": "28131d6c67880fa1a43f835e5386a44ffd8e3716", "siz...
"""Tests for Interval Bound Propagation.""" import functools from absl.testing import absltest from absl.testing import parameterized import haiku as hk import jax import jax.numpy as jnp import jax_verify import numpy as np class IBPTest(parameterized.TestCase): def assertArrayAlmostEqual(self, lhs, rhs): ...
{ "content_hash": "a7b2115b8facfce57459b35ca467e51b", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 76, "avg_line_length": 35.54014598540146, "alnum_prop": 0.5995070856438693, "repo_name": "deepmind/jax_verify", "id": "9d89f114f74c6a0f6d8d1fc75f2e0a3e2f72df93", "size": "...
from __future__ import division, unicode_literals """ This module provides classes that operate on points or vectors in 3D space. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "1.0" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __status__ =...
{ "content_hash": "795560f70fdd9380e225f227df7c4e4e", "timestamp": "", "source": "github", "line_count": 429, "max_line_length": 92, "avg_line_length": 34.67365967365967, "alnum_prop": 0.5057478991596639, "repo_name": "yanikou19/pymatgen", "id": "58088096e04f9dfd402ecbe1eb7817662aac772e", "size": "1...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('feti', '0007_course_campuses'), ] operations = [ migrations.RemoveField( model_name='course', name='campuses', ), ...
{ "content_hash": "c0837e90b891105aca7bfe93038045ab", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 59, "avg_line_length": 22.608695652173914, "alnum_prop": 0.5596153846153846, "repo_name": "cchristelis/feti", "id": "e9c369b847e897a089c57ccfc3b76543b9df309c", "size": "544...
import joblib import logging import os import pickle import numpy as np import xgboost as xgb from google.cloud.aiplatform.constants import prediction from google.cloud.aiplatform.utils import prediction_utils from google.cloud.aiplatform.prediction.predictor import Predictor class XgboostPredictor(Predictor): ...
{ "content_hash": "a5bb173bc57a9a56ba1b4355dd50b708", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 88, "avg_line_length": 34.75, "alnum_prop": 0.6066056245912361, "repo_name": "googleapis/python-aiplatform", "id": "005efcb1294c3a811762f788c7a276fccebc21f0", "size": "3660...
""" recent.py - Used for trello-rss to grab recent Trello updates on your account Written by Nate Collings TODO: - Currently just retrieves ALL it can given a specific token. Add support for just getting updates for certain boards, public or otherwise. The current process just filters it out later. """ import conf...
{ "content_hash": "c8f04ba857859f39b1ca07e7053e4b8c", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 115, "avg_line_length": 39.37078651685393, "alnum_prop": 0.6421232876712328, "repo_name": "naiyt/trello-rss", "id": "01dcafb2a3b8525ae171fe8b6c6ad02fad74df9f", "size": "350...
from distutils.core import setup setup(name='injections', version='0.2.2', description='Simple dependency injection library', author='Paul Colomiets', author_email='paul@colomiets.name', url='http://github.com/tailhook/injections', packages=[ 'injections', ], c...
{ "content_hash": "9e83dd2fba3901866f1334bf5d98a568", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 56, "avg_line_length": 28.22222222222222, "alnum_prop": 0.5787401574803149, "repo_name": "tailhook/injections", "id": "d8139439efc1021e3c035dcb908df33b56327bdf", "size": "5...
import json from GetEWSFolder import main, convert_mail_to_json import demistomock as demisto def create_mail(subject, body): return {'subject': subject, 'textBody': body, 'body': '<body>{}<\\body>'.format(body)} mails_folder_1 = [create_mail(subject='subject 1', body='body 1'), create_mail(subject='subject 2...
{ "content_hash": "d71abea7ba4733b4c71782adf5d05a84", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 115, "avg_line_length": 37.58695652173913, "alnum_prop": 0.6396761133603239, "repo_name": "VirusTotal/content", "id": "1951b61e66144e7d92ab0a1f298aabf8882d6466", "size": "1...
import logging from . import Analysis from .. import SIM_LIBRARIES from ..errors import AngrValueError l = logging.getLogger(name=__name__) class StaticHooker(Analysis): """ This analysis works on statically linked binaries - it finds the library functions statically linked into the binary and hooks the...
{ "content_hash": "217d36412531a47c77e7497222a0eda8", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 97, "avg_line_length": 35.583333333333336, "alnum_prop": 0.607728337236534, "repo_name": "iamahuman/angr", "id": "34d71fed93dd67d03514ab7241420bb007dea29b", "size": "1709",...
import sys import unittest import libsbml def isnan(x): return (x != x) pass class TestL3Parameter(unittest.TestCase): global P P = None def setUp(self): self.P = libsbml.Parameter(3,1) if (self.P == None): pass pass def tearDown(self): _dummyList = [ self.P ]; _dummyList[:]...
{ "content_hash": "1bb365a542113a9dc9f96971cf7c274b", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 109, "avg_line_length": 32.38607594936709, "alnum_prop": 0.6208716044557357, "repo_name": "TheCoSMoCompany/biopredyn", "id": "ab3e37d6f10dda40166ac92f4b72b9e16e192f43", "s...
import tests.periodicities.period_test as per per.buildModel((30 , 'H' , 200));
{ "content_hash": "c1a802b432f947a699879a0eefa4866a", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 45, "avg_line_length": 20.5, "alnum_prop": 0.7073170731707317, "repo_name": "antoinecarme/pyaf", "id": "5ccf08c5b93700231400c6f172c5a826cf86cf22", "size": "82", "binary": ...
__all__ = ['brand', 'category', 'garment']
{ "content_hash": "59027e2ea40f5f534b5aba41d7c52794", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 42, "avg_line_length": 43, "alnum_prop": 0.5348837209302325, "repo_name": "timesync/clothingapi", "id": "10df411d1e972e01cca3b6185e0bcd1663638621", "size": "43", "binary":...
''' New Integration Test for Batch Deleting Snapshot. @author: Legion ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import time test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_state.TestStateDict() bat_de...
{ "content_hash": "53d64e641efd889b5ad184bff8be62b4", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 71, "avg_line_length": 24.452380952380953, "alnum_prop": 0.6592015579357352, "repo_name": "zstackorg/zstack-woodpecker", "id": "a7e834bb24537d39a3998f8059d7a5d71ddd4218", "...
import _plotly_utils.basevalidators class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattermapbox.marker.colorbar", **kwargs, ): super(TickmodeValidator, self).__init__( plot...
{ "content_hash": "2586ec744a84234d66c67da667eb6d83", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 33, "alnum_prop": 0.5774410774410774, "repo_name": "plotly/plotly.py", "id": "bf215ec2a3a0bd8901abfd321b068cc45f446f1f", "size": "594", "binary": f...
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_modules = [Extension('fsdt_donnell_bc2_nonlinear', ['fsdt_donnell_bc2_nonlinear.pyx'], extra_compile_args=['/openmp', '/O2', '/favor:IN...
{ "content_hash": "3fa477c86d398bb7924fdb3dc861647e", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 60, "avg_line_length": 36.92857142857143, "alnum_prop": 0.574468085106383, "repo_name": "albertoferna/compmech", "id": "15c13d127e9d5295570f44583658c95e180799c4", "size": "...
import argparse import csv import sys import re import os import pprint import contextlib outfileFormat = '{}.csv' def main(): args = parseArguments() # Start fresh with contextlib.suppress(FileNotFoundError): os.remove(outfileName(args.date)) for path in args.paths: print(path) extractor = RTFExtractor(p...
{ "content_hash": "6780c574123f1747f900821af7d122b9", "timestamp": "", "source": "github", "line_count": 154, "max_line_length": 100, "avg_line_length": 27.207792207792206, "alnum_prop": 0.6775656324582339, "repo_name": "morrellk/openelections-data-or", "id": "844f516e14278fab8e7b73fb6a92a22553141068"...
from __future__ import unicode_literals import random import os import unicodedata from faker import Factory from django.core.files import File from saleor.product.models import (Shirt, ShirtVariant, Bag, BagVariant, ProductImage) from saleor.product.models import Category, Color fr...
{ "content_hash": "018b97e353e0fe798a035bb30884df04", "timestamp": "", "source": "github", "line_count": 165, "max_line_length": 79, "avg_line_length": 28.763636363636362, "alnum_prop": 0.6163084702907712, "repo_name": "hongquan/saleor", "id": "6bd3c8b51c35ba766e357a1eae66965f9628f952", "size": "474...
import _plotly_utils.basevalidators class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="histogram2dcontour", **kwargs): super(ZValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ed...
{ "content_hash": "cb8a7537753d58e14bb401d3b3ad875f", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 84, "avg_line_length": 36.416666666666664, "alnum_prop": 0.6041189931350115, "repo_name": "plotly/python-api", "id": "48de2103d195881195fa52ec5d024645686cf46c", "size": "43...
import os from datetime import datetime from django.test import TestCase, override_settings from django.utils._os import upath import pytz import responses from ..nosnl import NOSNLParser TEST_DIR = os.path.join(os.path.dirname(upath(__file__)), 'data') class NOSNLParserTests(TestCase): maxDiff = None de...
{ "content_hash": "b10de97c97b1716a02240d363eb8af23", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 116, "avg_line_length": 63.813793103448276, "alnum_prop": 0.6816167729385064, "repo_name": "flupzor/newsdiffs", "id": "4213b866aa9590df547f291213bac1fde1d839b2", "size": "...
from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.monasca import utils as monascautils from rally.task import validation class MonascaMetrics(monascautils.MonascaScenario): """Benchmark scenarios for monasca Metrics API.""" @validation.required_clien...
{ "content_hash": "a779e0983af2aa61d72454b1d04456ae", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 75, "avg_line_length": 34.65, "alnum_prop": 0.7186147186147186, "repo_name": "varuntiwari27/rally", "id": "e7affce2aad5b760b3d0d06759f3cef757b0cd61", "size": "1291", "bin...
"""Import router for absl.flags. See https://github.com/abseil/abseil-py.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging as _logging # go/tf-wildcard-import from absl.flags import * # pylint: disable=wildcard-import import six as _six f...
{ "content_hash": "1868f0ceba4bfcf2eaa4c5fe332e21de", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 80, "avg_line_length": 34.45454545454545, "alnum_prop": 0.7187335092348285, "repo_name": "Kongsea/tensorflow", "id": "abd6f3d85501449b4f32592aa3787d1cbdd67e40", "size": "25...
"""Convenience wrapper for invoking APIs/factories w/ a project.""" import os from google.cloud.proto.datastore.v1 import datastore_pb2 as _datastore_pb2 from google.cloud._helpers import _LocalStack from google.cloud._helpers import ( _determine_default_project as _base_default_project) from google.cloud.client...
{ "content_hash": "8012e2289815cc648caa36effe2fbe6e", "timestamp": "", "source": "github", "line_count": 590, "max_line_length": 79, "avg_line_length": 35.50508474576271, "alnum_prop": 0.6072656100821081, "repo_name": "ammarkhann/FinalSeniorCode", "id": "af7d6d4f9113980705f8e3b3faf219b1b17bfe6d", "s...
from __future__ import unicode_literals import uuid from .common import InfoExtractor from .ooyala import OoyalaIE from ..compat import ( compat_str, compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( int_or_none, extract_attributes, determine_ext, smuggle_url, par...
{ "content_hash": "076f216c10f2712febd1034843cb29db", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 102, "avg_line_length": 38.38942307692308, "alnum_prop": 0.5157169693174702, "repo_name": "bosstb/HaberPush", "id": "28b743cca1f2355a24cb6b913c7a7410f40d595f", "size": "80...
import logging from osc_lib import utils from osc_lib.command import command from vbclient.common.i18n import _ from vbclient.v1 import resource LOG = logging.getLogger(__name__) class ShowJob(command.ShowOne): _description = _("Show Job") def get_parser(self, prog_name): parser = super(ShowJob, s...
{ "content_hash": "ed6df6fe6d175ad85e8a5cec5905a74a", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 74, "avg_line_length": 27.17241379310345, "alnum_prop": 0.631979695431472, "repo_name": "Huawei/OpenStackClient_VBS", "id": "cccb3b433ba185786453e44d98914e907d9ff022", "siz...
from bambou import NURESTFetcher class NUDomainFIPAclTemplateEntriesFetcher(NURESTFetcher): """ Represents a NUDomainFIPAclTemplateEntries fetcher Notes: This fetcher enables to fetch NUDomainFIPAclTemplateEntry objects. See: bambou.NURESTFetcher """ @classmethod...
{ "content_hash": "bd5621f2c9e23e5cbc1290d343549f98", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 78, "avg_line_length": 24.68, "alnum_prop": 0.6726094003241491, "repo_name": "nuagenetworks/vspk-python", "id": "47dcf2f5ef89bb46323b49819d580609b45d3a5b", "size": "2228", ...
print('hello hello hello')
{ "content_hash": "10f79b1047116bc961f98af80ed3f90a", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 26, "avg_line_length": 27, "alnum_prop": 0.7407407407407407, "repo_name": "bobisme/hello", "id": "3d7905d799df012f8e1a1d3229bd1c7b2a3bb882", "size": "50", "binary": false,...
from pylab import* from scipy.io import wavfile from python_speech_features import mfcc from python_speech_features import delta from python_speech_features import logfbank # Read sound srate, sig = wavfile.read('da_ta.wav') plt.plot(np.arange(len(sig))/srate, sig) plt.title('da_ta.wav') plt.xlabel('Time (sec)') plt.y...
{ "content_hash": "6db5fa623845dbbd4c9f1e2d33b7dcee", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 85, "avg_line_length": 28.814814814814813, "alnum_prop": 0.7249357326478149, "repo_name": "jaekookang/useful_bits", "id": "be90e78f319006f840d028a912306ac8f55a9329", "size"...
import kol.Error as Error from GenericRequest import GenericRequest from kol.manager import PatternManager class Crimbo2011ToyFactoryRequest(GenericRequest): def __init__(self, session, itemId, quantity, targetPlayer='', note=''): super(Crimbo2011ToyFactoryRequest, self).__init__(session) self.url ...
{ "content_hash": "412ee066558dc7d4fb26248c7253cb7f", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 104, "avg_line_length": 52.111111111111114, "alnum_prop": 0.7114427860696517, "repo_name": "KevZho/buffbot", "id": "79b1204fc3c388341a4e8ea48c8bcddff63e0e02", "size": "1407...
"""Click command-line interface for REANA Job Controller.""" import io import json import click from flask.cli import with_appcontext from .spec import build_openapi_spec @click.group() def openapi(): """Openapi management commands.""" @openapi.command() @click.argument("output", type=click.File("w")) @with_...
{ "content_hash": "8ebb7ea96e2371a785fa465570268599", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 85, "avg_line_length": 23.482758620689655, "alnum_prop": 0.6563876651982379, "repo_name": "reanahub/reana-job-controller", "id": "e3b230b4797fdb39067bc10292b02c5974c472a0", ...
import numpy as np import os import sys import nrrd, png from PIL import Image def thumbnail(im, size=(25,25)): im = im.resize(size, Image.ANTIALIAS) return im if (len(sys.argv) < 4): print 'Error: missing arguments!' print 'e.g. python Index2MaxProjPNG_tn.py template DomainPrefix indexfile1.nrrd ind...
{ "content_hash": "560e943cab785abf56f0df7c8d2f4077", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 104, "avg_line_length": 40.35897435897436, "alnum_prop": 0.5857687420584498, "repo_name": "Robbie1977/3DstackDisplay", "id": "0078f37a74fa497afc59e3d83965bb2129f27b4a", "si...
from uitester.ui import main_window def start(): main_window.start() if __name__ == '__main__': start()
{ "content_hash": "7c52245c69425eea8cfb3c412c07f67e", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 35, "avg_line_length": 12.88888888888889, "alnum_prop": 0.5862068965517241, "repo_name": "IfengAutomation/uitester", "id": "514346f261b616003c19fae1f0e7338274a4349f", "size"...
import os import unittest import launch from launch_ros.substitutions import ExecutableInPackage import launch_testing import launch_testing.actions from launch_testing.asserts import assertSequentialStdout import pytest # @brief Test goal: "Integrationtest for the complexdata example of iceoryx" # @pre setup ROS2 ...
{ "content_hash": "d12b3adc1eeca23bba341fdfd8d6f209", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 275, "avg_line_length": 37.87951807228916, "alnum_prop": 0.683206106870229, "repo_name": "eclipse-iceoryx/iceoryx", "id": "ffec24b399f263728f291bf9819add3b6452515f", "size"...
from .auto_serial import * # END
{ "content_hash": "134c0b08c00813f67266c08d4d363f75", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 26, "avg_line_length": 11.333333333333334, "alnum_prop": 0.6764705882352942, "repo_name": "whaleygeek/mb_sdcard", "id": "4b5c437bd50ef7dc431464d1514caa64e9b741cb", "size": "...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from manager.libs.snippets.http_tools import http_destination_exists from django.conf import settings import urlparse class Migration(SchemaMigration): def forwards(self, o...
{ "content_hash": "a450339cf0969514e2a93bb24f896b1f", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 171, "avg_line_length": 61.61538461538461, "alnum_prop": 0.5717852684144819, "repo_name": "okfn/opd-brand-manager", "id": "f3640d36bd3c9aff55505978f30c84fa6e9f0130", "size"...
from functools import reduce from math import factorial import click __doc__ = """See https://jtara1.github.io/bernoulli.html for an updated Bernoulli Trials Calc""" @click.command() @click.argument('trials', type=click.INT) @click.argument('prob_of_success', type=click.FLOAT) def bernoulli_trials(trials, prob_of_su...
{ "content_hash": "f779b36ef0df1f4bf22565e4031d61b1", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 80, "avg_line_length": 33.476190476190474, "alnum_prop": 0.5889046941678521, "repo_name": "jtara1/MiscScripts", "id": "20e979ac32a14f0a4304295f499e8e04f81c4e5d", "size": "1...
import corepy.spre.spe as spe # ------------------------------ # Registers # ------------------------------ class mods: abs = 'abs' bias = 'bias' bx2 = 'bx2' invert = 'invert' sign = 'sign' x2 = 'x2' class divcomp: x = 'x' y = 'y' z = 'z' w = 'w' class Address(object): def __init__(self, base...
{ "content_hash": "a2197de5e8f6d1a7d36c716405722f70", "timestamp": "", "source": "github", "line_count": 389, "max_line_length": 187, "avg_line_length": 28.938303341902312, "alnum_prop": 0.597583725681798, "repo_name": "matthiaskramm/corepy", "id": "da32501f9a4d057e2ebdd105b04f70efa6f96eb2", "size":...
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p from OpenGL.GL import glget EXTENSION_NAME = 'GL_NV_texture_shader2' _p.unpack_constants( """GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF""", globals()) def glInitTextureShader2NV(): '''Return boolean indicating whether this ex...
{ "content_hash": "bbaec17160a087de4705eaffb257e208", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 74, "avg_line_length": 39.36363636363637, "alnum_prop": 0.7528868360277137, "repo_name": "frederica07/Dragon_Programming_Process", "id": "24af6b4a5aea3a7abb83ea64f3c22e090484...
import logging import re import signal import sys import time from typing import List from praw.exceptions import APIException # type: ignore from praw.models import Comment, Submission, Subreddit # type: ignore from prawcore.exceptions import RequestException, ServerError, Forbidden, NotFound # type: ignore impor...
{ "content_hash": "d3f7ef01dac2a179b796dd3d4246305c", "timestamp": "", "source": "github", "line_count": 223, "max_line_length": 98, "avg_line_length": 33, "alnum_prop": 0.6431580377768719, "repo_name": "TranscribersOfReddit/TranscribersOfReddit", "id": "3f5e2bb41b7ac0c25804e8dee7e258b9e0e65c55", "s...
"""This is just a hook for morph.io. Downloads a hard-coded list of data from other morph.io scrapers, and merges them into data.sqlite. To run this, you'll need a free morph.io account. Set MORPH_API_KEY to the value of your key. """ from logging import getLogger from os import environ from urllib.parse import urlenc...
{ "content_hash": "fb52d4bcee50c4f3d2d3a969f07271ba", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 78, "avg_line_length": 27.029850746268657, "alnum_prop": 0.6234124792932082, "repo_name": "spendright/msd", "id": "323bed859fb29b1614fa19cb1d0100c1b26a557e", "size": "2441"...
import datetime import hashlib import os import socket import tempfile import uuid import mock from oslo.config import cfg import paramiko import six import cinder from cinder.brick.initiator import connector from cinder.brick.initiator import linuxfc from cinder import exception from cinder.openstack.common import p...
{ "content_hash": "81c1d2f1268b3e6d75baa45714ebdade", "timestamp": "", "source": "github", "line_count": 934, "max_line_length": 79, "avg_line_length": 39.44539614561028, "alnum_prop": 0.4997557135877531, "repo_name": "spring-week-topos/cinder-week", "id": "7c5f27eff262a85ae64cfd01e55a68689ccbd7c6", ...
from django.conf import settings from .. import Tags, Warning, register def add_session_cookie_message(message): return message + ( " Using a secure-only session cookie makes it more difficult for " "network traffic sniffers to hijack user sessions." ) W010 = Warning( add_ses...
{ "content_hash": "32acd71111161c3f77a3c01e13b9a7fb", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 76, "avg_line_length": 27.75257731958763, "alnum_prop": 0.6229569093610698, "repo_name": "yephper/django", "id": "9d7b5385e1bebc82ae1b042a80714274667200f3", "size": "2692",...
"""Management script.""" import os from glob import glob from subprocess import call from flask_migrate import MigrateCommand from flask_script import Command, Manager, Option, Server, Shell from flask_script.commands import Clean, ShowUrls from chamberlain.app import create_app from chamberlain.database import db fr...
{ "content_hash": "09174d24641637bd73077ec7381d8550", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 107, "avg_line_length": 32.513513513513516, "alnum_prop": 0.6438071487946799, "repo_name": "sean-abbott/chamberlain", "id": "e22220f61a0606ef37cf8094ddf16066736704b8", "siz...
import sys import ctypes import platform from vtEngine import MainEngine from uiMainWindow import * #from simple_monitor import * from setup_logger import setup_logger setup_logger(filename='logs/vnpy_{0}.log'.format(datetime.now().strftime('%m%d_%H%M')), debug=False) # --------------------------------------------...
{ "content_hash": "a3fb1926be700bd95ef3fca096affab3", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 100, "avg_line_length": 25.346938775510203, "alnum_prop": 0.6111111111111112, "repo_name": "kanchenxi04/vnpy-app", "id": "b1b6634c1f921747b86b8d5c283c409992ca91ba", "size":...
from __future__ import absolute_import, division, print_function from collections import OrderedDict import pytest import numpy as np from matplotlib.axes import Axes from mock import MagicMock, patch from numpy.testing import assert_array_equal from glue.core.tests.test_state import clone from glue.core.tests.util ...
{ "content_hash": "d9ff12f43133eacf6c7611fcc985c0e3", "timestamp": "", "source": "github", "line_count": 467, "max_line_length": 83, "avg_line_length": 28.19271948608137, "alnum_prop": 0.5777001367157831, "repo_name": "stscieisenhamer/glue", "id": "58be4d69bf66dab15969c0f5afad8c60c256db45", "size": ...
import os, itertools, copy import re, glob, string import json import param try: import numpy as np np_ftypes = np.sctypes['float'] except: np, np_ftypes = None, [] try: from pandas import DataFrame except: DataFrame = None # pyflakes:ignore (try/except import) try: from holoviews import Table except...
{ "content_hash": "0dba57b3f331f9ecf10e4e8afd7b5174", "timestamp": "", "source": "github", "line_count": 979, "max_line_length": 106, "avg_line_length": 40.27987742594484, "alnum_prop": 0.601105644874981, "repo_name": "ioam/lancet", "id": "a4a8ad4ce866a71202135b685ca459ec485f569b", "size": "39453", ...
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: os_server_group short_description: Manage OpenStack server groups extends_documentation_fragment: openstack version_added: "2.2" author: "Lingxian ...
{ "content_hash": "ec39227d0bc88bac65ec49f6e7bcff4f", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 79, "avg_line_length": 26.69942196531792, "alnum_prop": 0.6103052608789782, "repo_name": "e-gob/plataforma-kioscos-autoatencion", "id": "0d740955923d601cf38abaa4af3668a62b96...
"""Accesses the google.cloud.videointelligence.v1p2beta1 VideoIntelligenceService API.""" import pkg_resources import warnings from google.oauth2 import service_account import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method import google.api_core.grpc...
{ "content_hash": "3a9adfbdd318105ac748ab87f215d0d7", "timestamp": "", "source": "github", "line_count": 264, "max_line_length": 163, "avg_line_length": 49.32954545454545, "alnum_prop": 0.617369269753513, "repo_name": "jonparrott/gcloud-python", "id": "f26b4c1dc507ec998205b96d38c166241e2a0980", "siz...
from flask_wtf import Form, RecaptchaField, recaptcha from wtforms import ( StringField, TextField, TextAreaField, PasswordField, BooleanField, ValidationError ) from wtforms.validators import DataRequired, Length, EqualTo, URL from models import User class Regi...
{ "content_hash": "25b50ddf048af31dee038a5448b25c5c", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 86, "avg_line_length": 29.641975308641975, "alnum_prop": 0.6393169512703041, "repo_name": "indicolite/flask-blog", "id": "147d155e1599736b2ff14be070e50af23e587469", "size":...
from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, map_error, ) from azure.core.pipeline import PipelineRespo...
{ "content_hash": "f985b5d9939b8b87a8d28f1adf47d845", "timestamp": "", "source": "github", "line_count": 456, "max_line_length": 238, "avg_line_length": 49.2828947368421, "alnum_prop": 0.6605259644907222, "repo_name": "Azure/azure-sdk-for-python", "id": "1ffec2c1d4e69bda8477da8a1f791d82a73a5aa7", "s...
import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union import google.api_core from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries import google.auth # type: ignore from google.auth import credentials as...
{ "content_hash": "3ec5a342d116950a8198bdeb5be15ccf", "timestamp": "", "source": "github", "line_count": 179, "max_line_length": 101, "avg_line_length": 36.41340782122905, "alnum_prop": 0.6153728137465481, "repo_name": "googleapis/python-compute", "id": "99eef4a3a9399392a49f16142dcb5d8223d07c86", "s...
import sys import logging from django.conf import settings class NullHandler(logging.Handler): def emit(self, record): pass h = NullHandler() _logger = logging.getLogger("south") _logger.addHandler(h) _logger.setLevel(logging.DEBUG) # TODO: Add a log formatter? def get_logger(): debug_on = getattr(s...
{ "content_hash": "09b7d91a0cffc128bbe24972c82b4550", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 98, "avg_line_length": 27.423076923076923, "alnum_prop": 0.6718092566619915, "repo_name": "wahaha02/myblog", "id": "052236aa1924fd91f72859b61db5257a0d235c50", "size": "713"...
from django.conf.urls import patterns, include, url urlpatterns = patterns('properties.views', url(r'^$', 'index'), #url(r'^properties/(?P<properties_id>\d+)/$', 'properties.views.detail') )
{ "content_hash": "f3221e0b27f3dfdef1959883bfa3b77a", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 77, "avg_line_length": 29, "alnum_prop": 0.6600985221674877, "repo_name": "khawley/Town_Country", "id": "41b02448029b421345f3518ba61c30c9e3bd381e", "size": "203", "binary"...
from django.contrib import admin from securedpi_events.models import Event admin.site.register(Event)
{ "content_hash": "83c2ed5f19fe9bdf805f4c08dff5c3e9", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 41, "avg_line_length": 25.75, "alnum_prop": 0.8349514563106796, "repo_name": "Secured-Pi/Secured-Pi", "id": "6c292beb5c5fb91bb6654038551aec03e49a2c73", "size": "103", "bin...
""" $description Japanese live streaming and video hosting platform for live video game broadcasts and individual live streams. $url mildom.com $type live, vod """ import logging import re from time import time from uuid import uuid4 from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api impor...
{ "content_hash": "5e7247cba3a386e04cb01b9a8c695aa6", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 127, "avg_line_length": 33.0046511627907, "alnum_prop": 0.4785794813979707, "repo_name": "gravyboat/streamlink", "id": "84ac311e00da1f99a25542221014c594655e5514", "size": ...
import mock_pydbus # General Bluez D-Bus Object Paths #: BlueZ DBus Service Name BLUEZ_SERVICE_NAME = 'org.bluez' #: BlueZ DBus adapter interface ADAPTER_INTERFACE = 'org.bluez.Adapter1' #: BlueZ DBus device Interface DEVICE_INTERFACE = 'org.bluez.Device1' # Bluez GATT D-Bus Object Paths #: BlueZ DBus GATT manager In...
{ "content_hash": "297142ce38e571c1d4834a4fa5f78e59", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 81, "avg_line_length": 34.787234042553195, "alnum_prop": 0.4920489296636086, "repo_name": "campug/bzero_kata", "id": "43a6b480b9dc63efb3db02b87362079707cd6a2b", "size": "32...
from Component import * import ComponentTypeConstants import ComponentCategories import ComponentHeaders class WaitComponent(Component): name = 'Wait' type = ComponentTypeConstants.METHOD category = ComponentCategories.SYSTEM headers = [ComponentHeaders.SYSTEM] args = [] #array of tuples (name of a...
{ "content_hash": "7c048e5277dc37c86f086fa9fe5ba024", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 59, "avg_line_length": 27.9375, "alnum_prop": 0.7404921700223713, "repo_name": "Vishwas-Adiga/Bloks", "id": "95bb7d1d7a1f4c1fb034a5464ef507074be347f3", "size": "447", "bi...
abc = 'abcdefghijklmnopqrstuvwxyz' def cifrar(cadena, clave): text_cifrado = '' for letra in cadena: suma = abc.find(letra) + clave modulo = int(suma) % len(abc) text_cifrado = text_cifrado + str(abc[modulo]) print suma print modulo print text_cifrado retu...
{ "content_hash": "c398f1d31a5b34e2dd4ea5ef089793dd", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 54, "avg_line_length": 23.405405405405407, "alnum_prop": 0.5866050808314087, "repo_name": "pesinasiller/classic-crypto", "id": "ef61deae322aaeb3c324de002a4f88ad63d586ab", "...
from AppKit import NSAlternateKeyMask, NSApplication, NSBundle, NSLog, \ NSMenuItem, NSUserDefaults import objc import re def Category(classname): return objc.Category(objc.lookUpClass(classname)) def Class(classname): return objc.lookUpClass(classname) def flow(text, width = 77): quote, indent = re.ma...
{ "content_hash": "a8964ac651b358239c85bd16c54267bf", "timestamp": "", "source": "github", "line_count": 299, "max_line_length": 84, "avg_line_length": 39.39799331103679, "alnum_prop": 0.6097623089983022, "repo_name": "arachsys/mailflow", "id": "ae1f91e27075856505513b80292f727420e9d0f1", "size": "11...
import os DEBUG = True TEMPLATES_AUTO_RELOAD = True SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
{ "content_hash": "21d6739f5456a3970452f36d8b305bd3", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 52, "avg_line_length": 21.2, "alnum_prop": 0.7641509433962265, "repo_name": "afh/yabab", "id": "fcbc5a0d7d18a40371208107f584c12e1220a1a8", "size": "106", "binary": false, ...
from click.testing import CliRunner from ichnaea.scripts.sentry_test import sentry_test_group def test_basic(): """Test that the command imports and runs at all.""" runner = CliRunner() result = runner.invoke(sentry_test_group) assert result.exit_code == 0
{ "content_hash": "ba5ea844e632db40301a42911b08cd66", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 57, "avg_line_length": 27.6, "alnum_prop": 0.717391304347826, "repo_name": "mozilla/ichnaea", "id": "667d3ef9f2a03b647e672ab7de9b252972cf6bbc", "size": "276", "binary": f...
import sys, os, getopt, shutil, py_compile, subprocess OPTIONLIST = [ ("dir", 1, "Name of directory containing game"), ("name", 1, "Human-readable name of the game"), ("version", 1, "Version number to add to game name"), ("rmdir", 2, "Delete all directories with given name"), ("rmext", 2, "Delete ...
{ "content_hash": "b23d8e59f8eac3ca201c93202c3cc086", "timestamp": "", "source": "github", "line_count": 406, "max_line_length": 186, "avg_line_length": 34.1576354679803, "alnum_prop": 0.5745601384482262, "repo_name": "tobspr/panda3d", "id": "6d89a9a0d052d9b571c962603d537efb1ca313af", "size": "14593...
from __future__ import unicode_literals import webnotes, json class Profile: """ A profile object is created at the beginning of every request with details of the use. The global profile object is `webnotes.user` """ def __init__(self, name=''): self.defaults = None self.name = name or webnotes.session.get('...
{ "content_hash": "bb2e26a31d8c8b0662c8ab72126e6d67", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 115, "avg_line_length": 28.741573033707866, "alnum_prop": 0.6362392494136043, "repo_name": "rohitw1991/latestadbwnf", "id": "81848ab988886ffe0322d7012b99bd3a23628481", "si...
"""E2E Tests for tfx.examples.bert.cola.bert_cola_pipeline.""" import os import unittest import tensorflow as tf from tfx.dsl.io import fileio from tfx.examples.bert.cola import bert_cola_pipeline from tfx.orchestration import metadata from tfx.orchestration.local.local_dag_runner import LocalDagRunner @unittest.s...
{ "content_hash": "b8ff1ba75a267819036186cc626f1692", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 75, "avg_line_length": 38.24691358024691, "alnum_prop": 0.6817301484828922, "repo_name": "tensorflow/tfx", "id": "bf88a217b5fee888549753c4232621f2798f46d7", "size": "3694",...
import sys import yaml import re import collections from pathlib import Path import textwrap def yml_dump_color(d): s = yaml.dump(d, default_flow_style=False, allow_unicode=True) return re.sub(r'^([a-zA-Z0-9_]+?:)', _key_colorer, s, flags=re.MULTILINE) def fail(err): print('\n'.join(textwrap.wrap(err, w...
{ "content_hash": "fbd985fbc02ae202063c696ce52fc0b0", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 86, "avg_line_length": 29.21917808219178, "alnum_prop": 0.6272855133614628, "repo_name": "molecular-workflow-repository/molflow", "id": "15c5e621406f8148f9e70c1ff7ad6e5fd1c19...
from collections import namedtuple import sure # noqa from moto.swf.exceptions import SWFUnknownResourceFault from moto.swf.models import Domain # Ensure 'assert_raises' context manager support for Python 2.6 import tests.backport_assert_raises # noqa # Fake WorkflowExecution for tests purposes WorkflowExecution =...
{ "content_hash": "b105594d8caf44e6eeb92dec28ec7226", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 88, "avg_line_length": 33.252100840336134, "alnum_prop": 0.6623704826889057, "repo_name": "okomestudio/moto", "id": "1a8a1268d761a99676c6aad91bcc5d941254c40e", "size": "39...
from pyasn1.type import univ, constraint, namedtype, namedval, tag from pyasn1_modules import rfc5280 MAX = float('inf') class KeyEncryptionAlgorithmIdentifier(rfc5280.AlgorithmIdentifier): pass class PrivateKeyAlgorithmIdentifier(rfc5280.AlgorithmIdentifier): pass class EncryptedData(univ.OctetString)...
{ "content_hash": "25aa896ad64c49b8c89ffb0d4ada001a", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 87, "avg_line_length": 26.4625, "alnum_prop": 0.7487009919697686, "repo_name": "cloudera/hue", "id": "d8c7c90e90918820641b198ec5f6b39b225cec92", "size": "2555", "binary":...
""" Integration (not unit) tests for pylast.py """ import os import unittest import pylast from .test_pylast import TestPyLastWithLastFm class TestPyLastUser(TestPyLastWithLastFm): def test_repr(self): # Arrange user = self.network.get_user("RJ") # Act representation = repr(user...
{ "content_hash": "bae2b1786b35006cf6c8af31087b4258", "timestamp": "", "source": "github", "line_count": 434, "max_line_length": 84, "avg_line_length": 28.599078341013826, "alnum_prop": 0.5986142442797293, "repo_name": "hugovk/pylast", "id": "1e7c76d35825661a39ace3dbfad08248214d5995", "size": "12434...
from django import template from django.conf import settings register = template.Library() @register.filter(name='in_list') def in_list(value, the_list): the_list = [x.strip() for x in the_list.encode('utf8').split(',')] return value in the_list @register.simple_tag def settings_value(name): return get...
{ "content_hash": "22459b2a5511702c972c8868ce5ca94c", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 70, "avg_line_length": 22.40909090909091, "alnum_prop": 0.691683569979716, "repo_name": "fcopantoja/sips", "id": "3eb89b50348c79360f112b6ed059cd1d007672c1", "size": "493", ...
""" 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": "ae922f2c1ca910fe4e0a40fb89a5a9c4", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 136, "avg_line_length": 45.888888888888886, "alnum_prop": 0.7340597255851493, "repo_name": "arenadata/ambari", "id": "12ea97e35ff7b9130dfbe16ac39771a2c5d65305", "size": "7...
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='gerrit_ext_review_list', version='0.1', description='', author='', author_email='', install_requires...
{ "content_hash": "730dd8d7eb2cce8c82a81f2b1e2ad99d", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 48, "avg_line_length": 23.181818181818183, "alnum_prop": 0.6392156862745098, "repo_name": "nttmcl/gerrit_ext_webui", "id": "5b6d56139f113a699a50cdbbe824fb138300621f", "size...
import shutil, os, re # Create a regex that matches files with the American date format. datePattern = re.compile(r"""^(.*?) # all text before the date ((0|1)?\d)- # one or two digits for the month ((0|1|2|3)?\d)- # one or two digits for the day ((19|20)\d\d) ...
{ "content_hash": "b1872e0e06a185aaecebc3487e11267e", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 82, "avg_line_length": 25.775862068965516, "alnum_prop": 0.6374581939799331, "repo_name": "rfreiberger/Automate-the-Boring-Stuff", "id": "124ee88272d9d780ac2edf054a2e39327a33...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/powerup/weapon/shared_thrown_explosive.iff" result.attribute_template_id = -1 result.stfName("powerup_n","weapon_thrown_explosive") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return res...
{ "content_hash": "299dd7e3379d48adc2d512614ea8ed1a", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 79, "avg_line_length": 24.846153846153847, "alnum_prop": 0.7089783281733746, "repo_name": "anhstudios/swganh", "id": "62dead66bdb8abd85f06fff54863d9959bb45400", "size": "46...