text
stringlengths
4
1.02M
meta
dict
""" Protrein Block assignation --- :mod:`pbxplore.assignment` ========================================================= .. autofunction:: assign """ # Third-party module import numpy # Local module from . import PB def assign(dihedrals, pb_ref=PB.REFERENCES): """ Assign Protein Blocks. Dihedral angl...
{ "content_hash": "56795faa18b91a8ff19d06950f538910", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 89, "avg_line_length": 31.554054054054053, "alnum_prop": 0.5892933618843683, "repo_name": "HubLot/PBxplore", "id": "56f1eba3bd244d23ff0cb0d6259bf452604ae848", "size": "2383...
from __future__ import unicode_literals from requests.exceptions import HTTPError from ..forms import CreditCardPaymentFormWithName from ..core import get_credit_card_issuer class PaymentForm(CreditCardPaymentFormWithName): VALID_TYPES = ['visa', 'mastercard', 'discover', 'amex'] def clean(self): ...
{ "content_hash": "ba56f87066c57c108f4ed3d053838332", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 78, "avg_line_length": 40.45238095238095, "alnum_prop": 0.5197174808711007, "repo_name": "artursmet/django-payments", "id": "8cda7562f1a71bf485f3edff0710295a06c0bf90", "siz...
from collections import defaultdict from concurrent import futures from functools import partial, reduce import json import numpy as np import os import re import operator import urllib.parse import pyarrow as pa import pyarrow.lib as lib import pyarrow._parquet as _parquet from pyarrow._parquet import (ParquetReade...
{ "content_hash": "26f5b20c679d85bcd08e0b47fb546434", "timestamp": "", "source": "github", "line_count": 1969, "max_line_length": 84, "avg_line_length": 37.6124936515998, "alnum_prop": 0.5954576756369921, "repo_name": "xhochy/arrow", "id": "1cfd210fb7616b5f42ebd6d286debd0aa0e96ec4", "size": "74846",...
from sklearn.cluster._kmeans import _kmeans_plusplus # noqa __all__ = ["_kmeans_plusplus"]
{ "content_hash": "b663a98a72f9fa387ef06fbb5091e53d", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 60, "avg_line_length": 31, "alnum_prop": 0.6989247311827957, "repo_name": "dask/dask-ml", "id": "bce639c624991a0298e81eb97b82d918de84f816", "size": "93", "binary": false, ...
"""Common definitions. """ import logging from collections import namedtuple LOGGER = logging.getLogger(__name__) # A unit of currency. CurrencyAmount = namedtuple( 'CurrencyAmount', 'currency amount') # Cost-free acquisition of a property. Similar to a BUY, but the cost is at # $0 and the event is fully tax...
{ "content_hash": "8be415a2c347261eca672d02d87d133a", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 75, "avg_line_length": 25.98148148148148, "alnum_prop": 0.7320028510334996, "repo_name": "chhamilton/acb", "id": "12d4ea510f2fe2926a20c0fd092fd592b00c52cb", "size": "1425",...
""" Module light Defines a light source to light polygonal surfaces. Each axes has up to eight lights associated with it. """ import OpenGL.GL as gl from visvis.core import misc from visvis.core.misc import PropWithDraw, DrawAfter, basestring def _testColor(value, canBeScalar=True): """ _testColor(value, canB...
{ "content_hash": "b97b87c994517f5c20aa4638c6cb0774", "timestamp": "", "source": "github", "line_count": 269, "max_line_length": 80, "avg_line_length": 31.044609665427508, "alnum_prop": 0.5662794874865286, "repo_name": "Alwnikrotikz/visvis", "id": "4cb7bae5677af9554771788a5ed30147f0ef9474", "size": ...
''' dbrev.tables_table.TablesTable implements the Flyweight pattern which handles caching. ''' import logging LOG = logging.getLogger(__name__) # LOG.setLevel(logging.INFO) # Long lines expected. # pylint: disable=C0301 # Cyclic imports protected by functions # pylint: disable=R0401 from freevolv.models.dbrev.ta...
{ "content_hash": "0f6d1114af465ff8d7913347b9900eb8", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 186, "avg_line_length": 40.91588785046729, "alnum_prop": 0.6233439926907264, "repo_name": "genevolv/dbrev", "id": "648c4f230abb5a921a52f10ca84f25a1cc659610", "size": "4378...
import unittest # Package from plan.schedule import Schedule from plan.time_range import TimeRange class TestSchedule(unittest.TestCase): def test_times(self): pass def test_time_zone(self): pass def test_operators(self): pass def test_add_time(self): pass def...
{ "content_hash": "e496516da75a805498cf721979f40181", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 38, "avg_line_length": 14.833333333333334, "alnum_prop": 0.6067415730337079, "repo_name": "CodePeasants/pyplan", "id": "5893629308fa2463d19d9a7e8b76e6a82e712e4d", "size": "...
import sys sys.path.insert(0, '../../pyv8') import pyv8run if "LibTest" not in sys.argv: sys.argv.append("LibTest") pyv8run.build_script()
{ "content_hash": "a3ec6bf3ee0d268e2d66e962659e3ccd", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 32, "avg_line_length": 23.833333333333332, "alnum_prop": 0.6923076923076923, "repo_name": "gpitel/pyjs", "id": "671de68049c2128ae43aea4b1a3fce2b153f316d", "size": "161", "...
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('villes', '0002_load_data'), ('floreal', '0005_constrain_admin_messages'), ] operations = [ migrations.AddField( model_name='network', ...
{ "content_hash": "809494da30ae6c8fa217e8f2da472fd1", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 138, "avg_line_length": 29.217391304347824, "alnum_prop": 0.59375, "repo_name": "fab13n/caracole", "id": "a7c3638220cdad71fa77453c919bd862c660eba7", "size": "721", "binar...
"""App factory.""" import os from flask import Flask, Blueprint from server.config import configs from server.data import data from server.data.module import load_modules from server.data.research import load_research from server.extensions import db, mail, ma, migrate, passlib # Blueprints user_bp = Blueprint('user...
{ "content_hash": "cc3d5a629223ac24b02a94a33bd321e2", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 79, "avg_line_length": 24.49122807017544, "alnum_prop": 0.6726361031518625, "repo_name": "Nukesor/spacesurvival", "id": "ba439b22dd9a1aae7f959df7e51ede2fa2aa978e", "size": ...
import ShareYourSystem as SYS import scipy.stats #degine @SYS.ClasserClass() class MakerClass(SYS.ExplorerClass): def default_init( self, _MakingXFloat = 0., _MakingYFloat = 0., _MadeDistanceFloat = 0., **_KwargVariablesDict ): #Call the parent __init__ method SYS.Exp...
{ "content_hash": "d6179a0cf10d10b2d49c00bca51ae93b", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 86, "avg_line_length": 19.016666666666666, "alnum_prop": 0.6573181419807187, "repo_name": "Ledoux/ShareYourSystem", "id": "f0728bb1f8c93b8a9021b65c3e2ecee161558ad1", "size"...
import imp import json import copy rules = imp.load_source('chess_basic_rules','common/rules.py') piece_value = json.load(open("common/chess_piece_priority.json")) helper = imp.load_source('helper_functions','common/helper_functions.py') opposite = { "white" : "black" , "black" : "white" } def emperical_comparision...
{ "content_hash": "f4620b1f691c600231cadd1c7da80cc5", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 141, "avg_line_length": 26.91304347826087, "alnum_prop": 0.6337641357027464, "repo_name": "OpenC-IIIT/prosfair", "id": "1d4fb484ccb5a12ebc5a8f7076f412f665d9b916", "size": ...
import pytest asdf = pytest.importorskip("asdf") from asdf.tests.helpers import assert_roundtrip_tree # noqa: E402 from astropy import units as u # noqa: E402 from astropy.time import Time, TimeDelta # noqa: E402 @pytest.mark.parametrize("fmt", TimeDelta.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = ...
{ "content_hash": "d350dd6ee0e887b17fa5aa68bed3bdd8", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 69, "avg_line_length": 29.464285714285715, "alnum_prop": 0.7042424242424242, "repo_name": "astropy/astropy", "id": "bdde8acfda56f50258c17cf219a12f71d6b1383f", "size": "890"...
""" WSGI config for locationUpdator project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django impor...
{ "content_hash": "adc3ba29b0e9eada6316bd00c47189d5", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 78, "avg_line_length": 27.666666666666668, "alnum_prop": 0.7971887550200804, "repo_name": "valarpirai/team-locator", "id": "b82b7218ed42c2dc5e1d95489b8e75b28a594b4e", "size...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_add_indexes'), ] operations = [ migrations.AlterField( model_name='document', name='document_value', ...
{ "content_hash": "784efa1ee390cf30364b02a4c85c6b62", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 108, "avg_line_length": 32.484848484848484, "alnum_prop": 0.5960820895522388, "repo_name": "marcusrehm/serenata-de-amor", "id": "6728cba68b93c3dc372a41ff297ad14abefdaeee", ...
from typing import Any, cast import urwid ELLIPSIS = "..." class EllipsisTextLayout(urwid.TextLayout): def supports_align_mode(self, align: Any) -> bool: return align in (urwid.LEFT, urwid.RIGHT) def supports_wrap_mode(self, wrap: Any) -> bool: return cast(bool, wrap == urwid.CLIP) def...
{ "content_hash": "846fbce84b85f30f99df31e01bbce021", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 78, "avg_line_length": 33.87755102040816, "alnum_prop": 0.4963855421686747, "repo_name": "rr-/dotfiles", "id": "419fb516f3a31ef1ab53a709519df91f7ab7c4fe", "size": "1660", ...
from bs4 import BeautifulSoup from weibo.common import log as logging LOG = logging.getLogger(__name__) class HBeautifulSoup(BeautifulSoup): pass class Soup(object): def __init__(self, *args, **kwargs): self.parser_type = "html.parser" self.soup = None def __call__(self, wb, **kwargs...
{ "content_hash": "87be76951f27e967c609789fa3e87b3f", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 56, "avg_line_length": 21.47222222222222, "alnum_prop": 0.5937904269081501, "repo_name": "windskyer/weibo", "id": "ad26c9c39da0235d8917451506bdf2419531732f", "size": "773",...
""" author: Chris Fernandez, chris2fernandez@gmail.com last updated: 05/26/2015 An script that can be used to create and launch all example NEXT experiments from examples/ directory. Usage from Command line: python run_examples.py """ import os # List of example experiment directories curr_examples = ['cartoon_tupl...
{ "content_hash": "ce5c57473f656aa26397dc33844d03fc", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 102, "avg_line_length": 35, "alnum_prop": 0.6899159663865546, "repo_name": "sumeetsk/NEXT", "id": "008b75dfe07d4472b8be7646a3ac2e1e572c8c21", "size": "1208", "binary": fa...
""" MoinMoin - PDF filter Depends on: pdftotext command from either xpdf-utils or poppler-utils or any other package that provides a pdftotext command that is callable with: pdftotext -enc UTF-8 filename.pdf - @copyright: 2006 MoinMoin:ThomasWaldmann @license: GNU GPL, ...
{ "content_hash": "d7718670bb02981a41759ec8e56b43c1", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 75, "avg_line_length": 37.9, "alnum_prop": 0.7058047493403694, "repo_name": "RealTimeWeb/wikisite", "id": "839ebce32ef0297ad71f8eb092f917f3c7e76197", "size": "787", "bina...
import json from .interface import ContentTypeSerializer from ..exceptions import SerializationException from ..compat import string_type class JsonSerializer(ContentTypeSerializer): content_type = ["application/json"] @staticmethod def dump(data): """ should return back a bytes (or stri...
{ "content_hash": "709f6ba7435daf600b89c80f3c3d18f2", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 66, "avg_line_length": 27.976744186046513, "alnum_prop": 0.6201163757273483, "repo_name": "toumorokoshi/web-transmute", "id": "a0821b4a6a0143e3f4daf3f22b30a04c147efffc", "s...
import pygame import Game from Menu.HeadMenu import HeadMenu from Menu.StartMenu.StartMenuItems.ExitGame import ExitGame from Menu.InGameMenu.StartMenuButton import StartMenuButton from Vector2 import Vector2 class FinalScreen(HeadMenu): def __init__(self, resolution: Vector2, background=None, logo=None, winner=...
{ "content_hash": "f14849a409e1d38aba3dbde41c25d58b", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 90, "avg_line_length": 36.027027027027025, "alnum_prop": 0.6804201050262566, "repo_name": "HRODEV/Frequency", "id": "b54ee82000e91e3f9000043d6a8d63166a5c6356", "size": "133...
from __future__ import annotations from os import PathLike from typing import IO, Any, Dict, List, Optional, Tuple, Union from .lang_types import ( Asset, Association, AttackStep, AttackStepType, Category, Field, Multiplicity, Risk, Steps, Variable, ) from .reader import LangRe...
{ "content_hash": "91eb1a61a59f29238e3f1bb02bc92d3e", "timestamp": "", "source": "github", "line_count": 366, "max_line_length": 92, "avg_line_length": 41.37158469945355, "alnum_prop": 0.5563333773609827, "repo_name": "foreseeti/securicad-model-sdk", "id": "7a6e4c90d979081f26ebea41d2804b0a11c6fb9b", ...
from oslo_log import log as logging import six from cinder import context from cinder.volume.drivers.cloudbyte import cloudbyte from cinder.i18n import _, _LE, _LI from cinder import exception LOG = logging.getLogger(__name__) class CloudByteISCSIDriver130(cloudbyte.CloudByteISCSIDriver): def __init__(self, *arg...
{ "content_hash": "1e95691fbec8eccdf807073f86f5e8a6", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 106, "avg_line_length": 36.00651465798045, "alnum_prop": 0.5521982992581871, "repo_name": "CloudByteStorages/openstack", "id": "2f013c1d29f4f773c26582f0433b4797244bd630", ...
__author__ = 'DSOWASP' # This is the Twisted Get Poetry Now! client, version 3.0. # NOTE: This should not be used as the basis for production code. import optparse from twisted.internet.protocol import Protocol, ClientFactory def parse_args(): usage = """usage: %prog [options] [hostname]:port ... This is the ...
{ "content_hash": "3ffe1b26fcb91fb214e13590e8d04df7", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 93, "avg_line_length": 26.892857142857142, "alnum_prop": 0.5627490039840638, "repo_name": "dianshen/python_day", "id": "702e8276ce0b807aa24d076812ae7fe34ab63e07", "size": ...
"""Support for Iperf3 sensors.""" from homeassistant.const import ATTR_ATTRIBUTION from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.restore_state import RestoreEntity from . import ATTR_VERSION, DATA_UPDATED, DOMAIN as IPERF3_DOMAI...
{ "content_hash": "33747df6f815ae7b3f8f0e1550ab274e", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 79, "avg_line_length": 30.744897959183675, "alnum_prop": 0.6272817789578493, "repo_name": "aequitas/home-assistant", "id": "efc34d8bdef000ddc69cb23858750895d0fe46b4", "size...
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param Failed: {"optional": true, "size": "8", "type": "number", "oid": "4", "format": "counter"} :param Total_Used: {"optional": true, "size": "8", "type"...
{ "content_hash": "2066c27f6629fbd6df3199389f1d87ce", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 167, "avg_line_length": 31.6, "alnum_prop": 0.5871470301850049, "repo_name": "amwelch/a10sdk-python", "id": "b147c30d18e6e3b1a767ea201c5a3ad836f9817e", "size": "2054", "b...
import time import json import urllib import urllib2 import copy from api import FoursquareRequestError, RateLimitExceededError class VenueAPIGateway: """ An object that interfaces with the foursquare API. All HTTP queries to the API should be carried out through a single gateway. Deals with unau...
{ "content_hash": "03e091195917fd7661703fb286fcfbe7", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 91, "avg_line_length": 35.916666666666664, "alnum_prop": 0.5859523307319131, "repo_name": "mattjw/cf4sq", "id": "5e7ff538eedbf32c6f51f3cf4a132c1366546d33", "size": "5386",...
import sys sys.path.append("..") from util.validator import Validator, ValidationRule, ValidationException, NULL_DATE # Libs. import unittest import datetime class ValidatorTests(unittest.TestCase): def _assertOK(self, in_val, out_val, rule): self.assertEqual(Validator.validate(in_val, rule=rule), out_va...
{ "content_hash": "0924911335b78728ff8d37d93b68b821", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 84, "avg_line_length": 37.714285714285715, "alnum_prop": 0.6463068181818182, "repo_name": "ololobster/cvidone", "id": "8214e6300633de0dae50e53d668ef57631567fb7", "size": "2...
from collections import OrderedDict import itertools class VisError(Exception): pass class Node(object): def __init__(self, seq, obj, cluster=None): self.obj = obj self.seq = seq self.cluster = cluster self.content = OrderedDict() self.style = None self.fillcol...
{ "content_hash": "233a36dabb6303a0b4e73e2bc66fe4f3", "timestamp": "", "source": "github", "line_count": 351, "max_line_length": 105, "avg_line_length": 28.353276353276353, "alnum_prop": 0.5794815112540193, "repo_name": "axt/bingraphvis", "id": "760c484b477aa7f1c265ac68f1508b5069dd38fb", "size": "99...
""" Copyright (c) 2015 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
{ "content_hash": "41f9c0d34507b5d0489b01993320aed2", "timestamp": "", "source": "github", "line_count": 200, "max_line_length": 77, "avg_line_length": 31.99, "alnum_prop": 0.5175054704595186, "repo_name": "alexforencich/hdg2000", "id": "89aaeacbf5442cdc0f5c33403d0378d213291aa4", "size": "6421", "...
import contextlib import sys import six import traceback from snipping.utils import fileutil from snipping.utils import strutil @contextlib.contextmanager def reopen_stdout_stderr(): f = fileutil.temp_file() old_stdout, old_stderr = sys.stdout, sys.stderr sys.stderr = sys.stdout = f try: yie...
{ "content_hash": "aeb4eb4f7ad959414bd6a840c36de81d", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 66, "avg_line_length": 24.036585365853657, "alnum_prop": 0.595636732623034, "repo_name": "yittg/Snipping", "id": "b528f44939f00999a0f8f36d951d481df4356c85", "size": "1971",...
"""Impl. of default bucket storage class command for Google Cloud Storage.""" from __future__ import absolute_import from __future__ import print_function from __future__ import division from __future__ import unicode_literals from gslib import metrics from gslib.command import Command from gslib.command_argument imp...
{ "content_hash": "c03c5f280eef701c4774ff1aa0d7fca9", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 87, "avg_line_length": 37.67857142857143, "alnum_prop": 0.6725118483412322, "repo_name": "endlessm/chromium-browser", "id": "2d9c20ae21fe73c6cc58513f0a03a613721514ab", "si...
"""Discover and run std-library "unittest" style tests.""" import sys import traceback import types from typing import Any from typing import Callable from typing import Generator from typing import Iterable from typing import List from typing import Optional from typing import Tuple from typing import Type from typing...
{ "content_hash": "3283cef971ebf5ba9d21f4e9173d15e6", "timestamp": "", "source": "github", "line_count": 414, "max_line_length": 116, "avg_line_length": 34.91787439613527, "alnum_prop": 0.5966380741560597, "repo_name": "Akasurde/pytest", "id": "851e4943b23efecfe30d0aad9b7529882f4e1bb9", "size": "144...
class ReverseProxied(object): '''Wrap the application in this middleware and configure the front-end server to add these headers, to let you quietly bind this to a URL other than / and to an HTTP scheme that is different than what is used locally. In nginx: location /myprefix { proxy...
{ "content_hash": "ba44275e630035b0fe24a0331fb59a72", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 68, "avg_line_length": 36.59375, "alnum_prop": 0.6080273270708796, "repo_name": "alex-leonhardt/sensu-grid", "id": "9649e6138f7ae35577dddd3a2e122f2c97e925f5", "size": "1171...
import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ from modelcluster.contrib.taggit import ClusterTaggableManager from wagtail.wagtailcore.fields import RichTextField class EntryAbstract(models.Model): body = RichTextField(verbose_name=_('body')) tags = Clus...
{ "content_hash": "ac9bc333991bc402f562597e89e1a5e2", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 118, "avg_line_length": 50.52173913043478, "alnum_prop": 0.6867469879518072, "repo_name": "taedori81/puput", "id": "5763562cb037bb6fba9309e5ac0ae6fe75962528", "size": "1162...
import json import logging from typing import ( Any, Dict, ) import kafka import slackclient from papika.bridges import Bridge log = logging.getLogger(__name__) def is_valid_message(message: Dict[str, Any]) -> bool: is_valid = True if 'channel' not in message: log.error("Required argument...
{ "content_hash": "10e41eae634f6df8a5dacd5abad6aef0", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 107, "avg_line_length": 33.25, "alnum_prop": 0.5541026479241582, "repo_name": "kennydo/papika", "id": "befeb2a537077967b54fc27b4c41945858fcf415", "size": "3059", "binary"...
from distutils.core import setup, Extension setup(name='yara-python', version='3.2.0', author='Victor M. Alvarez', author_email='plusvic@gmail.com;vmalvarez@virustotal.com', ext_modules=[Extension( name='yara', sources=['yara-python.c'], include_dirs=['../wind...
{ "content_hash": "3d4dec786f39b4379117ad4853c02935", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 80, "avg_line_length": 34.142857142857146, "alnum_prop": 0.5857740585774058, "repo_name": "digideskio/yara", "id": "61af2ea08fccc0ebcd108f47b8b6b8c56b9fe416", "size": "1108...
#!python3 # -*- coding:utf-8 -*- import os import sys import time import ctypes import shutil import subprocess IsPy3 = sys.version_info[0] >= 3 if IsPy3: import winreg else: import codecs import _winreg as winreg BuildType = 'Release' IsRebuild = True Build = 'Rebuild' Update = False Copy = False CleanAl...
{ "content_hash": "0aad8915b7f5b68508d027ad237dde0f", "timestamp": "", "source": "github", "line_count": 355, "max_line_length": 195, "avg_line_length": 38.19718309859155, "alnum_prop": 0.5918879056047197, "repo_name": "xylsxyls/xueyelingshuang", "id": "838790e20070e10f05e1b2e2621f3d289d0c804b", "si...
import json import pytest from openshift_checks.logging.logging_index_time import LoggingIndexTime, OpenShiftCheckException SAMPLE_UUID = "unique-test-uuid" def canned_loggingindextime(exec_oc=None): """Create a check object with a canned exec_oc method""" check = LoggingIndexTime() # fails if a module i...
{ "content_hash": "4f3954c0791599d127227e0cdbf0785b", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 105, "avg_line_length": 28.405882352941177, "alnum_prop": 0.612549182025264, "repo_name": "ttindell2/openshift-ansible", "id": "22566b295510fe06558f1c43ae9550bc947d433b", ...
from argparse import ArgumentParser from sys import stdin, stdout import logging from morph_seg.sequence_tagger.train import CNNConfig, LSTMConfig, \ CNNTagger, SequenceTagger from morph_seg.sequence_tagger.data import TrainValidData def parse_args(): p = ArgumentParser() p.add_argument('-t', '--trai...
{ "content_hash": "b2f248defa4bbb22ed7dbdc1284bae16", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 68, "avg_line_length": 33.2, "alnum_prop": 0.6006024096385543, "repo_name": "juditacs/morph-segmentation-experiments", "id": "5b66db54228f4ab5194bd5c4f965a3910bdda8a7", "si...
"""This example illustrates how to delete a report.""" import argparse import sys from apiclient import sample_tools from oauth2client import client # Declare command-line flags. argparser = argparse.ArgumentParser(add_help=False) argparser.add_argument( 'profile_id', type=int, help='The ID of the profile to...
{ "content_hash": "4a9a318f1ee590742ca12e4a2b9f3cee", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 80, "avg_line_length": 28.477272727272727, "alnum_prop": 0.6943335993615323, "repo_name": "falbassini/googleads-dfa-reporting-samples", "id": "d163c25b24c65f9feb3ac2615b9184e...
from bs4 import BeautifulSoup import json import re def extract_from_b64(encoded_doc): #doc = base64.urlsafe_b64decode(encoded_doc) doc = encoded_doc.decode("base64") doc = doc.decode('utf-8') doc = re.sub("<p>", " ", doc) doc = re.sub('<div class="BODY-2">', " ", doc) soup = BeautifulSoup(doc)...
{ "content_hash": "6c06b59b29ff09a84bfcffadea9b9c5f", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 78, "avg_line_length": 37.22222222222222, "alnum_prop": 0.5950248756218905, "repo_name": "ahalterman/cloacina", "id": "ee32681dc2b2c0f29f5f083e22da68588fafd3aa", "size": "1...
"""Bayesian variant calling with FreeBayes. https://github.com/ekg/freebayes """ import os import sys import toolz as tz from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils, shared from bcbio.pipeline import datadict as dd from bcbio.provenance ...
{ "content_hash": "4da7241c2df7919cff818a2760ababb4", "timestamp": "", "source": "github", "line_count": 333, "max_line_length": 111, "avg_line_length": 47.01801801801802, "alnum_prop": 0.5962189436035, "repo_name": "lpantano/bcbio-nextgen", "id": "0b2c1b262022091453bfdd8d6f164a915be83367", "size": ...
import os from flask import Flask APP_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = False class CustomFlask(Flask): jinja_options = Flask.jinja_options.copy() jinja_options.update(dict( block_start_string='(%', block_end_string='%)', variable_start_string='((', variable_end_string=')...
{ "content_hash": "41fcc62fb9de8d7441447f522517afe8", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 62, "avg_line_length": 23.21875, "alnum_prop": 0.6742934051144011, "repo_name": "biorack/metatlas", "id": "5554425d7a20decc2703076347b022a1e83b051b", "size": "752", "bina...
""" .. moduleauthor:: Stephen Raymond Ferg and Robert Lugg (active) .. default-domain:: py .. highlight:: python Version |release| ABOUT EASYGUI ============= EasyGui provides an easy-to-use interface for simple GUI interaction with a user. It does not require the programmer to know anything about tkinter, frames,...
{ "content_hash": "695629a40277227d6fe8d98d6a2c153e", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 103, "avg_line_length": 40.151898734177216, "alnum_prop": 0.7578814627994955, "repo_name": "harish0507/GMapsScrapper", "id": "910a77cb84bad01c3852f2dd0bd8d0af7c11538a", "si...
from ShareYourSystem.Classors import Representer,Attester,Classer from ShareYourSystem.Functers import Argumenter from ShareYourSystem.Objects import Initiator #Definition a derived second Class @Classer.ClasserClass() class MakerClass(Initiator.InitiatorClass): def __init__(self, _MakingMyFloat=0., _MakingMyL...
{ "content_hash": "965dbc71a18b3ac41185d2a2ecf60043", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 65, "avg_line_length": 19.466666666666665, "alnum_prop": 0.7340182648401826, "repo_name": "Ledoux/ShareYourSystem", "id": "64896a9210e7e77f8175cf9ea081cef707f60588", "size"...
''' Listing 5.4: Rectilinear to polar coordinates ''' import numpy as np import pyopencl as cl import pyopencl.array import utility kernel_src = ''' __kernel void polar_rect(__global float4 *r_vals, __global float4 *angles, __global float4 *x_coords, ...
{ "content_hash": "459cbe0ebce9bee8bf2e700787e55fcd", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 103, "avg_line_length": 33.81967213114754, "alnum_prop": 0.6800775569558895, "repo_name": "oysstu/pyopencl-in-action", "id": "10aff9cc4434d636aef5f9e9a678cfd2b8b0464b", "si...
from email.headerregistry import Address from typing import Any, Dict, List, Optional, Union from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.files.uploadedfile import UploadedFile from django.http import HttpRequest, HttpResponse from django.shortcuts import redir...
{ "content_hash": "910acbbd5690519228ef5a68015ecd27", "timestamp": "", "source": "github", "line_count": 786, "max_line_length": 100, "avg_line_length": 37.35750636132315, "alnum_prop": 0.6719340666825597, "repo_name": "rht/zulip", "id": "1225a6499494a0b81a5a223217257f78501cbc78", "size": "29363", ...
from __future__ import absolute_import, division, print_function, \ with_statement import unittest from miserable.dns.utils import * class HostnameTestCase(unittest.TestCase): def test_hostname(self): addr = Address('www.baidu.com', 80) self.assertTrue(addr.ipaddr is None) self.asser...
{ "content_hash": "272b03eee1e0475453cbec144faeb9ce", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 67, "avg_line_length": 28.526315789473685, "alnum_prop": 0.6605166051660517, "repo_name": "wiiiky/shadowsocks", "id": "6adb2db2bfb404d8e8e59a4e3eab3ec2285f7d76", "size": "1...
""" Graph core. @package bridgecut @author Aaron Zampaglione <azampagl@my.fit.edu> @copyright 2011 Aaron Zampaglione @license MIT """ from node import Node from edge import Edge from bridgecut.lib.util import combinations class Graph(object): @classmethod def expand(cls, node): """ Build...
{ "content_hash": "4353eccc9346b87cb1b6778bbabead5b", "timestamp": "", "source": "github", "line_count": 259, "max_line_length": 78, "avg_line_length": 28.28957528957529, "alnum_prop": 0.4576224921523134, "repo_name": "azampagl/ai-ml-improved-bridgecut", "id": "14b103870b2811e7aed6cc85b22016ac99469f3a...
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_EXT_coordinate_frame' def _f( function ): return _p.createFunction( function,_p.GL,'GL_EXT_coordinate_frame',False) _p.unpack_const...
{ "content_hash": "e9009d452640bf075a48fdcd26b16f85", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 77, "avg_line_length": 32.17, "alnum_prop": 0.7444824370531551, "repo_name": "frederica07/Dragon_Programming_Process", "id": "0d04c56808ecb2ac37a2263c8f4fa996cb266815", "s...
from google.cloud import aiplatform_v1beta1 def sample_list_optimal_trials(): # Create a client client = aiplatform_v1beta1.VizierServiceClient() # Initialize request argument(s) request = aiplatform_v1beta1.ListOptimalTrialsRequest( parent="parent_value", ) # Make the request re...
{ "content_hash": "840cffcece7d2fbe7680ad0eb3764e2c", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 73, "avg_line_length": 26.05263157894737, "alnum_prop": 0.7313131313131314, "repo_name": "googleapis/python-aiplatform", "id": "ea190408f36734f5e98c014a1a3ca2745c10adb0", "...
from __future__ import division __author__ = "Kishori M Konwar Niels W Hanson" __copyright__ = "Copyright 2014, MetaPathways" __credits__ = [""] __version__ = "1.0" __maintainer__ = "Kishori M Konwar Niels W Hanson" __status__ = "Release" #from libs.starcluster.test import teststarcluster as sctest #import sys try...
{ "content_hash": "438171c55ba2df9227faf015b112da89", "timestamp": "", "source": "github", "line_count": 506, "max_line_length": 184, "avg_line_length": 39.13833992094862, "alnum_prop": 0.6305291860230257, "repo_name": "Koonkie/MetaPathways_Python_Koonkie.3.0", "id": "4059e94d96de6bf7aab520fddcb324966...
'''EDRN RDF Service. ''' from zope.i18nmessageid import MessageFactory PACKAGE_NAME = __name__ DEFAULT_PROFILE = 'profile-' + PACKAGE_NAME + ':default' _ = MessageFactory(PACKAGE_NAME)
{ "content_hash": "adbed40291f0b41b09594433ea2ab81f", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 56, "avg_line_length": 23.375, "alnum_prop": 0.7165775401069518, "repo_name": "EDRN/DMCCBackend", "id": "9563677260b49cd08b32d9ff436f2d78e77208a5", "size": "331", "binary"...
"""Module containing the formatter for templates.""" from formatters.base import Formatter class TemplateFormatter(Formatter): """Formatter to convert datas in the templating format. This formatter is a regular one, but it renders the input datas using a templating system, currently Jinja2. ...
{ "content_hash": "25c0f2637bd8509c792610d1cb88402a", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 75, "avg_line_length": 29.047619047619047, "alnum_prop": 0.6622950819672131, "repo_name": "v-legoff/pa-poc3", "id": "46138aa6bd064c02b61ad23759ac06e8037e9d8d", "size": "215...
import sys from collections import OrderedDict from types import MappingProxyType, DynamicClassAttribute __all__ = ['Enum', 'IntEnum', 'unique'] def _is_descriptor(obj): """Returns True if obj is a descriptor, False otherwise.""" return ( hasattr(obj, '__get__') or hasattr(obj, '__set...
{ "content_hash": "de12f1f3dc51541dff83956a053c16ce", "timestamp": "", "source": "github", "line_count": 574, "max_line_length": 99, "avg_line_length": 38.721254355400696, "alnum_prop": 0.5616845136326825, "repo_name": "batermj/algorithm-challenger", "id": "b8787d19b884862265991e7a694b00f93f7b71e9", ...
import io import pretend from pyramid.httpexceptions import HTTPMovedPermanently, HTTPNotFound from webob import datetime_utils from warehouse.packaging import views from warehouse.packaging.interfaces import IDownloadStatService, IFileStorage from ...common.db.accounts import UserFactory from ...common.db.packagin...
{ "content_hash": "d343dd9a7fbae4b0f2fe58364b381d53", "timestamp": "", "source": "github", "line_count": 321, "max_line_length": 79, "avg_line_length": 33.68535825545171, "alnum_prop": 0.604365116063997, "repo_name": "HonzaKral/warehouse", "id": "25aea02dfc4001065493c6ce5f3b41b7598bbc44", "size": "1...
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
{ "content_hash": "1f84f49597f4713e3c10b3c42e8e4e1e", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 254, "avg_line_length": 44.08056872037915, "alnum_prop": 0.5651005268250726, "repo_name": "bikeNomad/mbed", "id": "9f18b421b1be1e4a8a58ff0c3a0de8c46e385819", "size": "9301...
from __future__ import annotations import itertools import numpy as np import pandas as pd import pytest import xarray as xr from xarray.core.missing import ( NumpyInterpolator, ScipyInterpolator, SplineInterpolator, _get_nan_block_lengths, get_clean_interp_index, ) from xarray.core.pycompat impo...
{ "content_hash": "09f56d24510207ba38aaafda35d8860a", "timestamp": "", "source": "github", "line_count": 728, "max_line_length": 112, "avg_line_length": 32.10851648351648, "alnum_prop": 0.6031229946524064, "repo_name": "pydata/xarray", "id": "6f3d7a702dd92c48b3e47d180480775de7f04170", "size": "23375...
print("http://machinelearningmastery.com/machine-learning-in-python-step-by-step/") import sys print('Python: {}'.format(sys.version)) # scipy import scipy print('scipy: {}'.format(scipy.__version__)) # numpy import numpy print('numpy: {}'.format(numpy.__version__)) # matplotlib import matplotlib print('matplotlib: {}'...
{ "content_hash": "72c29ac4ec485a2a90ddd77f49fbe622", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 83, "avg_line_length": 26.473684210526315, "alnum_prop": 0.7137176938369781, "repo_name": "yvlasov/ConProbIN", "id": "8c4c78fcd0ebc28aab1cab5d80ce32714b6b0e16", "size": "53...
import os import bz2 import gzip import simplejson import struct def mkdir_p(dirname): 'like mkdir -p' if not os.path.exists(dirname): try: os.makedirs(dirname) except OSError as e: if not os.path.exists(dirname): raise e def open_compressed(filename, ...
{ "content_hash": "aeb7274453841c231c0b4f7e1ae8efa8", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 78, "avg_line_length": 26.675862068965518, "alnum_prop": 0.5685108583247156, "repo_name": "forcedotcom/distributions", "id": "dbe20a09bd0caefe193559b167a8ce2e7210f548", "s...
class SessionSettings(object): SESSION_ENGINE = 'django.contrib.sessions.backends.file' SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 4 def SESSION_COOKIE_NAME(self): return self.PROJECT_NAME LOGIN_URL = '/admin/' MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
{ "content_hash": "f5392ca3d8493dfb3da51fd91ee2476b", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 78, "avg_line_length": 34.666666666666664, "alnum_prop": 0.6955128205128205, "repo_name": "futurecolors/tinned-django", "id": "8f25b747c3bdc61601c342a99f3169316b5fe1b3", "si...
import asyncio from opentracing.ext import tags from ..otel_ot_shim_tracer import MockTracer from ..testcase import OpenTelemetryTestCase from ..utils import get_logger, get_one_by_operation_name, stop_loop_when from .request_handler import RequestHandler logger = get_logger(__name__) class Client: def __init_...
{ "content_hash": "0c0291ccae2dc23431f5f8a1eb674eb1", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 80, "avg_line_length": 34.01481481481481, "alnum_prop": 0.625, "repo_name": "open-telemetry/opentelemetry-python", "id": "14958418a325a1f8b2b3ecc546841a026b35c2e5", "size"...
from dataclasses import dataclass from typing import Optional @dataclass(init=False, repr=False) class Token: """ A simple token representation, keeping track of the token's text, offset in the passage it was taken from, POS tag, dependency relation, and similar information. These fields match spacy's ...
{ "content_hash": "eaeece7456c28443dc99e11c19018a39", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 98, "avg_line_length": 33.03174603174603, "alnum_prop": 0.5812109562710236, "repo_name": "allenai/allennlp", "id": "c4f971ae01ddc2b96d8f8fe1ba902899741c1281", "size": "416...
from setuptools import setup setup( name="lexical-uuid", version="0.1.1", url='http://github.com/samuraisam/lexical_uuid', author='Samuel Sutch', author_email='sam@sutch.net', description='A sensible class for dealing with Lexical UUIDs', long_description= """ lexical_uuid is a lightweight ...
{ "content_hash": "41f10f2939f2ec3bd4662479d142976f", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 196, "avg_line_length": 36.791666666666664, "alnum_prop": 0.6613816534541337, "repo_name": "samuraisam/lexical_uuid", "id": "8f18b8f22c1160a769f8d0863310bdc13d65a17b", "siz...
from meocloud.client.linux.protocol.daemon_ui.ttypes import InitResult, StatusResult, RemoteDirectoryListingResult, SyncStatus from meocloud.client.linux.protocol.daemon_core.ttypes import State from meocloud.client.linux.protocol.daemon_ui import UI from meocloud.client.linux.thrift_utils import ThriftListener # Appl...
{ "content_hash": "9589430090e5ea8ad3f5023b149cafb8", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 126, "avg_line_length": 40.2589928057554, "alnum_prop": 0.6731593995711223, "repo_name": "sapo/meocloud-cli", "id": "281e30585aaa7d2a23700821017720c458b4d620", "size": "56...
import theano from theano import tensor import numpy from utils import init_embedding_table from collections import OrderedDict from blocks.bricks import Tanh, Softmax, Linear, MLP, Identity, Rectifier from blocks.bricks.lookup import LookupTable from blocks.bricks.recurrent import LSTM, GatedRecurrent, Bidirectional ...
{ "content_hash": "4daf3e5b7c911997f00ac9001b482737", "timestamp": "", "source": "github", "line_count": 321, "max_line_length": 213, "avg_line_length": 47.54205607476636, "alnum_prop": 0.5999606840967171, "repo_name": "arianhosseini/Question-Answering", "id": "71b880e70d2131c85a76aa0017d26ee217adab86...
class Global: var = 'Hello' if __name__ == "__main__": print Global.var Global.var = 5 print Global.var
{ "content_hash": "778dc7570c368ee17ba71dc5069ee658", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 26, "avg_line_length": 17.142857142857142, "alnum_prop": 0.5583333333333333, "repo_name": "traxex33/Twitter-Analysis", "id": "79906906deebc15a0df0bc9dff355daad219bbf3", "siz...
GEVENT_CHECKS = True THROTTLE_SECONDS = 60 * 60 THROTTLE_LIMIT = 1800 REDIS_HOST = 'localhost' REDIS_PORT = 6379 REDIS_DB = 0 try: from settings_local import * except ImportError: pass import redis cache = redis.StrictRedis( host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB)
{ "content_hash": "eb65d0bb8edb077405ff403bc53d1432", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 32, "avg_line_length": 14.8, "alnum_prop": 0.6925675675675675, "repo_name": "n3storm/emailpie", "id": "388dee58a0d2b311e619d450b267127505c0ae8b", "size": "296", "binary":...
from Child import Child from Node import Node # noqa: I201 EXPR_NODES = [ # An inout expression. # &x Node('InOutExpr', kind='Expr', children=[ Child('Ampersand', kind='AmpersandToken'), Child('Identifier', kind='IdentifierToken'), ]), # A #column expressio...
{ "content_hash": "b62c49884e00726cb8e21d3e2369fad2", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 74, "avg_line_length": 30.34453781512605, "alnum_prop": 0.5306009415674329, "repo_name": "wenluma/swift", "id": "07a9d5aff9fe990c0dc3195df3c45caac48d789d", "size": "3611",...
from __future__ import absolute_import, print_function import sys import os import traceback import click import itertools from netlib.http import CONTENT_MISSING import netlib.utils from . import flow, filt, contentviews from .exceptions import ContentViewException from .models import HTTPRequest class DumpError(Ex...
{ "content_hash": "7c0da910bc1411dfd35a85eda46eb3e2", "timestamp": "", "source": "github", "line_count": 347, "max_line_length": 84, "avg_line_length": 30.610951008645532, "alnum_prop": 0.5189229900207117, "repo_name": "0xwindows/InfoLeak", "id": "d2b130f1d6c8ea578875fbc1cb30b03886638b3f", "size": "...
from HttpMD5Util import buildMySign,httpGet,httpPost class OKCoinFuture: def __init__(self,url,apikey,secretkey): self.__url = url self.__apikey = apikey self.__secretkey = secretkey #OKCOIN期货行情信息 def future_ticker(self,symbol,contractType): FUTURE_TICKER_RESOURCE = "/api/...
{ "content_hash": "fd25e7210c8bb98709b062a54eec15b8", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 106, "avg_line_length": 34.646341463414636, "alnum_prop": 0.5909890883491729, "repo_name": "frrp/cryptoexchange", "id": "7ec9d58440ea2150e4bfc5bf570d0a12ab4dca1a", "size":...
from .instance_view_status import InstanceViewStatus from .sub_resource import SubResource from .sku import Sku from .availability_set import AvailabilitySet from .virtual_machine_size import VirtualMachineSize from .virtual_machine_extension_image import VirtualMachineExtensionImage from .virtual_machine_image_resourc...
{ "content_hash": "08db645130c3c3102c3d9b8ca98f145a", "timestamp": "", "source": "github", "line_count": 285, "max_line_length": 145, "avg_line_length": 45.49473684210526, "alnum_prop": 0.827934598179855, "repo_name": "AutorestCI/azure-sdk-for-python", "id": "3d6e82bd216d6bad3efb717c8d9698e0d605637a",...
"""SCons.Tool.masm Tool-specific initialization for the Microsoft Assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person ...
{ "content_hash": "f1d5ab084f380050d341569e7716c889", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 100, "avg_line_length": 37.66233766233766, "alnum_prop": 0.7196551724137931, "repo_name": "timj/scons", "id": "b9d88cd190cecae01cacecb433554f0855e0dbf4", "size": "2900", ...
import tkinter as tk from PIL import Image from PIL import ImageTk class Program(tk.Tk): def __init__(self, *args,**kwargs): tk.Tk.__init__(self,*args,**kwargs) container = tk.Frame(self) container.pack(side='top',fill='both', expand=True) container.grid_rowconfigure(0,weight=1) ...
{ "content_hash": "40d3d8b4ed89b7f29b725886517161ff", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 87, "avg_line_length": 33.417910447761194, "alnum_prop": 0.5757034390352836, "repo_name": "GeorgeManakanatas/PPDM", "id": "cfb58345346022545b51b203851ff48fde7ec20f", "size"...
import unittest import os from yambopy.dbs.savedb import YamboSaveDB from qepy.lattice import Path test_path = os.path.join(os.path.dirname(__file__),'..','..','data','refs','gw_conv') class TestYamboSaveDB(unittest.TestCase): def test_yambosavedb(self): """ test savedb """ #open savedb f...
{ "content_hash": "4ef9ba523bbfb9968aacf4148031169d", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 85, "avg_line_length": 25.666666666666668, "alnum_prop": 0.6071428571428571, "repo_name": "alexmoratalla/yambopy", "id": "1bb888333308696928c6706bbffb6ac556f4eccb", "size":...
from celery.task import task, Task, subtask import datetime, time, pytz from django.utils import timezone from models import ReaperConfig, RoomConfig, RoomStatus, ReaperLog from models import PseudoRoomMotion, PseudoRoomResv from django.db import transaction from gcal_v3_util import GCalendar from motion import ca...
{ "content_hash": "f5a90d5e6c46362393272037c3bde276", "timestamp": "", "source": "github", "line_count": 431, "max_line_length": 153, "avg_line_length": 33.71461716937355, "alnum_prop": 0.5387791617920308, "repo_name": "redwoodsystems/GoogleCalendar-Connector", "id": "c75dddd51bfd95f350dc28435370ee5fd...
from __future__ import print_function import numpy as np import pandas as pd test_data = pd.read_csv('../../data/test.csv', dtype={"Age": np.float64})
{ "content_hash": "cdc783441f973d6dd5c8f40a6e3e6c77", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 73, "avg_line_length": 25.5, "alnum_prop": 0.6862745098039216, "repo_name": "wojtekwalczak/kaggle_titanic", "id": "8a5b83ebad1431db2848e46c12235c9058cb7787", "size": "169", ...
""" ====================================================================== Point groups (:mod:`sknano.utils.symmetry_groups._point_groups`) ====================================================================== .. currentmodule:: sknano.utils.symmetry_groups._point_groups """ from __future__ import absolute_import, d...
{ "content_hash": "408efe5885b3e34a8f25088760d90697", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 70, "avg_line_length": 28.058823529411764, "alnum_prop": 0.5031446540880503, "repo_name": "androomerrill/scikit-nano", "id": "3ba7d844daa72193c1951d20b59ee8c29591d9e0", "si...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
{ "content_hash": "2b46537f2b34fff2a79aa387bea6b426", "timestamp": "", "source": "github", "line_count": 365, "max_line_length": 234, "avg_line_length": 28.78904109589041, "alnum_prop": 0.7215454891511229, "repo_name": "mahabs/nitro", "id": "90d1dc483daf4363c800e8bad1315695ebb71e60", "size": "11122"...
from collections import defaultdict class HypGraph(object): def __init__(self): self.nodes = defaultdict(str) # {id = label} self.edges = [] # (parent_node_id, child_node_id) self.costs = defaultdict(float) # {node_id = cost} self.word_probs = defaultdict(float) # {node_id = word_prob} def get_id(self...
{ "content_hash": "9c56daedf82d0cd0f8f62fe97f0f333d", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 97, "avg_line_length": 32.4296875, "alnum_prop": 0.6357504215851602, "repo_name": "shuoyangd/nematus", "id": "d0dffad9b28e15e2450c8a18918ef4b2493772c7", "size": "4198", ...
import logging import pyauto_functional import chromeos_network # pyauto_functional must come before chromeos_network class ChromeosWifi(chromeos_network.PyNetworkUITest): """Tests for ChromeOS wifi.""" def testNetworkInfoAndScan(self): """Get basic info on networks.""" # NetworkScan will also call Get...
{ "content_hash": "c95e0aaf4486ab92d8c87c70f12b32b2", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 78, "avg_line_length": 32.333333333333336, "alnum_prop": 0.7027491408934707, "repo_name": "Crystalnix/house-of-life-chromium", "id": "e757ebfbeef543d3cce9de3ddf5697f4b2b4b591...
import os import numpy as np from . import get_data_home from .tools import download_with_progress_bar DATA_URL = ('http://lambda.gsfc.nasa.gov/data/map/dr4/' 'skymaps/7yr/raw/wmap_band_imap_r9_7yr_W_v4.fits') MASK_URL = ('http://lambda.gsfc.nasa.gov/data/map/dr4/' 'ancillary/masks/wmap_temper...
{ "content_hash": "e8d9b3f355765f611e44fb61e11f39e7", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 36.8, "alnum_prop": 0.6362876254180602, "repo_name": "astroML/astroML", "id": "e21583778ca2258d846fffa26659b567c30090f2", "size": "2392", "binary":...
from __future__ import print_function from tweepy.models import ModelFactory from tweepy.utils import import_simplejson from tweepy.error import TweepError class Parser(object): def parse(self, method, payload): """ Parse the response payload and return the result. Returns a tuple that c...
{ "content_hash": "25aede723b88e4133591a0e013ece34a", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 79, "avg_line_length": 28.80952380952381, "alnum_prop": 0.583801652892562, "repo_name": "gemmaan/moviesenal", "id": "046cf50994e10ac7695a8585d6059706b03109f0", "size": "31...
"""A chart parser and some grammars. (Chapter 22)""" # (Written for the second edition of AIMA; expect some discrepanciecs # from the third edition until this gets reviewed.) from collections import defaultdict import urllib.request import re # ________________________________________________________________________...
{ "content_hash": "a09a2cb25c57512605367be5d8955aac", "timestamp": "", "source": "github", "line_count": 398, "max_line_length": 114, "avg_line_length": 38.221105527638194, "alnum_prop": 0.562056271364712, "repo_name": "sofmonk/aima-python", "id": "bf0b6a6aa8809c58143af3a146684119ab04a235", "size": ...
from setuptools import setup, find_packages REQUIREMENTS = ( 'django>=1.11,<3', ) TEST_REQUIREMENTS = ( 'mock', 'django-debug-toolbar', ) from contact_form import VERSION setup( name="django-contact-form-gv", version=VERSION, author="Aaron Madison", description="Django Contact Form using ...
{ "content_hash": "a5beb58074a12cbc729b395abc9ece5d", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 79, "avg_line_length": 32.62222222222222, "alnum_prop": 0.6151226158038147, "repo_name": "madisona/django-contact-form", "id": "00f29bc9ec2eafff69aa2bf7b63b036adbda43c9", "...
from . import test_account_followup checks = [ test_account_followup, ] # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
{ "content_hash": "48f7c303a646fbd5257c96bac12f7a83", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 65, "avg_line_length": 20.428571428571427, "alnum_prop": 0.7552447552447552, "repo_name": "diogocs1/comps", "id": "cf0ea3acbe63fd7e6460ee85059676f44a68ebf7", "size": "1128",...
""" Implement the cmath module functions. """ import cmath import math from numba.core.imputils import Registry, impl_ret_untracked from numba.core import types, cgutils from numba.core.typing import signature from numba.cpython import builtins, mathimpl from numba.core.extending import overload registry = Registry...
{ "content_hash": "21edfd33342ba77f52f007dbd0dce9f8", "timestamp": "", "source": "github", "line_count": 542, "max_line_length": 83, "avg_line_length": 32.48523985239852, "alnum_prop": 0.5363207815073551, "repo_name": "numba/numba", "id": "4305e9d45dde68b5f32b56e462bd5b064bfaed18", "size": "17607", ...
""" Test for softmax_regression.ipynb """ import os from pylearn2.testing.skip import skip_if_no_data from pylearn2.config import yaml_parse def test(): skip_if_no_data() dirname = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..') with open(os.path.join(dirname, 'sr_dataset.yaml'), 'r') a...
{ "content_hash": "79e1b6dcbf8ceaafc221ad0f7fbb8d54", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 76, "avg_line_length": 24.8125, "alnum_prop": 0.5936188077246012, "repo_name": "KennethPierce/pylearnk", "id": "a14ce0b609595713beca48d4060ac87e9db71034", "size": "1191", ...
import argparse import collections import re import sys import matplotlib.pyplot as plt import numpy as np import pysam from matplotlib.backends.backend_pdf import PdfPages plt.switch_backend('agg') def readFileReferenceFree(file, delim): with open(file, 'r') as dest_f: data_array = np.genfromtxt(dest_f...
{ "content_hash": "cf3ec6d0eafb817f73b70ef580162d43", "timestamp": "", "source": "github", "line_count": 253, "max_line_length": 188, "avg_line_length": 43.81818181818182, "alnum_prop": 0.5616994407360635, "repo_name": "mblue9/tools-iuc", "id": "12215651e4d3f57cb8116ad1d086e6fcfc5eba9f", "size": "11...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import glob import os import xml.dom.minidom as DOM from textwrap import dedent import coverage from mock import patch from pants.backend.python.tasks.pytest_run imp...
{ "content_hash": "ec2109f54bff94c74ebf9917e6c8b176", "timestamp": "", "source": "github", "line_count": 383, "max_line_length": 119, "avg_line_length": 35.58485639686684, "alnum_prop": 0.6094357619781349, "repo_name": "slyphon/pants", "id": "fae836469436e77e362738035c0e20b38d62fd04", "size": "13776...
import datetime import os from typing import Any, Dict, List import orjson from zerver.data_import.import_util import SubscriberHandler, ZerverFieldsT, build_recipients from zerver.data_import.rocketchat import ( build_custom_emoji, build_reactions, categorize_channels_and_map_with_id, convert_channel...
{ "content_hash": "9e7f4ed9ed43dc9dfe4ae95de0694180", "timestamp": "", "source": "github", "line_count": 1046, "max_line_length": 169, "avg_line_length": 43.44933078393881, "alnum_prop": 0.6006424925189228, "repo_name": "andersk/zulip", "id": "2447f089b85202ff45f756b71ba622002920ddf5", "size": "4544...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Addition' db.create_table(u'reserved_addition', ( (u'namedobject_ptr'...
{ "content_hash": "9f37bc977a67c0759981e0b69fa506fa", "timestamp": "", "source": "github", "line_count": 218, "max_line_length": 195, "avg_line_length": 75.94954128440367, "alnum_prop": 0.5670713293471039, "repo_name": "Strangemother/coffee", "id": "63fd3db1e941987db534356383085ef375961edd", "size":...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0003_auto_20160209_1048'), ] operations = [ migrations.AddField( model_name='group', name='count', f...
{ "content_hash": "facc736c5e8391ce5e8f838eefb438cb", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 49, "avg_line_length": 20.77777777777778, "alnum_prop": 0.5882352941176471, "repo_name": "xkmato/casepro", "id": "50d99e1606be4f087dd5f63f2c5a03326c002260", "size": "398", ...
from __future__ import absolute_import from __future__ import print_function from typing import ( AbstractSet, Any, AnyStr, Callable, Dict, Iterable, Mapping, MutableMapping, Optional, Sequence, Set, Text, Tuple, TypeVar, Union ) from django.utils.html import escape from django.utils.translation import ugettex...
{ "content_hash": "4b3b2151e75e537367f4358772b23be2", "timestamp": "", "source": "github", "line_count": 3792, "max_line_length": 223, "avg_line_length": 44.38660337552743, "alnum_prop": 0.6224081181601056, "repo_name": "AZtheAsian/zulip", "id": "dce86992dbd8649fd1ecffd03a163650739c4095", "size": "1...
""" Copyright 2012 GroupDocs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
{ "content_hash": "7e9c7a616704d0781b63553b5fdb4af0", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 77, "avg_line_length": 31.78787878787879, "alnum_prop": 0.684461391801716, "repo_name": "liosha2007/temporary-groupdocs-python3-sdk", "id": "ce5ada44cc098e3fce597b6efafae1b01...
import os import shutil import tempfile def try_delete(filename): try: os.unlink(filename) except: if os.path.exists(filename): shutil.rmtree(filename, ignore_errors=True) class TempFiles: def __init__(self, tmp, save_debug_files=False): self.tmp = tmp self.save_debug_files = save_debug_fi...
{ "content_hash": "3213dfed8c5c8b588c0116f12724171d", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 110, "avg_line_length": 24.73170731707317, "alnum_prop": 0.6538461538461539, "repo_name": "slightperturbation/Cobalt", "id": "27da10829fae6158b7ec61e5d45d2a0db4905414", "si...
from __future__ import absolute_import, unicode_literals import os from virtualenv.util.path import Path from ..via_template import ViaTemplateActivator class BatchActivator(ViaTemplateActivator): @classmethod def supports(cls, interpreter): return interpreter.os == "nt" def templates(self): ...
{ "content_hash": "ef636a6c86098c27364f9964b0d3246a", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 96, "avg_line_length": 31.869565217391305, "alnum_prop": 0.6998635743519782, "repo_name": "TeamSPoon/logicmoo_workspace", "id": "4149712d879f3fa72792d4e8d8e885590af1d9b9", ...
from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib from tempest import config from tempest.lib.common import rest_client from tempest.lib.services.compute import flavors_client as flavor_cli from tempest.lib.services.compute import floating_ips_client as floatingip_cli from t...
{ "content_hash": "32b8990b401b834b8bae6838ecc0d216", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 78, "avg_line_length": 34.55135135135135, "alnum_prop": 0.6334480600750939, "repo_name": "ityaptin/ceilometer", "id": "34bb33f21ee89b27fe7dd1bd2447a9447777f421", "size": "...