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
melodous/designate
designate/backend/impl_powerdns/__init__.py
1
17862
# Copyright 2012 Hewlett-Packard Development Company, L.P. All Rights Reserved. # Copyright 2012 Managed I.T. # # Author: Patrick Galbraith <patg@hp.com> # Author: Kiall Mac Innes <kiall@managedit.ie> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-5,963,925,626,582,785,000
36.2125
79
0.573396
false
scottdangelo/RemoveVolumeMangerLocks
cinder/volume/drivers/netapp/dataontap/nfs_7mode.py
1
8344
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
apache-2.0
-3,751,682,040,180,921,300
40.512438
79
0.607742
false
openstack/networking-plumgrid
networking_plumgrid/neutronclient/policy/policy_tag.py
1
5554
# Copyright 2016 OpenStack Foundation. # 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 requ...
apache-2.0
-8,675,215,597,151,297,000
38.956835
78
0.566619
false
friend0/tower
tower/map/space.py
1
4589
# coding=utf-8 """ Region will serve as an abstract base class (ABC) to implement a standard interface amongst both Map and Surface objects """ from __future__ import (absolute_import, division, print_function, unicode_literals) import abc import collections from future.utils import with_metaclass from builtins imp...
isc
-5,526,841,282,349,837,000
29.364238
120
0.663468
false
tensorflow/models
official/nlp/data/create_xlnet_pretraining_data_test.py
1
10930
# Copyright 2021 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
8,178,356,071,302,560,000
29.780282
80
0.617004
false
anselal/antminer-monitor
antminermonitor/app.py
1
3074
from flask import Flask from antminermonitor.blueprints.asicminer import antminer, antminer_json from antminermonitor.blueprints.user import user from antminermonitor.extensions import login_manager, migrate from antminermonitor.blueprints.asicminer.models.miner import Miner from antminermonitor.blueprints.asicminer.m...
gpl-3.0
268,709,785,204,979,900
27.728972
79
0.704945
false
dschien/simple-MC
simplemc/__init__.py
1
3544
''' simple-MC: Main module Copyright 2014, Dan Schien Licensed under MIT. ''' import importlib import xlrd __author__ = 'schien' NAME = 'name' TYPE = 'type' PARAM_A = 'param_a' PARAM_B = 'param_b' PARAM_C = 'param_c' MODULE = 'module' LABEL = 'label' UNIT = 'unit' TABLE_STRUCT = { NAME: 0, MODULE: 1, ...
mit
-6,855,969,719,708,827,000
24.681159
119
0.579007
false
wakatime/wakatime
tests/test_dependencies.py
1
16387
# -*- coding: utf-8 -*- from wakatime.main import execute from wakatime.packages import requests import logging import os import time import shutil from testfixtures import log_capture from wakatime.compat import is_py26, u from wakatime.constants import SUCCESS from wakatime.exceptions import NotYetImplemented from...
bsd-3-clause
-2,234,770,744,256,403,200
30.153992
219
0.511198
false
cr1901/HDMI2USB-litex-firmware
targets/nexys_video/video.py
1
4745
from litevideo.input import HDMIIn from litevideo.output import VideoOut from litex.soc.cores.frequency_meter import FrequencyMeter from litescope import LiteScopeAnalyzer from targets.utils import csr_map_update, period_ns from targets.nexys_video.net import NetSoC as BaseSoC class VideoSoC(BaseSoC): csr_peri...
bsd-2-clause
-5,000,189,978,101,860,000
31.5
111
0.60295
false
googleads/google-ads-python
google/ads/googleads/v6/errors/types/function_parsing_error.py
1
1514
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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 o...
apache-2.0
6,158,383,707,332,914,000
29.28
74
0.682959
false
BakanovKirill/Medicine
src/medicine/settings.py
1
5625
# Django settings for medicine project. import os from django.conf import global_settings DEBUG = True TEMPLATE_DEBUG = DEBUG PROJECT_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '../../') ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { ...
mit
-757,473,652,958,754,400
33.09697
108
0.685156
false
sam-falvo/kestrel
cores/S16X4B/rtl/nmigen/interfaces.py
1
3319
from nmigen import Signal # Unprefixed opcodes are 100% backward compatible with S16X4A. # New addition is the use of opcode 8 as an escape prefix. # Additionally, opcode 9 is reserved as a prefix for future # use. OPC_NOP = 0 OPC_LIT = 1 OPC_FWM = 2 OPC_SWM = 3 OPC_ADD = 4 OPC_AND = 5 OPC_XOR = 6 OPC_ZGO = 7 OPC_pre...
mpl-2.0
-6,783,078,153,429,094,000
29.449541
78
0.610124
false
neocortex/paletti
paletti/utils.py
1
3459
import numpy as np def rgb2lab(image): """ Transforms an RGB-image to a LAB-image. """ return xyz2lab(rgb2xyz(image)) def lab2rgb(image): """ Transforms a LAB-image to an RGB-image. """ return xyz2rgb(lab2xyz(image)) def rgb2xyz(image): """ Transforms an RGB-mage to a XYZ-image. """ image ...
mit
965,635,616,745,144,700
25.204545
74
0.46632
false
indolentriffraff/fihndos
cogs/customcmds.py
1
40126
import math import re import json from github import Github from PythonGists import PythonGists from discord.ext import commands from cogs.utils.checks import cmd_prefix_len, load_config '''Module for custom commands adding, removing, and viewing.''' class Customcmds: def __init__(self, bot): ...
gpl-3.0
-204,136,081,114,417,100
52.371274
302
0.421123
false
sanguinariojoe/FreeCAD
src/Mod/Fem/femexamples/constraint_transform_beam_hinged.py
8
7322
# *************************************************************************** # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> * # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
lgpl-2.1
-893,893,622,936,874,100
36.548718
92
0.612264
false
victor-gil-sepulveda/PhD-ANMPythonHelpers
anmichelpers/tools/tools.py
1
3490
""" Created on 9/2/2015 @author: victor """ import numpy import math import prody try: from pyproct.data.handler.sourceGenerator import SourceGenerator from pyproct.data.handler.protein.proteinEnsembleDataLoader import ProteinEnsembleDataLoader except: print "[WARNING] pyProCT was not found. Some function...
mit
1,331,841,634,051,595,000
25.846154
108
0.605444
false
mnunezdm/cazasteroides
karmaserver/modules/selection/provider/__init__.py
1
3116
''' EFES Provider module ''' from karmaserver.modules.selection.provider.evaluator import ObservationEvaluator from karmaserver.modules.selection.provider.filter import ObservationFilter from karmaserver.modules.selection.provider.eraser import ObservationEraser from karmaserver.modules.selection.provider.selector impo...
mit
-1,755,481,269,962,427,100
52.724138
93
0.723363
false
veselosky/schemazoid
schemazoid/micromodels/models.py
1
6716
import six from .fields import Field class MetaModel(type): """The metaclass for :class:`~schemazoid.micromodels.Model`. The main function of this metaclass is to move all of fields into the ``_clsfields`` variable on the class. """ def __new__(cls, name, bases, attrs): fields = {} ...
apache-2.0
7,780,856,994,009,770,000
36.104972
79
0.607504
false
subena-io/subena
base.py
1
1245
#!/usr/local/bin/python2.7 # -*- coding: utf-8-sig -*- import argparse import logging import os import sqlalchemy from sqlalchemy.ext.declarative.api import declarative_base from sqlalchemy.orm.session import sessionmaker #if no env variable has been defined, a default one is set if not(os.environ.has_key("SUBDB")): ...
apache-2.0
3,170,101,479,318,066,000
30.923077
87
0.715663
false
paulcronk/psinsights
psinsights/error.py
1
1641
############################################################################### # Copyright 2012 FastSoft Inc. # Copyright 2012 Devin Anderson <danderson (at) fastsoft (dot) com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You m...
apache-2.0
6,101,192,896,032,187,000
29.962264
79
0.572821
false
rbelzile/python-myfitnesspal
myfitnesspal/entry.py
1
1558
import re from myfitnesspal.base import MFPBase class Entry(MFPBase): def __init__(self, name, nutrition): self._name = name self._nutrition = nutrition #split out quantity and measuring unit out of entry name regex = r'(?P<short_name>.+), (?P<quantity>\d[\d\.]*) (?P<unit...
mit
735,692,817,802,413,600
22.606061
94
0.549422
false
vanant/googleads-dfa-reporting-samples
python/v2.1/get_content_categories.py
1
2155
#!/usr/bin/python # # Copyright 2014 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 b...
apache-2.0
4,475,333,366,051,865,600
30.231884
77
0.702552
false
kyuupichan/electrum
gui/qt/network_dialog.py
1
20239
#!/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
-5,699,706,547,034,703,000
38.071429
146
0.611987
false
explosion/catalogue
catalogue/_importlib_metadata/__init__.py
1
19681
import os import re import abc import csv import sys import zipp import email import pathlib import operator import functools import itertools import posixpath import collections from ._compat import ( NullFinder, PyPy_repr, install, Protocol, ) from configparser import ConfigParser from contextlib im...
mit
1,404,385,101,869,043,500
29.418856
94
0.614349
false
benkonrath/django-guardian
guardian/__init__.py
1
1073
""" Implementation of per object permissions for Django. """ from __future__ import unicode_literals from . import checks try: from .version import version as __version__ __version__split__ = __version__.split(".") VERSION = tuple(['1', '5', '7']) def get_version(): """ Returns shorte...
bsd-2-clause
-8,041,975,668,687,191,000
29.657143
94
0.657968
false
kitianFresh/awesome-python3-webapp
www/app.py
1
5548
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' async web application. ''' import logging; logging.basicConfig(level=logging.INFO) import asyncio, os, json, time from datetime import datetime from aiohttp import web from jinja2 import Environment, FileSystemLoader from config import configs import orm from cor...
apache-2.0
-2,934,702,981,828,618,000
35.078431
121
0.597826
false
fernandog/Medusa
ext/sqlalchemy/ext/mutable.py
1
32415
# ext/mutable.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php r"""Provide support for tracking of in-place changes to scalar values, which are prop...
gpl-3.0
-1,021,361,795,606,901,500
33.265328
79
0.640043
false
JordanP/openstack-snippets
ospurge/ospurge/resources/nova.py
1
1062
# 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 # distributed u...
apache-2.0
1,500,419,142,294,285,300
33.258065
76
0.69774
false
ericmjl/bokeh
examples/models/file/choropleth.py
1
2189
from bokeh.document import Document from bokeh.embed import file_html from bokeh.models import ColorBar, ColumnDataSource, LinearColorMapper, Patches, Plot from bokeh.palettes import Viridis11 from bokeh.resources import INLINE from bokeh.sampledata import unemployment, us_counties, us_states from bokeh.transform impor...
bsd-3-clause
5,742,818,407,330,208,000
38.089286
150
0.688899
false
hds-lab/textvisdrg
msgvis/apps/datatable/models.py
1
30970
from django.db import models from django.db.models import Q from datetime import timedelta import operator from msgvis.apps.base.models import MappedValuesQuerySet from msgvis.apps.corpus import models as corpus_models from msgvis.apps.groups import models as groups_models from msgvis.apps.dimensions import registry f...
mit
-5,398,902,057,194,541,000
44.410557
531
0.559768
false
andrefreitas/schwa
schwa/extraction/git_extractor.py
1
8652
# Copyright (c) 2015 Faculty of Engineering of the University of Porto # # 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,...
mit
-4,259,756,716,678,877,000
39.816038
118
0.623555
false
annelida/stuff
Scrapy/activesport/activesport/settings.py
1
3027
# -*- coding: utf-8 -*- # Scrapy settings for activesport project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/la...
mit
-5,023,893,244,834,036,000
34.611765
109
0.778328
false
skosukhin/spack
var/spack/repos/builtin/packages/ncdu/package.py
1
2257
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
6,441,542,120,662,856,000
42.403846
78
0.672574
false
bbossola/katas
trains/core/biz.py
1
5195
from math import inf class Context(): def __init__(self, max_len, direct=False, deep=False): self._max_len = max_len self._direct = direct self._deep = deep self._routes = [] def routes(self): return self._routes def max_depth(self): return self._max_len ...
mit
-6,439,781,061,811,617,000
25.370558
96
0.576323
false
rasbt/advent-of-code-2016
python_code/aoc_01_02.py
1
4237
import collections """ source: http://adventofcode.com/2016/day/1 DESCRIPTION Santa's sleigh uses a very high-precision clock to guide its movements, and the clock's oscillator is regulated by stars. Unfortunately, the stars have been stolen... by the Easter Bunny. To save Christmas, Santa needs you to retrieve all...
mit
3,319,549,417,505,917,400
30.857143
79
0.641256
false
hiteshchoudhary/Airvengers
AirvengersGUI.py
1
7188
#!/usr/bin/env python #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Thanks for opting for GUI version of AirCrack set of tools. This project is in early stage and require your support. # # Project is ...
gpl-2.0
3,782,132,015,984,386,600
45.374194
176
0.536032
false
awm/dmr5200
dmr5200.py
1
3719
# -*- coding: utf-8 -*- import io import time import serial import select class Dmr5200(object): """ Representation of a connection to a DMR-5200 digital multimeter. """ def __init__(self, port, timeout=2): """ Opens the serial connection to the meter. port - The platfor...
bsd-3-clause
-5,928,775,878,677,707,000
36.14
88
0.506731
false
Vauxoo/account-payment
res_currency_print_on_check/__init__.py
1
1030
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # Copyright (C) 2010 - 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
7,804,634,020,787,729,000
43.782609
78
0.603883
false
JensTimmerman/radical.pilot
examples/tutorial/coupled_tasks.py
1
8504
#!/usr/bin/env python __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import sys import radical.pilot as rp """ DESCRIPTION: Tutorial 3: Coupled Tasks For every task A1 and B1 a C1 is started. """ # READ: The RADICAL-Pilot documentation: # http://radicalpilot.readthedocs....
mit
2,146,378,430,429,013,200
35.813853
93
0.559384
false
googleapis/python-managed-identities
google/cloud/managedidentities/__init__.py
1
2912
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
apache-2.0
7,330,119,701,366,065,000
33.666667
96
0.786058
false
trolldbois/python-haystack
test/haystack/test_argparse_utils.py
1
1657
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import unittest import sys import argparse from haystack import argparse_utils class Test(unittest.TestCase): def test_readable(self): """test the readable helper.""" invalid = '/345678ui0d9t921giv9' self.assertRaises(argpars...
gpl-3.0
2,497,858,495,602,369,000
31.490196
88
0.675317
false
eengl/pytdlpack
test/test_create_new_grid.py
1
2265
#!/usr/bin/env python3 # ---------------------------------------------------------------------------------------- # Import Modules # ---------------------------------------------------------------------------------------- import numpy as np import setuptools import sys platform = setuptools.distutils.util.get_platf...
gpl-3.0
-6,735,055,586,359,847,000
44.3
100
0.368653
false
Jumpscale/jumpscale_portal8
apps/gridportal/base/Grid/.macros/page/adminjumpscripts/3_adminjumpscripts.py
1
1480
def main(j, args, params, tags, tasklet): def _formatdata(jumpscripts): aaData = list() for name, jumpscript in jumpscripts.items(): itemdata = ['<a href=adminjumpscript?name=%s>%s</a>' % (name, name)] for field in ['organization', 'version', 'descr']: #code i...
apache-2.0
6,871,115,370,447,651,000
36.948718
127
0.651351
false
RyanDJLee/pyta
nodes/AsyncFunctionDef.py
1
1078
""" AsyncFunctionDef astroid node Subclass of FunctionDef astroid node. An async def function definition and used for async astroid nodes like AsyncFor and AsyncWith. Attributes: - name (str) - The function's name. - args (Arguments) - An arguments node. See Arguments.py for more...
gpl-3.0
-8,257,557,885,051,870,000
28.135135
79
0.573284
false
mjpost/sacreBLEU
sacrebleu/sacrebleu.py
1
17856
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017--2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws....
apache-2.0
-2,981,217,303,946,219,000
49.157303
169
0.602431
false
KevinKazama/game
jeutennis/management/commands/tournoi2.py
1
12445
from django.core.management.base import BaseCommand, CommandError from jeutennis.models import table_joueurs, table_match, table_tournoi from django.utils import timezone import datetime import random import time from collections import OrderedDict list_tournoi = [] id_tournoi = [] list_part = [] domicile = [] exterie...
gpl-3.0
2,856,110,380,647,489,500
34.355114
266
0.346083
false
fireeye/flare-wmi
python-cim/samples/dump_keys.py
1
1204
import logging from cim.common import LoggingObject from cim import CIM from cim import is_index_page_number_valid logging.basicConfig(level=logging.DEBUG) g_logger = logging.getLogger("cim.printer") class Printer(LoggingObject): def __init__(self, cim): super(Printer, self).__init__() self._cim...
apache-2.0
-2,232,003,725,080,394,800
24.617021
70
0.606312
false
CO600GOL/Game_of_life
GameEngine/game/data_structures/grid.py
1
1632
""" This module contains the logic representing the grid on which a game is played. A grid, in this sense, is simply a collection cells set into rows and columns. The cells can, for the purposes of the project, only be square. """ from game.data_structures.cell import Cell def create_empty_grid(): """ This fu...
mit
7,694,286,100,144,176,000
29.792453
118
0.626838
false
robmcmullen/peppy
peppy/major_modes/groovy.py
1
1612
# peppy Copyright (c) 2006-2009 Rob McMullen # Licenced under the GPLv2; see http://peppy.flipturn.org for more info """Groovy programming language editing support. Major mode for editing Groovy files. Supporting actions and minor modes should go here only if they are uniquely applicable to this major mode and can't ...
gpl-2.0
5,934,957,365,940,290,000
30.607843
85
0.722705
false
joonro/PyTables
tables/description.py
1
35728
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: September 21, 2002 # Author: Francesc Alted # # $Id$ # ######################################################################## """Classes for describing columns for ``Table`` objects.""" # Im...
bsd-3-clause
1,684,387,528,308,238,800
36.608421
79
0.587886
false
tymofij/adofex
transifex/addons/cla/views.py
1
3292
from django.contrib import messages from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext from...
gpl-3.0
-2,236,727,836,968,306,000
35.577778
78
0.681349
false
beav/pulp
server/pulp/server/managers/auth/role/cud.py
1
13478
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
gpl-2.0
-2,383,789,678,807,386,000
38.291545
98
0.588484
false
JamesLinEngineer/RKMC
addons/plugin.video.salts/scrapers/hevcbluray_scraper.py
1
4696
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
gpl-2.0
-167,296,965,489,720,000
42.88785
166
0.567717
false
sidnarayanan/BAdNet
train/pf/adv/models/train_panda_0.py
1
9018
#!/usr/local/bin/python2.7 from sys import exit, stdout, argv from os import environ, system environ['KERAS_BACKEND'] = 'tensorflow' import numpy as np import utils import signal from keras.layers import Input, Dense, Dropout, concatenate, LSTM, BatchNormalization, Conv1D, concatenate from keras.models import Model ...
mit
1,051,288,253,197,318,900
31.555957
156
0.626192
false
sdvillal/manysources
chemdeco/integration/smartsviewer_utils.py
1
5954
# coding=utf-8 """Thin python wrapper over SmartsViewer.""" import os.path as op import subprocess from joblib import Parallel, delayed, cpu_count # for joblib pickling... def _depict(svr, smarts, dest_file): return svr.depict(smarts, dest_file) def as_pil(paths): from PIL import Image return map(Image....
bsd-3-clause
-6,591,404,141,517,652,000
45.155039
112
0.490595
false
jamesleesaunders/python-xbee
xbee/tests/test_base.py
1
5818
#! /usr/bin/python """ test_base.py By Paul Malmsten, 2010 pmalmsten@gmail.com Tests the XBeeBase superclass module for XBee API conformance. """ import unittest from xbee.base import XBeeBase from xbee.tests.Fake import Serial class TestWriteToDevice(unittest.TestCase): """ XBeeBase class should properly._w...
mit
4,733,193,037,075,674,000
29.460733
95
0.625473
false
boada/planckClusters
MOSAICpipe/bpz-1.99.3/bpz.py
1
52171
""" bpz: Bayesian Photo-Z estimation Reference: Benitez 2000, ApJ, 536, p.571 Usage: python bpz.py catalog.cat Needs a catalog.columns file which describes the contents of catalog.cat """ from __future__ import print_function from __future__ import division from builtins import str from builtins import ...
mit
-4,512,998,537,696,326,700
34.037609
107
0.519695
false
xupingmao/xnote
handlers/search/note.py
1
1364
# -*- coding:utf-8 -*- # Created by xupingmao on 2017/06/11 # @modified 2020/02/18 00:20:12 """搜索知识库文件""" import re import sys import six import xutils import xauth import xmanager import xconfig import xtables from xutils import textutil from xutils import SearchResult, text_contains NOTE_DAO = xutils.DAO("note") ...
gpl-3.0
-1,848,475,807,109,575,400
22.137931
69
0.608793
false
michaelBenin/sqlalchemy
lib/sqlalchemy/testing/plugin/noseplugin.py
1
2735
# plugin/noseplugin.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Enhance nose with extra options and behaviors for running SQLAlchemy tests. M...
mit
1,261,401,323,931,881,700
28.095745
84
0.626325
false
gammu/wammu
Wammu/Logger.py
1
5021
# -*- coding: UTF-8 -*- # # Copyright © 2003 - 2018 Michal Čihař <michal@cihar.com> # # This file is part of Wammu <https://wammu.eu/> # # 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 ve...
gpl-3.0
47,544,733,082,102,024
30.746835
77
0.552033
false
inveniosoftware/invenio-migrator
tests/legacy/test_access_dump.py
1
2580
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016, 2017 CERN. # # 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 version 2 of the # License, or (at your option) any...
gpl-2.0
-2,848,630,737,792,007,000
31.658228
76
0.646899
false
sebMathieu/dsima
simulator/src/agent/example.py
1
2631
##@package Example # Example of agent-based system based on a supply and a demand curve #@author Sebastien MATHIEU from .agent import Agent from .abstractSystem import AbstractSystem from .layer import Layer from .data import Data import math ## Supply with the target supply function \f$\pi = 0.1 q^2 +2\f...
bsd-3-clause
-5,392,300,815,870,196,000
33.106667
97
0.600912
false
odoo-arg/odoo_l10n_ar
l10n_ar_invoice_presentation/models/presentation_header.py
1
2454
# - coding: utf-8 -*- ############################################################################## # # This program 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 # ...
agpl-3.0
4,813,481,864,961,278,000
35.626866
112
0.614914
false
ninadpdr/python-saml
setup.py
1
1286
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, OneLogin, Inc. # All rights reserved. from setuptools import setup setup( name='python-saml', version='2.1.5', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ ...
bsd-3-clause
-1,276,905,179,418,649,900
25.244898
103
0.5521
false
google/assetMG
app/backend/helpers.py
1
1488
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-277,142,481,400,671,940
30.020833
74
0.686156
false
aaltinisik/OCBAltinkaya
addons/email_template/email_template.py
1
31022
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
agpl-3.0
-3,462,888,602,468,852,700
50.703333
151
0.573786
false
pboechat/OperatorGraph
auto_tuner/Configuration.py
1
9246
import xml.sax import ParseUtils from Enums import * #################################################################################################### class BaseConfiguration(xml.sax.ContentHandler): def loadFromDisk(self, filename): xml.sax.parse(filename, self) ######################################...
mit
9,163,868,085,743,371,000
57.878981
132
0.636413
false
cgarrard/osgeopy-code
Chapter4/listing4_2.py
1
1083
import os from osgeo import ogr def layers_to_feature_dataset(ds_name, gdb_fn, dataset_name): """Copy layers to a feature dataset in a file geodatabase.""" # Open the input datasource. in_ds = ogr.Open(ds_name) if in_ds is None: raise RuntimeError('Could not open datasource') # Open the g...
mit
-5,060,772,019,536,975,000
33.935484
65
0.650046
false
pylada/pylada-light
src/pylada/config/vasp.py
1
1440
############################### # This file is part of PyLaDa. # # Copyright (C) 2013 National Renewable Energy Lab # # PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to submit # large numbers of jobs on supercomputers. It provides a python interface to physical input, suc...
gpl-3.0
4,206,401,852,313,639,000
48.655172
103
0.711806
false
jennywoites/MUSSA
MUSSA_Flask/app/API_Rest/Services/DocenteServices/DocenteService.py
1
5919
from app.API_Rest.codes import * from app.models.docentes_models import Docente from app import db from flask_user import roles_accepted from app.API_Rest.Services.BaseService import BaseService from app.models.generadorJSON.docentes_generadorJSON import generarJSON_docente from app.models.docentes_models import Cursos...
gpl-3.0
8,846,627,085,232,308,000
32.822857
91
0.551445
false
lovelysystems/pyjamas
library/pyjamas/ui/HorizontalPanel.py
1
2463
# Copyright 2006 James Tauber and contributors # # 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 agre...
apache-2.0
-5,496,431,016,375,003,000
28.674699
74
0.688591
false
seocam/mirror-test
colab/search/forms.py
1
7726
# -*- coding: utf-8 -*- import unicodedata from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from haystack.forms import SearchForm from haystack.inputs import AltParser from haystack.inputs import AutoQuery from colab.super_archives.models import Mailin...
gpl-2.0
8,863,627,971,120,281,000
42.897727
79
0.576107
false
hjanime/VisTrails
vistrails/gui/variable_dropbox.py
1
22113
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
32,938,548,882,874,140
42.189453
126
0.575996
false
Petraea/jsonbot
jsb/lib/less.py
1
1782
# jsb/less.py # # """ maintain bot output cache. """ # jsb imports from jsb.utils.exception import handle_exception from jsb.utils.limlist import Limlist from jsb.lib.cache import get, set, delete ## basic imports import logging ## Less class class Less(object): """ output cache .. caches upto <nr> item of ...
mit
4,724,756,526,734,193,000
26.430769
76
0.589226
false
waterdotorg/power.Water
project/custom/migrations/0011_auto__add_friendjoinedemaillog__add_unique_friendjoinedemaillog_user_u.py
1
13099
# -*- 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): # Adding model 'FriendJoinedEmailLog' db.create_table('custom_friendjoinedemaillog', ( ('id', se...
gpl-3.0
2,593,868,828,637,019,000
75.608187
182
0.569738
false
HugoDelval/ip-reputation-monitoring
reputation/db/postgres.py
1
4686
# # Copyright (C) 2016, OVH SAS # # This file is part of ip-reputation-monitoring. # # ip-reputation-monitoring 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 op...
gpl-3.0
365,307,016,488,537,500
40.839286
164
0.528596
false
dmnielsen/zSALT
zsalt/mosred.py
1
3102
""" mosred Process MOS spectral reductions of the data and produce the output spectra for each object """ import os, sys, glob, shutil import numpy as np import pyfits from scipy.ndimage.filters import median_filter from pyraf import iraf from iraf import pysalt from saltobslog import obslog from specselfid im...
bsd-3-clause
-4,401,168,587,431,947,000
39.285714
133
0.628949
false
tensorflow/probability
tensorflow_probability/python/distributions/poisson_test.py
1
22478
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
apache-2.0
-6,222,672,986,908,313,000
37.822107
90
0.643518
false
petrkotas/twitter-feed
twitter_feed/mock/tweets.py
1
19865
HOME_TIMELINE = [ { 'coordinates': None, 'truncated': False, 'created_at': 'Tue Aug 28 21:16:23 +0000 2012', 'favorited': False, 'id_str': '240558470661799936', 'in_reply_to_user_id_str': None, 'entities': { 'urls': [ ], 'h...
mit
-6,867,694,552,128,083,000
35.382784
192
0.429801
false
radicalbit/ambari
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
1
5636
""" 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 not use this ...
apache-2.0
-2,267,958,351,017,531,100
40.755556
216
0.743967
false
dichenko/kpk2016
Diff/111879.py
1
1032
#Дана возрастающая последовательность целых чисел 1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, ... # Она сформирована следующим образом: берется одно нечетное число, затем два четных, # затем три нечетных и так далее. Выведите N-й элемент этой последовательности. def next_chet(x): if x % 2 == 0: return x + 2 ...
gpl-3.0
8,481,426,430,898,534,000
18.906977
91
0.53271
false
achim1/HTCTools
htctools/batchfarming.py
1
33073
""" Management of Zeuthen Batch farmjobs """ import sys # #import shlex #import sys #import tarfile #import time #import logging #import zmq #import os #import sqlite3 #import re # #from .. import CONFIG, Logger #from .metascript import MetaScript #from .utils import ListSlicer, RotatingFileNamer, GetEnvshells, ExitF...
gpl-3.0
-3,701,935,994,679,156,000
32.644964
181
0.52626
false
loafbaker/django_ecommerce1
orders/migrations/0004_auto__chg_field_order_billing_address__chg_field_order_shipping_addres.py
1
8620
# -*- 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): # Changing field 'Order.billing_address' db.alter_column(u'orders_order'...
mit
829,237,142,568,387,700
75.973214
195
0.577842
false
theadviceio/executer
tests/utils/test_utils_errors.py
1
2265
import sys import os import unittest import tempfile sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)) + "/../../")) import utils.errors # logname = "/tmp/test.log" # print("-----------------------------") # print((" current logs in %s" % logname)) # print("-----------------------------") ...
apache-2.0
5,571,883,912,347,106,000
31.357143
89
0.628256
false
holgerBerger/go_ludalo
top/top.py
1
13095
#!/usr/bin/env python # # indices used: # # use goludalo # db.<fs>.createIndex({"ts":1, "nid":1}) # # use ludalo # db.jobs.createIndex({"start":1}) # db.jobs.createIndex({"end":1}) # db.jobs.createIndex({"jobid":1}) import time,sys # CONFIG DBHOST="localhost" SNAP = 5 PERFDB="goludalo" JOBDB="ludalo" JOBCO...
gpl-2.0
666,660,058,061,147,300
33.370079
223
0.485223
false
garnachod/classification
src/Clasificadores/NodosPalabras/Nodo.py
1
1286
import random class Nodo(object): """docstring for Nodo""" def __init__(self, palabra): super(Nodo, self).__init__() self.nodosConectados = {} self.palabra = palabra def setConexo(self, nodo): #peso = random.random() - 0.5 peso = 0.1 palabra = nodo.getPalabra() self.nodosConectados[palabra] = peso ...
apache-2.0
-4,430,257,125,241,442,300
24.72
76
0.710731
false
Minhua722/NMF
egs/ar/local/ar_extract_nmf_feats.py
1
3850
#!/usr/bin/env python import cv2 import numpy as np import argparse import math import pickle from sklearn.decomposition import PCA from nmf_support import * import sys, os if __name__ == '__main__': #------------------------------------------------------ # Args parser #--------------------------------------...
apache-2.0
-5,565,832,709,138,475,000
33.070796
120
0.624675
false
Fastcode/NUClearExample
nuclear/b.py
1
3760
#!/usr/bin/env python3 import sys import os import argparse import pkgutil import re # Don't make .pyc files sys.dont_write_bytecode = True # Go and get all the relevant directories and variables from cmake nuclear_dir = os.path.dirname(os.path.realpath(__file__)) project_dir = os.path.dirname(nuclear_dir) # Get the...
mit
3,648,145,695,033,993,000
31.695652
164
0.651064
false
drimer/NetControl
webconf/settings.py
1
2783
""" Django settings for NetControl project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
gpl-2.0
-5,218,627,443,829,308,000
25.009346
71
0.688825
false
yrobla/nova
nova/tests/test_libvirt.py
1
220373
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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 # # ...
apache-2.0
-5,483,306,512,135,139,000
40.642668
79
0.541877
false
rtrajano/sphinx_rtfd
docs/conf.py
1
8478
#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
bsd-3-clause
6,779,916,785,083,622,000
29.829091
76
0.704883
false
noba3/KoTos
addons/plugin.video.xstream/sites/gstream_in.py
1
15009
# -*- coding: utf-8 -*- from resources.lib.util import cUtil from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.lib.config import cConfig from resources.lib ...
gpl-2.0
-2,172,259,095,798,689,000
37.469231
131
0.650247
false
rokihi/ObjectDetector
YOLO_tiny_tf.py
1
9863
import numpy as np import tensorflow as tf import cv2 import time import sys class YOLO_TF: fromfile = None tofile_img = 'test/output.jpg' tofile_txt = 'test/output.txt' imshow = True filewrite_img = False filewrite_txt = False disp_console = True weights_file = 'weights/YOLO_tiny.ckpt' alpha = 0.1 threshold...
lgpl-3.0
-605,665,277,583,583,900
40.616034
209
0.645848
false
lyan6/genenetwork2
wqflask/wqflask/views.py
1
30443
# -*- coding: utf-8 -*- # # Main routing table for GN2 from __future__ import absolute_import, division, print_function import traceback # for error page import os # for error gifs import random # for random error gif import datetime # for errors import time # for errors import sys import csv import x...
agpl-3.0
-2,919,960,334,922,159,000
36.817391
151
0.621621
false
Praetonus/Arc
src/arc/huffman.py
1
5696
#!/usr/bin/python3.4 #-*- coding: utf-8 -*- ######################################################################## # Copyright 2014 Benoît Vey # # # # This file is part of Arc. ...
gpl-3.0
-5,932,957,318,099,833,000
26.780488
90
0.58086
false
avaris/aBibliophile
searchmodel.py
1
1847
#!/usr/bin/env python # -.- coding: utf-8 -.- # Author : Deniz Turgut # Created : 05.11.2011 from PyQt4 import QtGui, QtCore class SearchModel(QtGui.QSortFilterProxyModel): def __init__(self, parent=None): super(SearchModel, self).__init__(parent) self.setSortCaseSensitivity(QtCore.Qt.CaseInsensi...
gpl-3.0
-507,099,931,512,108,800
29.278689
77
0.617759
false
guyemerson/sem-func
src/core/intrinsic.py
1
5876
import os, pickle, numpy as np from collections import Counter from math import log from warnings import warn from __config__.filepath import AUX_DIR, FREQ_FILE, VOCAB_FILE from utils import product # Load vocabulary with open(os.path.join(AUX_DIR, VOCAB_FILE), 'rb') as f: pred_name = pickle.load(f) with open(...
mit
-4,691,154,396,318,563,000
34.403614
138
0.602451
false
epam/DLab
integration-tests/examples/copy_files.py
1
4782
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
apache-2.0
599,134,483,112,161,700
42.472727
132
0.610832
false
gem/sidd
sidd/operator/loaders/ms.py
1
3048
# Copyright (c) 2011-2013, ImageCat Inc. # # This program 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 option) any later version. # # This program is...
agpl-3.0
1,110,092,615,301,480,200
31.648352
87
0.621063
false
jumoconnect/openjumo
jumodjango/org/models.py
1
14137
from action.models import Action from django.conf import settings from django.contrib.contenttypes import generic from django.db import models from entity_items.models import Advocate, ContentItem, MediaItem, TimelineItem from entity_items.models.location import Location from etc import cache from etc.templatetags.tags...
mit
-5,442,474,995,486,512,000
38.935028
242
0.654453
false