text
stringlengths
4
1.02M
meta
dict
import binascii import hashlib from neo.Core.Cryptography.Crypto import Crypto from neo.Core.Fixed8 import Fixed8 from neo.Core.UInt160 import UInt160 from neo.Core.State.ContractState import ContractPropertyState # used for ApplicationEngine.Run from neo.SmartContract import TriggerType from neo.VM import OpCode from...
{ "content_hash": "16e22765df2570cc1571ff09abd44f6f", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 170, "avg_line_length": 38.40886699507389, "alnum_prop": 0.6456329357445171, "repo_name": "hal0x2328/neo-python", "id": "a7cb982ef1ae65b528ddef38d6dd04a6fb0e9f9b", "size":...
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): ...
{ "content_hash": "876d477188b6fd813970c9a89a07028f", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 97, "avg_line_length": 28.096153846153847, "alnum_prop": 0.5859000684462696, "repo_name": "PCATLMarketing/sovereigncoin", "id": "44dc6fa79c9afc1f505cbde73747ed27ccd16b8b", ...
import unittest from datetime import timedelta from airflow import DAG, models from airflow.sensors.time_delta_sensor import TimeDeltaSensor from airflow.utils.timezone import datetime DEFAULT_DATE = datetime(2015, 1, 1) DEV_NULL = '/dev/null' TEST_DAG_ID = 'unit_tests' class TestTimedeltaSensor(unittest.TestCase):...
{ "content_hash": "2b8473486c8aebbd3debb295c4e88c28", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 84, "avg_line_length": 33.16, "alnum_prop": 0.6803377563329313, "repo_name": "wileeam/airflow", "id": "c06694ee0b81dc8dc09db4425b3b6c774d35fb2a", "size": "1616", "binary"...
''' Copyright (c) 2016 Genome Research Ltd. 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, distr...
{ "content_hash": "7689db62c61d83e4ba087cb48f132ec8", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 113, "avg_line_length": 44.719298245614034, "alnum_prop": 0.6939976461357396, "repo_name": "jeremymcrae/denovoFilter", "id": "a6f691cb80056e0639e230a33537a89bb2ee078f", "si...
from buildbot import config class ConfigErrorsMixin(object): def assertConfigError(self, errors, substr_or_re): if len(errors.errors) > 1: self.fail("too many errors: %s" % (errors.errors,)) elif len(errors.errors) < 1: self.fail("expected error did not occur") elif...
{ "content_hash": "5e91f874dbd300de7772bd956c095b4d", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 70, "avg_line_length": 36.53846153846154, "alnum_prop": 0.5915789473684211, "repo_name": "denny820909/builder", "id": "3747977e8dd7d3ba01f94a4808d5b1ead5f7eef2", "size": "1...
import sys import inspect PY2 = sys.version_info[0] == 2 def with_metaclass(meta, *bases): # Taken from flask/six. class metaclass(meta): def __new__(cls, name, this_bases, d): return meta(name, bases, d) return type.__new__(metaclass, 'temporary_class', (), {}) if PY2: text_typ...
{ "content_hash": "6bae5600aa84f0e6f89b19fd9fd0f916", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 32.56923076923077, "alnum_prop": 0.5710911667453944, "repo_name": "Drudenhaus/aws-ec2rescue-linux", "id": "2ed0fe78792602e21bc9e84a11cec5284ccc42b4", ...
""" Management class for Pool-related functions (join, eject, etc). """ from oslo_log import log as logging from oslo_serialization import jsonutils import six import six.moves.urllib.parse as urlparse from nova.compute import rpcapi as compute_rpcapi import nova.conf from nova import exception from nova.i18n import ...
{ "content_hash": "112b9573f1f79c4cf97cd3690e397f30", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 79, "avg_line_length": 48.346666666666664, "alnum_prop": 0.559477845192131, "repo_name": "phenoxim/nova", "id": "5487d4fb8f79d334c95fa7b72c277c233e739312", "size": "11533"...
""" Base classes for device interfaces. :Device: The base class for all devices. This defines the interface that must be implemented by all devices and therefore any workload and instrumentation can always rely on. :AndroidDevice: Implements most of the :class:`Device` interface, and ...
{ "content_hash": "c7b0f983ac8e7b5e36ed101841a64511", "timestamp": "", "source": "github", "line_count": 434, "max_line_length": 115, "avg_line_length": 39.235023041474655, "alnum_prop": 0.6116983791402396, "repo_name": "freedomtan/workload-automation", "id": "f0338a487be7fca23f81ddab905d3231ecddcb95"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('account', '0003_auto_20150915_2025'), ] operations = [ migrations.RemoveField( model_name='user', name='problems_status', ...
{ "content_hash": "9b27e78a59c43b7bf3c8f237f2f8c821", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 47, "avg_line_length": 19.705882352941178, "alnum_prop": 0.5940298507462687, "repo_name": "wangmingjob/OnlineJudge", "id": "64f8ae03913cb40e15cbc80b32966b0245c8edc1", "size...
""" Tests ----- This module contains all the tests related to the app. """ #!/usr/bin/env python3 import os import pegasus import unittest import tempfile from bs4 import BeautifulSoup class PegasusTestCase(unittest.TestCase): def setUp(self): """ Set up the test environment: 1. Create a ...
{ "content_hash": "905c56c3a422565c24837610252c4ee0", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 89, "avg_line_length": 37.51807228915663, "alnum_prop": 0.5862235067437379, "repo_name": "blaringsilence/pegasus", "id": "885bafb451a208570e208e52532880ead1af82c8", "size"...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest from mock import ANY from ansible.module_utils.network.fortios.fortios import FortiOSHandler try: from ansible.modules.network.fortios import fortios_log_syslogd4_filter except ImportError: ...
{ "content_hash": "3b6f5304d9764749373c14bbc64b3c2b", "timestamp": "", "source": "github", "line_count": 239, "max_line_length": 133, "avg_line_length": 35.60669456066945, "alnum_prop": 0.5841363102232667, "repo_name": "thaim/ansible", "id": "5e16cc4804941e68a944b5b00cd5d39bf3bced1a", "size": "9206"...
import webapp2 from pages import author_list class AuthorPage(webapp2.RequestHandler): """The amcgee user home page of the GiR App Labs at AAMU app.""" def get(self): """HTTP GET handler for the amcgee Users page.""" self.response.headers['Content-Type'] = 'text/plain' self.response...
{ "content_hash": "06bd5c34ed51ca7efa558a09afebd6c1", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 68, "avg_line_length": 23.58823529411765, "alnum_prop": 0.6758104738154613, "repo_name": "GIR-at-AAMU/gir_app_labs_at_aamu", "id": "d27aa10ccb282cd08064de9796a6a90297d6a521",...
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User class EmailBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = User.objects.get(email__iexact=username) if user.check_password(password): ...
{ "content_hash": "655117270d35903184ecfcdcd37d5ee4", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 77, "avg_line_length": 40.90909090909091, "alnum_prop": 0.6888888888888889, "repo_name": "paulcwatts/django-auth-utils", "id": "56221b13b6c6de29a0be077de868cb52452ab7b3", "...
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, map_error, ) from azure.core...
{ "content_hash": "aa26bb3b3dd5bbe41f8eb234c98d2f47", "timestamp": "", "source": "github", "line_count": 693, "max_line_length": 234, "avg_line_length": 47.544011544011546, "alnum_prop": 0.6515418234794221, "repo_name": "Azure/azure-sdk-for-python", "id": "4b1f054c85b052cdd16fcc8226013491a7038ee8", ...
from __future__ import unicode_literals import autoslug.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ('organizations', '0002_auto_20161210_1948'), ] ...
{ "content_hash": "74c40c65bd8df02ccd713cc77514dac1", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 171, "avg_line_length": 43, "alnum_prop": 0.6188068756319515, "repo_name": "watchdogpolska/watchdog-kj-kultura", "id": "1bf2674b91617d8afdbe453ce92156210b662c25", "size": "...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('signage', '0005_logentry_signage'), ] operations = [ migrations.AlterField( model_name='blade', name='number', field=models.CharField(db_column='numero',...
{ "content_hash": "34f40099622cf7bb0e892642dcc7ecae", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 100, "avg_line_length": 24, "alnum_prop": 0.5911458333333334, "repo_name": "GeotrekCE/Geotrek-admin", "id": "6086510f20477ea4e950de6b1b190203cf0b9d48", "size": "435", "bi...
""" Define the names making up the domain specific language """ from pyshould.expectation import ( Expectation, ExpectationNot, ExpectationAll, ExpectationAny, ExpectationNone, OPERATOR ) from pyshould.dumper import Dumper __author__ = "Ivan -DrSlump- Montes" __email__ = "drslump@pollinimini.net" __licens...
{ "content_hash": "fef315f4e2393a46f2ac9cba2e3332f2", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 76, "avg_line_length": 24.56140350877193, "alnum_prop": 0.695, "repo_name": "drslump/pyshould", "id": "f7b26ef76500c1df8917fbf50b851aecd7f04b24", "size": "1400", "binary"...
import time from math import ceil import appleseed as asr from ..logger import get_logger from ..utils import util logger = get_logger() class FinalTileCallback(asr.ITileCallback): """ The TileCallback is responsible for sending the results of the render back to Blender """ def __init__(self, engin...
{ "content_hash": "b07c1e651fb29785a830839856985076", "timestamp": "", "source": "github", "line_count": 248, "max_line_length": 121, "avg_line_length": 39.483870967741936, "alnum_prop": 0.478656045751634, "repo_name": "dictoon/blenderseed", "id": "71978958693942a01eb8d23a12f870249f80d550", "size": ...
import os import time import fasteners from conans.util.files import load, save from conans.util.log import logger class NoLock(object): def __enter__(self): pass def __exit__(self, exc_type, exc_val, exc_tb): # @UnusedVariable pass class SimpleLock(object): def __init__(self, file...
{ "content_hash": "08b7c07bc0ef865bbc399c7a8203bb4e", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 89, "avg_line_length": 30.625, "alnum_prop": 0.5488435374149659, "repo_name": "conan-io/conan", "id": "cce0a7a1205ce181d83d60c8992fb5e932ed6aa4", "size": "3675", "binary...
""" ===================================================== Transform EEG data using current source density (CSD) ===================================================== This script shows an example of how to use CSD [1]_ [2]_ [3]_. CSD takes the spatial Laplacian of the sensor signal (derivative in both x and y). It does...
{ "content_hash": "b87c598cded25e120fe2076a631927fa", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 79, "avg_line_length": 41.21875, "alnum_prop": 0.5691180187010362, "repo_name": "mne-tools/mne-tools.github.io", "id": "e5cddbd49fe276f171459458ebbf80bc51cbb9a5", "size": "...
"""Tests for core.domain.question_services.""" from __future__ import annotations import logging import re from core import feconf from core.domain import question_domain from core.domain import question_fetchers from core.domain import question_services from core.domain import skill_domain from core.domain import s...
{ "content_hash": "8c33afa20556f5c3b7480c7a5a2c3401", "timestamp": "", "source": "github", "line_count": 3220, "max_line_length": 135, "avg_line_length": 39.0639751552795, "alnum_prop": 0.47691316998712097, "repo_name": "kevinlee12/oppia", "id": "edbae4be0c716c7daa3c69eec6abf642d372f4e4", "size": "1...
from __future__ import absolute_import, division, print_function # huckle's imports from . import package from . import config from . import hutils from . import hclinav import sys # navigate through the command line sequence for a given cliname def navigate(argv): nav = hclinav.navigator(root=config.url, apinam...
{ "content_hash": "9fc93ee65e914d88d4e6d1cbe5563606", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 72, "avg_line_length": 26.418367346938776, "alnum_prop": 0.5268443414445731, "repo_name": "cometaj2/huckle", "id": "ba993707e3ec5d90f9d126cd5f345ae0d435628b", "size": "2589...
"""Unit tests for feed_utility.py.""" from typing import Dict from feeds import feed_utility from feeds.tests.fixtures import * # pylint: disable=wildcard-import def test_flatten_dict() -> None: """Test flattening of dict.""" input_dict = {"a": {"b": "c"}, 1: {"a": [1]}, "p": {"q": {"r": "s"}}} expected_outpu...
{ "content_hash": "eb1da0041c09c26b4253ea88c5e027a1", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 80, "avg_line_length": 34.81927710843374, "alnum_prop": 0.6359861591695501, "repo_name": "chronicle/cli", "id": "40c8f504dc7de2d711aab311cea9ec89f5925984", "size": "3466", ...
import boto3 import uuid import sys import getopt elbclient = boto3.client('elb') def usage (): print "elb_helper.py -l <LB name> -i <instance> <-d[eregister]|-r[egister]|-s[status]>" if(len(sys.argv) < 6): usage() sys.exit(2) #Let's print the status of our instances def printinstances( loadblancer, inst...
{ "content_hash": "d16d12c46cf3edd9edaaf48f29d53252", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 121, "avg_line_length": 30.964912280701753, "alnum_prop": 0.6130311614730878, "repo_name": "ceizner/codechallenge", "id": "d7cba5bde528467c4631bbc1551ba5fc34a00ac7", "size"...
from google.cloud import datacatalog_v1beta1 def sample_search_catalog(): # Create a client client = datacatalog_v1beta1.DataCatalogClient() # Initialize request argument(s) request = datacatalog_v1beta1.SearchCatalogRequest( query="query_value", ) # Make the request page_result ...
{ "content_hash": "ac4842c78666ac13c2b4b8a81c83c5e3", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 68, "avg_line_length": 25.75, "alnum_prop": 0.7165048543689321, "repo_name": "googleapis/python-datacatalog", "id": "8e50383bf7288b6871139a72e53ef0adcf9e554d", "size": "191...
"""myBlog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
{ "content_hash": "e309d85f3cff53d5cd35cce217713606", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 77, "avg_line_length": 41.21875, "alnum_prop": 0.6603487490523123, "repo_name": "ruter/myBlog", "id": "ee0eb3c326e42652fdec89b7a6ecbd46a97043ef", "size": "1343", "binary"...
import numpy as np import cv2 cap = cv2.VideoCapture(1) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) #SIFT sift = cv2.SIFT() kp = sift.detect(gray,None) img=cv2.drawKeypoints(gray,k...
{ "content_hash": "26f975f3c979f68cdebc330ef61e732d", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 83, "avg_line_length": 24.869565217391305, "alnum_prop": 0.6748251748251748, "repo_name": "wasit7/cs634", "id": "9631507f63dd1637cfadb922da8fc47661abb0a1", "size": "572", ...
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize from Cython.Distutils import build_ext import numpy,appdirs,os,pdb def run_setup(*ags): pkgs = [ 'dstoolm4' ] exts = [] setup(script_args = ags,name = 'dstoolm4',version = '4.0...
{ "content_hash": "c9080f7f7929e6e7f7515a1611480e6c", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 97, "avg_line_length": 28.14814814814815, "alnum_prop": 0.6355263157894737, "repo_name": "ctogle/dstoolm", "id": "9d8b59d47d1ac4ecdf3eb4182aa3c67a2193127a", "size": "779", ...
import django.db.models.deletion import django_fsm from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('marketplace', '0035_offeringpermission'), ('google', '0001_initial'), ] operations = [ migrations.CreateModel( name='G...
{ "content_hash": "a0918d7100ee985ed32055fb31907176", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 76, "avg_line_length": 32.8125, "alnum_prop": 0.3595238095238095, "repo_name": "opennode/waldur-mastermind", "id": "aa92d4b17055352bedb6a9a746f617319e46c02f", "size": "2150...
import httplib as http from flask import request from framework import sentry from framework.auth.decorators import must_be_logged_in from framework.exceptions import HTTPError from osf.models import AbstractNode as Node, NotificationSubscription from website.notifications import utils from website.notifications.con...
{ "content_hash": "aa3dd85b2b68649128cc3aa3ea396c17", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 106, "avg_line_length": 35.910714285714285, "alnum_prop": 0.6372451516658378, "repo_name": "cwisecarver/osf.io", "id": "1645bd484c9ef580ca591fe058104b0e78f0dd83", "size": ...
import connector import hash import almanac import audit import auth import cache import calendar import chatlog import conduit import config import conpherence import countdown import daemon import dashboard import dbdatetime import differential import diviner import doorkeeper import draft import drydock import fact...
{ "content_hash": "a631f355f18890d56d9b0ebc99225084", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 19, "avg_line_length": 14.87719298245614, "alnum_prop": 0.8643867924528302, "repo_name": "veblush/PyPhabricatorDb", "id": "31fd4bc20352a3a9be245580890f354ffd1e67d1", "size"...
import os from oslo_config import cfg import heat_integrationtests IntegrationTestGroup = [ cfg.StrOpt('username', default=os.environ.get('OS_USERNAME'), help="Username to use for API requests."), cfg.StrOpt('password', default=os.environ.get('OS_PASSWORD'), ...
{ "content_hash": "92530c6782ff0076b5984192153e5668", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 79, "avg_line_length": 41.22794117647059, "alnum_prop": 0.5639379347244515, "repo_name": "takeshineshiro/heat", "id": "b45a8d8c0fa6c1e99709ecabd43f19ef7426e247", "size": "...
from .CoordSys import CoordSys from .geocoords import CSGeo as ModuleCSGeo class CSGeo(CoordSys, ModuleCSGeo): """ Python manager for geographic coordinate systems. Implements `CoordSys`. """ DOC_CONFIG = { "cfg": """ [coordsys] # WGS84 (latitude, longitude) coordi...
{ "content_hash": "611726b7d9248da856173c0df93ea380", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 116, "avg_line_length": 25.26153846153846, "alnum_prop": 0.5286236297198539, "repo_name": "geodynamics/spatialdata", "id": "cbbd2878ec07bc2de97e6998340041a0b5afdc23", "size...
""" werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed_url=request.u...
{ "content_hash": "dd749451c0c97735b2a74c61700cd503", "timestamp": "", "source": "github", "line_count": 342, "max_line_length": 78, "avg_line_length": 44.707602339181285, "alnum_prop": 0.539241334205363, "repo_name": "Glottotopia/aagd", "id": "306fcf55ade9aef3df9fd964eb073874a6791838", "size": "153...
from django.db import models from django.contrib.contenttypes.models import ContentType from django.template.defaultfilters import slugify from exceptions import IllegalMove, SameLevelMove, WrongLevelMove slug_length = 50 class LocationBase(models.Model): name = models.CharField(max_length=255) slug = model...
{ "content_hash": "432cbd597f863e93d63e5641043d55d9", "timestamp": "", "source": "github", "line_count": 246, "max_line_length": 104, "avg_line_length": 32.764227642276424, "alnum_prop": 0.61712158808933, "repo_name": "uq-eresearch/uqam", "id": "b6888f1be7ed3b99dac3739aad49bb86178ca787", "size": "80...
from airflow.ti_deps.deps.dag_ti_slots_available_dep import DagTISlotsAvailableDep from airflow.ti_deps.deps.dag_unpaused_dep import DagUnpausedDep from airflow.ti_deps.deps.dagrun_exists_dep import DagrunRunningDep from airflow.ti_deps.deps.exec_date_after_start_date_dep import ExecDateAfterStartDateDep from airflow.t...
{ "content_hash": "97430dbb563462511eaba42f19962e5e", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 90, "avg_line_length": 43.549549549549546, "alnum_prop": 0.7277616880430285, "repo_name": "r39132/airflow", "id": "4ec74a7e1e0a5d982a5f6778d8cf4e82d979215b", "size": "5646...
""" Copyright (C) 2012 by Adam Ewing (adam.ewing@gmail.com) Released under the MIT license, see LICENSE.txt """ import re import os import subprocess import tempfile import pysam import sys import gzip import argparse import peakparser from string import maketrans def checkfile(fname): try: open(fname)...
{ "content_hash": "113a938c698fce90980e5c0c12c37495", "timestamp": "", "source": "github", "line_count": 658, "max_line_length": 148, "avg_line_length": 38.525835866261396, "alnum_prop": 0.5704536489151874, "repo_name": "adamewing/GRIPper", "id": "1a2e1a0bb0a35368a061eec20643d5c25e364a61", "size": "...
""" A memento for a workbench window. """ # Enthought library imports. from traits.api import Any, Dict, HasTraits, Str, Tuple class WorkbenchWindowMemento(HasTraits): """ A memento for a workbench window. """ # The Id of the active perspective. active_perspective_id = Str # The memento for the ed...
{ "content_hash": "6c79e5fffd491eb864fbed1de52a4416", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 79, "avg_line_length": 25.333333333333332, "alnum_prop": 0.6148325358851675, "repo_name": "pankajp/pyface", "id": "3b3ec350682e87ac0ea4364a148e2b6cde9469ae", "size": "836",...
from setuptools import find_packages, setup version = '2.3' setup(name='op_robot_tests', version=version, description="", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='', author='', author_email...
{ "content_hash": "ebfbf50942fd328a442c14fa90da0673", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 96, "avg_line_length": 25.046511627906977, "alnum_prop": 0.4911792014856082, "repo_name": "bubanoid/robot_tests", "id": "9af4480dbc3ac36a55dadfdc4afc80735cbf3ced", "size": ...
"""Models defining a product's material properties"""
{ "content_hash": "5d311cdeb73841746b3bd1b5f29e3e48", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 53, "avg_line_length": 54, "alnum_prop": 0.7592592592592593, "repo_name": "byteweaver/django-eca-catalogue", "id": "1c89c30972135e10c5b3b1fc231ce0ab9aa462b4", "size": "54", ...
from collections import Counter import StringIO import gzip import hashlib import mailbox import os import random import re import string import sys import tempfile import urlparse import requests import bs4 def normalize_email(email): if email: return email.replace(' at ', '@').lower() class MailArchive...
{ "content_hash": "0ee6210def741149323c5afa3ab32785", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 128, "avg_line_length": 29.342245989304814, "alnum_prop": 0.537452159650082, "repo_name": "scottyallen/mailmark", "id": "cf77ac18dc8ca20204898f9a0067faf9aac956ad", "size":...
from trac.core import * from trac.resource import Resource from trac.web.api import IRequestHandler from trac.web.chrome import chrome_info_script, web_context from trac.wiki.api import WikiSystem from trac.wiki.formatter import format_to class WikiRenderer(Component): """Wiki text renderer.""" implements(IR...
{ "content_hash": "84180aaa3bb08d86a509436774d4a050", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 76, "avg_line_length": 36.18604651162791, "alnum_prop": 0.6330334190231363, "repo_name": "walty8/trac", "id": "e64328538f65941142034231431fa7a06bdfb7a9", "size": "2048", ...
from class_type import ClassType class FileClass(ClassType): def __init__(self): super().__init__("file") FILE_CLASS = FileClass() FILE_TYPE = FILE_CLASS.instance()
{ "content_hash": "5bdb9fa811bf084d077496c805495f26", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 33, "avg_line_length": 18.1, "alnum_prop": 0.6519337016574586, "repo_name": "PiJoules/python-type-inference", "id": "07edd44c3602dce5e8acc4f73773db418f3da382", "size": "181...
""" Cobbler Tops ============ Cobbler Tops is a master tops subsystem used to look up mapping information from Cobbler via its API. The same cobbler.* parameters are used for both the Cobbler tops and Cobbler pillar modules. .. code-block:: yaml master_tops: cobbler: {} cobbler.url: https://example.com/cobbl...
{ "content_hash": "d2e871f8bfd4e5dae85cb30fcb43f5bd", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 87, "avg_line_length": 24.946428571428573, "alnum_prop": 0.6420901932712957, "repo_name": "saltstack/salt", "id": "7a5d66662ab4f10f12a180c35d2ab7816115e14b", "size": "1397"...
import clr clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument clr.AddReference("RevitAPI") import Autodesk clr.AddReference("RevitNodes") import Revit c...
{ "content_hash": "9b855d20f96fc649774de7384ce05e33", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 66, "avg_line_length": 27.428571428571427, "alnum_prop": 0.7664930555555556, "repo_name": "dimven/SpringNodes", "id": "4364c4f900b15c7bf3a31f04fa31fd5f777f354b", "size": "1...
import os import re import sys import unittest import PRESUBMIT sys.path.append( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from PRESUBMIT_test_mocks import MockOutputApi, MockChange class MockInputApi(object): """ Mocked input api for unit testing of presubmit. This lets us m...
{ "content_hash": "3df262af65f2778ee688bc63f6078ac6", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 79, "avg_line_length": 35.91034482758621, "alnum_prop": 0.6982907624351834, "repo_name": "google-ar/WebARonARCore", "id": "0fd049de560336c32bc1f1b1e73f0f59cd1d10cb", "size...
import os from dotenv import load_dotenv basedir = os.path.abspath(os.path.dirname(__file__)) load_dotenv(os.path.join(basedir, '.env')) class Config(object): # DB SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') # fix MySQL - https://www.pythonanywhere.com/forums/topic/2465/ SQLALCHEMY_POOL_RECYC...
{ "content_hash": "a95a050dd8962af37bb8c9a0b35d1847", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 79, "avg_line_length": 33.166666666666664, "alnum_prop": 0.6721105527638191, "repo_name": "EeOneDown/spbu4u", "id": "d4deea6d80919b41a17f7812f0d6bc4b8b11a702", "size": "796...
from __future__ import absolute_import from collections import namedtuple from datetime import datetime, timedelta import pytz from casexml.apps.case.dbaccessors import get_open_case_docs_in_domain from casexml.apps.case.mock import CaseBlock from casexml.apps.case.models import CommCareCase from casexml.apps.case.xml ...
{ "content_hash": "a9a98ce0896ebf63eb374d9321c48a52", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 118, "avg_line_length": 35.494505494505496, "alnum_prop": 0.6052631578947368, "repo_name": "puttarajubr/commcare-hq", "id": "aacc8bff4c388724027f85dd76debbf80c45b2fb", "si...
import listmixin # Uses recipe 440656 import array # Public domain class BitList(listmixin.ListMixin): """ List of bits. The constructor takes a list or string containing zeros and ones, and creates an object that acts like list(). This class is memory compact (uses 1 byte per every 8 elements). """ ...
{ "content_hash": "9b311efbd2174a616d20e85eb50b983e", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 67, "avg_line_length": 27.24793388429752, "alnum_prop": 0.5665756748559296, "repo_name": "ActiveState/code", "id": "8e96290d2097e26e33411236ff3213023e735077", "size": "329...
"""Support for Home Assistant Cloud binary sensors.""" from __future__ import annotations import asyncio from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.dispatcher import async_dispatche...
{ "content_hash": "ba489f52bb84ee86c4d21e5bcf1f630f", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 72, "avg_line_length": 31.546666666666667, "alnum_prop": 0.6906170752324599, "repo_name": "GenericStudent/home-assistant", "id": "5f4c715c41a763bfa7c862fdce81448177811193", ...
address = "" # your SSH username username = "" # your SSH password password = "" # the directory in which data should be stored on the remote machine before loading into database data_dir = "" # the port used by the database on the remote machine port = "4200"
{ "content_hash": "524c7dd8e490b673a28fb1ab4de91c36", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 97, "avg_line_length": 29, "alnum_prop": 0.7279693486590039, "repo_name": "mmmatthew/floodx_data_preprocessing", "id": "823e7f836a7014e635805c0652fb1387abb3cd6a", "size": "2...
from google.cloud import memcache_v1 def sample_update_instance(): # Create a client client = memcache_v1.CloudMemcacheClient() # Initialize request argument(s) instance = memcache_v1.Instance() instance.name = "name_value" instance.node_count = 1070 instance.node_config.cpu_count = 976 ...
{ "content_hash": "8d4b68ab3d13502a5b5dd3656851102b", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 63, "avg_line_length": 25.06896551724138, "alnum_prop": 0.7015130674002751, "repo_name": "googleapis/python-memcache", "id": "bfe196593045ab9dccf9fae2f44e053183e8f002", "si...
from itsdangerous import URLSafeTimedSerializer def generate_confirmation_token(email): from app import app serializer = URLSafeTimedSerializer(app.config['SECRET_KEY']) return serializer.dumps(email, salt=app.config['SECURITY_PASSWORD_SALT']) def confirm_token(token, expiration=3600): from app impo...
{ "content_hash": "7a2027b57e0c94dcaaf884e56c0f92d9", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 77, "avg_line_length": 27.5, "alnum_prop": 0.6710743801652893, "repo_name": "jlopezvi/Consensus", "id": "9f6a48c18c54694a406e5d8f352aeb02dac6e7f6", "size": "605", "binary...
""" Tests of the web browser interface (smtweb) using Selenium """ from __future__ import print_function from __future__ import unicode_literals import os from time import sleep from builtins import input from unittest import SkipTest try: from selenium import webdriver have_selenium = True except ImportErro...
{ "content_hash": "3550bb7bbb61cde6cd5024a0fbaec49e", "timestamp": "", "source": "github", "line_count": 222, "max_line_length": 139, "avg_line_length": 40.14414414414414, "alnum_prop": 0.6411579892280072, "repo_name": "open-research/sumatra", "id": "54ce96be99439fa28669a83c3a280a9497bb5833", "size"...
import inspect import io import keyword import pydoc from collections import namedtuple from six.moves import range from pygments.token import Token from bpython._py3compat import PythonLexer, py3 from bpython.lazyre import LazyReCompile if not py3: import types _name = LazyReCompile(r'[a-zA-Z_]\w*$') ArgS...
{ "content_hash": "a3dadd1c99f97f0e99bab07b00dd3bff", "timestamp": "", "source": "github", "line_count": 279, "max_line_length": 79, "avg_line_length": 31.36200716845878, "alnum_prop": 0.5516571428571428, "repo_name": "wevial/bpython", "id": "0dfb4feffd277331cadef41526fff9d5878dd330", "size": "9936"...
import unittest from test import test_support import os import subprocess MacOS = test_support.import_module('MacOS') TESTFN2 = test_support.TESTFN + '2' class TestMacOS(unittest.TestCase): def testGetCreatorAndType(self): if not os.path.exists('/Developer/Tools/SetFile'): return tr...
{ "content_hash": "bb41ed89886bc5495829e17f12f803f2", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 90, "avg_line_length": 27.275510204081634, "alnum_prop": 0.5170220725776281, "repo_name": "MalloyPower/parsing-python", "id": "465d3042a20719cdd07057ecc0d6f5023174cfc7", "s...
import GafferUI from Qt import QtGui from Qt import QtWidgets # The pointer is specified via the C++ Pointer class, but to actually change # the qt pointer we use this python code which is triggered by Pointer::changedSignal(). __cursorOverridden = False def __pointerChanged() : global __cursorOverridden pointer...
{ "content_hash": "53c4ede3c857c7ec25a0b4ab23a52d59", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 88, "avg_line_length": 30.5, "alnum_prop": 0.7562841530054645, "repo_name": "appleseedhq/gaffer", "id": "b22ad28dbcd0ba571b2d701fb91d6837d5d5b4e0", "size": "2718", "binar...
import _plotly_utils.basevalidators class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattercarpet.marker.colorbar", **kwargs ): super(OutlinewidthValidator, self).__init__( ...
{ "content_hash": "2c64f71f50acde7e70545c89b3608ea1", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 31.11111111111111, "alnum_prop": 0.5803571428571429, "repo_name": "plotly/python-api", "id": "2e3c6b763b584c267792d07d7afbe7ce8ada3cea", "size": "560...
from datetime import timedelta, datetime from celery import shared_task from django.db import transaction from django.db.models import Q, Count from django.utils import timezone from bestiary.models import Monster from .models import DungeonLog, RiftRaidLog, WorldBossLog, StatisticsReport from .reports.generate impor...
{ "content_hash": "d7bdea58e3c379167e37330c5377da95", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 236, "avg_line_length": 42, "alnum_prop": 0.645983645983646, "repo_name": "porksmash/swarfarm", "id": "39261dfa3c56618989795189638638bbcd1dcb68", "size": "4158", "binary"...
"""Test for deprecation of qiskit.test.mock module.""" from qiskit.test import QiskitTestCase class MockModuleDeprecationTest(QiskitTestCase): """Test for deprecation of qiskit.test.mock module.""" def test_deprecated_mock_module(self): """Test that the mock module is deprecated.""" # pylint:...
{ "content_hash": "4c6a3ceb669d4f19b6983f2a7bfe6940", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 75, "avg_line_length": 44.4375, "alnum_prop": 0.720112517580872, "repo_name": "QISKit/qiskit-sdk-py", "id": "d2355c84717bb357054783ed4b4140ad0bbf9543", "size": "1189", "b...
import csv from os import listdir from os.path import join base_dir = '/home/matt/DL/Autonomous_Driving/Udacity/CarND-Behavioral-Cloning/data/IMG' img_files = listdir('data/IMG/') with open('data/driving_log_test.csv', 'w') as wf: with open('data/driving_log_clean.csv', 'r') as rf: reader = csv.reader(rf)...
{ "content_hash": "5d1c42a52116d91a553d6195d2bfd0de", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 87, "avg_line_length": 33.35294117647059, "alnum_prop": 0.6102292768959435, "repo_name": "dyelax/CarND-Behavioral-Cloning", "id": "d118bbc92b77333a6cadfc1061dca83479ca71c4", ...
import os from collections import defaultdict from helper_functions import sortby, Make_folder_if_not_exists, load_fasta, convert_to_bases, clean_files # ---------------------------------------------------------------------------------------------------------------------------------------------------------------- #...
{ "content_hash": "490ad0f61df50a31124f8f644eab504d", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 176, "avg_line_length": 48.642857142857146, "alnum_prop": 0.509770699198012, "repo_name": "LauritsSkov/Introgression-detection", "id": "8efa6bac79acfc79e1e04cad4ef3f944e8906...
def verse(i): if i == 0: return "No more bottles of beer on the wall, no more bottles of beer.\n" \ "Go to the store and buy some more, " \ "99 bottles of beer on the wall.\n" if i == 1: return "1 bottle of beer on the wall, 1 bottle of beer.\n" \ ...
{ "content_hash": "c5777e45771858e6051e68185acf9b31", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 82, "avg_line_length": 42.8235294117647, "alnum_prop": 0.5357142857142857, "repo_name": "always-waiting/exercism-python", "id": "02b82a1b0f80ac319e52cacfb7e1a37f3a029ad7", ...
from test_framework.test_framework import NavCoinTestFramework from test_framework.util import * class DisableWalletTest (NavCoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_network(self, split=False): self....
{ "content_hash": "0a44bbc268b6720f08d5bdcca4085e12", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 97, "avg_line_length": 40.1025641025641, "alnum_prop": 0.65153452685422, "repo_name": "navcoindev/navcoin-core", "id": "e8fe7907e9df32219758ced692074a480252bce6", "size": "...
import sys import string import json blink_protocol_path = sys.argv[1] browser_protocol_path = sys.argv[2] output_cc_path = sys.argv[3] output_h_path = sys.argv[4] header = """\ // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // fo...
{ "content_hash": "203c50f0738ff3374ea9d60449a76aa8", "timestamp": "", "source": "github", "line_count": 797, "max_line_length": 80, "avg_line_length": 31.158092848180676, "alnum_prop": 0.6471227801715459, "repo_name": "guorendong/iridium-browser-ubuntu", "id": "cc2aa130b6840e6f2585bc825df34929bf91f3d...
import sst import sst.actions sst.actions.set_base_url('http://localhost:%s/' % sst.DEVSERVER_PORT) sst.actions.go_to('/') elem = sst.actions.get_element(tag='body') sst.actions.assert_css_property( elem, 'font-family', 'Ubuntu,Tahoma,sans-serif') elem = sst.actions.get_element(tag='body') sst.actions.assert_cs...
{ "content_hash": "6b089866be0f8879e3602e87e4943ba7", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 74, "avg_line_length": 30.136363636363637, "alnum_prop": 0.7073906485671192, "repo_name": "DramaFever/sst", "id": "2055b03d407f4496fb0c8bf58d786b1cf0a3ec0c", "size": "663",...
import sys sys.path.append("..") import unittest from operator import attrgetter import datetime import pymongo import maroon from maroon import Model, IntProperty, Property from mongo import MongoDB from mock import MockDB from couch import CouchDB from models import SimpleModel, FunModel, PersonModel class TestBa...
{ "content_hash": "6dad51ede22bbb4da5dcdf1ba821d9cf", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 71, "avg_line_length": 31.54074074074074, "alnum_prop": 0.5657585720995773, "repo_name": "nod/maroon", "id": "bb96174153f0771230fc7c07bb6b0916d423245c", "size": "4281", ...
""" SQLite3 backend for django. Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ from __future__ import unicode_literals import datetime import decimal import re import warnings from django.conf import settings from django.db import utils from django.db.backends import utils ...
{ "content_hash": "9d4ee7329539e7afec8f5cd67b6ee02c", "timestamp": "", "source": "github", "line_count": 475, "max_line_length": 117, "avg_line_length": 39.93052631578947, "alnum_prop": 0.62993620498761, "repo_name": "gitaarik/django", "id": "2330a98a5330fefdfa69833b1f8641632dd9a98a", "size": "18967...
import os import pytest from compose.cli.command import get_config_path_from_options from compose.config.environment import Environment from compose.const import IS_WINDOWS_PLATFORM from tests import mock class TestGetConfigPathFromOptions: def test_path_from_options(self): paths = ['one.yml', 'two.yml...
{ "content_hash": "9e6f78e786c3dfc3c16ee70c6f606911", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 104, "avg_line_length": 43.2962962962963, "alnum_prop": 0.6372968349016254, "repo_name": "thaJeztah/compose", "id": "60638864c37107e4f26880707da68e8b96c5e051", "size": "234...
import logging from datetime import datetime from onadata.libs.utils.viewer_tools import get_client_ip class Enum(object): __name__ = "Enum" def __init__(self, **enums): self.enums = enums def __getattr__(self, item): return self.enums[item] def __getitem__(self, item): retu...
{ "content_hash": "2ad2b40dc09cb2bdd334ac1d6409e549", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 78, "avg_line_length": 34.941605839416056, "alnum_prop": 0.6266973052015876, "repo_name": "jomolinare/kobocat", "id": "2ba75f5e8f7a9deb107e91e2f641e1ac523c8940", "size": "...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class UpdateFile(Choreography): def __init__(self, temboo_session): """ Create a ne...
{ "content_hash": "6a150947adde65fabfb9e525759908d3", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 182, "avg_line_length": 41.36842105263158, "alnum_prop": 0.6870229007633588, "repo_name": "lupyuen/RaspberryPiImage", "id": "fbcc726f29db4e3fe105af1467e573693257d3dd", "siz...
from azure.identity import DefaultAzureCredential from azure.mgmt.datashare import DataShareManagementClient """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-datashare # USAGE python synchronization_settings_get.py Before run the sample, please set the values of the client ID, ten...
{ "content_hash": "35d7c80472a063f0893985920f521814", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 142, "avg_line_length": 34.94285714285714, "alnum_prop": 0.7383483237939493, "repo_name": "Azure/azure-sdk-for-python", "id": "7b32c5b8a441652415f811dfe54b4e649623d4f6", "s...
import os, sys, argparse, time, threading import traceback # The path to the ASP python files and tools basepath = os.path.dirname(os.path.realpath(__file__)) # won't change, unlike syspath pythonpath = os.path.abspath(basepath + '/../Python') # for dev ASP libexecpath = os.path.abspath(basepath + '/../...
{ "content_hash": "938731fa38fbe4917e893fb5561720ef", "timestamp": "", "source": "github", "line_count": 201, "max_line_length": 617, "avg_line_length": 39.0547263681592, "alnum_prop": 0.6226751592356687, "repo_name": "NeoGeographyToolkit/StereoPipeline", "id": "ce9bab5abfc32bac86c5ba0a51cec2f80544a19...
import mysql.connector from tests_group.group_helper import Group from tests_contract.contact_helper import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = ...
{ "content_hash": "52900d83263f997dd9e16d4829ed98e2", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 114, "avg_line_length": 42.647887323943664, "alnum_prop": 0.5554821664464994, "repo_name": "werbk/task-7.20", "id": "e28a7bd7e9ff1a576e54998d8788acdd85c025b0", "size": "302...
from core.himesis import Himesis import uuid class HcreateComponent(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule createComponent. """ # Flag this instance as compiled now self.is_compiled = True super(...
{ "content_hash": "6ef586694430d3846ea4b947c09b93f8", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 156, "avg_line_length": 33.97872340425532, "alnum_prop": 0.5203506574827802, "repo_name": "levilucio/SyVOLT", "id": "d805610b15bee9cfa02356f0aeb5ba8ae8ac2ac2", "size": "319...
from __future__ import with_statement import os import tornado.httpserver import tornado.process from core.application import Application import core.db as db from core.settings import Settings from core.util import get_servlet_urlspec from servlets.api import APIServlet import ui_modules api_application = tornado.we...
{ "content_hash": "b742713000a353c8b05c55413a60e554", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 100, "avg_line_length": 29.536585365853657, "alnum_prop": 0.6837324525185797, "repo_name": "pombredanne/pushmanager", "id": "76b8f4f28de332ba1f7897bd60297404b7ecc0c9", "siz...
"""Integrating embed tables Revision ID: 1b8856078bd3 Revises: f2b0984f780 Create Date: 2016-10-28 10:58:42.229165 """ # revision identifiers, used by Alembic. revision = '1b8856078bd3' down_revision = 'f2b0984f780' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by A...
{ "content_hash": "c26691f307faadb06819c25a1cc2f14a", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 122, "avg_line_length": 51, "alnum_prop": 0.7145098039215686, "repo_name": "go-lab/labmanager", "id": "323bceb1ccbf95876d9c64c35d39077ff5454a95", "size": "3825", "binary"...
from flask import render_template, url_for, flash, redirect, session, request, g from forms import LoginForm from app import app @app.route("/") @app.route("/index") @app.route("/home") def index(): return render_template("index.html", name="ehigie aito") @app.route("/login", methods = ["GET", "POST"]) def login(...
{ "content_hash": "addecd781b6ff8b940e9cc93de6c4cd0", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 80, "avg_line_length": 29.88235294117647, "alnum_prop": 0.6692913385826772, "repo_name": "aitoehigie/reddish", "id": "29722e322e6282c835b580816c6aa4c62d74fecb", "size": "50...
import unittest from client import RebillEwayClient, HOSTED_TEST_URL from suds import WebFault # uncomment to enable debugging #import logging #logging.basicConfig(level=logging.DEBUG) #logging.getLogger('suds.client').setLevel(logging.DEBUG) class ClientTestCase(unittest.TestCase): def setUp(self): self....
{ "content_hash": "936f736d0f74af3a3b8b08f03e0ab81a", "timestamp": "", "source": "github", "line_count": 287, "max_line_length": 190, "avg_line_length": 71.16724738675958, "alnum_prop": 0.38673194614443085, "repo_name": "SimpleTax/merchant", "id": "207870afca75138f5ea765bd561f928d426cb186", "size": ...
from flask import Flask # Creates our application. app = Flask(__name__) app.debug = True # DATABASE SETTINGS from app import views
{ "content_hash": "9ebcfbeac448a1af3775baf98ea62a41", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 26, "avg_line_length": 15, "alnum_prop": 0.7333333333333333, "repo_name": "vgm64/worklunch", "id": "a7aca5447d66a0788eb415c13d092b62c26757fb", "size": "145", "binary": fal...
""" Function helpers to do stuff on svg files. """ import os import logging from docstamp.commands import call_command, which, check_command import svgutils.transform as sg log = logging.getLogger(__name__) def replace_chars_for_svg_code(svg_content): """ Replace known special characters to SVG code. Param...
{ "content_hash": "7972291f5008821f442082bd5c77746f", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 105, "avg_line_length": 24.333333333333332, "alnum_prop": 0.593892694063927, "repo_name": "PythonSanSebastian/docstamp", "id": "f40869589a3583a0e5190b90a538900d06efe49d", ...
"""Base class for request handlers that display charts.""" import json from dashboard import layered_cache from dashboard.common import request_handler from dashboard.common import namespaced_stored_object # The revision info (stored in datastore) is a dict mapping of revision type, # which should be a string starti...
{ "content_hash": "7a6dade41a1b08ac9e24c9a38942fcdb", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 80, "avg_line_length": 38.583333333333336, "alnum_prop": 0.7249820014398848, "repo_name": "benschmaus/catapult", "id": "c90a1534400f5d022c0b7b52d396dfbb9cf9a596", "size": "...
''' website :copyright: (c) 2013-2015 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' import os from flask.helpers import send_from_directory from trytond.model import ModelSQL, fields from trytond.pool import Pool, PoolMeta from nereid import current_app,...
{ "content_hash": "5e78b9a632d88e80623840b454d63d10", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 76, "avg_line_length": 26.03921568627451, "alnum_prop": 0.5893574297188755, "repo_name": "aroraumang/nereid-webshop", "id": "d07d5e23a656edc65b97e89796facedfe267689b", "si...
import re import json import base64 from time import sleep from io import BytesIO from googleapiclient import discovery from googleapiclient.http import MediaIoBaseUpload from googleapiclient.errors import HttpError from google.oauth2.service_account import Credentials from starthinker.config import UI_SERVICE RE_CR...
{ "content_hash": "80716a0aeff27580dee792c3589104d7", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 79, "avg_line_length": 31.18, "alnum_prop": 0.7357280307889673, "repo_name": "google/starthinker", "id": "32683e02c7a1c0eea545236aa22de81f80fd6a87", "size": "2301", "bina...
import configparser from datetime import datetime import os import json from pyspark.sql import SparkSession from pyspark.sql.functions import udf, col, substring, lit, when, avg from pyspark.sql import functions as F from pyspark.sql.functions import input_file_name import random from pyspark.sql.types import * from p...
{ "content_hash": "a1fe71c9ce345979ed279656ca8d869a", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 447, "avg_line_length": 55.351851851851855, "alnum_prop": 0.7648042823686851, "repo_name": "GoogleCloudPlatform/serverless-spark-workshop", "id": "4a608c962ad82321e640ae8a480...
import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-jgcoinrpc")) import json import shutil import subprocess import tempfile import traceback from jgcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from util import * def check_array_result(object_array, t...
{ "content_hash": "f81ebffbef495c95cdacb351ff2ff121", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 105, "avg_line_length": 39.04054054054054, "alnum_prop": 0.5579785392869505, "repo_name": "cptecdfi/jgcoins", "id": "c24f497047b581baeef16aa5b091e43a51fb1e9e", "size": "60...
"""Support for Roku binary sensors.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from rokuecp.models import Device as RokuDevice from homeassistant.components.binary_sensor import ( BinarySensorEntity, BinarySensorEntityDescription, ) from homea...
{ "content_hash": "18bd7e6ad3c0294d825cf6b76c302a40", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 73, "avg_line_length": 30.473118279569892, "alnum_prop": 0.7155963302752294, "repo_name": "toddeye/home-assistant", "id": "5b6da073dd189fb1be35b0d2b783ecc6147802c1", "size"...
"""The security groups extension.""" from oslo_log import log as logging from oslo_serialization import jsonutils from webob import exc from nova.api.openstack.api_version_request \ import MAX_PROXY_API_SUPPORT_VERSION from nova.api.openstack import common from nova.api.openstack.compute.schemas import security_gr...
{ "content_hash": "0bcad187084c43e993be664bdac1d079", "timestamp": "", "source": "github", "line_count": 519, "max_line_length": 79, "avg_line_length": 43.36801541425819, "alnum_prop": 0.587035720632664, "repo_name": "rajalokan/nova", "id": "8e1d2e0d59a6d083be046103b2c659f95d640020", "size": "23182"...
""" __IsolHasNoMatchIsolated_MDL.py_____________________________________________________ Automatically generated AToM3 Model File (Do not modify directly) Author: gehan Modified: Fri Oct 11 15:08:32 2013 ____________________________________________________________________________________ """ from stickylink import * f...
{ "content_hash": "8d82ed72c7283ea6686ef96870a116dd", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 625, "avg_line_length": 43.87074829931973, "alnum_prop": 0.6410296169948829, "repo_name": "levilucio/SyVOLT", "id": "dae256a1ed925bac8472799a0e39cd6be0a926a6", "size": "64...
"""Tests for drums_rnn_create_dataset.""" # internal imports import tensorflow as tf import magenta from magenta.models.drums_rnn import drums_rnn_create_dataset from magenta.models.shared import events_rnn_model from magenta.pipelines import drum_pipelines from magenta.pipelines import pipelines_common from magenta....
{ "content_hash": "830f7735c256953d7725103730b91c67", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 77, "avg_line_length": 35.5, "alnum_prop": 0.6333333333333333, "repo_name": "YoshikawaMasashi/magenta", "id": "11c2d01b627b8befd830a48c5d71b517e3c03a7a", "size": "2725", ...
from ..external.qt.QtCore import (QAbstractItemModel, QModelIndex, QObject, Qt, QTimer, Signal, QSize) from ..external.qt.QtGui import (QFont, QTreeView, QItemSelectionModel, QAbstractItemView, QStyledItemDelegate) from .qtutil import layer_icon from ....
{ "content_hash": "1360667a59a31cb33ed0d41dffd7164d", "timestamp": "", "source": "github", "line_count": 536, "max_line_length": 77, "avg_line_length": 28.32276119402985, "alnum_prop": 0.6036492984651868, "repo_name": "JudoWill/glue", "id": "ab881840a6fb3420c32bb0fec04947d57390cec0", "size": "15211"...
import pathlib import hashlib import subprocess import multiprocessing import os import re import sys # key for performing a natural sort def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): return [int(text) if text.isdigit() else text.lower() for text in re.split(_nsre, s)] # exception to handle ...
{ "content_hash": "50db32324713b97382581a826b70f2b6", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 118, "avg_line_length": 24.81045751633987, "alnum_prop": 0.6485774499473129, "repo_name": "weinels/LaTeX", "id": "ffb9fc147180fa4e4e11582347d31bd2ca8aaf94", "size": "3796"...
ANSIBLE_METADATA = {'status': ['stableinterface'], 'supported_by': 'core', 'version': '1.0'} DOCUMENTATION = ''' --- module: win_file version_added: "1.9.2" short_description: Creates, touches or removes files or directories. description: - Creates (empty) files, updates fi...
{ "content_hash": "61f4a4275d7a866da09d69a108e11cf8", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 87, "avg_line_length": 31.107692307692307, "alnum_prop": 0.658753709198813, "repo_name": "nwiizo/workspace_2017", "id": "82c5510c3cfb55df1315b745ce9279f6f20f14b6", "size": ...
from __future__ import annotations from datetime import datetime, timedelta from airflow.models import DAG from airflow.operators.empty import EmptyOperator DEFAULT_DATE = datetime(2016, 1, 1) # DAG tests backfill with pooled tasks # Previously backfill would queue the task but never run it dag1 = DAG(dag_id="test_...
{ "content_hash": "f820c356677bd00c4e9ea86af58c7d11", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 97, "avg_line_length": 38.89473684210526, "alnum_prop": 0.7564276048714479, "repo_name": "apache/airflow", "id": "2729dfaf8230ddf63e0445a3b0e56df5a43eeca5", "size": "1526",...
from __future__ import print_function import re import os import pickle import sys import vim # pylint: disable=F0401 # Insert the taskwiki on the python path BASE_DIR = vim.eval("s:plugin_path") sys.path.insert(0, os.path.join(BASE_DIR, 'taskwiki')) import errors # Handle exceptions without traceback, if they're Ta...
{ "content_hash": "692c248e64522e9739ba6095962abd02", "timestamp": "", "source": "github", "line_count": 522, "max_line_length": 94, "avg_line_length": 30.70689655172414, "alnum_prop": 0.586062761245243, "repo_name": "Spirotot/taskwiki", "id": "dd9f6d032e042758baae07c34ec09df1cc598dd4", "size": "160...
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('core', '0001_initial'), ] operations = [ migrati...
{ "content_hash": "c45a4fe8485fe98b0b14b7d04634cfce", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 130, "avg_line_length": 46.0377358490566, "alnum_prop": 0.578688524590164, "repo_name": "HigorSilvaRosa/ForumGeolocalizado", "id": "61c79b333b870df0f651c35c7bbd4b90a85f9c31",...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
{ "content_hash": "d96570655994adcf9ade9b28710d9cb6", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 121, "avg_line_length": 41.578947368421055, "alnum_prop": 0.5943037974683544, "repo_name": "SurielRuano/Orientador-Legal", "id": "d01f3a93cba32f3cefad516eaaab29a4b076443e", ...
import threading import uuid from nova.compute import flavors from nova.compute import utils as compute_utils import nova.image import time from nova.openstack.common import log as logging from nova import volume from nova import objects from nova.openstack.common import uuidutils from nova import block_dev...
{ "content_hash": "e5cad11b079d85b8d27327fdb3691890", "timestamp": "", "source": "github", "line_count": 1070, "max_line_length": 174, "avg_line_length": 49.899065420560746, "alnum_prop": 0.5490710218759365, "repo_name": "Hybrid-Cloud/badam", "id": "2b40deb265f7333464f6f14d5af074251c523327", "size":...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0007_userprofile'), ] operations = [ migrations.AddField( model_name='user', name='about', field=models...
{ "content_hash": "b42f541749ee1e3ea61b2f2edeebf008", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 88, "avg_line_length": 22.333333333333332, "alnum_prop": 0.5945273631840796, "repo_name": "yrchen/CommonRepo", "id": "0489135384c01f5e0587116f297123dd303d31ed", "size": "42...
from __future__ import print_function, unicode_literals ''' Extension to Python Markdown for Embedded Audio Basic Example: >>> import markdown >>> text = """[podcast]http://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3[/podcast]""" >>> html = markdown.markdown(text, [PodcastExtension()]) >>> print(html...
{ "content_hash": "fcfb385bd5157750c523d5b1d6bf7399", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 101, "avg_line_length": 30.524590163934427, "alnum_prop": 0.6541353383458647, "repo_name": "damianavila/nikola", "id": "be8bb6be12cb27a9ebae161dd0a16d00763bc709", "size": "...