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
ficoos/godot
platform/iphone/detect.py
1
9752
import os import sys def is_active(): return True def get_name(): return "iOS" def can_build(): import sys import os if sys.platform == 'darwin' or os.environ.has_key("OSXCROSS_IOS"): return True return False def get_opts(): return [ ('IPHONEPLATFORM', 'name of the...
mit
-4,415,321,914,416,388,600
49.791667
508
0.494155
false
3.954582
false
false
false
alphagov/notifications-api
migrations/versions/0252_letter_branding_table.py
1
1503
""" Revision ID: 0252_letter_branding_table Revises: 0251_another_letter_org Create Date: 2019-01-17 15:45:33.242955 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0252_letter_branding_table' down_revision = '0251_another_letter_org' def upgrade(): op...
mit
9,020,807,077,260,492,000
35.658537
99
0.587492
false
3.99734
false
false
false
dana-at-cp/cpauto
tests/objects/test_group.py
1
3664
# -*- coding: utf-8 -*- """Tests for cpauto.objects.group module.""" import pytest import responses import cpauto @pytest.mark.parametrize("name,params", [ ("grp_basic", {}), ("grp_with_comment", {"comments": "ow now brown cow"}), ("grp_with_tags", {"tags": ["servers", "web", "dns"]}), ]) def test_add(co...
apache-2.0
-7,694,709,256,478,565,000
33.895238
75
0.574236
false
3.312839
true
false
false
dschuff/WAOT
src/wac.py
1
2361
#!/usr/bin/env python import argparse import os import subprocess import sys RUNTIME_LIB = 'wart' def find_runtime_dir(start_dir): lib_name = 'lib' + RUNTIME_LIB + '.a' if os.path.exists(os.path.join(start_dir, lib_name)): return os.path.abspath(start_dir) for d in [os.path.join(start_dir, x) for x in os.li...
apache-2.0
-8,867,012,722,067,558,000
32.728571
76
0.6205
false
3.194858
false
false
false
mrroach/CentralServer
csrv/model/cards/runner/card01037.py
1
2754
from csrv.model import actions from csrv.model import events from csrv.model import timing_phases from csrv.model.cards import card_info from csrv.model.cards import event class ChooseIce(timing_phases.BasePhase): """Choose a piece of ice for card01037.""" def __init__(self, game, player): timing_phases.Base...
apache-2.0
-3,939,459,415,255,302,000
27.6875
80
0.681917
false
3.274673
false
false
false
retrogradeorbit/Pigo
pigo/gfx/TextureEngine.py
1
2910
from Texture import Texture from Tex import Tex #from weakref import * from PIL import Image ## ## @brief stores and keeps track of on card textures ## ## stores and keeps track of on card textures. ## TODO: resizes and caches to disk texture shrinking HORIZONTAL=0 VERTICAL=1 import weakref class TextureEngine: ...
gpl-3.0
8,635,336,365,835,592,000
32.837209
119
0.594845
false
4.18705
false
false
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/tests/test_reproducibility.py
1
3864
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import contextlib from io import StringIO import json import os import tempfile import unittest import torch from . import test_binaries c...
bsd-3-clause
3,292,364,400,086,513,000
36.514563
97
0.5603
false
3.80315
true
false
false
drvinceknight/Axelrod
axelrod/tests/test_tournament_manager.py
1
2683
import unittest import axelrod class TestTournamentManager(unittest.TestCase): @classmethod def setUpClass(cls): cls.test_output_directory = './assets/' cls.test_with_ecological = True cls.test_tournament_name = 'test_tournament' cls.test_file_name = 'test_file_name' c...
mit
1,240,633,106,179,890,700
40.276923
76
0.660455
false
3.525624
true
false
false
xu6148152/Binea_Python_Project
python_practice/batteries_included/collections_test.py
1
1464
# coding=utf-8 from collections import namedtuple, Counter from collections import deque from collections import defaultdict import os import sys try: from collections import OrderedDict except ImportError: # python 2.6 or earlier, use backport from ordereddict import OrderedDict __author__ = 'xubinggui' ...
mit
-5,807,403,507,421,724,000
19.257143
54
0.620592
false
3.267281
false
false
false
mikemike/SkypeBot
custom/server-old.py
1
2002
#!/sevabot # -*- coding: utf-8 -*- """ Shows what server a site is on """ from __future__ import unicode_literals import re import os import Skype4Py import urllib2 import socket from sevabot.bot.stateful import StatefulSkypeHandler from sevabot.utils import ensure_unicode, get_chat_id class ServerHandler(Stateful...
gpl-2.0
-3,084,206,064,392,355,300
23.120482
110
0.554945
false
3.763158
false
false
false
juhgiyo/pyserver
pyserver/network/async_tcp_client.py
1
6653
#!/usr/bin/python """ @file async_tcp_client.py @author Woong Gyu La a.k.a Chris. <juhgiyo@gmail.com> <http://github.com/juhgiyo/pyserver> @date March 10, 2016 @brief AsyncTcpClient Interface @version 0.1 @section LICENSE The MIT License (MIT) Copyright (c) 2016 Woong Gyu La <juhgiyo@gmail.com> Permission i...
mit
631,969,208,172,865,900
35.756906
119
0.601383
false
4.297804
false
false
false
CroissanceCommune/autonomie
autonomie/forms/training/trainer.py
1
1970
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; import functools import deform from colanderalchemy import SQLAlchemySchemaNode from autonomie import forms from autonomie.forms.user.user import get_list_sch...
gpl-3.0
-7,347,418,329,904,043,000
23.924051
77
0.583037
false
3.554152
false
false
false
eunchong/build
scripts/slave/recipe_modules/webrtc/gclient_config.py
1
1707
# Copyright 2013 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 DEPS CONFIG_CTX = DEPS['gclient'].CONFIG_CTX ChromeInternalGitURL = DEPS['gclient'].config.ChromeInternalGitURL ChromiumGitURL = DEPS['gclient'].confi...
bsd-3-clause
-4,658,722,570,066,493,000
31.826923
79
0.710018
false
3.220755
true
false
false
jlinn/pylastica
tests/query/test_querystring.py
1
2345
__author__ = 'Joe Linn' import unittest import hashlib import random import pylastica from tests.base import Base class QueryStringTest(unittest.TestCase, Base): def test_search_multiple_fields(self): string = hashlib.md5(str(random.random())).hexdigest() query = pylastica.query.QueryString(strin...
apache-2.0
-1,380,882,597,778,277,600
36.222222
150
0.613646
false
3.585627
true
false
false
EUDAT-B2SHARE/invenio-old
modules/bibcirculation/lib/bibcirculation_model.py
1
12269
# -*- coding: utf-8 -*- # ## This file is part of Invenio. ## Copyright (C) 2011, 2012, 2013 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 you...
gpl-2.0
6,992,625,803,890,977,000
42.049123
86
0.617247
false
3.625591
false
false
false
tmenjo/cinder-2015.1.0
cinder/db/sqlalchemy/api.py
1
124586
# 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 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
apache-2.0
-3,084,373,201,303,192,600
33.133151
79
0.595613
false
4.154806
false
false
false
COSMOGRAIL/PyCS
pycs/sim/old/frk.py
1
5272
""" forkmap -- Forking map(), uses all processors by default. Connelly Barnes 2008, public domain. Based on forkmap by Kirk Strauser, rewritten and optimized. Version 1.0.2. """ import os, mmap, marshal, struct, cPickle import ctypes, ctypes.util import time, traceback builtin_map = map def nprocessors(): try:...
gpl-3.0
-9,114,155,565,234,374,000
30.195266
123
0.55956
false
2.776198
false
false
false
uxlsl/blog
movie/views.py
1
2044
import pytz from django.views.generic import ListView from django.db.models import Q from django.contrib import messages from rest_framework import viewsets, generics from rest_framework import filters from django.conf import settings from .models import MovieRes, MovieUpdate, MovieNotify from .serializers import Movie...
gpl-2.0
5,641,885,930,326,095,000
35.290909
73
0.628758
false
3.952475
false
false
false
chubbymaggie/claripy
claripy/frontend_mixins/model_cache_mixin.py
1
9949
import weakref import itertools class ModelCache(object): _defaults = { 0, 0.0, True } def __init__(self, model): self.model = model self.replacements = weakref.WeakKeyDictionary() def __hash__(self): if not hasattr(self, '_hash'): self._hash = hash(frozenset(self.mode...
bsd-2-clause
8,530,850,976,090,461,000
33.545139
107
0.589205
false
3.772848
false
false
false
MarCnu/videojsXBlock
videojs/videojs.py
1
5080
""" videojsXBlock main Python class""" import pkg_resources from django.template import Context, Template from xblock.core import XBlock from xblock.fields import Scope, Integer, String, Boolean from xblock.fragment import Fragment class videojsXBlock(XBlock): ''' Icon of the XBlock. Values : [other (defaul...
gpl-3.0
1,623,204,342,252,490,200
35.028369
148
0.599016
false
4.067254
false
false
false
bsaleil/lc
tools/graphs.py
1
14708
#!/usr/bin/env python3 #!/usr/bin/python3 #--------------------------------------------------------------------------- # # Copyright (c) 2015, Baptiste Saleil. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditi...
bsd-3-clause
3,920,754,107,737,802,000
26.961977
132
0.628298
false
3.097725
false
false
false
spohnan/geowave
python/src/main/python/pygw/query/vector/__init__.py
1
1243
# # Copyright (c) 2013-2019 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache License, Version 2.0 which...
apache-2.0
-7,345,824,623,308,834,000
46.807692
96
0.77313
false
4.836576
false
false
false
openstack/manila
manila/tests/share/drivers/dell_emc/plugins/unity/test_utils.py
1
6351
# Copyright (c) 2016 EMC Corporation. # 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
3,944,791,302,127,216,000
37.259036
78
0.537553
false
3.263618
true
false
false
toumorokoshi/sprinter
sprinter/formula/command.py
1
2334
""" Runs a command [ssh] formula = sprinter.formula.command redirect_stdout_to_log=false fail_on_error=true shell = False install=echo 'setting up...' update=echo 'updating...' remove=echo 'destroying...' activate=echo 'activating...' deactivate=echo 'deactivating...' """ from __future__ import unicode_literals from s...
mit
7,646,238,375,529,140,000
33.835821
107
0.568552
false
4.378987
true
false
false
joberreiter/pyload
module/plugins/hooks/JustPremium.py
1
2420
# -*- coding: utf-8 -*- import re from module.plugins.internal.Addon import Addon class JustPremium(Addon): __name__ = "JustPremium" __type__ = "hook" __version__ = "0.24" __status__ = "testing" __config__ = [("activated", "bool", "Activated" , False), ...
gpl-3.0
-6,310,847,757,710,996,000
43.814815
122
0.544628
false
3.734568
false
false
false
lgrahl/threema-msgapi-sdk-python
examples/simple.py
1
1737
""" You can modify and use one of the functions below to test the gateway service with your account. """ import asyncio import logbook import logbook.more from threema.gateway import ( Connection, GatewayError, util, ) from threema.gateway.simple import TextMessage async def send_via_id(connection): ...
mit
877,856,302,636,758,300
22.472973
69
0.632124
false
3.974828
false
false
false
niosus/EasyClangComplete
plugin/utils/subl/row_col.py
1
2420
"""Represent different ways to work with row and column in views.""" class ZeroIndexedRowCol(): """A cursor position as 0-indexed row and column.""" def __init__(self, row, col): """Initialize from row and column as seen in file (start with 1).""" self._row = row self._col = col ...
mit
-211,356,029,211,549,730
28.512195
77
0.572727
false
4.060403
false
false
false
rboman/progs
pytools/utils.py
1
2981
# -*- coding: utf-8 -*- # # Copyright 2019 Romain Boman # # 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 a...
apache-2.0
-7,001,047,471,291,135,000
24.262712
78
0.60785
false
3.707711
false
false
false
tjanez/bup
lib/bup/helpers.py
1
33921
"""Helper functions and classes for bup.""" from collections import namedtuple from ctypes import sizeof, c_void_p from os import environ from contextlib import contextmanager import sys, os, pwd, subprocess, errno, socket, select, mmap, stat, re, struct import hashlib, heapq, math, operator, time, grp, tempfile from...
lgpl-2.1
5,800,003,140,876,239,000
30.379278
83
0.575838
false
3.660013
false
false
false
kerrickstaley/wssh
test-server.py
1
1078
#!/usr/bin/env python2 import threading import time # HTTP-related import SimpleHTTPServer import SocketServer import os # websocket-related from gevent import monkey; monkey.patch_all() from ws4py.server.geventserver import WebSocketServer from ws4py.websocket import WebSocket import random class HTTPThread(threading...
mit
-1,019,747,312,209,264,300
25.95
85
0.694805
false
3.877698
false
false
false
cadecolvin/ToDo
todo/core.py
1
3052
import datetime import pickle from textwrap import TextWrapper class Item: """Represents a ToDo item. Args: name (str): The name/title of the item description (str): A longer description of the item """ def __init__(self, name, description): self.name = name self....
gpl-3.0
6,191,962,772,768,519,000
28.066667
94
0.571101
false
4.085676
false
false
false
materialsproject/MPContribs
mpcontribs-ingester/mpcontribs/ingester/webui.py
1
9875
from __future__ import unicode_literals, print_function, absolute_import import json, os, socket, codecs, time, psutil import sys, warnings, multiprocessing from tempfile import gettempdir from flask import render_template, request, Response, Blueprint, current_app from flask import url_for, redirect, make_response, s...
mit
-176,121,219,628,774,750
34.01773
87
0.601013
false
3.842412
false
false
false
hans/adversarial
distributions.py
1
3175
"""Defines distributions from which to sample conditional data.""" import numpy as np from pylearn2.format.target_format import OneHotFormatter from pylearn2.space import VectorSpace from pylearn2.utils import sharedX import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams ...
bsd-3-clause
1,724,738,664,900,313,300
29.825243
94
0.625197
false
4.216467
false
false
false
mtik00/yamicache
tests/test_class.py
1
4025
from __future__ import print_function import sys import time import pytest from yamicache import Cache, nocache, override_timeout c = Cache(prefix="myapp", hashing=False, debug=False) class MyApp(object): @c.cached() def test1(self, argument, power): """running test1""" return argument ** pow...
mit
-3,754,619,742,474,733,600
18.925743
79
0.569689
false
3.17429
true
false
false
jsurloppe/N14
N14/names_generator.py
1
31120
# flake8: noqa # port of docker names-generator import random left = [ "admiring", "adoring", "affectionate", "agitated", "amazing", "angry", "awesome", "blissful", "boring", "brave", "clever", "cocky", "compassionate", "competent", "condescending", "conf...
gpl-3.0
235,119,602,138,753,730
51.257143
378
0.740713
false
3.001834
false
false
false
dheerajgopi/google-python
basic/wordcount.py
1
2942
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
apache-2.0
7,231,735,229,345,965,000
28.717172
79
0.705303
false
3.494062
false
false
false
FinalAngel/django-cms
cms/utils/placeholder.py
1
12108
# -*- coding: utf-8 -*- import operator import warnings from collections import namedtuple from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models.query_utils import Q from django.template import TemplateSyntaxError, NodeList, Variable, Context, Template, engines ...
bsd-3-clause
-7,211,856,277,109,119,000
37.683706
110
0.623472
false
4.499443
false
false
false
jbutler42/pynet_class
pyclass/week4/shell.py
1
2967
#!/usr/bin/env python import paramiko from getpass import getpass from pyclass.common import config from pyclass.common.entities import entities (device_ip, device_port, device_type) = entities.ssh_devices['rtr1'] username = entities.entities['ssh_user'] print device_ip, device_port, username class shellConnection(o...
apache-2.0
-5,937,187,709,868,411,000
38.039474
74
0.587799
false
3.909091
false
false
false
hachreak/invenio-records
examples/app.py
1
2795
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 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
6,225,988,424,922,670,000
26.135922
76
0.732379
false
3.433661
false
false
false
ligo-cbc/pycbc
pycbc/types/timeseries.py
1
42880
# Copyright (C) 2014 Tito Dal Canton, Josh Willis, Alex Nitz # # 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...
gpl-3.0
-2,155,293,972,368,629,800
38.411765
120
0.587803
false
4.306951
false
false
false
vsilent/smarty-bot
core/lib/julius/connect.py
1
2602
#! /usr/bin/python -u # (Note: The -u disables buffering, as else we don't get Julius's output.) # # Command and Control Application for Julius # # How to use it: # julius -quiet -input mic -C julian.jconf 2>/dev/null | ./command.py # # Copyright (C) 2008, 2009 Siegfried-Angel Gevatter Pujals <rainct@ubunt...
mit
-8,112,321,757,459,421,000
33.693333
90
0.664873
false
3.787482
false
false
false
xxi511/CKFinder
CKCrawler.py
1
3689
from bs4 import BeautifulSoup as bs from urllib.request import urlopen from urllib.request import Request import threading import webbrowser from collections import OrderedDict class CKCrawler(object): def __init__(self, tid, keywod, p1, p2): homeData = self.getpageData(tid, 1) lastPage = int(home...
mit
2,669,349,828,524,851,000
35.74
118
0.531718
false
3.439139
false
false
false
google/compynator
tests/test_niceties.py
1
5249
# Copyright 2019 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, s...
apache-2.0
-3,231,996,535,187,309,600
35.706294
78
0.563726
false
3.324256
true
false
false
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/conversion_custom_variable_error.py
1
1244
# -*- 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,988,404,719,535,612,000
30.1
74
0.704984
false
4.119205
false
false
false
PanDAWMS/panda-bigmon-lsst
lsst/settings/config.py
1
7652
from os.path import dirname, join import core import lsst import filebrowser import pbm from lsst import admin #from local import defaultDatabase, MY_SECRET_KEY from local import dbaccess, MY_SECRET_KEY ### VIRTUALENV #VIRTUALENV_PATH = '/data/virtualenv/django1.6.1__python2.6.6' #VIRTUALENV_PATH = '/data/virtuale...
apache-2.0
4,741,140,407,640,507,000
31.841202
104
0.542473
false
3.647283
false
false
false
iABC2XYZ/abc
Epics/DataAna8.py
1
5336
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Oct 27 15:44:34 2017 @author: p """ import numpy as np import tensorflow as tf import matplotlib.pyplot as plt plt.close('all') def GenWeight(shape): initial = tf.truncated_normal(shape, stddev=1.) return tf.Variable(initial) def GenBias(shap...
gpl-3.0
-3,398,072,958,445,177,300
19.288973
75
0.589018
false
2.263895
false
false
false
Paricitoi/python_4_eng
python_week2/solution_week2_ex2a.py
1
1823
#!/usr/bin/env python ''' Write a script that connects to the lab pynet-rtr1, logins, and executes the 'show ip int brief' command. ''' import telnetlib import time import socket import sys import getpass TELNET_PORT = 23 TELNET_TIMEOUT = 6 def send_command(remote_conn, cmd): ''' Send a command down the teln...
gpl-3.0
-1,532,054,509,643,778,300
22.371795
80
0.643993
false
3.375926
false
false
false
cbertinato/pandas
pandas/tests/tseries/frequencies/test_freq_code.py
1
4666
import pytest from pandas._libs.tslibs import frequencies as libfrequencies, resolution from pandas._libs.tslibs.frequencies import ( FreqGroup, _period_code_map, get_freq, get_freq_code) import pandas.tseries.offsets as offsets @pytest.fixture(params=list(_period_code_map.items())) def period_code_item(request...
bsd-3-clause
-8,814,508,839,053,833,000
30.527027
75
0.576511
false
2.819335
true
false
false
xflows/textflows
streams/views.py
1
1151
# helperji, context stvari from django.shortcuts import render, get_object_or_404, redirect from django.http import Http404, HttpResponse from django.contrib import messages from django.core import serializers # from django.utils import simplejson from workflows.urls import * from workflows.helpers import * import work...
mit
3,006,428,727,042,375,700
27.073171
99
0.785404
false
3.724919
false
false
false
bcroq/kansha
kansha/card_addons/vote/comp.py
1
1757
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from nagare import security from peak.rules import when from nagare.securit...
bsd-3-clause
5,426,557,955,261,706,000
28.283333
96
0.671599
false
3.528112
false
false
false
siriuslee/pyoperant
pyoperant/tlab/local_chronic.py
1
3078
import datetime as dt import os import logging import argparse from functools import wraps from pyoperant import hwio, components, panels, utils, InterfaceError, events from pyoperant.interfaces import nidaq_ logger = logging.getLogger(__name__) class Panel131(panels.BasePanel): """ The chronic recordings box in...
gpl-3.0
9,138,150,092,646,161,000
29.475248
102
0.550682
false
4.533137
false
false
false
francbartoli/geonode
geonode/geoserver/views.py
1
34744
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-7,559,356,352,611,287,000
38.126126
120
0.568213
false
4.254715
false
false
false
levilucio/SyVOLT
GM2AUTOSAR_MM/Properties/positive/Himesis/HM5ThenClausePart2CompleteLHS.py
1
17412
from core.himesis import Himesis, HimesisPreConditionPatternLHS class HM5ThenClausePart2CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HM5ThenClausePart2CompleteLHS. """ # Flag this instance as compiled no...
mit
6,289,185,427,386,588,000
48.047887
154
0.515679
false
5.009206
false
false
false
galaxy-team/website
newrelic/hooks/framework_bottle.py
1
2494
import newrelic.api.web_transaction import newrelic.api.out_function import newrelic.api.name_transaction import newrelic.api.error_trace import newrelic.api.function_trace def instrument(module): version = map(int, module.__version__.split('.')) def out_Bottle_match(result): callback, args = result ...
agpl-3.0
-5,393,824,894,224,822,000
36.223881
74
0.631115
false
3.946203
false
false
false
tomucu/pse
server/webservice/detection_app/tests.py
1
1720
import json from django.test import TestCase from django.test.client import Client class SimpleTest(TestCase): def setUp(self): self.client = Client() def test_mona_lisa_1(self): # TODO(sghiaus): Change test images to png. mona_lisa_1 = open("detection_app/testdata/MonaLisa1.png", "rb...
mit
7,223,417,858,786,676,000
39
81
0.607558
false
3.150183
true
false
false
BrainBot/advent
2016/p22/p22.py
1
1776
import re from collections import defaultdict GOAL_CHAR = 'G' EMPTY_CHAR = '_' NORMAL_CHAR = '.' BIG_CHAR = '#' START = (35,0) def print_grid(grid, goal, goal_size): for l, j in enumerate(grid): for k, i in enumerate(j): print_char = NORMAL_CHAR if i[1] > 100: pri...
mit
5,136,835,176,271,946,000
23.666667
81
0.538851
false
3.072664
false
false
false
kevin-coder/tensorflow-fork
tensorflow/python/saved_model/load_test.py
1
48380
# Copyright 2018 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
-3,310,007,591,043,251,000
34.863603
116
0.648698
false
3.583704
true
false
false
ternaris/marv-robotics
code/marv/marv/utils.py
1
3364
# Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os import re import sys import time from datetime import datetime, timedelta from datetime import tzinfo as tzinfo_base from itertools import islice from marv_api.utils import NOTSET def chunked(iterable, chunk_size): itr = iter(...
agpl-3.0
-6,854,258,184,394,770,000
26.801653
93
0.58591
false
3.384306
false
false
false
jmoiron/jmoiron.net
jmoiron/stream/models.py
1
1223
#!/usr/bin/env python # -*- coding: utf-8 -*- """stream data access models""" from flask import Blueprint, render_template from micromongo import * __all__ = ["Entry", "Plugin", "blueprint", "url_prefix"] blueprint = Blueprint("stream", __name__, template_folder="templates", static_folder="static", ) url_p...
mit
-1,370,310,344,401,744,100
25.021277
63
0.606705
false
3.494286
false
false
false
zhm/s3_cmd_bin
resources/run-tests.py
1
21749
#!/usr/bin/env python # -*- coding=utf-8 -*- ## Amazon S3cmd - testsuite ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 import sys import os import re from subprocess import Popen, PIPE, STDOUT import locale import pwd count_pass = 0 count_fail = 0 count_sk...
mit
-1,690,160,694,387,922,000
39.454376
225
0.595885
false
2.937263
true
false
false
wchen1994/Alignments-of-Sequences
alignSeq/app4.py
1
5765
import url_file_read as provided import math import random import project4 import matplotlib.pyplot as plt protein_human = provided.read_protein(provided.HUMAN_EYELESS_URL) protein_fly = provided.read_protein(provided.FRUITFLY_EYELESS_URL) scoring_matrix = provided.read_scoring_matrix(provided.PAM50_URL) """ caluclat...
mit
-3,805,425,347,808,624,000
33.520958
166
0.662272
false
3.435638
false
false
false
litebitcoins/litebitcoin
test/functional/test_framework/mininode.py
1
57674
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin P2P ...
mit
8,927,728,029,096,172,000
30.091105
262
0.578978
false
3.545678
false
false
false
escapewindow/signingscript
src/signingscript/vendored/mozbuild/mozbuild/test/backend/test_build.py
2
9822
# 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/. from __future__ import absolute_import, unicode_literals, print_function import buildconfig import os import shutil imp...
mpl-2.0
-1,361,531,391,960,118,500
40.268908
78
0.54551
false
3.576839
true
false
false
Grumbel/rfactortools
race07-ids.py
1
3707
#!/usr/bin/env python3 # Race07 Tool # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # 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...
gpl-3.0
-381,973,977,070,208,450
31.234783
79
0.555166
false
3.699601
false
false
false
wronk/mne-python
mne/epochs.py
1
129010
# -*- coding: utf-8 -*- """Tools for working with epoched data""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Denis Engemann <denis.engemann@gmail.com> # ...
bsd-3-clause
669,946,045,660,823,700
40.938557
80
0.57077
false
4.07335
false
false
false
twotwo/tools-python
pandas-sample/save-stock-info.py
1
1444
# fetch remove data to local excel: AAPL.xls/MSFT.xls # https://github.com/pydata/pandas-datareader/blob/master/pandas_datareader/data.py import datetime import os import pandas as pd import pandas_datareader.data as web import sys import warnings if not sys.warnoptions: warnings.simplefilter("ignore") warnin...
mit
107,123,274,152,641,920
32.581395
83
0.680748
false
3.008333
false
false
false
twbattaglia/conda-menu
app/cmd/conda_api.py
1
16815
import re import os import sys import json from subprocess import Popen, PIPE from os.path import basename, isdir, join __version__ = '1.2.1-modified' class CondaError(Exception): "General Conda error" pass class CondaEnvExistsError(CondaError): "Conda environment already exists" pass def _call_c...
gpl-3.0
8,817,906,200,453,926,000
28.294425
88
0.595897
false
3.693169
true
false
false
Andy43000/lingua101
german_adverbs.py
1
1520
#top25germanadverbs import random while True: #initiate loop d = { 'eben ':'just now', 'erst ':'first', 'natürlich ': 'naturally', 'vielleicht ':'perhaps', 'dort ': 'there', 'auch ':'also', 'so ':'so', ...
apache-2.0
-4,658,886,380,276,498,000
26.618182
77
0.399605
false
4.061497
false
false
false
abusse/cinder
cinder/volume/drivers/san/hp/hp_lefthand_cliq_proxy.py
1
18776
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
-1,048,060,943,674,934,800
38.035343
79
0.597199
false
3.870542
false
false
false
whowutwut/confluent
confluent_server/confluent/neighutil.py
1
2087
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2016 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-2,022,119,195,281,933,000
31.609375
77
0.637278
false
3.836397
false
false
false
DedMemez/ODS-August-2017
building/DistributedPetshopInterior.py
1
1383
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.building.DistributedPetshopInterior from direct.distributed.DistributedObject import DistributedObject from direct.actor.Actor import Actor from RandomBuilding import RandomBuilding class DistributedPetshopInterior(DistributedObject, RandomBuildi...
apache-2.0
8,962,982,952,427,555,000
38.735294
119
0.670282
false
3.55527
false
false
false
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/lib/filebrowsebutton.py
1
17383
#---------------------------------------------------------------------- # Name: wxPython.lib.filebrowsebutton # Purpose: Composite controls that provide a Browse button next to # either a wxTextCtrl or a wxComboBox. The Browse button # launches a wxFileDialog and loads the resu...
mit
3,643,485,071,056,536,000
35.78913
95
0.54421
false
4.549333
false
false
false
compas-dev/compas
src/compas/geometry/shapes/cone.py
1
7844
from __future__ import absolute_import from __future__ import division from __future__ import print_function from math import cos from math import pi from math import sin from math import sqrt from compas.utilities import pairwise from compas.geometry import matrix_from_frame from compas.geometry import transform_po...
mit
7,685,976,723,404,255,000
26.048276
82
0.516191
false
4.298082
false
false
false
nhmc/xastropy
xastropy/spec/continuum.py
1
2939
""" #;+ #; NAME: #; continuum #; Version 1.0 #; #; PURPOSE: #; Module for continuum code #; 20-Aug-2015 by JXP #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import ...
bsd-3-clause
7,977,228,251,095,165,000
25.963303
82
0.560735
false
3.198041
false
false
false
CloudNcodeInc/djmail
djmail/south_migrations/0001_initial.py
1
3184
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Message' db.create_table('djmail_message', ( ('uuid', self.gf('django.db.models.f...
bsd-3-clause
-8,891,581,562,814,985,000
59.075472
159
0.592023
false
3.577528
false
false
false
azyobuzin/TbrFeed
tbrfeed/feedgen.py
1
1888
import datetime import re import xml.sax.saxutils import flask import tumblr def img_tag_from_photo(photo): alt_sizes = photo["alt_sizes"] alt_size = None for size in alt_sizes: if size["width"] > 420 and size["width"] <= 500: alt_size = size if not alt_size: alt_size = al...
mit
6,560,032,934,799,633,000
28.046154
116
0.60911
false
3.341593
false
false
false
RedHatInsights/insights-core
insights/parsers/avc_cache_threshold.py
1
1082
""" AvcCacheThreshold - File ``/sys/fs/selinux/avc/cache_threshold`` ================================================================ This parser reads the content of ``/sys/fs/selinux/avc/cache_threshold``. """ from .. import parser, CommandParser from ..parsers import ParseException from insights.specs import Spec...
apache-2.0
-5,647,076,919,696,862,000
29.055556
98
0.634011
false
3.99262
false
false
false
MartinPaulo/resplat
storage/report_unfunded.py
1
2761
from decimal import * from operator import attrgetter from storage.models import Collection from storage.report_funding import ReportRow, FundingReportRow, \ FundingReportForCollection, AbstractFundingReportBase class Bunch(list): """ http://code.activestate.com/recipes/52308-the-simple-but-handy-collect...
lgpl-3.0
5,416,138,525,681,396,000
37.347222
97
0.597247
false
4.013081
false
false
false
polarise/python-bioclasses
setup.py
1
1055
from distutils.core import setup setup( name='BioClasses', version='0.1.6', packages=["BioClasses"], data_files=[("genetic_codes", \ ["data/genetic_codes/euplotid_genetic_code.txt", \ "data/genetic_codes/human_genetic_code.txt", \ "data/genetic_codes/tetrahymena_genetic_code.txt"]), \ ("CAI_tables", \ ["data/CAI_t...
gpl-2.0
1,539,110,896,714,187,800
38.074074
120
0.720379
false
2.657431
false
false
false
pablobesada/tw
twfetch.py
1
9251
#encoding: utf-8 """ from twitter import Twitter twitter = Twitter.getTwitter() q = twitter.search(q='scioli') print q['search_metadata'] for t in q['statuses']: print t """ #import tweetstream import time import threading from twython import TwythonStreamer, Twython from pymongo import MongoClient from datetime imp...
apache-2.0
3,237,573,120,783,323,000
35.561265
434
0.592
false
3.48006
false
false
false
nash-x/hws
neutron/plugins/ml2/drivers/mech_sriov/mech_driver.py
1
8207
# Copyright 2014 Mellanox Technologies, Ltd # # 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 t...
apache-2.0
8,194,136,619,381,212,000
42.194737
78
0.603509
false
4.250129
false
false
false
imagi-ng/metadata-database
metadata_database/model.py
1
4164
import metadata_database.type class Base(metadata_database.database.Model): __abstract__ = True id = metadata_database.database.Column( metadata_database.type.UUID, primary_key=True ) class Annotation(Base): __tablename__ = "annotations" annotator_id = metadata_database.databas...
mit
-3,911,850,472,369,324,000
21.508108
63
0.644813
false
4.062439
false
false
false
vipul-sharma20/fossevents.in
fossevents/events/migrations/0001_initial.py
1
1738
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import django_extensions.db.fields import uuid class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name=...
mit
-9,013,716,467,257,346,000
45.972973
172
0.610472
false
4.45641
false
false
false
markuswissinger/ducktestpy
ducktest/base.py
1
1475
""" Copyright 2016 Markus Wissinger. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
apache-2.0
-3,634,547,098,730,059,300
27.921569
90
0.732203
false
4.263006
false
false
false
andrewdodd/drf-timeordered-pagination
tests/conftest.py
1
1512
def pytest_configure(): from django.conf import settings settings.configure( DEBUG_PROPAGATE_EXCEPTIONS=True, DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}}, SITE_ID=1, SECRET_KEY='not very secret in tests', ...
mit
8,540,495,660,768,154,000
31.170213
70
0.558201
false
4.609756
false
false
false
omf2097/pyomftools
omftools/pyshadowdive/palette_mapping.py
1
1335
from validx import Dict, List from .protos import DataObject from .palette import Palette from .utils.parser import BinaryParser from .utils.validator import UInt8 from .utils.types import Remappings, Remapping class PaletteMapping(DataObject): __slots__ = ( "colors", "remaps", ) schema ...
mit
-2,354,301,160,322,109,000
28.021739
74
0.6
false
3.637602
false
false
false
thomasgibson/tabula-rasa
HDG_CG_comp/base.py
1
2187
from firedrake import * from firedrake.utils import cached_property from abc import ABCMeta, abstractproperty class Problem(object): __metaclass__ = ABCMeta def __init__(self, N=None, degree=None, dimension=None, quadrilaterals=False): super(Problem, self).__init__() self....
mit
3,198,064,129,734,001,000
22.516129
79
0.564243
false
4.027624
false
false
false
dhmodi/virtual_patient_assistant
cognitiveSQL/LangConfig.py
1
4537
# -*- coding: utf-8 -* import sys, re import unicodedata #reload(sys) #sys.setdefaultencoding("utf-8") class LangConfig: def __init__(self): self.avg_keywords = [] self.sum_keywords = [] self.max_keywords = [] self.min_keywords = [] self.count_keywords = [] self.junction_keywords = [] self.disjunctio...
apache-2.0
5,558,215,102,798,540,000
39.159292
117
0.699581
false
3.018629
false
false
false
James-cB/openPoke
vs2012/openPoke_1/openPoke_1/Threads_def.py
1
5087
def programStart(): start = raw_input(" Would you like to begin the simulation? \n\n ") if start in {"Yes", "yes", "Yep", "yep", "Begin", "begin", "Start", "start", "y", "Y"}: time.sleep(0.3) print "" time.sleep(0.2) ...
gpl-2.0
-1,430,950,072,649,434,400
26.803279
209
0.535876
false
3.386818
false
false
false
eharney/cinder
cinder/volume/drivers/hitachi/hbsd_horcm.py
1
58062
# Copyright (C) 2014, 2015, Hitachi, Ltd. # # 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 ...
apache-2.0
464,826,580,063,807,040
37.656458
79
0.533378
false
3.621858
false
false
false
nschloe/quadpy
src/quadpy/c1/_gauss_patterson.py
1
32328
import numpy as np from ..helpers import article from ._gauss_legendre import gauss_legendre from ._helpers import C1Scheme source = article( authors=["T.N.L. Patterson"], title="The optimum addition of points to quadrature formulae", journal="Math. Comp.", volume="22", year="1968", pages="847...
mit
722,025,886,675,733,100
38.472527
112
0.556607
false
2.874111
false
false
false
jds2001/sos
sos/plugins/etcd.py
1
2227
# Copyright (C) 2015 Red Hat, Inc. Neependra Khare <nkhare@redhat.com> # Copyright (C) 2015 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com> # 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 ...
gpl-2.0
9,004,921,074,959,026,000
30.814286
79
0.585092
false
3.699336
false
false
false
ioos/cc-plugin-ncei
cc_plugin_ncei/ncei_point.py
1
5599
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' cc_plugin_ncei/ncei_point.py ''' from compliance_checker.base import BaseCheck from cc_plugin_ncei.ncei_base import TestCtx, NCEI1_1Check, NCEI2_0Check from cc_plugin_ncei import util class NCEIPointBase(BaseCheck): _cc_spec = 'ncei-point' valid_feature_types...
apache-2.0
5,135,783,404,558,934,000
41.679389
145
0.635664
false
3.697751
true
false
false
xxd3vin/spp-sdk
tools/script/blender/x3d2ocs.py
1
7210
import sys,os,bpy import urllib from urllib import * import urllib.request from xml.etree import ElementTree print("run start") render_url = "http://192.168.3.78:8088/content/test/monkey" x3d_url = "http://192.168.3.78:8088/content/test/monkey.x3d" x3d_scene_name = "monkey" def dowload_x3d(x3d_url): print("st...
mit
8,665,271,637,099,151,000
35.979487
212
0.520527
false
3.724174
false
false
false
nmc-probe/emulab-nome
tbsetup/plab/libdslice/dslice/nodemgrproxy.py
1
5675
""" Copyright (c) 2002 Intel Corporation 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 list of conditions and t...
agpl-3.0
-1,721,309,583,470,177,000
41.350746
88
0.672423
false
3.628517
false
false
false
robcarver17/pysystemtrade
sysexecution/order_stacks/contract_order_stack.py
1
2783
import datetime from copy import copy from syscore.objects import missing_order from sysexecution.order_stacks.order_stack import orderStackData, missingOrder from sysexecution.trade_qty import tradeQuantity from sysexecution.orders.contract_orders import contractOrder class contractOrderStackData(orderStackData): ...
gpl-3.0
2,876,840,782,749,514,000
37.123288
87
0.621272
false
3.908708
false
false
false
RedhawkSDR/FrontEndController
python/FrontEndController.py
1
11241
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK FrontEndController. # # REDHAWK FrontEndController is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesse...
lgpl-3.0
5,431,343,900,330,088,000
40.025547
141
0.601993
false
4.478486
false
false
false
noracami/ballin-lana
djangoconnectiondashboard/djangoconnectiondashboard/settings/base.py
1
2970
""" Django settings for djangoconnectiondashboard project. Generated by 'django-admin startproject' using Django 1.8.2. 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/...
cc0-1.0
4,128,789,508,909,835,000
25.517857
72
0.696633
false
3.671199
false
false
false
srio/dabam
code/dabam_python_example.py
1
1915
import dabam if __name__ == '__main__': # # get summary table # text = dabam.dabam_summary() print(text) out = dabam.dabam_summary_dictionary() for i in range(len(out)): print("i=:%d, entry:%d"%(i,(out[i])["entry"])) print(out[13]) # # load a given entry (=14) ...
gpl-2.0
4,966,671,420,835,856,000
32.596491
111
0.556136
false
3.389381
false
false
false
toomore/grs
grs/twseno.py
1
6281
# -*- coding: utf-8 -*- ''' TWSE stock no. ''' # Copyright (c) 2012, 2013, 2014 Toomore Chiang, http://toomore.net/ # # 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, incl...
mit
-4,252,215,680,980,006,000
28.827586
79
0.536581
false
3.428652
false
false
false