repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
feist/pcs
pcs/lib/cib/resource/primitive.py
1
8042
from lxml import etree from pcs.common import report_codes from pcs.lib import reports from pcs.lib.cib.nvpair import ( append_new_instance_attributes, append_new_meta_attributes, get_value, get_nvset_as_dict, ) from pcs.lib.cib.resource.operations import( prepare as prepare_operations, create_...
gpl-2.0
-2,313,638,528,757,066,000
31.82449
80
0.645984
false
cesargtz/YecoraOdoo
addons/l10n_pa/__openerp__.py
260
1737
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
2,930,209,654,749,003,300
33.019608
78
0.605764
false
teije01/Doris-StaMPS-int
Sentinel/BperpDate.py
1
7306
#!/usr/bin/env python import numpy as np import sys import numpy.polynomial.polynomial as poly from scipy import interpolate from scipy.optimize import fmin arg = sys.argv; #print arg def readorb(filename): with open(filename, "r") as ins: array = [] mode = "search" for line in ins: ...
mit
-4,376,313,829,112,523,300
31.471111
107
0.531344
false
ARM-software/bob-build
config_system/tests/run_tests_formatter.py
1
2381
#!/usr/bin/env python # Copyright 2019 Arm Limited. # SPDX-License-Identifier: Apache-2.0 # # 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 #...
apache-2.0
349,623,053,536,688,200
28.7625
86
0.638387
false
PinguinoIDE/pinguino-ide
pinguino/qtgui/ide/methods/timed_methods.py
1
10604
#!/usr/bin/env python #-*- coding: utf-8 -*- import os import codecs from PySide2 import QtGui from .core_threads import UpdateAutocompleter from ..methods.decorators import Decorator # from ..tools.code_navigator import self from ..methods.dialogs import Dialogs ####################################################...
gpl-2.0
-3,271,880,996,313,087,000
38.715356
117
0.580913
false
hickey/amforth
core/devices/at90can64/device.py
5
9972
# Partname: AT90CAN64 # generated automatically, do not edit MCUREGS = { 'PORTA': '&34', 'DDRA': '&33', 'PINA': '&32', 'PORTB': '&37', 'DDRB': '&36', 'PINB': '&35', 'PORTC': '&40', 'DDRC': '&39', 'PINC': '&38', 'PORTD': '&43', 'DDRD': '&42', 'PIND': '&41', 'PORTE': '&46', 'DDRE': '&45', 'PINE': '&44', ...
gpl-2.0
8,847,281,556,092,558,000
21.665909
38
0.481949
false
ct-23/home-assistant
homeassistant/components/sensor/google_travel_time.py
3
9936
""" Support for Google travel time sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.google_travel_time/ """ from datetime import datetime from datetime import timedelta import logging import voluptuous as vol from homeassistant.components...
apache-2.0
-1,500,978,648,483,499,500
35.529412
77
0.604368
false
fbradyirl/home-assistant
script/hassfest/__main__.py
1
2256
"""Validate manifests.""" import pathlib import sys from .model import Integration, Config from . import codeowners, config_flow, dependencies, manifest, services, ssdp, zeroconf PLUGINS = [codeowners, config_flow, dependencies, manifest, services, ssdp, zeroconf] def get_config() -> Config: """Return config.""...
apache-2.0
1,487,302,839,008,185,600
27.2
87
0.617908
false
dwfreed/mitmproxy
test/pathod/tservers.py
4
3497
import tempfile import re import shutil import requests import io import urllib from mitmproxy.net import tcp from mitmproxy.test import tutils from pathod import language from pathod import pathoc from pathod import pathod from pathod import test def treader(bytes): """ Construct a tcp.Read object fro...
mit
-8,591,084,572,792,553,000
23.117241
66
0.496997
false
Yuriy-Leonov/nova
nova/api/openstack/compute/contrib/extended_floating_ips.py
15
1055
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # 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-...
apache-2.0
4,511,040,822,980,275,700
38.074074
78
0.718483
false
ROMFactory/android_external_chromium_org
build/protoc_java.py
90
1317
#!/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. """Generate java source files from protobufs Usage: protoc_java.py {protoc} {proto_path} {java_out} {stamp_file} {proto_files}...
bsd-3-clause
8,742,060,042,102,386,000
22.517857
78
0.681853
false
kambysese/mne-python
examples/preprocessing/plot_virtual_evoked.py
10
1912
""" ======================= Remap MEG channel types ======================= In this example, MEG data are remapped from one channel type to another. This is useful to: - visualize combined magnetometers and gradiometers as magnetometers or gradiometers. - run statistics from both magnetometers and gradi...
bsd-3-clause
-7,705,605,516,967,098,000
33.763636
79
0.571653
false
bcl/pykickstart
pykickstart/handlers/rhel3.py
3
3887
# # Chris Lumens <clumens@redhat.com> # # Copyright 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be usef...
gpl-2.0
9,018,431,750,590,843,000
44.197674
79
0.693851
false
thomashaw/SecGen
modules/utilities/unix/ctf/metactf/files/repository/src_angr/solutions/17_angr_arbitrary_jump/scaffold17.py
3
5173
import angr import claripy import sys def main(argv): path_to_binary = argv[1] project = angr.Project(path_to_binary) initial_state = ??? # An under-constrained (unconstrained) state occurs when there are too many # possible branches from a single instruction. This occurs, among other ways, # when the i...
gpl-3.0
9,003,968,272,649,144,000
39.100775
88
0.67485
false
Phosphenius/battle-snakes
src/skinpacker.py
1
2068
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Script for packing and unpacking skin textures """ import argparse from pygame import image, Surface, Rect, transform from pygame.locals import SRCALPHA from utils import add_vecs HEAD = Rect(0, 0, 10, 10) STRAIGHT1 = Rect(20, 20, 10, 10) STRAIGHT2 = Rect(30, 20, 10...
mit
-4,247,806,216,348,837,400
27.722222
71
0.552224
false
NMGRL/pychron
pychron/pipeline/plot/overlays/mean_indicator_overlay.py
2
8405
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
7,355,818,399,855,848,000
32.090551
103
0.496609
false
mzdaniel/oh-mainline
vendor/packages/django-model-utils/model_utils/models.py
2
4347
import warnings from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import FieldDoesNotExist from django.core.exceptions import ImproperlyConfigured from model_utils....
agpl-3.0
7,256,281,790,793,202,000
31.684211
77
0.642052
false
rr326/servi
servi/config.py
1
6717
import os import os.path import logging from logging import warning as warn import collections import yaml from jinja2 import Environment, DictLoader from servi.exceptions import MasterNotFound, ServiError ''' Global configuration for servi files Use as import config as c Note - this will also read in additional va...
mit
3,468,425,310,789,938,000
28.208696
79
0.630043
false
StryKaizer/Brew
djangoproject/brew/migrations/0007_auto__chg_field_mashingtemplog_degrees.py
1
2586
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'MashingTempLog.degrees' db.alter_column('brew_mashingtemplog', 'degrees', self.gf('django...
isc
-5,131,017,576,390,685,000
46.036364
138
0.549884
false
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/Week_3/playground/env/Lib/site-packages/dateutil/tz/_factories.py
19
1434
from datetime import timedelta class _TzSingleton(type): def __init__(cls, *args, **kwargs): cls.__instance = None super(_TzSingleton, cls).__init__(*args, **kwargs) def __call__(cls): if cls.__instance is None: cls.__instance = super(_TzSingleton, cls).__call__() ...
apache-2.0
2,647,980,680,884,885,000
28.265306
77
0.550209
false
mattcongy/itshop
docker-images/taigav2/taiga-back/taiga/front/sitemaps/epics.py
2
1994
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
mit
5,995,191,063,229,191,000
35.888889
99
0.680723
false
hsaputra/tensorflow
tensorflow/python/keras/_impl/keras/datasets/cifar100.py
13
2130
# Copyright 2015 The TensorFlow 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 required by applica...
apache-2.0
-5,493,189,598,599,294,000
33.354839
80
0.674178
false
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/internal/backends/chrome/fuchsia_browser_finder.py
1
3039
# Copyright 2019 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. """Finds Fuchsia browsers that can be started and controlled by telemetry.""" from telemetry.core import fuchsia_interface from telemetry.core import platfor...
bsd-3-clause
6,158,092,294,778,516,000
28.504854
79
0.730174
false
jni/networkx
examples/graph/knuth_miles.py
36
2994
#!/usr/bin/env python """ An example using networkx.Graph(). miles_graph() returns an undirected graph over the 128 US cities from the datafile miles_dat.txt. The cities each have location and population data. The edges are labeled with the distance betwen the two cities. This example is described in Section 1.1 in ...
bsd-3-clause
1,061,707,336,581,686,000
25.972973
72
0.579826
false
2014cdbg3/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/imp.py
637
9839
"""This module provides the components needed to build your own __import__ function. Undocumented functions are obsolete. In most cases it is preferred you consider using the importlib module's functionality over this module. """ # (Probably) need to stay in _imp from _imp import (lock_held, acquire_lock, release_lo...
gpl-2.0
-851,577,233,260,649,900
33.28223
83
0.617644
false
mlperf/training_results_v0.5
v0.5.0/google/cloud_v3.8/gnmt-tpuv3-8/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/shape_utils.py
22
2359
# Copyright 2017 The TensorFlow 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 required by applica...
apache-2.0
2,291,649,656,630,872,800
32.7
80
0.697329
false
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/asynchat.py
53
12133
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission...
apache-2.0
-2,877,506,005,519,607,000
35.110119
92
0.574961
false
jomolinare/crate-web
src/web/utils.py
1
1865
# vim: set fileencodings=utf-8 # -*- coding: utf-8 -*- __docformat__ = "reStructuredText" import re import hashlib import logging from StringIO import StringIO from datetime import datetime from markdown2 import markdown from django.utils.html import strip_tags from django.utils.text import Truncator from django.ut...
apache-2.0
2,349,779,469,422,588,000
30.083333
136
0.594638
false
eneldoserrata/marcos_openerp
addons/hr_expense/__openerp__.py
47
2927
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-4,339,387,155,246,486,500
39.625
244
0.635897
false
jankoslavic/numpy
numpy/distutils/extension.py
162
3043
"""distutils.extension Provides the Extension class, used to describe C/C++ extension modules in setup scripts. Overridden to support f2py. """ from __future__ import division, absolute_import, print_function import sys import re from distutils.extension import Extension as old_Extension if sys.version_info[0] >= ...
bsd-3-clause
4,789,670,299,745,683,000
32.811111
82
0.524811
false
veger/ansible
lib/ansible/plugins/action/async_status.py
26
2115
# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase from ansible...
gpl-3.0
-6,943,613,779,483,804,000
40.470588
92
0.602364
false
domenkozar/nixops
nixops/backends/virtualbox.py
1
13850
# -*- coding: utf-8 -*- import os import sys import time import shutil import stat from nixops.backends import MachineDefinition, MachineState import nixops.known_hosts sata_ports = 8 class VirtualBoxDefinition(MachineDefinition): """Definition of a VirtualBox machine.""" @classmethod def get_type(cls...
lgpl-3.0
6,952,973,712,270,845,000
37.37883
169
0.544419
false
dursk/django
django/contrib/gis/geos/prototypes/threadsafe.py
529
2859
import threading from django.contrib.gis.geos.libgeos import ( CONTEXT_PTR, error_h, lgeos, notice_h, ) class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the noti...
bsd-3-clause
2,637,667,330,166,260,700
29.741935
81
0.624344
false
barachka/odoo
addons/purchase/report/purchase_report.py
49
6707
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-5,790,953,001,636,079,000
50.992248
160
0.535858
false
fuziontech/sentry
src/sentry/utils/samples.py
2
2278
""" sentry.utils.samples ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os.path from sentry.constants import DATA_ROOT, PLATFORM_ROOTS, PLATFORM_TITLES from sentry.event_manager...
bsd-3-clause
8,358,280,970,425,862,000
24.595506
136
0.565408
false
Willyham/tchannel-python
tchannel/messages/ping_request.py
1
1385
# Copyright (c) 2015 Uber Technologies, Inc. # # 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, publ...
mit
4,911,558,287,249,796,000
40.969697
79
0.769675
false
tammoippen/nest-simulator
pynest/nest/__init__.py
8
7112
# -*- coding: utf-8 -*- # # __init__.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 2 of the License, or # ...
gpl-2.0
-4,803,291,507,027,186,000
27.448
78
0.623453
false
sivaramakrishnansr/ryu
ryu/lib/packet/linux.py
38
2264
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
-774,907,233,702,992,600
35.516129
74
0.687721
false
Naeka/vosae-app
www/timeline/api/resources/base.py
1
1627
# -*- coding:Utf-8 -*- from tastypie import fields as base_fields from tastypie_mongoengine import fields from core.api.utils import TenantResource from timeline.models import TimelineEntry from timeline.api.doc import HELP_TEXT __all__ = ( 'TimelineEntryBaseResource', ) class TimelineEntryBaseResource(TenantR...
agpl-3.0
8,909,035,884,849,488,000
30.901961
85
0.648433
false
acfogarty/espressopp
contrib/mpi4py/mpi4py-2.0.0/test/test_datatype.py
8
16240
from mpi4py import MPI import mpiunittest as unittest datatypes_c = [ MPI.CHAR, MPI.WCHAR, MPI.SIGNED_CHAR, MPI.SHORT, MPI.INT, MPI.LONG, MPI.UNSIGNED_CHAR, MPI.UNSIGNED_SHORT, MPI.UNSIGNED, MPI.UNSIGNED_LONG, MPI.LONG_LONG, MPI.UNSIGNED_LONG_LONG, MPI.FLOAT, MPI.DOUBLE, MPI.LONG_DOUBLE, ] datatypes_c99 = [ MPI.C_BOOL...
gpl-3.0
-5,648,149,145,489,475,000
37.301887
89
0.564901
false
lfckop/graphite-web
webapp/tests/test_finders.py
39
1517
import random import time from django.test import TestCase from graphite.intervals import Interval, IntervalSet from graphite.node import LeafNode, BranchNode from graphite.storage import Store, get_finder class FinderTest(TestCase): def test_custom_finder(self): store = Store(finders=[get_finder('tests...
apache-2.0
6,148,608,675,714,370,000
28.173077
77
0.603164
false
skidzo/sympy
sympy/stats/error_prop.py
19
3119
"""Tools for arithmetic error propogation.""" from __future__ import print_function, division from itertools import repeat, combinations from sympy import S, Symbol, Add, Mul, simplify, Pow, exp from sympy.stats.symbolic_probability import RandomSymbol, Variance, Covariance _arg0_or_var = lambda var: var.args[0] if l...
bsd-3-clause
7,426,842,089,598,248,000
33.655556
82
0.582879
false
KevinNJ/Projects
Sallen Key Solver/SallenKey_Design.py
1
5404
# -*- coding: utf-8 -*- from __future__ import division import math import random import matplotlib.pyplot as plt import scipy.signal as sig from itertools import product from misc import common_part_values, metric_prefix from anneal import Annealer # Setup optimization targets target_q = 0.707 #...
mit
-4,195,785,991,462,016,000
29.590643
125
0.590522
false
popazerty/blackhole-vuplus
tools/svg2skin.py
57
2482
#!/usr/bin/python # don't expect too much. # this is a really simple&stupid svg parser, which will use rectangles # and text fields to produce <widget> snippets for a skin. # use object "id" fields for source names if you want. # extracting font information is buggy. # if you want text fields, please use flow text regi...
gpl-2.0
-1,516,366,406,416,120,300
25.688172
122
0.637792
false
glogiotatidis/mozillians-new
vendor-local/lib/python/celery/tests/test_task/__init__.py
14
31806
from __future__ import absolute_import from __future__ import with_statement from datetime import datetime, timedelta from functools import wraps from celery import task from celery.app import app_or_default from celery.task import task as task_dec from celery.exceptions import RetryTaskError from celery.execute impo...
bsd-3-clause
2,002,775,386,134,274,600
34.979638
78
0.594385
false
OpenNeuroLab/brainspell-neo
brainspell/article_helpers.py
2
15579
# functions related to adding and editing article data import re import urllib.request import Bio from Bio import Entrez, Medline from Bio.Entrez import efetch, esearch, parse, read from models import * from search_helpers import get_article_object Entrez.email = "neel@berkeley.edu" # BEGIN: article helper functio...
mit
-444,295,727,874,853,400
30.793878
103
0.581616
false
titasakgm/brc-stock
openerp/addons/report_geraldo/lib/geraldo/geraldo/utils.py
7
4767
import sys try: import reportlab except ImportError: cm = 28.346456692913385 A4 = (595.275590551181, 841.8897637795275) black = None TA_LEFT, TA_CENTER, TA_RIGHT = 0, 1, 2 landscape = lambda t:(t[1],t[0]) else: from reportlab.lib.units import * # Check this - is the source of units from...
agpl-3.0
-8,679,180,624,890,607,000
28.981132
114
0.651353
false
strk/QGIS
tests/src/python/test_qgsrasterrerderer_createsld.py
15
29445
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsrasterrenderer_createsld.py --------------------- Date : December 2018 Copyright : (C) 2018 by Luigi Pirelli Email : luipir at gmail dot com *****...
gpl-2.0
8,477,634,650,018,969,000
50.931217
196
0.668908
false
Yukarumya/Yukarum-Redfoxes
third_party/rust/unicode-bidi/tools/generate.py
1
7122
#!/usr/bin/env python # # Based on src/etc/unicode.py from Rust 1.2.0. # # Copyright 2011-2013 The Rust Project Developers. # Copyright 2015 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache Licen...
mpl-2.0
8,501,669,058,603,427,000
31.372727
95
0.559955
false
ip-tools/ip-navigator
patzilla/util/text/format.py
1
1253
# -*- coding: utf-8 -*- # (c) 2014-2016 Andreas Motl, Elmyra UG import re _slugify_strip_re = re.compile(r'[^\w\s-]') _slugify_strip_wo_equals_re = re.compile(r'[^\w\s=-]') _slugify_hyphenate_re = re.compile(r'[-\s]+') def slugify(value, strip_equals=True, lowercase=True): """ Normalizes string, converts to lo...
agpl-3.0
8,734,895,882,604,972,000
33.805556
113
0.659218
false
Letractively/userinfuser
serverside/entities/badges.py
12
4345
# Copyright (C) 2011, CloudCaptive # # 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. # # This program is distributed i...
gpl-3.0
6,005,465,396,798,948,000
36.782609
85
0.762486
false
LukeMurphey/splunk-network-tools
src/bin/network_tools_app/ipwhois/nir.py
1
23132
# Copyright (c) 2013-2019 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and...
apache-2.0
2,106,532,206,882,849,500
32.917889
79
0.490576
false
fxfitz/ansible
lib/ansible/modules/network/f5/bigip_gtm_datacenter.py
14
13189
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
8,706,962,929,824,958,000
27.796943
91
0.604822
false
abhiatgithub/shogun-toolbox
examples/undocumented/python_modular/classifier_featureblock_logistic_regression.py
17
1312
#!/usr/bin/env python from numpy import array,hstack from numpy.random import seed, rand from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_numbers('../data/fm_train_real.dat') testdat = lm.load_numbers('../data/fm_test_real.dat') label_traindat = lm.load_labels('../data/label_train_twoclass.dat') p...
gpl-3.0
5,645,723,405,197,600,000
34.459459
111
0.766768
false
dstrockis/outlook-autocategories
lib/cryptography/hazmat/primitives/asymmetric/dh.py
13
4852
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import six from cryptography import utils def generate_par...
apache-2.0
-8,761,201,166,182,098,000
24.671958
79
0.61047
false
romain-dartigues/ansible
lib/ansible/modules/network/f5/bigip_device_syslog.py
9
18823
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
833,631,243,585,975,200
24.855769
91
0.592042
false
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/idlelib/idle_test/test_textview.py
79
2871
'''Test the functions and main class method of textView.py. Since all methods and functions create (or destroy) a TextViewer, which is a widget containing multiple widgets, all tests must be gui tests. Using mock Text would not change this. Other mocks are used to retrieve information about calls. The coverage is es...
gpl-2.0
-697,528,611,282,193,900
28.597938
79
0.650296
false
sublee/almost
almosttests.py
1
4697
# -*- coding: utf-8 -*- import math import sys from pytest import deprecated_call from almost import almost def test_repeating_decimal(): assert almost(1 / 3.) == 0.333 assert almost(1 / 6.) == 0.167 assert almost(3227 / 555., prec=6) == 5.814414 def test_irrational_number(): assert almost(math.pi...
bsd-3-clause
9,126,364,334,814,774,000
30.313333
79
0.543751
false
kingvuplus/ME-TEST2
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
10
4102
# -*- coding: iso-8859-1 -*- # (c) 2006 Stephan Reichholf # This Software is Free, use it where you want, when you want for whatever you want and modify it if you want but don't remove my copyright! from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.MessageBox import MessageBox f...
gpl-2.0
5,810,372,187,983,657,000
28.941606
177
0.705022
false
BoGoEngine/ibus-bogo
ibus_engine/base_config.py
1
3649
# # This file is part of ibus-bogo project. # # Copyright (C) 2012 Long T. Dam <longdt90@gmail.com> # Copyright (C) 2012-2013 Trung Ngo <ndtrung4419@gmail.com> # Copyright (C) 2013 Duong H. Nguyen <cmpitg@gmail.com> # # ibus-bogo is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
gpl-3.0
4,221,742,663,541,760,000
27.732283
70
0.588928
false
PyBossa/pybossa
test/test_sched_2.py
1
3260
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
-3,752,032,101,376,897,500
35.222222
91
0.632515
false
genenetwork/genenetwork2_diet
wqflask/wqflask/heatmap/heatmap.py
1
12293
from __future__ import absolute_import, print_function, division import sys sys.path.append(".") import gc import string import cPickle import os import datetime import time import pp import math import collections import resource import scipy import numpy as np from scipy import linalg from pprint import pformat a...
agpl-3.0
-3,729,645,642,327,297,500
37.901899
142
0.521435
false
vadimtk/chrome4sdp
third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
51
4991
# Copyright (C) 2010 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
4,734,112,231,349,241,000
43.963964
133
0.661992
false
dmchoull/cdeploy
cdeploy/migrator.py
1
3928
import os import sys import yaml from cassandra.cluster import Cluster from cqlexecutor import CQLExecutor class Migrator: def __init__(self, migrations_path, session): print('Reading migrations from {0}'.format(migrations_path)) self.migrations_path = migrations_path self.session = sessio...
apache-2.0
3,149,915,204,304,144,000
30.685484
120
0.655295
false
walke469/spartahack-17
ballotbuilder/lib/python3.5/site-packages/werkzeug/debug/console.py
256
5599
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
bsd-2-clause
1,338,724,053,757,779,500
25.04186
93
0.569387
false
cloudera/hue
desktop/core/ext-py/zope.interface-4.5.0/src/zope/interface/tests/test_document.py
5
16637
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
apache-2.0
7,100,911,926,255,284,000
31.944554
79
0.509347
false
h4ck3rm1k3/FEC-Field-Documentation
fec/version/v7_0/F3.py
3
6647
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER COMMITTEE ID NUMBER', 'number': '2'}, {'name': 'COMMITTEE NAME', 'number': '3'}, ...
unlicense
8,093,536,693,214,553,000
65.47
97
0.504137
false
theetcher/fxpt
fxpt/fx_prefsaver/ctrl_maya.py
1
3651
import pymel.core.uitypes as pmui from ctrl_pymel import getController as pmGetController from pstypes import UIType from com import message IDX_PM_TYPE = 0 IDX_PM_CLASS = 1 constructors = { UIType.MCheckBox: [UIType.PMCheckBox, pmui.CheckBox], UIType.MCheckBoxGrp1: [UIType.PMCheckBoxGrp1, pmui.CheckBoxGrp],...
mit
2,828,684,900,872,439,000
56.046875
94
0.780608
false
lahcoin/lahcoin
contrib/bitrpc/bitrpc.py
22
7838
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8638") else: access = Ser...
mit
1,663,038,747,795,507,000
23.191358
79
0.661776
false
Averroes/raft
core/data/DomFuzzerResultsDataModel.py
11
1487
# # This module supports the data model for the responses data for TreeViews # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
596,395,145,326,268,700
37.128205
103
0.71957
false
thonkify/thonkify
src/lib/unidecode/x08a.py
253
4647
data = ( 'Yan ', # 0x00 'Yan ', # 0x01 'Ding ', # 0x02 'Fu ', # 0x03 'Qiu ', # 0x04 'Qiu ', # 0x05 'Jiao ', # 0x06 'Hong ', # 0x07 'Ji ', # 0x08 'Fan ', # 0x09 'Xun ', # 0x0a 'Diao ', # 0x0b 'Hong ', # 0x0c 'Cha ', # 0x0d 'Tao ', # 0x0e 'Xu ', # 0x0f 'Jie ', # 0x10 'Yi...
mit
-3,254,872,024,097,134,000
17.011628
21
0.392511
false
polarise/BioClasses
count_paths_in_sequence.py
1
1624
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import division import sys import time from Node import * from LeafCounter import * from Sequence import * from Bio import SeqIO from TransitionMatrix import * import cPickle from GeneticCode import * def main( fn ): TM = TransitionMatrix() TM.read( "tr...
gpl-2.0
4,254,871,458,882,988,500
25.639344
102
0.647783
false
gratefulfrog/SPI
RPI/Python/OLD/oscSerialApp_tooSlow/master.py
1
13258
#!/usr/bin/python3 # example call # ./master.py /dev/ttyUSB0 /dev/ttyUSB1 ## python system imports import csv import threading import queue import time import sys import os.path import AEMmailer from casyncosc import SerialServer ## diskSpaceLimit : in MB, when limit reached, processing halts diskSpaceLimit = 100 # ...
gpl-3.0
2,114,149,594,944,436,700
39.054381
130
0.609519
false
tzuhsienli/resume-site
resume/urls.py
1
1524
from django.conf.urls import patterns, include, url from django.contrib.auth.models import User, Group from rest_framework import viewsets, routers # from resume.views import hello # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() # We should create our API now ...
mit
-5,957,161,605,396,819,000
35.285714
82
0.703412
false
doganaltunbay/odoo
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
35
34024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-6,044,267,754,553,525,000
49.480712
290
0.563161
false
wwj718/ANALYSE
lms/djangoapps/licenses/models.py
150
2538
import logging from django.db import models, transaction from student.models import User from xmodule_django.models import CourseKeyField log = logging.getLogger("edx.licenses") class CourseSoftware(models.Model): name = models.CharField(max_length=255) full_name = models.CharField(max_length=255) url...
agpl-3.0
7,364,665,756,965,138,000
29.578313
82
0.676911
false
scalable-networks/gnuradio-3.7.0.1
grc/gui/Element.py
5
7564
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 2 of the License, or (at your option...
gpl-3.0
4,921,128,525,882,327,000
27.651515
100
0.677287
false
alkemics/luigi
examples/wordcount_hadoop.py
66
2728
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
4,597,095,118,495,976,400
30
111
0.663856
false
MingyuanXie/CopyNet
experiments/synthetic.py
1
2907
__author__ = 'jiataogu' from emolga.dataset.build_dataset import deserialize_from_file, serialize_to_file import numpy.random as n_rng n_rng.seed(19920206) # the vocabulary tmp = [chr(x) for x in range(48, 58)] # '1', ... , '9', '0' voc = [tmp[a] + tmp[b] + tmp[c] for c in xrange(10) ...
mit
8,680,094,016,142,692,000
29.925532
118
0.472652
false
yencarnacion/jaikuengine
.google_appengine/lib/django-1.4/django/utils/simplejson/encoder.py
430
15620
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
apache-2.0
4,469,383,807,539,669,500
35.325581
136
0.523816
false
ekalosak/boto
tests/unit/cloudformation/test_connection.py
70
30604
#!/usr/bin/env python import unittest from datetime import datetime from mock import Mock from tests.unit import AWSMockServiceTestCase from boto.cloudformation.connection import CloudFormationConnection from boto.exception import BotoServerError from boto.compat import json SAMPLE_TEMPLATE = r""" { "AWSTemplateFor...
mit
-8,513,588,990,384,635
41.270718
122
0.590021
false
QianBIG/odoo
addons/l10n_be_hr_payroll/__openerp__.py
312
1872
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
-4,758,766,004,801,711,000
34.320755
78
0.60203
false
davehorton/drachtio-server
deps/boost_1_69_0/tools/build/test/project_dependencies.py
7
1160
#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2002, 2003, 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that we can specify a dependency property in project requirements, and # tha...
mit
4,786,728,652,083,490,000
21.745098
81
0.687069
false
strint/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/identity_test.py
22
1831
# Copyright 2016 The TensorFlow 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 required by applica...
apache-2.0
-5,133,993,485,341,403,000
37.957447
90
0.691972
false
cdr-stats/cdr-stats
install/conf/settings_local.py
2
5199
# # CDR-Stats License # http://www.cdr-stats.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The Initial Develope...
mpl-2.0
4,651,175,968,537,831,000
27.723757
95
0.562416
false
rversteegen/commandergenius
project/jni/python/src/Lib/test/test_errno.py
58
1178
#! /usr/bin/env python """Test the errno module Roger E. Masse """ import errno from test import test_support import unittest std_c_errors = frozenset(['EDOM', 'ERANGE']) class ErrnoAttributeTests(unittest.TestCase): def test_for_improper_attributes(self): # No unexpected attributes should be on the ...
lgpl-2.1
-1,657,397,964,819,893,800
28.45
78
0.634126
false
jordy33/yowsup
yowsup/layers/protocol_presence/layer.py
61
1175
from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer from .protocolentities import * from yowsup.layers.protocol_iq.protocolentities import ErrorIqProtocolEntity class YowPresenceProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "presence": (self.recvPresence, sel...
gpl-3.0
2,190,365,671,304,235,500
39.517241
91
0.722553
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib-python/2.7/user.py
313
1627
"""Hook to allow user-specified customization code to run. As a policy, Python doesn't run user-specified code on startup of Python programs (interactive sessions execute the script specified in the PYTHONSTARTUP environment variable if it exists). However, some programs or sites may find it convenient to allow users...
agpl-3.0
7,804,924,008,642,178,000
32.895833
72
0.708666
false
wong2/sentry
src/sentry/migrations/0017_auto__add_field_projectmember_api_key.py
36
10324
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProjectMember.api_key' db.add_column('sentry_projectmember', 'api_key', self.gf('django.db.models....
bsd-3-clause
-8,802,908,712,587,791,000
77.80916
178
0.558214
false
catapult-project/catapult-csm
systrace/systrace/tracing_agents/agents_unittest.py
8
1650
# Copyright 2014 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. import unittest from systrace import util from devil.android import device_utils from devil.android.sdk import intent from devil.android.sdk import keyeven...
bsd-3-clause
4,487,883,961,643,833,300
32
74
0.704848
false
alextruberg/custom_django
django/contrib/sites/models.py
114
3549
from __future__ import unicode_literals import string from django.db import models from django.db.models.signals import pre_save, pre_delete from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.core.exceptions import ValidationError SITE_C...
bsd-3-clause
-6,456,121,549,537,545,000
28.823529
203
0.647506
false
Distrotech/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/geo3d/models.py
404
1835
from django.contrib.gis.db import models class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __unicode__(self): return self.name class Interstate2D(models.Model): name = models.CharField(max_length=30) l...
apache-2.0
-4,010,105,193,238,507,000
25.594203
52
0.679019
false
ramramps/mkdocs
mkdocs/legacy.py
29
4548
from __future__ import unicode_literals import logging from mkdocs import utils from mkdocs.exceptions import ConfigurationError log = logging.getLogger(__name__) def pages_compat_shim(original_pages): """ Support legacy pages configuration Re-write the pages config fron MkDocs <=0.12 to match the ...
bsd-2-clause
1,044,798,072,022,087,300
35.384
79
0.567062
false
wnt-zhp/hufce
django/contrib/admin/templatetags/admin_list.py
79
15696
import datetime from django.contrib.admin.util import lookup_field, display_for_field, label_for_field from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, PAGE_VAR, SEARCH_VAR) from django.contrib.admin.templatetags.admin_static import static from django.core.exceptions import ...
gpl-3.0
-7,308,256,201,383,839,000
40.305263
198
0.552752
false
dcramer/django-db-routes
src/dbroutes/backend/base.py
1
1560
import re from django.db.backends.postgresql_psycopg2.base import * # from the postgresql doc SQL_IDENTIFIER_RE = re.compile(r'^[_a-zA-Z][_a-zA-Z0-9]{,62}$') PUBLIC_SCHEMA_NAME = 'public' def _check_identifier(identifier): if not SQL_IDENTIFIER_RE.match(identifier): raise RuntimeError("Invalid string u...
apache-2.0
5,653,152,534,853,379,000
30.836735
81
0.634615
false
Affix/fas
fas/group.py
1
33669
# -*- coding: utf-8 -*- # # Copyright © 2008 Ricky Zhou # Copyright © 2008-2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hop...
gpl-2.0
-5,300,399,345,005,197,000
43.357049
187
0.603737
false
quchunguang/test
testpy3/pyqt5_widget_splitter.py
1
2031
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import (QWidget, QHBoxLayout, QVBoxLayout, QLabel, QComboBox, QFrame, QSplitter, QApplication) from PyQt5.QtCore import Qt class Example(QWidget): def __init__(self): super().__init__() self.in...
mit
-2,781,676,108,475,705,300
27.208333
72
0.546529
false
vipul-sharma20/oh-mainline
vendor/packages/Django/django/conf/locale/lv/formats.py
107
1578
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y. \g\a\d\a j. F' TIME_FORMAT = ...
agpl-3.0
-4,104,413,873,753,049,600
35.674419
80
0.538364
false
lbjay/cds-invenio
modules/bibindex/lib/bibindex_engine_stemmer_tests.py
4
2712
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio 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 versio...
gpl-2.0
7,525,119,042,704,231,000
41.375
79
0.54056
false
cobalys/django
django/contrib/localflavor/si/forms.py
8
4672
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
bsd-3-clause
-353,993,995,460,222,700
27.315152
86
0.586901
false