repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
tnwhitwell/lexicon
lexicon/providers/rage4.py
1
5124
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify email address used to a...
mit
-5,749,159,318,801,691,000
33.16
109
0.57377
false
4.298658
false
false
false
Jumpscale/jumpscale6_core
lib/JumpScale/portal/docgenerator/Docgenerator.py
1
4197
from JumpScale import j from Confluence2HTML import Confluence2HTML from Confluence2RST import Confluence2RST class DocgeneratorFactory: def __init__(self): pass def getConfluenceClient(self, url, login, passwd, spacename, erasespace=False, erasepages=False): """ @param url e.g. htt...
bsd-2-clause
-2,757,643,876,178,571,000
38.971429
117
0.641649
false
3.611876
false
false
false
PetukhovVictor/compiler
src/Parser/Parsers/statements/loop.py
1
1574
from ...combinators import Lazy from ...AST.statements.loop import WhileStatement, ForStatement, RepeatStatement def while_stmt(): """ Parsing 'while' statement. """ from ..common import keyword from ..expressions import logical from ..statements import base def process(parsed): (...
mit
-6,239,727,314,899,469,000
30.48
92
0.60864
false
4.015306
false
false
false
robwebset/script.pinsentry
plugin.py
1
38814
# -*- coding: utf-8 -*- import sys import os import urllib import urlparse import xbmc import xbmcgui import xbmcplugin import xbmcaddon if sys.version_info < (2, 7): import simplejson else: import json as simplejson # Import the common settings from resources.lib.settings import Settings from resources.lib.s...
gpl-2.0
4,811,090,829,362,698,000
45.262217
220
0.593935
false
4.234101
false
false
false
kmshi/miroguide
channelguide/moderate/views.py
1
7043
# Copyright (c) 2008-2009 Participatory Culture Foundation # See LICENSE for details. from django.http import HttpResponseRedirect from django.core import cache from django.core.paginator import Paginator, InvalidPage from django.contrib.auth.decorators import permission_required from django.db.models import Count fro...
agpl-3.0
-8,478,159,749,297,703,000
40.429412
179
0.64305
false
3.848634
false
false
false
Jacotsu/pepenet
pepedb.py
1
3086
#!/usr/bin/env python3 import sqlite3 from sqlite3 import IntegrityError import logging from pepe import Pepe queries = {"init_pepe_hashes_tbl": "CREATE TABLE IF NOT EXISTS pepe_hashes (" "hash VARCHAR(128) NOT NULL," "banned BIT DEFAULT 'TRUE'," ...
agpl-3.0
7,499,702,028,987,201,000
34.068182
79
0.47278
false
4.310056
false
false
false
ifanrx/django-oauth2-provider
provider/oauth2/backends.py
1
2869
import codecs from ..utils import now, MergeDict from .forms import ClientAuthForm, PublicPasswordGrantForm from .models import AccessToken import binascii class BaseBackend(object): """ Base backend used to authenticate clients as defined in :rfc:`1` against our database. """ def authenticate(sel...
mit
-2,330,183,553,365,629,400
27.69
91
0.623214
false
4.461897
false
false
false
RyanHope/AutobahnPython
examples/twisted/wamp/rpc/arguments/frontend.py
1
3404
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
-562,642,779,276,927,300
35.602151
85
0.643948
false
3.926182
false
false
false
erdem/DRF-TDD-example
todoapp/todoapp/settings.py
1
3674
""" Django settings for todoapp project. Generated by 'django-admin startproject' using Django 1.9.3. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os #...
mit
429,275,996,174,183,040
23.993197
91
0.679913
false
3.489079
false
false
false
nazmizorlu/python-euromsg
euromsg/euromsg.py
1
2109
# encoding: utf-8 import zeep class EuromsgMailer(object): """ Provides a simple interface for sending an email over euro.message service. """ AUTHORIZATION_URL = "https://ws.euromsg.com/live/auth.asmx?wsdl" POST_URL = "https://ws.euromsg.com/live/post.asmx?wsdl" username = "" password = ...
mit
7,132,670,849,879,594,000
33.016129
123
0.572783
false
4.087209
false
false
false
tachijuan/python
myscripts/gameoflife.py
1
2170
#JOHN CONWAY'S GAME OF LIFE import time import random import serial from plotter import mybuffer def countSurrounding(universe, a, b): count = 0 surrounding = ((a - 1, b - 1), (a - 1, b ), (a - 1, b + 1), (a , b - 1), (a , b +...
mit
4,504,501,008,302,187,500
27.552632
97
0.482488
false
3.444444
false
false
false
blueboxgroup/nova
nova/tests/unit/virt/vmwareapi/test_read_write_util.py
1
1977
# Copyright 2013 IBM Corp. # Copyright 2011 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-2.0 # # Unless ...
apache-2.0
6,471,982,315,284,460,000
39.346939
78
0.538695
false
4.383592
false
false
false
miing/mci_migo
identityprovider/models/const.py
1
2776
# Copyright 2010, 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). from django.utils.translation import ugettext_lazy as _ class BaseConst(object): @classmethod def _get_choices(cls): attrs = [(getattr(cls, attr), attr) for ...
agpl-3.0
215,333,135,043,336,400
28.849462
75
0.666066
false
3.887955
false
false
false
hipnusleo/laserjet
resource/pypi/cryptography-1.7.1/docs/development/custom-vectors/arc4/generate_arc4.py
1
2676
# 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 binascii from cryptography.hazmat.backends import default...
apache-2.0
-4,067,945,267,181,852,000
25.306122
79
0.546338
false
3.758427
false
false
false
MuckRock/muckrock
muckrock/tags/models.py
1
1153
""" Models for the tags application """ # pylint: disable=model-missing-unicode # Django from django.db import models # Standard Library import re # Third Party from taggit.models import GenericTaggedItemBase, Tag as TaggitTag from taggit.utils import _parse_tags def parse_tags(tagstring): """Normalize tags a...
agpl-3.0
-3,860,341,060,295,800,300
21.607843
83
0.647008
false
3.719355
false
false
false
LoRexxar/Cobra-W
tests/test_detection.py
1
3783
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cobra ~~~~~ Implements cobra main :author: BlBana <635373043@qq.com> :homepage: https://github.com/wufeifei/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import xml.et...
mit
3,212,599,887,361,926,700
31.895652
116
0.58102
false
3.558796
true
false
false
stefanv/scipy3
scipy/io/array_import.py
1
17710
# Authors: Travis Oliphant, Trent Oliphant # with support from Lee Barford's group at Agilent, Inc. # """This module allows for the loading of an array from an ASCII Text File """ __all__ = ['read_array', 'write_array'] # Standard library imports. import os import re import sys import types # Numpy imports. impor...
bsd-3-clause
6,912,863,567,193,047,000
34.349301
96
0.571993
false
3.871038
false
false
false
nilgoyyou/dipy
doc/examples/gradients_spheres.py
2
6248
""" ===================== Gradients and Spheres ===================== This example shows how you can create gradient tables and sphere objects using dipy_. Usually, as we saw in :ref:`example_quick_start`, you load your b-values and b-vectors from disk and then you can create your own gradient table. But this time le...
bsd-3-clause
3,460,100,473,134,985,000
29.778325
83
0.668854
false
2.794275
false
false
false
google/edward2
edward2/tensorflow/program_transformations.py
1
4527
# coding=utf-8 # Copyright 2021 The Edward2 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
8,156,045,043,530,767,000
34.928571
79
0.684118
false
3.978032
false
false
false
EmhyrVarEmreis/LessSyntaxValidator
Parser.py
1
4541
from Tokenizer import Tokenizer class Parser: def __init__(self, input_content, file=True, debug=False): self.tokenizer = Tokenizer(input_content, file) self.tokenizer.tokenize() self.token = None self.is_debug = debug self.pos = 0 self.info = [] self.debug ...
apache-2.0
-6,505,733,249,550,220,000
27.38125
115
0.508699
false
3.69187
false
false
false
klahnakoski/intermittents
pyLibrary/queries/list/aggs.py
1
4655
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __...
mpl-2.0
-9,038,071,592,435,119,000
34.265152
131
0.549946
false
3.694444
false
false
false
thuydang/djagazin
wsgi/djagazin/djagazin/settings_cmspluginblog.py
1
5456
# -*- coding: utf-8 -*- import os gettext = lambda s: s PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS LANGUAGES = [('en', 'en')] DEFAULT_LANGUAGE = 0 DATABASES = { 'default': { ...
bsd-2-clause
-401,843,231,126,464,300
28.491892
102
0.705279
false
3.185055
false
false
false
sagemath/git-trac-command
git_trac/digest_transport.py
1
4942
r""" HTTP transport to the trac server AUTHORS: - David Roe, Julian Rueth, Robert Bradshaw: initial version """ #***************************************************************************** # Copyright (C) 2013 David Roe <roed.math@gmail.com> # Julian Rueth <julian.rueth@fsfe.org> # ...
gpl-3.0
2,998,220,303,857,756,000
33.802817
220
0.563537
false
4.381206
false
false
false
rbiswas4/cambio
configdict.py
1
3613
#!/usr/bin/env python def repdictval(fname , paramdict , oname , ignorestrings=['#'], dictdelim = '='): """repdictval (fname , paramdict, oname, ignorestrings=["#], dictdelim ='=') rewrites the file fname to oname but replacing all keys in fname according to the dictionary paramdict args: fname: mandatory fi...
mit
6,862,792,546,798,256,000
23.578231
81
0.596734
false
3.223015
false
false
false
gsi-upm/soba
projects/oldProyects/EWESim/Visual.py
1
2183
from mesa.visualization.ModularVisualization import ModularServer from LabModel import LabModel from CoffeMakerAgent import CoffeMakerAgent from TVAgent import TVAgent from AccessAgent import AccessAgent from PC import PC from DrawLabMapBackEnd import DrawLabMapBackEnd from DrawLabMapBackEnd import RepresentationModule...
mit
-3,161,618,585,566,298,600
26.987179
65
0.505268
false
4.057621
false
false
false
sonofeft/XYmath
xymath/exhaustive.py
1
1911
#!/usr/bin/env python # -*- coding: ascii -*- r""" Support routines for exhaustive equation search in curve fit routines. Uses itertools to find all combinations. """ from __future__ import print_function from builtins import str from itertools import combinations from math import factorial full_funcL = ['const','...
gpl-3.0
-525,025,727,344,207,300
27.969697
101
0.556253
false
2.860778
false
false
false
puttarajubr/commcare-hq
corehq/apps/commtrack/signals.py
1
2350
from collections import defaultdict import itertools from django.dispatch import Signal from casexml.apps.case.signals import cases_received from casexml.apps.case.xform import get_case_updates from corehq.apps.commtrack import const from corehq.apps.commtrack.const import is_supply_point_form from corehq.apps.commtrac...
bsd-3-clause
8,584,708,459,433,800,000
41.727273
107
0.711915
false
3.778135
false
false
false
forallsystems/21stbadgepathways
users/views.py
1
18332
from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ##from django.views.generic.simple import direct_to_template from django.shortcuts import render from django.db....
gpl-2.0
-2,927,636,180,874,615,300
38.941176
136
0.534693
false
4.47231
false
false
false
tppsr/tppsr.github.io
obraz/_scripts/make_tsv.py
1
2512
# author : Johann-Mattis List # email : mattis.list@uni-marburg.de # created : 2014-10-22 16:52 # modified : 2014-10-22 16:52 """ convert tppsr data to qlc table for easy editing possibilities """ __author__="Johann-Mattis List" __date__="2014-10-22" from lingpyd import * import json # get places first orte = ...
gpl-2.0
821,586,110,226,958,200
23.627451
87
0.539809
false
2.854545
false
false
false
rschwager-mm/polymr
redis/tests/test_endtoend.py
1
2094
import os import shutil import tempfile import unittest from io import StringIO import polymr.index import polymr.storage import polymr.query import polymr.record import polymr_redis to_index = StringIO("""01001,MA,DONNA,AGAWAM,WUCHERT,PO BOX 329,9799PNOVAY 01007,MA,BERONE,BELCHERTOWN,BOARDWAY,135 FEDERAL ST,9799JA8...
apache-2.0
-6,689,539,681,040,428,000
31.71875
78
0.657593
false
2.733681
true
false
false
jldbc/pybaseball
tests/integration/pybaseball/test_standings.py
1
1230
from typing import Optional import pandas as pd import pytest from pybaseball.standings import standings from pybaseball.utils import most_recent_season def get_division_counts_by_season(season: Optional[int]) -> int: if season is None: season = most_recent_season() - 1 if season >= 1994: r...
mit
3,364,428,428,907,323,400
25.170213
75
0.628455
false
3.819876
true
false
false
sajeeshcs/nested_projects_keystone
keystone/common/ldap/core.py
1
69881
# 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-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
7,993,627,596,492,166,000
38.795558
79
0.570727
false
4.131059
false
false
false
stormi/tsunami
src/primaires/meteo/perturbations/nuages_neige.py
1
3142
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # l...
bsd-3-clause
3,164,862,924,788,352,500
43.642857
79
0.67136
false
3.633721
false
false
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnsnsrec_args.py
1
1541
# # Copyright (c) 2008-2015 Citrix 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
8,914,623,597,450,243,000
28.634615
79
0.700844
false
3.550691
false
false
false
borismus/lightning
src/Article.py
1
2652
import warnings class Article(object): def __init__(self, title, type_name, content, date_created, source_path, slug, permalink, snip, output_path, meta_description, yaml): # The title of this article. self.title = title # Name of the template to use for this article. self.type_name = type_name...
apache-2.0
6,203,739,876,596,297,000
27.826087
80
0.649321
false
3.588633
false
false
false
Azure/azure-sdk-for-python
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters_py3.py
1
6983
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
9,160,240,290,828,039,000
56.237705
433
0.690105
false
3.832602
false
false
false
kije/PySpyX
pyspy/models.py
1
1199
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Camera Surveillance tool for Raspberry Pi with Camera module Project in ICT M152. Copyright (C) 2015 Kim D. Jeker This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
gpl-3.0
6,659,538,990,149,907,000
36.46875
112
0.758132
false
3.782334
false
false
false
woobe/h2o
py/testdir_single_jvm/test_summary2_percentile2.py
1
5756
import unittest, time, sys, random, math, getpass sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_import as h2i import h2o_summ DO_MEDIAN = True def write_syn_dataset(csvPathname, rowCount, colCount, expectedMin, expectedMax, SEED): r1 = random.Random(SEED) dsf = open(csvPathname, "w+") ...
apache-2.0
942,799,294,077,880,000
36.135484
124
0.518763
false
3.754729
false
false
false
jitter77/practice
choose_CoM.py
1
4754
#!/usr/bin/env python2.7 #_*_ coding: utf-8 _*_ __version__ = '0.1' """ This file contains all available modules and the depending bootloader. Also the available filesystems (rootfs), especially for linux to be flashed. Currently implemented Modules: TX25, TX28, TX28S, TX48, TX53, TX6U, TX6Q, CompactTFT (all KaRo)...
gpl-2.0
7,994,087,551,314,057,000
40.347826
115
0.633572
false
2.85183
false
false
false
agharibi/linchpin
linchpin/provision/InventoryFilters/GenericInventory.py
1
2122
#!/usr/bin/env python import StringIO from camel import Camel from InventoryFilter import InventoryFilter from InventoryProviders import get_all_drivers class GenericInventory(InventoryFilter): def __init__(self): InventoryFilter.__init__(self) self.filter_classes = get_all_drivers() def g...
gpl-3.0
4,296,843,620,019,809,000
33.225806
78
0.609331
false
3.742504
false
false
false
CGenie/solar
solar/solar/orchestration/graph.py
1
3033
import json import uuid import networkx as nx import redis from solar import utils from .traversal import states r = redis.StrictRedis(host='10.0.0.2', port=6379, db=1) def save_graph(name, graph): # maybe it is possible to store part of information in AsyncResult backend r.set('{}:nodes'.format(name), ...
apache-2.0
-4,254,927,419,307,855,400
23.658537
79
0.581932
false
3.149533
false
false
false
seken/nink
pyglet/window/carbon/__init__.py
1
40222
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
gpl-3.0
977,834,912,983,223,200
36.945283
97
0.599846
false
3.998211
false
false
false
makelove/OpenCV-Python-Tutorial
ch38-使用特征匹配和单应性查找对象/findHomography.py
1
3198
# -*- coding: utf-8 -*- # @Time : 2017/7/13 下午5:13 # @Author : play4fun # @File : findHomography.py # @Software: PyCharm """ findHomography.py:联合使用特征提取和 calib3d 模块中的 findHomography 在复杂图像中查找已知对象 """ import numpy as np import cv2 from matplotlib import pyplot as plt MIN_MATCH_COUNT = 10 img1 = cv2.imread('../da...
mit
5,273,761,605,515,775,000
34.589041
135
0.666282
false
1.883974
false
false
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py
1
37012
## @file # This file is used to parse a Module file of .PKG file # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full ...
gpl-2.0
-4,743,107,407,899,620,000
35.681863
120
0.607317
false
3.891903
false
false
false
jonge-democraten/dyonisos
subscribe/views.py
1
9340
import datetime import logging import Mollie from django.conf import settings from django.contrib.auth.decorators import login_required from django.template.context_processors import csrf from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts impor...
mit
3,150,483,725,742,663,000
41.844037
311
0.673555
false
3.727055
false
false
false
Vallher/zulip
zilencer/views.py
1
4990
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpRequest from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login as django_login_page from django.http import HttpResponseRedirect from zilencer.m...
apache-2.0
604,761,024,584,877,700
36.238806
115
0.677154
false
3.794677
false
false
false
windskyer/nova
nova/network/api.py
1
23187
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
gpl-2.0
5,222,163,939,739,262,000
41.005435
79
0.608703
false
4.36338
false
false
false
ahlusar1989/geocoder
setup.py
1
2493
#!/usr/bin/python # coding: utf8 import os from codecs import open import re try: from setuptools import setup except ImportError: from distutils.core import setup def find_version(*file_paths): # Open in Latin-1 so that we avoid encoding errors. # Use codecs.open for Python 2 compatibility here ...
mit
1,628,420,099,275,741,200
33.150685
76
0.624148
false
3.794521
false
false
false
wagnerluis1982/speakerfight
core/forms.py
1
2172
# from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django import forms from core.models import Profile class ProfileForm(forms.ModelForm): username = forms.CharField(...
mit
2,638,071,516,526,770,000
33.47619
77
0.624309
false
4.059813
false
false
false
MiroK/INF5650
Lecture-5/cea_supg.py
1
3165
""" Consider to convection diffusion problem -alpha*u`` - u` = f in (0, 1) u = g on \partial(0, 1) 1) f = alpha*pi**2*sin(pi*x) - pi*cos(pi*x), u(0) = u(1) = 0 2) f = 0, u(0) = 0, u(1) = 1 Use supg stabilization and in both cases estimate the constant from Cea's lemma. """ # FIXME add problem 2 # FIXME add supg n...
gpl-3.0
-5,288,071,937,445,712,000
23.160305
79
0.552291
false
2.764192
false
false
false
nttcom/eclcli
eclcli/orchestration/heatclient/shell.py
1
30756
# 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 # d...
apache-2.0
1,969,773,989,123,590,700
41.955307
79
0.492749
false
4.672034
false
false
false
jumpmanjay/PyHDHR
PyHDHR.py
1
38860
import time import string from datetime import datetime import urllib2 import json import os from decimal import Decimal import operator import re try: Log except NameError: class Logger: def __init__(self): return def Debug(self, s): print(s) def Info(se...
mit
5,337,613,110,872,147,000
33.60374
144
0.542177
false
4.191565
false
false
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py
2
24374
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
198,693,106,789,416,320
57.033333
223
0.601748
false
3.876272
true
false
false
lgarren/spack
var/spack/repos/builtin/packages/r-limma/package.py
1
1754
############################################################################## # 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,144,001,010,521,606,000
43.974359
124
0.67959
false
3.796537
false
false
false
rstens/gwells
gwells/models/WellStatusCode.py
1
1252
""" 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 distri...
apache-2.0
-6,481,166,179,080,037,000
35.823529
87
0.703674
false
4.145695
false
false
false
TheLazyBastard/InXource
main.py
1
3432
import PySide from API import P18F4550 from UI.Main import Ui_MainWindow from UI.FrmAgregarEvento import Ui_FrmAgregarEvento from PySide.QtGui import * from PySide.QtCore import * from Commons import Db import sys import os ROOT_DIR = os.path.abspath(sys.path[0]) CONF_DIR = os.path.join(ROOT_DIR,"Commons") class FrmAg...
gpl-3.0
5,873,281,448,068,205,000
36.714286
109
0.652098
false
3.18663
false
false
false
eokyere/ccdfgh
ccdf.py
1
17214
import datetime Mandatory = 100 RequiredConditional = 200 IfAvailable = 300 FIELD_NO = 0 FIELD_NAME = 1 FIELD_TYPE = 2 FIELD_LENGTH = 3 FIELD_OPTIONS = 4 OTHER_ID = ( ('', 'Not Available'), ('STAFF', 'Staff ID'), ('STUD', 'Student ID'), ('SERV', 'Service ID'), ('NHIS', 'National Health Insurance ID'), ) MARIT...
mit
6,816,729,376,058,748,000
33.222664
105
0.656733
false
2.707881
false
false
false
AhmedArslan/Pyntheon
pyntheon/pyntheon.py
1
9694
#!/usr/bin/env python # # Pyntheon; A resource for common lab specimens from virus to human # to analyze their proteins for the presence of Posttranslational modifications (PTMs) # in a large set of proteins of interest, also analyze the presence of mutations # overlap with the modified residues. # Besides this, Pynt...
mit
-5,463,098,049,978,268,000
39.902954
144
0.666392
false
2.49011
false
false
false
tomatohater/django-staticshard
docs/conf.py
1
8202
# -*- coding: utf-8 -*- # # django-pgcryptoauth documentation build configuration file, created by # sphinx-quickstart on Wed Nov 21 01:32:47 2012. # # 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 # autogenerated f...
mit
-5,443,916,250,706,051,000
31.164706
80
0.705803
false
3.707957
true
false
false
atzengin/OCC
occ/occ_ocvc/blks2/packet.py
1
9789
# Copyright 2008,2009,2012-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later...
gpl-3.0
-6,145,824,515,688,930,000
38
136
0.590867
false
3.861538
false
false
false
DarkStarSword/StereoCropper
directx/types.py
1
35586
from ctypes import * from ctypes.wintypes import * from comtypes import * #******************************************************************** # # Typedefs and constants # #******************************************************************** REFGUID = POINTER(GUID) UINT = c_uint INT = c_int ...
gpl-3.0
7,054,927,187,856,822,000
27.004075
86
0.444669
false
3.570741
false
false
false
eavatar/ava
src/eavatar.ava/ava/cmds/cli.py
1
2333
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import sys import glob import logging import click from importlib import import_module from ava.runtime import environ _MODULES_DIR = os.path.join('mods', 'commands') # the package name for modules. _...
bsd-3-clause
-4,171,653,097,202,309,000
27.120482
135
0.626232
false
3.518854
false
false
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/work_bulk_v30.py
1
3129
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
-1,837,777,454,946,984,000
26.9375
119
0.541707
false
4.058366
false
false
false
nakednamor/naked-python
samples/methods.py
1
2379
# methods are created using the def keyword and brackets def first_method (): print("I'm the first method") # methods are called as expected first_method() # methods can have arguments def parameter_method(param1, param2, param3): print("passed param1: " + param1) print("passed param2: " + param2) pri...
mit
231,020,471,468,134,940
29.5
72
0.699033
false
3.308762
false
false
false
tetherless-world/dco-elasticsearch
ingest/ingestHelpers.py
1
8158
__author__ = 'Hao' from rdflib import Namespace, RDF from itertools import chain import argparse from SPARQLWrapper import SPARQLWrapper, JSON import json from rdflib import Namespace, RDF PROV = Namespace("http://www.w3.org/ns/prov#") BIBO = Namespace("http://purl.org/ontology/bibo/") VCARD = Namespace("http://www.w...
lgpl-3.0
-497,398,907,724,857,000
36.944186
143
0.644521
false
3.472967
false
false
false
zacherytapp/wedding
weddingapp/apps/home/views.py
1
1697
from django.shortcuts import render from django.views.generic import TemplateView from django.views.generic.edit import CreateView, UpdateView, DeleteView from story.models import Story, Timeline from gallery.models import Gallery from party.models import PartyMember from information.models import InformationDetail fr...
bsd-3-clause
-5,974,705,921,774,026,000
41.425
78
0.776665
false
3.550209
false
false
false
gogobody/lifebone
article/admin.py
1
1349
# coding: utf-8 from django.contrib import admin from comment.models import Comment from models import Article class CommentInline(admin.TabularInline): model = Comment readonly_fields = ("owner", "content", "status", "create_timestamp") fieldsets = ( (None, { "fields": ("owner", "con...
gpl-2.0
-5,963,574,223,190,653,000
29.340909
115
0.599251
false
3.667582
false
false
false
shenfei/oj_codes
leetcode/python/n48_Rotate_Image.py
1
1054
def swap(m, coord): i0, j0 = coord[-1] tmp = m[i0][j0] for i, j in reversed(coord[:-1]): m[i0][j0] = m[i][j] i0, j0 = i, j m[i0][j0] = tmp def side_rotate(m, idx, size): for k in range(size - 1): coord = [(idx, idx + k), (idx + k, idx + size - 1), ...
mit
5,316,033,107,966,581,000
24.095238
76
0.426945
false
2.927778
false
false
false
Hao-Liu/avocado
avocado/core/restclient/cli/app.py
1
4537
# 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
-699,910,421,660,753,300
32.607407
78
0.59136
false
4.745816
false
false
false
erdc/proteus
proteus/tests/CLSVOF/with_RANS3PF/ls_p.py
1
1124
from __future__ import absolute_import from builtins import object from proteus import * from proteus.default_p import * from .multiphase import * from proteus.mprans import NCLS3P LevelModelType = NCLS3P.LevelModel coefficients = NCLS3P.Coefficients(V_model=V_model, RD_model=RD_mode...
mit
-4,951,817,361,576,982,000
33.060606
68
0.530249
false
3.957746
false
false
false
gpospelov/BornAgain
Doc/PhysicsManual/fig/drawing/Green.py
1
3056
#!/usr/bin/env python3 """ Compute radiation trajectories through multilayer sample for use in figure that explains the Green function. """ xd = 52 yd = 10 # detector s = 3 # source located at -s T = [6, 6] # layer thickness sd = T[0] - s # distance from source to lower interface DeltaLayer = [.05, .1] # refracti...
gpl-3.0
-5,298,009,045,656,751,000
26.531532
80
0.491165
false
2.338179
false
false
false
bradmwalker/wanmap
wanmap/__init__.py
1
1274
import logging from pyramid.config import Configurator from pyramid.session import SignedCookieSessionFactory from sqlalchemy.orm import configure_mappers from .schema import Persistable # Import persistable subclasses without cycles. from . import ( # noqa network, scans, ) # run configure_mappers after def...
mit
-3,335,895,843,328,695,300
26.695652
66
0.708006
false
3.99373
true
false
false
TamiaLab/carnetdumaker
apps/licenses/admin.py
1
2019
""" Admin views for the licenses app. """ from django.contrib import admin from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ from .models import License class LicenseAdmin(admin.ModelAdmin): """ Admin form for the ``License`` data model. """ list_disp...
agpl-3.0
-8,921,883,607,128,972,000
25.92
68
0.475978
false
4.304904
false
false
false
makhomed/fabrix
contrib/create-server-partitions-2-devices/fabfile.py
1
6724
""" create partitions on bare metal server for zfs storage expected bare metal server with two *empty* HDDs /dev/sda and /dev/sdb in LiveCD mode $ fab server_create_partitions create partitions, /boot mdraid and LVM volumes on top of mdraid: GPT: /dev/sda1, /dev/sdb1 - 2014s - bios_grub partitions /dev/sda2, /d...
gpl-3.0
-875,203,391,519,666,200
32.287129
101
0.585961
false
3.283203
false
false
false
tjcsl/ion
intranet/apps/eighth/migrations/0001_initial.py
1
7379
# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('auth', '__first__')] operations = [ migrations.CreateModel( name='EighthA...
gpl-2.0
-7,994,381,863,572,326,000
46.301282
145
0.573113
false
4.445181
false
false
false
molski/pmag
models.py
1
3672
from . import base_models class Single11(base_models.SingleLabelModel): patch_size = 11 weight_shapes = { 'w_c1': [4, 4, 4, 1, 64], 'w_c2': [3, 3, 3, 64, 64], 'w_c3': [3, 3, 3, 64, 128], 'w_c4': [3, 3, 3, 128, 128], 'w_fc1': [1024, 512], 'w_fc2': [512, 512], ...
mit
-7,129,855,554,206,926,000
20.473684
45
0.405229
false
2.482759
false
false
false
timpalpant/KaggleBillionWordImputation
scripts/find_missing_word_pos_ngram_gap.py
1
1938
#!/usr/bin/env python ''' Identify the location of a missing word in a sentence using a POS-tag n-gram model. Computes gap likelihood as: P(gap) = P(a, *, b) / P(a, b) ''' import sys, argparse, pickle from collections import defaultdict import numpy as np from scipy.misc import logsumexp from util import window, tok...
gpl-3.0
-1,279,219,915,256,001,000
30.258065
65
0.631579
false
3.460714
false
false
false
henrysher/duplicity
duplicity/backends/jottacloudbackend.py
1
5657
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf-8 -*- # # Copyright 2014 Håvard Gulldahl # # in part based on dpbxbackend.py: # Copyright 2013 jno <jno@pisem.net> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU ...
gpl-2.0
-7,411,561,866,758,260,000
35.025478
96
0.660361
false
3.677503
false
false
false
Code4SA/umibukela
umibukela/migrations/0024_funder-fill.py
1
1502
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from umibukela.models import Programme, Funder def noop(apps, schema_editor): pass def create_funders(apps, schema_editor): mavc = Funder(name="MAVC") mavc.save() sash_funder = Funder(name="Brot fur die...
mit
-7,118,993,164,979,846,000
31.652174
174
0.650466
false
3.493023
false
false
false
Esri/hermes
src/hermes/common.py
1
2027
""" Copyright 2015 Esri 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 ...
apache-2.0
-5,853,898,637,292,269,000
32.229508
75
0.607301
false
4.565315
false
false
false
josecolella/PLD
src/TreasureHunters.py
1
1999
import pygame from game import Game from menu import * from gameoptions import * class TreasureHunters(object): """ This class represents the global game which includes the menu. Create to encapsulate the initialization of the game """ menu_music = "audio/menu.ogg" @staticmethod def star...
mit
-5,266,492,012,962,927,000
30.234375
69
0.6003
false
4.164583
false
false
false
jmbeuken/abinit
developers/maintainers/list-cpp-options.py
1
1275
#!/usr/bin/env python from __future__ import print_function import os import re import sys fortran = re.compile("\.([Ff]|[Ff]90)$") cppline = re.compile("^#") cppkeys = ("define .*","include.*","ifdef","ifndef","elif","^if ","else","endif","defined","undef","!","&&","\|\|","\(","\)") def main(top): cppopts = dict(...
gpl-3.0
1,820,384,346,134,768,400
24.5
125
0.479216
false
3.390957
false
false
false
dchud/sentinel
bin/scripts/fix-medline-metadata.py
1
2556
#!/usr/bin/env python2.3 # Fix one or all canary records by replacing all medline metadata # with results of a fresh pubmed query. # # $Id$ from optparse import OptionParser import pprint import time import canary.context from canary.loader import Parser, QueuedRecord from canary.search import PubmedSearch from cana...
mit
6,377,323,993,426,911,000
32.631579
84
0.623631
false
3.90229
false
false
false
cpennington/edx-platform
common/djangoapps/terrain/stubs/lti.py
1
13171
""" Stub implementation of LTI Provider. What is supported: ------------------ 1.) This LTI Provider can service only one Tool Consumer at the same time. It is not possible to have this LTI multiple times on a single page in LMS. """ import base64 import hashlib import logging import os import textwrap from uuid i...
agpl-3.0
-5,977,926,249,054,291,000
40.031153
120
0.570496
false
4.030294
false
false
false
Brazelton-Lab/lab_scripts
prokka_blast_pipeline.py
1
8272
#! /usr/bin/env python """ BLAST sequences from PROKKA annotations Takes a PROKKA FAA file and a file with an one or more IDs (each ID must be on its own line). If a PROKKA annotation description contains an ID in the IDs file, its sequence is BLASTed against NCBI BLAST and the results are written to a custom TSV. Th...
gpl-2.0
-3,402,509,142,417,538,600
39.748768
94
0.538443
false
4.123629
false
false
false
tochikuji/pyPyrTools
pyrtools/steer2HarmMtx.py
1
2281
import numpy def steer2HarmMtx(*args): ''' Compute a steering matrix (maps a directional basis set onto the angular Fourier harmonics). HARMONICS is a vector specifying the angular harmonics contained in the steerable basis/filters. ANGLES (optional) is a vector specifying the angular p...
mit
-1,143,086,122,221,487,600
33.044776
100
0.560719
false
3.702922
false
false
false
Ebag333/Pyfa
eos/saveddata/crestchar.py
1
1399
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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 Software Foundation, ...
gpl-3.0
-1,484,187,016,517,416,700
30.795455
81
0.600429
false
4.16369
false
false
false
silviuapostu/project-euler-solutions
51.py
1
1370
''' Prime digit replacements Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family. For a family of size 8, we can employ some optimizations: * only search for 3-repeated digits, since any other patterns will contai...
mit
-1,382,000,943,297,379,600
32.414634
79
0.59562
false
3.558442
false
false
false
JanLaureys/chirp
Servo_Driver.py
1
2036
#!/usr/bin/python import time import math from Adafruit_I2C import Adafruit_I2C # ============================================================================ # Adafruit PCA9685 16-Channel PWM Servo Driver # ============================================================================ class PWM : i2c = None # Re...
mit
1,515,251,618,942,068,000
31.333333
78
0.54224
false
2.847552
false
false
false
cjohnson318/geostatsmodels
geostatsmodels/simulation.py
1
2688
#!/usr/bin/env python import numpy as np import geostatsmodels.kriging as k import random def gridpath( xdim, ydim ): ''' Input: (xdim) iterable describing the start, stop, and no. steps (ydim) iterable describing the start, stop, and no. steps Output: (path) path through the 2D grid, a list ...
mit
2,718,245,654,744,868,000
34.84
69
0.565104
false
3.598394
false
false
false
pkilambi/python-kubernetes
kubernetes/pod.py
1
27703
#!/usr/bin/env python # # Copyright 2014 Cosmos.io # # 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
-6,371,762,940,621,166,000
25.896117
114
0.714688
false
3.694226
false
false
false
bacemtayeb/Tierra
src/modules/attacks/beef_hook.py
1
3889
from attack import Attack from libmproxy import controller, proxy, platform from threading import Thread from zoption import Zoption import util class beef_hook(Attack): """ Injects BeEF hooks into poisoned traffic. Requires libmproxy and it's dependencies """ def __init__(self): super(be...
gpl-3.0
8,189,911,646,063,612,000
37.127451
111
0.519414
false
4.480415
true
false
false
depop/kombu
examples/simple_task_queue/client.py
1
1077
from __future__ import with_statement from kombu.common import maybe_declare from kombu.pools import producers from queues import task_exchange priority_to_routing_key = {'high': 'hipri', 'mid': 'midpri', 'low': 'lopri'} def send_as_task(connection, fun, args=(...
bsd-3-clause
8,975,392,671,591,617,000
33.741935
73
0.584958
false
4.095057
false
false
false
jandom/GromacsWrapper
staging/SunGridEngine.py
1
17146
# $Id: SunGridEngine.py 2765 2009-01-20 13:02:14Z oliver $ """ :mod:`staging.SunGridEngine` --- staging class for SunGridEngine ================================================================ Primitive framework for staging jobs in `Sun Grid Engine`_ via a customized :class:`Job` class. Example python submission scr...
gpl-3.0
3,551,175,902,556,135,000
38.874419
205
0.589059
false
4.014517
false
false
false
jungla/ICOM-fluidity-toolbox
2D/RST/extract_Scalar_temp.py
1
3216
try: paraview.simple except: from paraview.simple import * import numpy as np from mpi4py import MPI import os import csv from scipy import interpolate import gc import sys gc.enable() comm = MPI.COMM_WORLD label = 'm_25_3b' labelo = 'm_25_3b' basename = 'mli' ## READ archive (too many points... somehow) # args: n...
gpl-2.0
-8,916,378,337,202,013,000
25.360656
113
0.650498
false
2.57899
false
false
false
nanophotonics/nplab
nplab/utils/gui_generator.py
1
19497
from __future__ import print_function from nplab.utils.gui import QtWidgets, uic, QtCore, get_qt_app from nplab.ui.ui_tools import UiTools import nplab.datafile as df from nplab.utils.log import create_logger, ColoredFormatter import os import sys import inspect import numpy as np import pyqtgraph import pyqtgraph.do...
gpl-3.0
-839,913,068,192,220,300
46.437956
137
0.595528
false
4.435168
false
false
false
vt-rocksat-2017/waveforms
command/v1/tx_scram_rand.py
1
9135
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Tx Scram Rand # Generated: Wed May 24 11:14:20 2017 ################################################## from gnuradio import blocks from gnuradio import digital from gnuradio import e...
mit
-316,759,349,539,431,040
38.717391
350
0.595731
false
3.115621
false
false
false
venkatarun95/genericCC
parsing_scripts/plot_vary_mahimahi_configs.py
1
10059
import argparse from fractions import Fraction import math import matplotlib.pyplot as plt import numpy as np import os import re import time import parse_ctcp_output import parse_tcptrace import analyse_data # Format:- # key: cc_type eg. 10x, 1000x, cubic, cubicsfqCodel etc. # value: dictionary: key - (vary_type, v...
gpl-2.0
-2,882,641,616,217,414,700
31.76873
149
0.648971
false
2.743114
false
false
false
kongxu633/QBotWebWrap
qqbot/qqrobot/qqbot.py
1
26991
# -*- coding: utf-8 -*- import re import random import json import os import sys import datetime import time import threading import logging import urllib from HttpClient import HttpClient reload(sys) sys.setdefaultencoding("utf-8") HttpClient_Ist = HttpClient() ClientID = int(random.uniform(111111, 888888)) PTWebQ...
gpl-3.0
7,200,754,149,509,369,000
34.871831
589
0.50799
false
3.083414
false
false
false
MariusWirtz/TM1py
TM1py/Services/AnnotationService.py
1
3455
# -*- coding: utf-8 -*- import collections import json from TM1py.Objects.Annotation import Annotation from TM1py.Services.ObjectService import ObjectService class AnnotationService(ObjectService): """ Service to handle Object Updates for TM1 CellAnnotations """ def __init__(self, rest): su...
mit
1,133,109,939,761,928,700
38.712644
114
0.619392
false
4.31875
false
false
false