text stringlengths 4 1.02M | meta dict |
|---|---|
import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Difference'] , ['LinearTrend'] , ['Seasonal_MonthOfYear'] , ['NoAR'] ); | {
"content_hash": "15be80326014cb40b2ce6e95ce9bfa0f",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 94,
"avg_line_length": 41.75,
"alnum_prop": 0.7245508982035929,
"repo_name": "antoinecarme/pyaf",
"id": "8f481b49727c5a9bf20c47e66498cce34a0eb0a7",
"size": "167",
"binary"... |
import time
import base
import v2_swagger_client
from v2_swagger_client.rest import ApiException
from base import _assert_status_code
class Robot(base.Base, object):
def __init__(self):
super(Robot,self).__init__(api_type = "robot")
def list_robot(self, expect_status_code = 200, **kwargs):
try... | {
"content_hash": "3557d2913c803a2f1342089030ab87e6",
"timestamp": "",
"source": "github",
"line_count": 142,
"max_line_length": 197,
"avg_line_length": 51.936619718309856,
"alnum_prop": 0.6385084745762711,
"repo_name": "wy65701436/harbor",
"id": "3ef9b9d113c8924b33fb41c3b6286712412d806e",
"size": "... |
"""
MIT License
Copyright (c) 2017 Igor Kroitor
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, ... | {
"content_hash": "11f9489b172fbb9242403d64f0960e5a",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 79,
"avg_line_length": 43.55172413793103,
"alnum_prop": 0.6904196357878069,
"repo_name": "aiueogawa/ccxt",
"id": "f3ec860b8562f31de470ab254493594245174ddb",
"size": "1288",... |
"""
This module provides some custom wx widgets for the file converter perspective
"""
import wx
import os
from sas.sascalc.dataloader.data_info import Vector
from sas.sasgui.guiframe.utils import check_float
class VectorInput(object):
"""
An input field for inputting 2 (or 3) components of a vector.
"""
... | {
"content_hash": "475324ab007e8c174d0960af241dc235",
"timestamp": "",
"source": "github",
"line_count": 188,
"max_line_length": 78,
"avg_line_length": 31.53191489361702,
"alnum_prop": 0.5706815114709851,
"repo_name": "lewisodriscoll/sasview",
"id": "a0df9e02f1e8840ff0603feff6d0a8ff5c66da19",
"size"... |
from distutils.core import setup
setup(
name='django-migratron',
version='0.1.3',
author='Chase Seibert',
author_email='chase.seibert@gmail.com',
packages=[
'migratron',
'migratron.management',
'migratron.management.commands',
'migratron.templates',
],
url='h... | {
"content_hash": "eed640f312a28e0e634688ed8a7e70dc",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 92,
"avg_line_length": 28.608695652173914,
"alnum_prop": 0.6398176291793313,
"repo_name": "chase-seibert/django-migratron",
"id": "4df29e5016ce1138d76fbb44b8510a948f162c85",
... |
import os
import sys
from .base import BaseCommand, CommandError
from opencivicdata.common import JURISDICTION_CLASSIFICATIONS
from opencivicdata.divisions import Division
def prompt(ps, default=''):
return input(ps).strip() or default
CLASS_DICT = {'events': 'Event',
'people': 'Person',
... | {
"content_hash": "4d59384d42aa613c6d335fcd35e5f53e",
"timestamp": "",
"source": "github",
"line_count": 118,
"max_line_length": 98,
"avg_line_length": 42.567796610169495,
"alnum_prop": 0.5922755325502688,
"repo_name": "influence-usa/pupa",
"id": "603c75edd3c843d1e8504c05472b57c2718738d8",
"size": "... |
import unittest2 as unittest
from Products.CMFCore.utils import getToolByName
from Products.UserAndGroupSelectionWidget import testing
from Products.UserAndGroupSelectionWidget.memberlookup import MemberLookup
class MemberLookupTest(unittest.TestCase):
layer = testing.USERANDGROUPSELECTIONWIDGET_INTEGRATION_TES... | {
"content_hash": "44d31209f82cc878f3dd48ffde8fd645",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 80,
"avg_line_length": 35.89010989010989,
"alnum_prop": 0.6635027556644213,
"repo_name": "collective/Products.UserAndGroupSelectionWidget",
"id": "a92e09eeca6c006b45d7dfff77f... |
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from . import views
urlpatterns = patterns('',
url(r'^patients/$', views.PatientList.as_view(), name='patient_list'),
url(r'^patients-json/$', views.patient_list_json),
#url(r'^patient/add/$', views.PatientAdd... | {
"content_hash": "802c4fcecd4dcfcbe1d17853d0823af6",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 102,
"avg_line_length": 57.42857142857143,
"alnum_prop": 0.6554726368159204,
"repo_name": "datakid/hh2014-epilepsy",
"id": "eb303c7c10b514072f2c2eb5d3150b43c0553d6c",
"size... |
"""
Checkers for Ruby related projects
"""
from checkers import base
class RubyVersionChecker(base.GitHubVersionChecker):
"""
Ruby project checker
"""
name = 'Ruby'
slug = 'ruby'
homepage = 'http://www.ruby-lang.org/'
repository = 'https://github.com/ruby/ruby'
@staticmethod
def _... | {
"content_hash": "da048a6fbdfb3544dd782bf83ac65ca0",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 77,
"avg_line_length": 24.69090909090909,
"alnum_prop": 0.6119293078055965,
"repo_name": "pawelad/verse",
"id": "973a1d39abe0bd627a3afd1882769585eb1b375d",
"size": "1358",
... |
import logging
import re
from django.contrib import auth
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from django.db.models import ManyToManyField, Q
from djblets.util.decorators import augment_method_from
from djblets.webapi.decorators import (webapi_login_required,
... | {
"content_hash": "6856c009a332320e929783a068132411",
"timestamp": "",
"source": "github",
"line_count": 1078,
"max_line_length": 79,
"avg_line_length": 38.56679035250464,
"alnum_prop": 0.5436440168370414,
"repo_name": "reviewboard/reviewboard",
"id": "151775ae5a0d95dfab91218053f7d29c76f83ae1",
"siz... |
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('music', '0021_https_thumbnails'),
]
operations = [
migrations.AlterField(
model_name='music',
name='thumbnail',
... | {
"content_hash": "9bbb543e9e986fcdf3ad11baac3007e7",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 51,
"avg_line_length": 21.68421052631579,
"alnum_prop": 0.587378640776699,
"repo_name": "Amoki/Amoki-Music",
"id": "f8fcde1ec3f3b1027649ce74c61bd378ad72fc73",
"size": "436"... |
from unittest import TestCase
from senic_hub.nuimo_app.hass import HomeAssistant
class TestHomeAssistant(TestCase):
def test_find_state_entity_state(self):
ha = HomeAssistant("ws://test")
states = [
{"entity_id": "eid1"},
{"entity_id": "eid2"},
]
self.asse... | {
"content_hash": "cdef827e04b723a60fe027f5e00d5620",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 85,
"avg_line_length": 30.533333333333335,
"alnum_prop": 0.6135371179039302,
"repo_name": "grunskis/senic-hub",
"id": "05301d5810ca0dd9b6d7bec610af7524a98bec9c",
"size": "4... |
from __future__ import unicode_literals
from guardian.models import UserObjectPermission, GroupObjectPermission
from teamroles.models.role import Role
from teamroles.models.team import Team
from teamroles.models.userrole import UserRole
from teamroles.models.userteam import UserTeam
from django.contrib import admin
fr... | {
"content_hash": "55c4d180bbb1b53a97950d671da2be51",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 71,
"avg_line_length": 33.05263157894737,
"alnum_prop": 0.8455414012738853,
"repo_name": "mevlanaayas/django-teams",
"id": "e9274ea9def3273d22821809aec55effe59009e0",
"size... |
import time
import os
path = os.path.dirname(os.path.realpath(__file__))
os.chdir(path)
from sklearn.multiclass import OneVsOneClassifier, \
OutputCodeClassifier, \
OneVsRestClassifier
from csf_utils import get_vector_space_model_train_test,... | {
"content_hash": "f3b421a7a9dbb804aac3a02543a0d935",
"timestamp": "",
"source": "github",
"line_count": 181,
"max_line_length": 78,
"avg_line_length": 25.635359116022098,
"alnum_prop": 0.4827586206896552,
"repo_name": "ChatbotAI/Text-Data",
"id": "757d7bebe0da9e4157c63e714dbf5193aec3ce61",
"size": ... |
import jinja2.nativetypes
import jinja2.sandbox
class _AirflowEnvironmentMixin:
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.filters.update(FILTERS)
def is_safe_attribute(self, obj, attr, value):
"""
Allow access to ``_`` prefix vars (but not ``__``).
... | {
"content_hash": "440b38e9dd3f3b6bacbc6e1ccd96d5bd",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 106,
"avg_line_length": 26.072727272727274,
"alnum_prop": 0.6680613668061367,
"repo_name": "bolkedebruin/airflow",
"id": "6ec010f618fd363fd701ea0bd8a57d12efec4243",
"size":... |
from vt_manager_kvm.models import *
from vt_manager_kvm.communication.utils.XmlUtils import *
import xmlrpclib
am = xmlrpclib.Server('https://expedient:expedient@192.168.254.193:8445/xmlrpc/agent')
xml = xmlFileToString('communication/utils/queryDelete.xml')
am.send(xml)
| {
"content_hash": "e79b666a5735a60120cce426e978d93b",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 86,
"avg_line_length": 23.166666666666668,
"alnum_prop": 0.7805755395683454,
"repo_name": "ict-felix/stack",
"id": "a75fe56a83b690ea82d551a62718ea74a48650bd",
"size": "278"... |
import base64
import logging
import pickle
from datetime import datetime
from django.core.mail import EmailMessage
from django.db import models
PRIORITIES = (
("1", "high"),
("2", "medium"),
("3", "low"),
("4", "deferred"),
)
class MessageManager(models.Manager):
def non_deferred(self):
... | {
"content_hash": "ab2c5f782c2e6a6cd7f3e18c79e155fd",
"timestamp": "",
"source": "github",
"line_count": 238,
"max_line_length": 105,
"avg_line_length": 26.69327731092437,
"alnum_prop": 0.5869667873445616,
"repo_name": "cchery101/django-mailer",
"id": "5a8dc760a8a5348703bb135ea37be1c2584278ec",
"siz... |
from filters.dummy_sink import DummySink
from filters.dummy_source import DummySource
from filters.logger_sink import LoggerSink
class TestGraphBuilder:
"""
A fake graph builder used only for testing
"""
def __init__(self):
self._filters = {}
source_filter = DummySource('dummy_source')... | {
"content_hash": "63de052ad4c4910ccf8b44248a06a6af",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 66,
"avg_line_length": 37.68571428571428,
"alnum_prop": 0.6398786959818044,
"repo_name": "koolspin/rosetta",
"id": "9f1b1c0b868c44c95c34a790f9eeddbd22e86424",
"size": "1319... |
import socket
import readline
HOST = '127.0.0.1'
PORT = 2222
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect((HOST, PORT))
stream = socket.makefile()
newline = '\r\n'
readymsg = '~~~ok!~~~'
def write_stream(msg):
stream.write(msg + newline)
stream.flush()
def exec_sync(cmd):
... | {
"content_hash": "93d8d5863f906559907fb6a5ee42d8a5",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 100,
"avg_line_length": 25.135802469135804,
"alnum_prop": 0.5589390962671905,
"repo_name": "juho-p/wot-debugserver",
"id": "12c79b769762c6be9e937793bd11b8a6dea6370a",
"size... |
"""
Usage:
python -m test.regrtest [options] [test_name1 [test_name2 ...]]
python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]]
If no arguments or options are provided, finds all files matching
the pattern "test_*" in the Lib/test subdirectory and runs
them in alphabetical order (but see -M an... | {
"content_hash": "dbc894b7d27469ee7c961ffbc5bd4494",
"timestamp": "",
"source": "github",
"line_count": 1609,
"max_line_length": 85,
"avg_line_length": 34.047855811062774,
"alnum_prop": 0.5722395633681981,
"repo_name": "mcking49/apache-flask",
"id": "0007da64b8861df186e21dd0ce61ba1ea0940e29",
"size... |
from __future__ import print_function
import sys
from collections import namedtuple
from pyang import plugin
_COPYRIGHT_NOTICE = """
// DO NOT EDIT
// generated by pyang using OpenConfig https://github.com/openconfig/public
//
// Copyright (C) 2014-2019 Nippon Telegraph and Telephone Corporation.
//
// Licensed unde... | {
"content_hash": "73b3219ab43cd94ac94714b84de6c9f9",
"timestamp": "",
"source": "github",
"line_count": 797,
"max_line_length": 168,
"avg_line_length": 32.623588456712675,
"alnum_prop": 0.551440329218107,
"repo_name": "j-kato/gobgp",
"id": "1ad359e30f50c58bc5df65f8330e0864d024c6e9",
"size": "26619"... |
from local_settings import *
# Application definition
INSTALLED_APPS = (
'wpadmin',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'lugar',... | {
"content_hash": "d62a3ae3a55ce67626ef967877e7178d",
"timestamp": "",
"source": "github",
"line_count": 115,
"max_line_length": 77,
"avg_line_length": 26.217391304347824,
"alnum_prop": 0.6451077943615257,
"repo_name": "CARocha/mapafinca",
"id": "e8ec6454d7e3db011b18c50b741d3af3c755a116",
"size": "3... |
import h2o
h2o.init()
airlines_url = "https://s3.amazonaws.com/h2o-airlines-unpacked/allyears2k.csv"
airlines_df = h2o.import_file(airlines_url)
airlines_df.columns
airlines_df.describe() # output suppressed
airlines_df["IsArrDelayed"].describe()
independent_vars = ["Year","Month","DayOfWeek","CRSDepTime","CRSAr... | {
"content_hash": "3384f68c973e768684f22d52d1e9d75f",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 105,
"avg_line_length": 27.32,
"alnum_prop": 0.7891654465592972,
"repo_name": "pchmieli/h2o-3",
"id": "445cc509c74ae21d3062615ecf0c28228ece2600",
"size": "683",
"binary":... |
""" unit testing code for molecule suppliers
"""
import os
import tempfile
import unittest
from rdkit import Chem, RDLogger
from rdkit import RDConfig
class TestCase(unittest.TestCase):
def tearDown(self):
RDLogger.EnableLog('rdApp.error')
def test1SDSupplier(self):
fileN = os.path.join(RD... | {
"content_hash": "de51d15322e5100c43c265157eb963f9",
"timestamp": "",
"source": "github",
"line_count": 94,
"max_line_length": 99,
"avg_line_length": 29.21276595744681,
"alnum_prop": 0.5571740713765477,
"repo_name": "bp-kelley/rdkit",
"id": "720860e55f9e59b531d274134477b2599dccdb32",
"size": "3021"... |
from confiture import Confiture, ConfigFileError
print("[*] loading template")
confiture = Confiture("examples/templates/confiture.yaml")
print("[*] checking required files for blueberry")
try:
confiture.check("examples/config/blueberry_ok.yaml")
print("[*] blueberry file is correct")
except ConfigFileError as... | {
"content_hash": "216f6e5c538afbad3c0adf85da3de9d3",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 58,
"avg_line_length": 33.875,
"alnum_prop": 0.7343173431734318,
"repo_name": "Frky/confiture",
"id": "1f785318e9bcc9a0e398ea59bc4ad8c1cd7e8c46",
"size": "543",
"binary":... |
import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 30, transform = "Difference", sigma = 0.0, exog_count = 0, ar_order = 0); | {
"content_hash": "a8cd9864c8afc7efd0b435a898dc8eb7",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 168,
"avg_line_length": 38.285714285714285,
"alnum_prop": 0.7089552238805971,
"repo_name": "antoinecarme/pyaf",
"id": "91d11f728b45ea977c2bff77ba1318b59def0395",
"size": "26... |
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
from fluent_contents.models.managers import ContentItemManager
class Migration(migrations.Migration):
initial = True
dependencies = [
('fluent_contents'... | {
"content_hash": "7ad5ff373b35b9e6f8a66416ab1cee62",
"timestamp": "",
"source": "github",
"line_count": 172,
"max_line_length": 332,
"avg_line_length": 49.51744186046512,
"alnum_prop": 0.5634613126687801,
"repo_name": "onepercentclub/bluebottle",
"id": "7276019558604242454ee1e47f0481c2460010d0",
"s... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | {
"content_hash": "b85b023749e2a32aaf4e95914c4be49e",
"timestamp": "",
"source": "github",
"line_count": 1517,
"max_line_length": 80,
"avg_line_length": 38.17930125247199,
"alnum_prop": 0.5344452501812907,
"repo_name": "supunkamburugamuve/mooc2",
"id": "dda6cb8d432e55fc8bd255eaee915fbf9782930a",
"si... |
import os
import sys
import traceback
import greenhouse
import junction
def main(environ, argv):
greenhouse.global_exception_handler(traceback.print_exception)
junction.configure_logging(level=1)
hub = junction.Hub(("", 9057), [("", 9056)])
hub.start()
greenhouse.Event().wait()
if __name__ ==... | {
"content_hash": "7643e7eee64913a29707524e99d4b59a",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 66,
"avg_line_length": 18.5,
"alnum_prop": 0.6702702702702703,
"repo_name": "teepark/junction",
"id": "14bfbba926b0625b1f64684032104c2164445b30",
"size": "444",
"binary":... |
"""
Tests that a loadable_module target is built correctly.
"""
from __future__ import print_function
import TestGyp
import os
import struct
import sys
if sys.platform == 'darwin':
print("This test is currently disabled: https://crbug.com/483696.")
sys.exit(0)
test = TestGyp.TestGyp(formats=['ninja', 'make',... | {
"content_hash": "f35de3a5434e6657a9e12c6da0719dea",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 72,
"avg_line_length": 25.5,
"alnum_prop": 0.690359477124183,
"repo_name": "chromium/gyp",
"id": "77dde1d6cd1975a812f901458bdadafe93a86251",
"size": "1404",
"binary": fal... |
"""Shared logger for cwltool."""
import logging
_logger = logging.getLogger("cwltool") # pylint: disable=invalid-name
defaultStreamHandler = logging.StreamHandler() # pylint: disable=invalid-name
_logger.addHandler(defaultStreamHandler)
_logger.setLevel(logging.INFO)
| {
"content_hash": "7e5262501e2adee4cd5e87bf6feaeb14",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 78,
"avg_line_length": 38.714285714285715,
"alnum_prop": 0.7859778597785978,
"repo_name": "dleehr/cwltool",
"id": "c720ddef89437e8b8c79e4ed305e110925380c20",
"size": "271",
... |
from __future__ import unicode_literals
import django.contrib.postgres.search
from django.db import migrations
from ..models import IndexEntry
table = IndexEntry._meta.db_table
class Migration(migrations.Migration):
dependencies = [
('postgres_search', '0001_initial'),
]
operations = [
... | {
"content_hash": "1f1896419d4e730a9cc76dc05f413c34",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 79,
"avg_line_length": 28.659574468085108,
"alnum_prop": 0.5657015590200446,
"repo_name": "timorieber/wagtail",
"id": "29ae599ab3625e0f69d0b3cd9a19f4bcacb6020a",
"size": "1... |
"""
sentry.plugins.sentry_sites
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
| {
"content_hash": "ddcde1783178951432ff2e18fa40051b",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 70,
"avg_line_length": 25.857142857142858,
"alnum_prop": 0.6132596685082873,
"repo_name": "primepix/django-sentry",
"id": "0fa8e33e122a17b769a2d1828ad644af2b91cc18",
"size":... |
import mock
from oslo_serialization import jsonutils
from six.moves import http_client
import webob
from cinder import context
from cinder import exception
from cinder.objects import fields
from cinder import test
from cinder.tests.unit.api import fakes
from cinder.tests.unit import fake_constants as fake
from cinder.... | {
"content_hash": "1761355e61c42f4c1c8a648e1d28c023",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 79,
"avg_line_length": 39.956989247311824,
"alnum_prop": 0.6590419806243273,
"repo_name": "phenoxim/cinder",
"id": "24e79b2a0c7df3a9f8b84637b1ea3947f356cee5",
"size": "4334... |
from abc import ABCMeta, abstractmethod
import numpy as np
from scipy.linalg import hankel
from scipy.sparse import lil_matrix
from scipy.sparse import csr_matrix as spmatrix
class StructureMeta:
__metaclass__ = ABCMeta
@abstractmethod
def struct_from_vec(self, x):
# reads an input vector
... | {
"content_hash": "49798a192d3cedd6d35c202682756279",
"timestamp": "",
"source": "github",
"line_count": 73,
"max_line_length": 157,
"avg_line_length": 29.931506849315067,
"alnum_prop": 0.5729977116704805,
"repo_name": "clemenshage/grslra",
"id": "bd50063a51ea7705175672adf9eaf55717b861b6",
"size": "... |
from contextlib import contextmanager
from typing import Any, Dict, Generator, List, NamedTuple, Optional, Tuple, Union
from warnings import warn
import reactivex
from reactivex import Observable, typing
from reactivex.notification import Notification, OnError, OnNext
from reactivex.observable.marbles import parse
fro... | {
"content_hash": "f7576f4121d7ff60df22152230737e40",
"timestamp": "",
"source": "github",
"line_count": 197,
"max_line_length": 87,
"avg_line_length": 29.248730964467004,
"alnum_prop": 0.5971884762235335,
"repo_name": "ReactiveX/RxPY",
"id": "e26c3da934cbf3410eecbc28288d23d52fd3d427",
"size": "5762... |
import glob
import os
import sys
import ah_bootstrap
from setuptools import setup
from astropy_helpers.setup_helpers import (
register_commands, get_package_info, get_debug_option)
try:
from astropy_helpers.distutils_helpers import is_distutils_display_option
except:
# For astropy-helpers v0.4.x
from ... | {
"content_hash": "fc7ee6ba670fd05b7486538b968f812f",
"timestamp": "",
"source": "github",
"line_count": 103,
"max_line_length": 79,
"avg_line_length": 35.55339805825243,
"alnum_prop": 0.687602403058438,
"repo_name": "joergdietrich/astropy",
"id": "5a8cf869855b8d972c67312b35b5e7df65137b71",
"size": ... |
"""
byceps.services.user_badge.dbmodels.badge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from typing import Optional
from ....database import db, generate_uuid
from ....typing import BrandID
from ....util.instances i... | {
"content_hash": "5351dcb476ae20fdbde69a80d7c9e47c",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 83,
"avg_line_length": 31,
"alnum_prop": 0.6227781435154707,
"repo_name": "homeworkprod/byceps",
"id": "0169bfe16f4227d11bb603542394ccee77dbc78c",
"size": "1519",
"binary... |
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
import afm.views
urlpatterns = [
url(r'^(?P<uuid>p[0-9a-f\-]{7,})/upload/$',
afm.views.AFMFileUpload.as_view(), name='afm_upload'),
url(r'^autocreate/(?P<uuid>s[0-9]+)/$',
afm.views.AutocreateAFMView.as... | {
"content_hash": "0a80812b764fdd28907d6e1734cd071d",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 70,
"avg_line_length": 27.307692307692307,
"alnum_prop": 0.6422535211267606,
"repo_name": "wbg-optronix-lab/emergence-lab",
"id": "dd48cf9f4c21024921b36516072f77dd8808085c",
... |
from sorl.thumbnail.base import ThumbnailBackend
from sorl.thumbnail.images import ImageFile
from sorl.thumbnail import default
class S3Backend(ThumbnailBackend):
def get_thumbnail(self, file_, geometry_string, **options):
"""
Returns thumbnail as an ImageFile instance for file with geometry and
... | {
"content_hash": "09907a421520c347e82ef85411f29c10",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 87,
"avg_line_length": 34.588235294117645,
"alnum_prop": 0.6139455782312925,
"repo_name": "DemocracyClub/electionleaflets",
"id": "efee65302a58e7c6c2d07321a5e101b9bd5fb37b",
... |
"""Support for creating Kay forms from Datastore data models.
Taken from google.appengine.ext.db.djangoforms
Terminology notes:
- forms: always refers to the Kay newforms subpackage
- field: always refers to a Kay forms.Field instance
- property: always refers to a db.Property instance
Mapping between properti... | {
"content_hash": "96e940a1566561caa4879b6284a027c6",
"timestamp": "",
"source": "github",
"line_count": 776,
"max_line_length": 83,
"avg_line_length": 34.81701030927835,
"alnum_prop": 0.6236953142349545,
"repo_name": "yosukesuzuki/let-me-notify",
"id": "0276763c29b5215f3158c7c2f7573c0c040cf5e4",
"s... |
from django.conf.urls import include, url
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core import urlresolvers
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from django.contrib.staticfiles.te... | {
"content_hash": "85e8cbaa7007960391b735195bdb39fa",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 99,
"avg_line_length": 32.924528301886795,
"alnum_prop": 0.7318051575931233,
"repo_name": "davecranwell/wagtail",
"id": "26fb57985b3986cb0b7b2697d69b6421bd76fb4c",
"size": ... |
import unittest
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.layout_tests.port.base import Port
from webkitpy.layout_tests.port.driver import Driver, DriverOutput
from webkitpy.layout_tests.port import browser_test, browser_test_driver
from webkitpy.layout_tests.port.server_process_... | {
"content_hash": "17da925bdfa83456a8f026f406c8d916",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 81,
"avg_line_length": 39.91304347826087,
"alnum_prop": 0.7559912854030502,
"repo_name": "highweb-project/highweb-webcl-html5spec",
"id": "576e0b0863783bf19cf80b8d9a25e716d8f... |
import sys
import random
import math as actual_math
from exterminate.Constants import DECIMAL_ERROR_RANGE
class AltMath:
def __init__(self):
self.custom_pi = actual_math.pi
self.custom_e = actual_math.e
@property
def pi(self):
# https://www.wikiwand.com/en/Indiana_Pi_Bill
... | {
"content_hash": "88a293baa7a4eece92bd64c1514b87b1",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 76,
"avg_line_length": 22.823529411764707,
"alnum_prop": 0.6146907216494846,
"repo_name": "adtac/exterminate",
"id": "aed4808dae44c128be3ddb5a7809f7a33ad27d94",
"size": "77... |
from collections import namedtuple
import rpyc
import cv2
from detection.opencv import draw_lines
import time
State = namedtuple("State", "name act default_args")
State.__new__.__defaults__ = tuple([None] * 2) + ({},)
def main_loop(robot, start_state, state_dict, delay=0.02, remote_display=None):
print("Chec... | {
"content_hash": "9562a69ef465a602cf3f618e9faea1c1",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 83,
"avg_line_length": 25.767857142857142,
"alnum_prop": 0.6153846153846154,
"repo_name": "TheCamusean/DLRCev3",
"id": "c4e101780d19816c7f64ec7dcbd31deef24da1d7",
"size": "... |
"""
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import environ
BASE_DIR = os.p... | {
"content_hash": "f2d555d24abe2ab7105b213863e78805",
"timestamp": "",
"source": "github",
"line_count": 144,
"max_line_length": 82,
"avg_line_length": 25.26388888888889,
"alnum_prop": 0.6849917537108301,
"repo_name": "cesardeazevedo/sniffle",
"id": "893804577308a5c977019f1e7c4369a48d1e4d71",
"size"... |
"""
Diagnostics for SUR and 3SLS estimation
"""
__author__= "Luc Anselin lanselin@gmail.com, \
Pedro V. Amaral pedrovma@gmail.com"
import numpy as np
import scipy.stats as stats
import numpy.linalg as la
from sur_utils import sur_dict2mat,sur_mat2dict,sur_corr
from regimes import buildR1var,wald_test... | {
"content_hash": "ae438b2250afa33976ca66e1a1cdafc9",
"timestamp": "",
"source": "github",
"line_count": 221,
"max_line_length": 86,
"avg_line_length": 30.65158371040724,
"alnum_prop": 0.5738116327133156,
"repo_name": "TaylorOshan/pysal",
"id": "24256419bbfc389ac73d0d209c2aea8ff45bd524",
"size": "67... |
import roslib; roslib.load_manifest('face_detection')
import rospy
import sys
import cv
from cv_bridge import CvBridge
from sensor_msgs.msg import Image
from geometry_msgs.msg import Point
from geometry_msgs.msg import PointStamped
#
# Instantiate a new opencv to ROS bridge adaptor
#
cv_bridge = CvBridge()
#
# Defi... | {
"content_hash": "fd45236d38e6243a996676d6303ec023",
"timestamp": "",
"source": "github",
"line_count": 108,
"max_line_length": 88,
"avg_line_length": 30.47222222222222,
"alnum_prop": 0.5907019143117593,
"repo_name": "andrewtron3000/hacdc-ros-pkg",
"id": "5f8ba451d50ace5b7d51af6e5d7e9c3a98b16d59",
... |
class BenchmarkCase(object):
@classmethod
def setUpClass(cls):
pass
@classmethod
def tearDownClass(cls):
pass
def setUp(self):
pass
def tearDown(self):
pass
| {
"content_hash": "d8a432cb4f5b9cabe80d538b2cf75ea3",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 28,
"avg_line_length": 15.428571428571429,
"alnum_prop": 0.5740740740740741,
"repo_name": "AlekSi/benchmarking-py",
"id": "803c5cc4c3f56279cab665cd903bddb3a12715e6",
"size"... |
from collections import defaultdict
import logging
from linkedin.mobster.utils import format_time
class NetworkEventHandler(object):
def __init__(self):
# request start times in seconds
self._request_start_times = {}
# the following dicts use request ids as keys
self._request_start_times = defaultd... | {
"content_hash": "c063b5f9876f1d2c83acd3bd6d6bf058",
"timestamp": "",
"source": "github",
"line_count": 235,
"max_line_length": 117,
"avg_line_length": 40.13191489361702,
"alnum_prop": 0.631322235181847,
"repo_name": "krishnakanthpps/mobster",
"id": "164d6128aaf2514a1c47235293834619d061d1b1",
"size... |
import unittest
import os
import random
import string
from qiniu import rs
from qiniu import conf
def r(length):
lib = string.ascii_uppercase
return ''.join([random.choice(lib) for i in range(0, length)])
conf.ACCESS_KEY = os.getenv("QINIU_ACCESS_KEY")
conf.SECRET_KEY = os.getenv("QINIU_SECRET_KEY")
key = '... | {
"content_hash": "d799371a8e36343e492651e0912f8b3b",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 66,
"avg_line_length": 27.24742268041237,
"alnum_prop": 0.5720771850170261,
"repo_name": "jemygraw/qrsync-python",
"id": "32714ff526c9f4e1e3b0a4c707d50943a85c32b1",
"size":... |
"""SCons.Scanner.RC
This module implements the dependency scanner for RC (Interface
Definition Language) files.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Softwar... | {
"content_hash": "1d041fea2b986f369396be31942a4f77",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 116,
"avg_line_length": 35.27272727272727,
"alnum_prop": 0.6563573883161512,
"repo_name": "kayhayen/Nuitka",
"id": "47c6ca26ec547425b6057fb47097556cd55464f4",
"size": "2328... |
import tensorflow as tf
import numpy as np
from preprocess import shuffle
from tqdm import tqdm as t
from ipdb import set_trace as stop
import matplotlib.pyplot as plt
import os
from IPython import embed
class Run_classifiers():
def __init__(self, data, sentembeddings, general_options):
self.data = data
... | {
"content_hash": "b90b346b6cde3343896d9dd4686f94f9",
"timestamp": "",
"source": "github",
"line_count": 134,
"max_line_length": 136,
"avg_line_length": 43.634328358208954,
"alnum_prop": 0.6066358816487087,
"repo_name": "PauBatlle/emb4class",
"id": "99b4f6ee0ea0cfd20200cc5faa47536491951b00",
"size":... |
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General conf... | {
"content_hash": "804d2ee53d7a25569f0013be9ed7a718",
"timestamp": "",
"source": "github",
"line_count": 214,
"max_line_length": 80,
"avg_line_length": 32.01401869158879,
"alnum_prop": 0.7102612757261714,
"repo_name": "sphinx-contrib/spelling",
"id": "83ed97e0a64454dfdcedce913d567523de1fdf9f",
"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 RetrieveInvoiceItem(Choreography):
def __init__(self, temboo_session):
"""
Cr... | {
"content_hash": "59efbc8a42cdcbe86076266b8bbafd38",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 149,
"avg_line_length": 39.81967213114754,
"alnum_prop": 0.7179909427748045,
"repo_name": "jordanemedlock/psychtruths",
"id": "cf513699921c1e720282e93043df31bed68448b8",
"s... |
"""
Copyright 2016 George Herde
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 writing, software
di... | {
"content_hash": "fba956cb2c54aead1445c07fe4ad123f",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 106,
"avg_line_length": 38.1375,
"alnum_prop": 0.6778105539167486,
"repo_name": "blackpan2/LoLMastery",
"id": "0c458f26caa6c7bce55321d44b8e7288a44f33d8",
"size": "3051",
... |
"""Basic neural network layers."""
__all__ = ['Sequential', 'HybridSequential', 'Dense', 'Dropout', 'Embedding',
'BatchNorm', 'InstanceNorm', 'LayerNorm', 'Flatten', 'Lambda', 'HybridLambda']
import warnings
import numpy as np
from .activations import Activation
from ..block import Block, HybridBlock
from .... | {
"content_hash": "ca02378c51b7f46e53eab2ddf4f6dea8",
"timestamp": "",
"source": "github",
"line_count": 676,
"max_line_length": 99,
"avg_line_length": 39.468934911242606,
"alnum_prop": 0.5610359431805405,
"repo_name": "fullfanta/mxnet",
"id": "d86c3e6ce4f34387019d0a714cfdbedb2e070f8b",
"size": "275... |
from gzip import GzipFile
from io import BytesIO
from flask import request
class GZip(object):
def __init__(self, app=None):
self.app = app
if app is not None:
self.init_app(app)
def init_app(self, app):
app.after_request(self.after_request)
def after_request(self, r... | {
"content_hash": "143488d17244acaad652828d9660390d",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 84,
"avg_line_length": 27.82857142857143,
"alnum_prop": 0.6262833675564682,
"repo_name": "abacuspix/NFV_project",
"id": "a0f2baf5a51b621cf94246c044007a4c459a80ac",
"size": ... |
import os
DEBUG = False
DEBUG_user = ''
OTHER_APPS=()
invalid_template_string=''
try:
from local_settings import *
except ImportError:
pass
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)).replace('\\','/')
LOGIN_URL='login_view'
### admins in local_settings ###
MANAGERS = ADMINS
### database set... | {
"content_hash": "a55ac36db7299a8d79eda00dfd1534c1",
"timestamp": "",
"source": "github",
"line_count": 213,
"max_line_length": 148,
"avg_line_length": 31.586854460093896,
"alnum_prop": 0.6793995243757431,
"repo_name": "tbpmig/mig-website",
"id": "0bb3d848e2c48a7f00011958fcba7b8efdd0670c",
"size": ... |
from bs4 import BeautifulSoup # For HTML parsing
import requests
import re # Regular expressions
from time import sleep # To prevent overwhelming the server between connections
import pandas as pd # For converting results to a dataframe
from sqlalchemy import create_engine,Table,Column,Integer,String,Meta... | {
"content_hash": "1745c621d3da0be73be44016cdc6d43d",
"timestamp": "",
"source": "github",
"line_count": 227,
"max_line_length": 213,
"avg_line_length": 39.62555066079295,
"alnum_prop": 0.6893829905503057,
"repo_name": "chi-hung/SementicProj",
"id": "b0164ae17efe60dcedd52a587613a1172fd90f9f",
"size"... |
import os
import sys
import subprocess
import argparse
import logging
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
from logging import Formatter, StreamHandler
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
_handler = StreamHandler()
_handler.setFormatter(Formatter(
'%(asctime)s %(l... | {
"content_hash": "e3e1cb672ab08033b9dd98b21782d4cb",
"timestamp": "",
"source": "github",
"line_count": 126,
"max_line_length": 131,
"avg_line_length": 36.07936507936508,
"alnum_prop": 0.6135063792344919,
"repo_name": "dahlke/rcfiles",
"id": "7a389a7a3e059dfb95906d07d35c3d8248656933",
"size": "4568... |
from neutron.api import extensions
from neutron.extensions import l3
ALIAS = 'cisco-apic-l3'
USE_ROUTING_CONTEXT = 'apic:use_routing_context'
EXT_GW_ATTRIBUTES = {
USE_ROUTING_CONTEXT: {
'allow_post': True, 'allow_put': False,
'is_visible': True, 'default': None,
'validate': {'type:uuid_o... | {
"content_hash": "009ccc85db2681d9a7abc4c9facf89c7",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 78,
"avg_line_length": 23.136363636363637,
"alnum_prop": 0.6198428290766208,
"repo_name": "noironetworks/apic-ml2-driver",
"id": "d506fb93418ce1a4c4034e2212f5ef48c5666fb6",
... |
from bokeh.charts import BoxPlot, output_file, show
from bokeh.sampledata.autompg import autompg as df
p = BoxPlot(df, values='mpg', label='cyl', outliers=False,
title="MPG Summary (grouped by CYL, no outliers)")
output_file("boxplot.html")
show(p)
| {
"content_hash": "a147cd8f55d10a422f77903ebbbfd13b",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 62,
"avg_line_length": 29.333333333333332,
"alnum_prop": 0.7121212121212122,
"repo_name": "draperjames/bokeh",
"id": "fb446792d2e02a0632e5661d382117a4669a2f46",
"size": "264... |
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("letters", "0011_letter_is_draft"),
]
operations = [
migr... | {
"content_hash": "3fa223a32dfe3059cd355a1d0535f811",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 66,
"avg_line_length": 29.296296296296298,
"alnum_prop": 0.5651074589127687,
"repo_name": "watchdogpolska/feder",
"id": "96f2392f147a11a4dec5254748ccec78a8ee45fb",
"size": ... |
from django.conf.urls import url
from twobuntu.categories import views
from twobuntu.feeds import CategoryArticlesFeed
urlpatterns = [
url(r'^(?P<id>\d+)/(?:(?P<slug>[\w-]+)/)?$', views.view, name='view'),
url(r'^rss/(?P<id>\d+)/$', CategoryArticlesFeed(), name='rss'),
]
| {
"content_hash": "f9e7d7a6466bab4757dba8eb9012e449",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 74,
"avg_line_length": 28.3,
"alnum_prop": 0.6466431095406361,
"repo_name": "2buntu/2buntu-blog",
"id": "b4653a7bdf90ace47360c3416e3347474bc0360a",
"size": "283",
"binary... |
__author__ = 'ar'
import os
import glob
import numpy as np
import matplotlib.pyplot as plt
import pycocotools.coco as coco
from pycocotools.coco import COCO
import skimage.io as skio
######################################
def findCatById(listCats, catId):
for ii in listCats:
if ii['id'] == catId:
... | {
"content_hash": "6989be0754b34642b9e4f04f3ff0fc35",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 88,
"avg_line_length": 30.38888888888889,
"alnum_prop": 0.5776965265082267,
"repo_name": "gakarak/FCN_MSCOCO_Food_Segmentation",
"id": "41a8125a6bbc31c6471fc23d7525e3efd2ba51... |
from django import template
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse
register = template.Library()
@register.filter
def rating_score(obj, user):
"""
Returns the score a user has given an object
"""
if not user.is_authenticated or not hasattr(obj, "_ra... | {
"content_hash": "755140d57b9212d331493f25f8238f96",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 78,
"avg_line_length": 23.80327868852459,
"alnum_prop": 0.6287878787878788,
"repo_name": "django/djangosnippets.org",
"id": "9219e2b79414b3044a107887a5505c7944f692b4",
"siz... |
import MyBot_core
| {
"content_hash": "859e37bb1808e326cb74a03527f6e908",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 17,
"avg_line_length": 18,
"alnum_prop": 0.8333333333333334,
"repo_name": "HaliteChallenge/Halite-II",
"id": "a7b1c492b5bafa666847a72eeec868fee5de9047",
"size": "18",
"bin... |
from ShareYourSystem.Classors.Representer import _print
from ShareYourSystem.Functers import Argumenter,Switcher
from ShareYourSystem.Objects import Setter
#Print a version of the class
_print(dict(Switcher.SwitcherClass.__dict__.items()))
#Print a version of this object
_print(Switcher.SwitcherClass())
#Print a ver... | {
"content_hash": "aedee73e648ce3dd004289eb6aa8e4b8",
"timestamp": "",
"source": "github",
"line_count": 111,
"max_line_length": 93,
"avg_line_length": 22.83783783783784,
"alnum_prop": 0.7510848126232742,
"repo_name": "Ledoux/ShareYourSystem",
"id": "9e9c189311bc8e5ac29b5bc2fa36bf8078f856d6",
"size"... |
"""Bitcoin P2P network half-a-node.
This python code was modified from ArtForz' public domain half-a-node, as
found in the mini-node branch of http://github.com/jgarzik/pynode.
P2PConnection: A low-level connection object to a node's P2P interface
P2PInterface: A high-level interface object for communicating to a no... | {
"content_hash": "7da06ad1daaf3d332b0fdc5c65f2f92e",
"timestamp": "",
"source": "github",
"line_count": 436,
"max_line_length": 182,
"avg_line_length": 37.5,
"alnum_prop": 0.6181039755351682,
"repo_name": "ppcoin/ppcoin",
"id": "a6860ee17f07596d85bc9a93884a02f51a85584c",
"size": "16655",
"binary"... |
from setuptools import setup
version = '3.0'
setup(name='dopamine',
packages = ['dopamine'],
version=version,
description="A library to use DopamineLabs machine learning API",
long_description="""\
This packages provides a class for interacting with the DopamineAPI from a python project. After... | {
"content_hash": "2ec5eb9b282e68eafd2b1cf187106cc2",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 435,
"avg_line_length": 49.42307692307692,
"alnum_prop": 0.7011673151750972,
"repo_name": "DopamineLabs/DopamineAPI_Python-Client",
"id": "7d7df2a0421bdba82d8867fd7fe86d5e3dd... |
from django.conf.urls import include, url
urlpatterns = [
url(r'^paginate_test/$', "utils.tests.pagination_test_func"),
]
| {
"content_hash": "97d29194de2eecd233c19378fe000358",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 65,
"avg_line_length": 18.428571428571427,
"alnum_prop": 0.689922480620155,
"repo_name": "mcmdhr/CSOJ",
"id": "2388e32c75123a4e23e2715511b1076d9df5ab8b",
"size": "441",
"b... |
"""Febelfin Bank Transaction Code designations.
See :doc:`/specs/b2c`.
"""
from lino.api import _
DESCRIPTIONS = {
'0101': _("Individual transfer order"),
'0102': _("Individual transfer order initiated by the bank"),
'0103': _("Standing order"),
'0105': _("Payment of wages, etc."),
'0107': _("Co... | {
"content_hash": "87848882a37de4f37b5c365b79acaed3",
"timestamp": "",
"source": "github",
"line_count": 295,
"max_line_length": 79,
"avg_line_length": 43.6135593220339,
"alnum_prop": 0.6004974351002642,
"repo_name": "lino-framework/xl",
"id": "632b57b30e8974bd54c0f1930b8eb24732fd35ca",
"size": "130... |
from itertools import groupby
from . import SimConcretizationStrategy
class SimConcretizationStrategyControlledData(SimConcretizationStrategy):
"""
Concretization strategy that constraints the address to controlled data.
Controlled data consists of symbolic data and the addresses given as arguments.
m... | {
"content_hash": "e5548b1595db0403116d17a544635ab6",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 147,
"avg_line_length": 43.84782608695652,
"alnum_prop": 0.6534457114526524,
"repo_name": "f-prettyland/angr",
"id": "62a6464082c7a642028bad4976e458728864d396",
"size": "20... |
"""Announcement SMTP based library.
The announcement SMTP based library with a simplified command line startup.
MIT licensed, Copyright (c) 2015
@author Oliver Merkel, Merkel(dot)Oliver(at)web(dot)de.
All rights reserved.
"""
from announcementconfig import *
from smtplib import SMTP
from string import Template
from ... | {
"content_hash": "c0143626c7e910cbe702df6e0643c908",
"timestamp": "",
"source": "github",
"line_count": 197,
"max_line_length": 108,
"avg_line_length": 34.69035532994924,
"alnum_prop": 0.6552531460345332,
"repo_name": "OMerkel/Announcement",
"id": "25ce4d955f0989c7075e4d6ccb11da030ab99a6e",
"size":... |
from django.contrib import admin
from tools.models import Tool, ToolCategory
# Register your models here.
class ToolAdmin(admin.ModelAdmin):
model = Tool
ordering = ('status',)
list_display = ('title', 'status')
admin.site.register(Tool, ToolAdmin)
# Register your models here.
class ToolCategoriesAdmin(admin.M... | {
"content_hash": "b8fdb2d3476835016fae628efb8ba2df",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 54,
"avg_line_length": 24.6875,
"alnum_prop": 0.769620253164557,
"repo_name": "ethdeveloper/ethdeveloper",
"id": "8f1f56246fcc599df93b3073e590d5bef56f2d3c",
"size": "395",
... |
'''
'''
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
import logging
import time
import argparse
# Custom MQTT message callback
def customCallback(client, userdata, message):
print("Received a new message: ")
print(message.payload)
print("from topic: ")
print(message.topic)
print("------... | {
"content_hash": "cf8b50eb3721325da86b583623cf4ab3",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 124,
"avg_line_length": 41.32967032967033,
"alnum_prop": 0.7053975006647168,
"repo_name": "duplocloud/duploiotagent",
"id": "070679727f72b5a831f7dc04d5eaf8c035f8cd7e",
"siz... |
from abc import abstractmethod
import codecs
import os
import time
from typing import Dict, Generator, List, Optional, Tuple, Union
import click
from lxml import etree
from perfectextractor.apps.core.base import BaseWorker
from .models import Alignment, MultiWordExpression
from .utils import TXT, XML, CSV, open_csv, ... | {
"content_hash": "01b08d2e8846e6aadecf18a7aa2ef034",
"timestamp": "",
"source": "github",
"line_count": 440,
"max_line_length": 121,
"avg_line_length": 39.56136363636364,
"alnum_prop": 0.5685643706554834,
"repo_name": "UUDigitalHumanitieslab/time-in-translation",
"id": "79674ac44f49d6fd7be967e74356df... |
"""Query and aggregate data from log files using SQL-like syntax"""
import sys
import argparse
import os
import re
import ast
import readline
import atexit
import time
import inspect
from multiprocessing import cpu_count
try:
from collections import OrderedDict
except ImportError:
# python < 2.7 compatability
... | {
"content_hash": "8fbe786440e631d6b488784bbce15ff1",
"timestamp": "",
"source": "github",
"line_count": 247,
"max_line_length": 189,
"avg_line_length": 36.1336032388664,
"alnum_prop": 0.5757983193277311,
"repo_name": "spuriousdata/logrok",
"id": "6a4bebbd0924d0fb439c9d505a90c6c3423656a4",
"size": "... |
import math
class Point(object):
def __init__(self, x=0, y=0, r=None, theta=None):
self.x, self.y = x,y
# convert from polar if necessary
if r is not None and theta is not None:
self.x = r * math.cos(theta)
self.y = r * math.sin(theta)
def __add__(self, other):
return Point(x = self.x + other.x, y = ... | {
"content_hash": "95b355310cf691cecd52576c2c6e08af",
"timestamp": "",
"source": "github",
"line_count": 103,
"max_line_length": 109,
"avg_line_length": 32.61165048543689,
"alnum_prop": 0.6805596903840428,
"repo_name": "MercerBinaryBears/Slides",
"id": "638e34d8029e1e55e86e5b2d776f353fba692fec",
"si... |
import urllib
import tornado.ioloop
import tornado.web
import tornado.auth
import tornado.httpclient
import tornado.escape
import tornado.httputil
import logging
class GithubMixin(tornado.auth.OAuth2Mixin):
""" Github OAuth Mixin, based on FacebookGraphMixin
"""
_OAUTH_AUTHORIZE_URL = 'https://github.com... | {
"content_hash": "f58e89b3eacff4799bfd089044e5c467",
"timestamp": "",
"source": "github",
"line_count": 111,
"max_line_length": 119,
"avg_line_length": 36.52252252252252,
"alnum_prop": 0.5860878145041933,
"repo_name": "richstoner/incf_engine",
"id": "c404ba01be3b0e9ec98937c2f04af449fb4bb874",
"size... |
try:
# Python 2.7
from collections import OrderedDict
except:
# Python 2.6
from gluon.contrib.simplejson.ordered_dict import OrderedDict
from gluon import current
from gluon.storage import Storage
def config(settings):
"""
Template settings for IFRC's Resource Management System
- A... | {
"content_hash": "a19ccb7030fe6f9dcf806d6523a592f0",
"timestamp": "",
"source": "github",
"line_count": 2127,
"max_line_length": 155,
"avg_line_length": 41.67842031029619,
"alnum_prop": 0.45766497461928934,
"repo_name": "gallifrey17/eden",
"id": "75c755c6ade2c3e475487079db38650d4016f0ea",
"size": "... |
import abjad
from abjad.tools import lilypondnametools
from abjad.tools import spannertools
from abjad.tools import markuptools
class ComplexTextSpanner(spannertools.Spanner):
r'''A complex text spanner.
.. container:: example
::
>>> staff = abjad.Staff("c'4 d'4 r4 e'4")
>>... | {
"content_hash": "895251e53bdb3487831f62eede428d31",
"timestamp": "",
"source": "github",
"line_count": 393,
"max_line_length": 92,
"avg_line_length": 36.404580152671755,
"alnum_prop": 0.5087020339693856,
"repo_name": "josiah-wolf-oberholtzer/consort",
"id": "1436eab59c81248ea974602be462b2da6e231c8d"... |
import copy
import math
from oslo_log import log as logging
from oslo_utils import importutils
import six
from cinder import exception
from cinder.i18n import _, _LW
from cinder import utils
from cinder.volume.drivers.netapp.dataontap.client import client_base
from cinder.volume.drivers.netapp import utils as na_util... | {
"content_hash": "da3e28f79022cd51ade40d0f80d0475f",
"timestamp": "",
"source": "github",
"line_count": 603,
"max_line_length": 79,
"avg_line_length": 43.550580431177444,
"alnum_prop": 0.5348996610943986,
"repo_name": "scottdangelo/RemoveVolumeMangerLocks",
"id": "ce199bf656b0df8d91d5ca978df4bed6e97f... |
from django.conf import settings
from django.db.models import Q
from django.http import Http404
from django.shortcuts import get_object_or_404
from rest_framework import status
from rest_framework.authentication import BaseAuthentication
from rest_framework.decorators import (api_view, authentication_classes,
... | {
"content_hash": "de64be872aaa6df233926cbb07c80409",
"timestamp": "",
"source": "github",
"line_count": 334,
"max_line_length": 77,
"avg_line_length": 37.4251497005988,
"alnum_prop": 0.64096,
"repo_name": "Joergen/zamboni",
"id": "8bf37f553dc7ecf4c5fe57f04c0095b4cb18ebd9",
"size": "12500",
"binar... |
import pytest
import numpy as np
from numpy.testing import assert_allclose
from sklearn.compose import ColumnTransformer
from sklearn.datasets import load_diabetes
from sklearn.datasets import load_iris
from sklearn.datasets import make_classification
from sklearn.datasets import make_regression
from sklearn.dummy im... | {
"content_hash": "3e47d099c059456c2388ab4ee18a8ed8",
"timestamp": "",
"source": "github",
"line_count": 353,
"max_line_length": 79,
"avg_line_length": 39.55807365439094,
"alnum_prop": 0.6842595244915497,
"repo_name": "bnaul/scikit-learn",
"id": "2b381e9a20b1a86706a8ca6b94eaaae817b6f9be",
"size": "1... |
import sys, shutil, os, hashlib
def usage():
print "This program moves all .tile files in the current directory to"
print "\ta file named based on their MD5 values."
print "usage: move_tiles.py"
if __name__ == '__main__':
if "--help" in sys.argv:
usage()
else:
for file in os.listdi... | {
"content_hash": "5148a50583ea65ef2288e7589961966b",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 74,
"avg_line_length": 31.375,
"alnum_prop": 0.545816733067729,
"repo_name": "eaburns/pbnf",
"id": "0b8f888f6d281327600f9281a8e5df520624a61a",
"size": "653",
"binary": fa... |
from longclaw.configuration.models import Configuration
def currency(request):
config = Configuration.for_site(request.site)
return {
'currency_html_code': config.currency_html_code,
'currency': config.currency
}
| {
"content_hash": "78de7ad99250c757b51b5dd3e423a8a3",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 56,
"avg_line_length": 30.25,
"alnum_prop": 0.7066115702479339,
"repo_name": "JamesRamm/longclaw",
"id": "aa1373c4a225f3a200120624e66b8f8fa924f50a",
"size": "242",
"binary... |
import numpy as np
import tensorflow as tf
def pairwise_add(u, v=None, is_batch=False):
"""
performs a pairwise summation between vectors (possibly the same)
Parameters:
----------
u: Tensor (n, ) | (n, 1)
v: Tensor (n, ) | (n, 1) [optional]
is_batch: bool
a flag for whether the ve... | {
"content_hash": "92860d3de55fcee8d802d16e3139ea9c",
"timestamp": "",
"source": "github",
"line_count": 135,
"max_line_length": 141,
"avg_line_length": 32.318518518518516,
"alnum_prop": 0.6245702498280999,
"repo_name": "thaihungle/deepexp",
"id": "f853d2c7ca708ee0d6ea1abb16f30164cc0dbb2c",
"size": ... |
"""Functions to perform actions related to voiceover application."""
from __future__ import annotations
from core import feconf
from core.domain import email_manager
from core.domain import exp_fetchers
from core.domain import opportunity_services
from core.domain import rights_domain
from core.domain import rights_m... | {
"content_hash": "feec78ad54a7583987a1a006d5a5ba59",
"timestamp": "",
"source": "github",
"line_count": 312,
"max_line_length": 80,
"avg_line_length": 39.69551282051282,
"alnum_prop": 0.7062575696406944,
"repo_name": "brianrodri/oppia",
"id": "4cb83051c08b33b0ad25654a2da2325e7cc1d8ec",
"size": "129... |
"""Test RPC misc output."""
import xml.etree.ElementTree as ET
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_raises_rpc_error,
assert_equal,
assert_greater_than,
assert_greater_than_or_equal,
)
from test_framework.authproxy import JSONRPCExcept... | {
"content_hash": "2596ecf62656f4f3e18eba48c7fd2b4a",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 141,
"avg_line_length": 37.17777777777778,
"alnum_prop": 0.6102809324566647,
"repo_name": "rnicoll/dogecoin",
"id": "b30b288ff4266bc39620d9b18c73876eca449a86",
"size": "355... |
from django.conf import settings
from django import test
from django.utils import translation
from django.utils.functional import lazy
import jinja2
from nose.tools import eq_
from test_utils import ExtraAppTestCase, trans_eq
from testapp.models import TranslatedModel, UntranslatedModel, FancyModel
from translations.... | {
"content_hash": "a21fc99828ddb3a5aed9b0b925eb2559",
"timestamp": "",
"source": "github",
"line_count": 374,
"max_line_length": 79,
"avg_line_length": 36.40909090909091,
"alnum_prop": 0.5993978115590806,
"repo_name": "washort/gelato.models",
"id": "8ba156318be3a7eafb8890bc9067534e53394df2",
"size":... |
import numpy
from io import BytesIO
import aggdraw as agg
from . import AggHelp
from ginga import ImageView
from ginga.aggw.CanvasRenderAgg import CanvasRenderer
try:
import PIL.Image as PILimage
have_PIL = True
except ImportError:
have_PIL = False
class ImageViewAggError(ImageView.ImageViewError):
... | {
"content_hash": "0389ce988c5e7136d1df89194abad30b",
"timestamp": "",
"source": "github",
"line_count": 141,
"max_line_length": 77,
"avg_line_length": 31.070921985815602,
"alnum_prop": 0.6135585482766491,
"repo_name": "stscieisenhamer/ginga",
"id": "acede338b5b4477473d08b5381bdcbb71a6abe7b",
"size"... |
from multiprocessing import Array, Event, Process
from time import sleep
from ujson import loads as json_loads
from sanic import Sanic
from sanic.response import json
from sanic.utils import local_request, HOST, PORT
# ------------------------------------------------------------ #
# GET
# --------------------------... | {
"content_hash": "b8cd359cf522f5ffb3aca4475aa38aa4",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 80,
"avg_line_length": 26.849056603773583,
"alnum_prop": 0.5818692902319045,
"repo_name": "hhstore/flask-annotated",
"id": "545ecee76bfb9a7489c8bbce73c0f9dd495d4a5b",
"size... |
#!/usr/bin/env python
#Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com)
#
#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 rig... | {
"content_hash": "c9ad97106788481e9c1c770e1cf461d3",
"timestamp": "",
"source": "github",
"line_count": 240,
"max_line_length": 188,
"avg_line_length": 45.954166666666666,
"alnum_prop": 0.6444827273551545,
"repo_name": "harvardinformatics/jobTree",
"id": "0c7ea6c5db3047b706cbd639eb2cb5bad240e5b4",
... |
from a10sdk.common.A10BaseClass import A10BaseClass
class Dblb(A10BaseClass):
"""Class Description::
DBLB template.
Class dblb supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param uuid: {"description": "uuid of the obj... | {
"content_hash": "09f476c888aa28c2d87eac9dd6da0d1c",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 257,
"avg_line_length": 40.53488372093023,
"alnum_prop": 0.6201950659781985,
"repo_name": "a10networks/a10sdk-python",
"id": "8b0395bdd099ad7d8d6314c88669a031f697f505",
"si... |
"""
A minimal front end to the Docutils Publisher, producing LaTeX.
"""
try:
import locale
locale.setlocale(locale.LC_ALL, '')
except:
pass
from docutils.core import publish_cmdline
description = ('Generates LaTeX documents from standalone reStructuredText '
'sources. '
'Rea... | {
"content_hash": "773adf846f79caa50c7bd264183c4f98",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 76,
"avg_line_length": 30.4,
"alnum_prop": 0.6447368421052632,
"repo_name": "ENCODE-DCC/pyencoded-tools",
"id": "688edf3449fd25c6c352fa41ae98c59c6bb3eca5",
"size": "823",
... |
from google.cloud import kms_v1
def sample_list_crypto_keys():
# Create a client
client = kms_v1.KeyManagementServiceClient()
# Initialize request argument(s)
request = kms_v1.ListCryptoKeysRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_crypto_keys... | {
"content_hash": "d9bde8fb5bd11d06eaed96425415f821",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 70,
"avg_line_length": 24.7,
"alnum_prop": 0.7004048582995951,
"repo_name": "googleapis/python-kms",
"id": "4f9b57a0352ba5a23c5a7c5550fba9eff4c33a64",
"size": "1885",
"bi... |
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User as DjangoUser
from anaf.core.models import Group, Perspective, ModuleSetting
from models import Ticket, TicketQueue, TicketStatus, ServiceAgent, Service, ServiceLevelAgreement
from anaf.identities.m... | {
"content_hash": "9bf7e21b50e50063131a86b1b13949e5",
"timestamp": "",
"source": "github",
"line_count": 585,
"max_line_length": 100,
"avg_line_length": 44.473504273504275,
"alnum_prop": 0.6137909828189261,
"repo_name": "tovmeod/anaf",
"id": "70bb237a33a7b8508cfd52822d9b158f32d4e008",
"size": "26017... |
import ipywidgets as widgets
class FormValue(widgets.HBox):
def __init__(self, name, **kwargs):
self.name = name
width = kwargs.get('width', 'auto')
self._ncb = kwargs.get('cb')
# accept either 'description' or 'desc'
desc = kwargs.get('desc', kwargs.get('description', ''... | {
"content_hash": "8f4fdc9b145b11c036746437c93e7b94",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 101,
"avg_line_length": 30.01818181818182,
"alnum_prop": 0.5860084797092671,
"repo_name": "martin-hunt/hublib",
"id": "7b09c44e1da6325ca9c8fd832786595162b61042",
"size": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.