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
jcchoiling/learningPython
aws/swf/register.py
1
1618
#!/usr/bin/env python3 """ Registers domains, workflows and activities """ from botocore.exceptions import ClientError from aws.swf.creds import init_aws_session, DOMAIN, WORKFLOW import boto3 def register_domain(session): try: response = session.register_domain( name=DOMAIN, descri...
gpl-3.0
-4,660,156,210,070,328,000
32.040816
78
0.609394
false
kennedyshead/home-assistant
homeassistant/components/advantage_air/sensor.py
1
4827
"""Sensor platform for Advantage Air integration.""" import voluptuous as vol from homeassistant.components.sensor import SensorEntity from homeassistant.const import PERCENTAGE from homeassistant.helpers import config_validation as cv, entity_platform from .const import ADVANTAGE_AIR_STATE_OPEN, DOMAIN as ADVANTAGE_...
apache-2.0
373,923,090,265,001,540
32.520833
95
0.630412
false
greyside/django-mesh
django_mesh/tests/test_managers.py
1
8604
# -*- coding: utf-8 -*- #Copyright (C) 2011 Seán Hayes # #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at your option) any later version. # #This program is ...
gpl-3.0
-4,949,374,654,283,196,000
28.768166
72
0.63257
false
ngageoint/scale
scale/storage/management/commands/scale_delete_files.py
1
4317
"""Defines the command line method for running a delete files task""" from __future__ import unicode_literals import json import logging import os import signal import sys from collections import namedtuple from django.core.management.base import BaseCommand from messaging.manager import CommandMessageManager from s...
apache-2.0
4,207,757,517,502,264,000
35.897436
105
0.63748
false
parrainc/jobs-portal-iso700
jobs_portal/settings.py
1
3615
""" Django settings for jobs_portal project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import ...
unlicense
3,272,112,202,115,496,000
24.638298
91
0.669986
false
brachiel/rotcbot
jabberbot.py
1
22562
#!/usr/bin/python # -*- coding: utf-8 -*- # JabberBot: A simple jabber/xmpp bot framework # Copyright (c) 2007-2011 Thomas Perl <thp.io/about> # # 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; ...
gpl-3.0
938,640,651,225,199,000
36.919328
141
0.575614
false
simmetria/sentry
tests/sentry/web/frontend/teams/tests.py
1
7297
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from django.contrib.auth.models import User from django.core.urlresolvers import reverse from sentry.constants import MEMBER_OWNER, MEMBER_USER from sentry.models import Team from sentry.testutils import fixture from sentry.testutils import ...
bsd-3-clause
4,606,438,708,366,151,700
39.538889
134
0.66082
false
tmalsburg/EyeScript
EyeScript/interest_area.py
1
2120
# -*- coding: utf-8 -*- class InterestArea: """ Represents a region of the screen, for eye data reporting purposes. The EyeLink Data Viewer can associate fixations with regions on the screen, for instance the regions around each word in a sentence. An InterestArea object stores the information for ...
gpl-2.0
-2,225,037,435,047,510,500
47.181818
145
0.66934
false
openstack/zaqar
zaqar/storage/redis/subscriptions.py
1
11355
# Copyright (c) 2015 Catalyst IT 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 to in ...
apache-2.0
-2,472,054,833,630,128,000
40.900369
79
0.551035
false
acgx/ooi-hack
oh_discussion/models.py
1
4592
from django.core.urlresolvers import reverse_lazy from django.conf import settings from django.db import models from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from django.utils import timezone from mptt.models import MPTTModel, TreeForeignKey class ONode(MPTTModel): ...
gpl-2.0
-1,767,600,785,363,577,000
32.920635
118
0.668226
false
jcsp/manila
manila/tests/scheduler/test_host_manager.py
1
31419
# Copyright (c) 2011 OpenStack, LLC # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Clinton Knight # 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 # # ...
apache-2.0
8,508,839,372,847,586,000
40.61457
79
0.498806
false
DemocracyClub/yournextrepresentative
ynr/apps/moderation_queue/management/commands/moderation_queue_detect_faces_in_queued_images.py
1
2409
import json import boto3 from django.core.management.base import BaseCommand, CommandError from moderation_queue.models import QueuedImage # These magic values are because the AWS API crops faces quite tightly by # default, meaning we literally just get the face. These values are about # right or, they are more righ...
agpl-3.0
-6,778,755,372,919,547,000
35.5
80
0.598589
false
Abdoctor/behave
behave/formatter/_builtins.py
1
1799
# -*- coding: utf-8 -*- """ Knowledge base of all built-on formatters. """ from __future__ import absolute_import from behave.formatter import _registry # ----------------------------------------------------------------------------- # DATA: # -------------------------------------------------------------------------...
bsd-2-clause
-574,672,067,158,876,300
45.128205
79
0.573652
false
agustinhenze/natsort.debian
test_natsort/stress_natsort.py
1
1942
# -*- coding: utf-8 -*- """\ This file contains functions to stress-test natsort, looking for cases that raise an unknown exception. """ from random import randint, sample, choice from string import printable from copy import copy from pytest import fail from natsort import natsorted from natsort.compat.py23 import py2...
mit
1,389,643,025,399,781,400
34.962963
76
0.599897
false
jolyonb/edx-platform
lms/djangoapps/course_goals/models.py
1
1260
""" Course Goals Models """ from __future__ import absolute_import from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils import Choices from opaque_keys.edx.django.models import CourseKeyField # Each goal is represented by a g...
agpl-3.0
-6,925,073,710,970,054,000
30.5
106
0.664286
false
radicalbit/ambari
ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py
1
149649
''' 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
-4,457,167,415,613,347,000
37.078626
209
0.508089
false
linuxm0nk3ys/conkyPress
py/mod_comments.py
1
1689
#! /usr/bin/env python2.7 from bs4 import BeautifulSoup def printStats(gl, soup, adminPageEx): if adminPageEx == 'true': print('${font Arial:bold:size=10}'+ gl.topicCol +'COMMENTS '+gl.topicLineCol+'${hr 2}') print('${color red}Error getting comment stats') print(gl.secOffset) else: #Private variables pend...
gpl-3.0
-8,220,707,289,308,061,000
27.627119
97
0.609236
false
Cloudzero/cloudzero-reactor-aws
reactor/utils/decorators.py
1
5537
# -*- coding: utf-8 -*- # Copyright (c) 2016-present, CloudZero, Inc. All rights reserved. # Licensed under the BSD-style license. See LICENSE file in the project root for full license information. import multiprocessing import signal import sys import time from functools import wraps ###############################...
bsd-3-clause
744,318,115,019,031,800
35.913333
114
0.592379
false
mamewotoko/stacklr
oauth2/oauth2client/calendar_test.py
1
1868
from oauth2client.client import flow_from_clientsecrets, credentials_from_clientsecrets_and_code from apiclient.discovery import build import json, httplib2, sys from oauth2client.file import Storage import setting, os target_calendar_name = "debug" credentials = None storage = Storage(setting.STORAGE_FILE) if os.pa...
apache-2.0
1,567,577,337,228,768,800
29.622951
96
0.659529
false
MD2Korg/CerebralCortex
jupyter_demo/demo_algorithm/gps_clustering.py
1
4106
# Copyright (c) 2019, MD2K Center of Excellence # - Nasir Ali <nasir.ali08@gmail.com> # 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 cop...
bsd-2-clause
7,539,623,679,772,456,000
37.735849
80
0.708719
false
Wang-Sen/nqzx-backend
bootcamp/auth/views.py
1
1142
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login from bootcamp.auth.forms import SignUpForm from django.contrib.auth.models import User from bootcamp.feeds.models import Feed from django.utils.translation import ugettext_lazy as _ def signup(request): if request.met...
gpl-3.0
-5,708,250,624,121,392,000
44.68
97
0.65324
false
spasiva/pocztowy_konwerter
konwerter.py
1
7143
#!/usr/bin/python3 # # Copyright (C) 2017 Łukasz Kopacz # # This file is part of Pocztowy konwerter. # # Pocztowy konwerter 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 #...
gpl-3.0
-813,897,427,883,694,600
53.106061
118
0.623075
false
tiankangkan/paper_plane
treasure/sync_db.py
1
1031
import sys import os def current_file_directory(): return os.path.dirname(os.path.realpath(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.append(BASE_DIR) from paper_plane import django_models_init from treasure.models import FileMapping from k_util.hash_util import...
gpl-3.0
-5,145,393,756,400,926,000
28.457143
76
0.634336
false
dabrze/CheckMyBlob
GatherData/ignored_res.py
1
4949
ELEMENTS_ELECTRONS = { "H":1, "HE":2, "LI":3, "BE":4, "B":5, "C":6, "N":7, "O":8, "F":9, "NE":10, "NA":11, "MG":12, "AL":13, "SI":14, "P":15, "S":16, "CL":17, "AR":18, "K":19, "CA":20, "SC":21, "TI":22, "V":23, "CR":24, "MN":25, "FE":26, "CO":27, "NI":28, "CU":29, "ZN":30, "GA":31, "GE":32, "AS":33, "SE":3...
mit
3,418,070,713,469,237,000
25.324468
107
0.322489
false
gtsapelas/TRANSrisk_fcm_project
TRANSrisk_fcm_project/settings_management/base_settings.py
1
4279
""" Django settings for TRANSrisk_fcm_project project. Generated by 'django-admin startproject' using Django 1.9. 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/ """ ...
mit
1,756,050,001,963,518,000
25.91195
103
0.696892
false
lundjordan/slaveapi
slaveapi/web/__init__.py
1
1275
from flask import Flask from .results import Results from .slave import Reboot, Slave, ShutdownBuildslave, GetUptime, GetLastActivity from .slave import Disable, AWSTerminateInstance from .slaves import Slaves app = Flask(__name__) app.add_url_rule("/results", view_func=Results.as_view("results"), methods=["GET"]) a...
mpl-2.0
1,747,946,871,438,649,600
69.833333
149
0.727059
false
JohnLunzer/flexx
docs/scripts/uiexample.py
1
6956
""" Small sphinx extension to show a UI example + result """ import os import sys import hashlib import warnings import subprocess import importlib.util from sphinx.util.compat import Directive from docutils import nodes from flexx import app THIS_DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path....
bsd-2-clause
-2,431,509,267,522,017,300
32.442308
118
0.594307
false
OryanMo/itchy-broccoli
populatetables.py
1
3174
#!/usr/bin/python3 import selenium.webdriver.support.ui as ui from time import sleep from selenium import webdriver import sqlite3 from datetime import datetime from pyvirtualdisplay import Display from pathlib import Path db = sqlite3.connect('/root/itchy-broccoli/db/moviedb.db') cinemas = db.cursor() #cursor.execut...
gpl-3.0
5,235,147,248,176,388,000
29.815534
175
0.601449
false
anybox/anybox.buildbot.odoo
anybox/buildbot/openerp/utils.py
1
3465
import os import hashlib import subprocess BUILD_UTILS_PATH = os.path.join(os.path.split(__file__)[0], 'build_utils') # can be overridden from command line tools such as update-mirrors, # for the version that has the buildbot hooks. vcs_binaries = dict(bzr='bzr', hg='hg', git='git') def ez_hash(url): """Return...
agpl-3.0
-462,754,591,610,683,900
32.317308
77
0.608369
false
onto/sonata
sonata/preferences.py
1
38992
""" This module provides a user interface for changing configuration variables. Example usage: import preferences ... prefs = preferences.Preferences() prefs.on_prefs_real(self.window, self.prefs_window_response, tab callbacks...) """ import gettext import gtk from consts import consts from config import Config fro...
gpl-3.0
-8,600,412,385,628,513,000
44.819036
269
0.61169
false
acercado/jd-ph-cms
jd-ph-cms/myuser/migrations/0001_initial.py
1
1377
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-29 10:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MyUser'...
bsd-3-clause
3,431,463,518,727,111,700
38.342857
114
0.573711
false
manahl/arctic
arctic/chunkstore/tools/tools.py
1
1508
from itertools import groupby import pymongo from arctic.chunkstore.chunkstore import SYMBOL, SEGMENT, START def segment_id_repair(library, symbol=None): """ Ensure that symbol(s) have contiguous segment ids Parameters ---------- library: arctic library symbol: None, str, list of str ...
lgpl-2.1
5,661,819,244,783,407,000
29.77551
89
0.588859
false
kebugcheckex/radon
apache_monitor/backend/logfilter.py
1
2862
# URL Filter for Log Monitor import urllib.parse import config import dbo import messaging import utils cacheable_params = None host_ignore_list = None url_ignore_pattern = None agent_ignore_pattern = None def load_cacheable_param(): global cacheable_params cacheable_params = dbo.load_string_list('cacheable...
gpl-3.0
-4,408,366,807,604,016,000
28.505155
100
0.604472
false
mlabru/ptracks
model/newton/cine/prc_dir_ponto.py
1
3353
#!/usr/bin/env python # -*- coding: utf-8 -*- """ --------------------------------------------------------------------------------------------------- prc_dir_ponto revision 0.2 2015/nov mlabru pep8 style conventions revision 0.1 2014/nov mlabru initial version (Linux/Python) --------------------------------------...
gpl-3.0
-4,592,119,500,607,738,000
34.542553
130
0.548638
false
shane-breeze/DMPlots
python/signalModel.py
1
1512
import os import glob import re from Utils import getLimitsFromFile class SignalModel: def __init__(self, path): """ Initalise: * _path = stats output for this signal model * _model = name of signal model (taken from the path) """ path = path.replace('\n','') ...
gpl-3.0
3,973,868,659,589,617,000
31.170213
72
0.52381
false
andersroos/rankedftw
main/update.py
1
16666
import json import socket from collections import deque from datetime import timedelta from logging import getLogger, INFO, WARNING from time import sleep from django.db import transaction from common.utils import utcnow, to_unix, StoppableThread from main.battle_net import BnetClient, ApiLadder from main.client import...
agpl-3.0
1,096,104,690,824,885,500
40.769424
117
0.50144
false
megmogmog1965/awscostchart
server/util.py
1
6428
#!/usr/bin/env python # encoding: utf-8 ''' Created on Aug 4, 2016 :author: Yusuke Kawatsu ''' # built-in modules. import os import copy import time import shutil import codecs import sqlite3 import tempfile import datetime # installed modules. from flask import request # my modules. from http_error import make_ht...
mit
2,187,536,141,951,111,700
25.320675
186
0.586085
false
openbmc/openbmc-test-automation
lib/gen_plug_in_utils.py
1
23809
#!/usr/bin/env python r""" This module provides functions which are useful to plug-in call point programs. """ import sys import os import re import collections import gen_print as gp import gen_valid as gv import gen_misc as gm import gen_cmd as gc import func_args as fa PLUG_VAR_PREFIX = os.environ.get("PLUG_VAR_...
apache-2.0
944,438,229,631,471,100
39.629693
110
0.638498
false
dmort27/pylid
pylid/langs/el.py
1
736889
#!/usr/bin/env python # -*- coding: utf-8 -*- import pylid from collections import Counter el = pylid.PyLID(3) el.total_ngrams = 207365496 el.lang = 'el' el.ngrams = Counter({ u'\u03b1\u03b9#': 1833955, u'#\u03c4\u03b7': 1792914, u'#\u03ba\u03b1': 1652081, u'#\u03c4\u03bf': 1512455, u'\u03bf\u03c5...
mit
-2,661,911,612,505,249,300
23.766048
35
0.517999
false
leandrodemarcovedelago/thesis-aco
CspAco.py
1
2628
#!/usr/bin/env python #-*- encoding: utf-8 -*- import time import networkx as nx from Functions import buildGraph, cost, updatePheromone, isSolution, \ buildSaturatedGraph, sensTotal import Ant import sys def runExperiment(samples, scenario1, tau_min, tau_max): g, numPaths, numSol...
gpl-3.0
-5,265,195,603,573,273,000
31.265823
80
0.552511
false
ahmedaljazzar/edx-platform
openedx/features/enterprise_support/api.py
1
24868
""" APIs providing support for enterprise functionality. """ import logging from functools import wraps from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django.urls import reverse from django.shortcuts import redirect from django.template.loader impo...
agpl-3.0
7,703,140,729,834,478,000
36.564955
118
0.626267
false
django-extensions/django-extensions
tests/db/fields/test_uniq_field_mixin_compat.py
1
5584
# -*- coding: utf-8 -*- try: from unittest import mock except ImportError: import mock import six from django.db import models from django.test import TestCase from tests.testapp.models import ( DummyRelationModel, InheritedFromPostWithUniqFieldCompat, PostWithUniqFieldCompat, ReverseModelCompat, Secon...
mit
6,138,063,087,923,542,000
34.794872
97
0.637894
false
rojkov/taskqueue
tests/test_confparser.py
1
1196
import unittest import io import taskqueue.confparser TEST_CONFIG = """ [DEFAULT] non_override = defvalue key1 = value1 override = defvalue [section] key1 = section_value1 key2 = section_value2 """ class TestConfigParser(unittest.TestCase): """Tests for ConfigParser.""" def setUp(self): pass d...
gpl-2.0
8,601,310,943,548,484,000
22.45098
73
0.550167
false
greeenSY/Tstream
tstream-server/bin/jstorm.py
1
15194
#!/usr/bin/python import os import sys import random import subprocess as sub import getopt def identity(x): return x def cygpath(x): command = ["cygpath", "-wp", x] p = sub.Popen(command,stdout=sub.PIPE) output, errors = p.communicate() lines = output.split("\n") return lines[0] if sys.plat...
apache-2.0
1,662,608,393,907,917,000
38.984211
215
0.65822
false
jaor/bigmler
bigmler/processing/samples.py
1
3680
# -*- coding: utf-8 -*- # # Copyright 2015-2020 BigML # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-1,280,145,822,054,038,000
33.392523
76
0.619837
false
gioman/QGIS
python/plugins/processing/tests/QgisAlgorithmsTest.py
1
1800
# -*- coding: utf-8 -*- """ *************************************************************************** QgisAlgorithmTests.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ***********************...
gpl-2.0
-9,213,115,937,581,045,000
30.578947
79
0.490556
false
furious-luke/django-supertest
supertest/helpers.py
1
2189
import random import logging from selenium.common.exceptions import StaleElementReferenceException STRATEGIES = [ 'empty', 'long', 'text', 'integer', 'real', ] logger = logging.getLogger(__name__) def autofill(form): done = set() while 1: # Sometimes the form gets screwed up a...
bsd-3-clause
-3,196,331,769,195,174,400
23.595506
98
0.574235
false
Recoskie/netrealms
client/source/engine/network.py
1
1511
class Connection(): import socket import netcmd def __init__(address, port): connect(address, port) def connect(self, address, port): self.sock = socket.socket() self.sock.connect((address, port)) def disconnect(self): self.sock.close() pass def recieve(self, data): data = self.sock.re...
mit
2,866,098,681,061,454,000
30.5
104
0.512244
false
MickSandoz/compassion-switzerland
child_sync_typo3/model/project_compassion.py
1
3722
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: David Coninckx # # The licence is in the file __openerp__.py # #######...
agpl-3.0
6,883,415,528,850,355,000
38.021505
78
0.49597
false
getsentry/freight
migrations/versions/106230ad9e69_migrate_task_to_deploy.py
1
3895
""" migrate task to deploy Revision ID: 106230ad9e69 Revises: 16c1b29dc47c Create Date: 2016-02-17 00:43:21.608658 """ # revision identifiers, used by Alembic. revision = "106230ad9e69" down_revision = "16c1b29dc47c" from alembic import op import sqlalchemy as sa MIGRATE_TASK_TO_DEPLOY = """ INSERT INTO deploy (ta...
apache-2.0
833,459,868,892,859,900
27.224638
86
0.653915
false
hoechenberger/psychopy
changelogUpdateMD.py
1
1949
#!/usr/bin/env python # this script replaces hashtags with a sphinx URL string (to the github issues or pull request) # written by Jon with regex code by Jeremy import re input_path = 'psychopy/CHANGELOG.txt' output_path = 'docs/source/changelog.md' def repl_link(match): name = match.group('name').strip() ...
gpl-3.0
4,051,621,068,185,614,000
27.246377
117
0.620318
false
nucleron/IDE
yaplcide.py
1
1737
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "$Revision$" import __builtin__ import gettext import os import sys gettext.install('yaplcide') # this is a dummy to prevent gettext falling down _dist_folder = os.path.split(sys.path[0])[0] _beremiz_folder = os.path.join(_dist_folder, "beremiz") #Ensure ...
gpl-3.0
5,156,411,548,361,681,000
28.440678
78
0.635003
false
cemoody/lda2vec
tests/test_topics.py
1
1528
from lda2vec import topics import numpy as np def exp_entropy(log_p): return -np.nansum(np.exp(log_p + 1e-12) * (log_p + 1e-12)) def test_prob_words(): context = np.random.randn(3) vocab = np.random.randn(10, 3) lo = topics.prob_words(context, vocab, temperature=1) hi = topics.prob_words(contex...
mit
376,136,370,618,247,040
30.833333
76
0.587042
false
mabxsi/ice-cache-explorer
h5reader.py
1
7754
############################################################################### # ICE Explorer: A viewer and reader for ICE cache data # Copyright (C) 2010 M.A. Belzile # # 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 ...
gpl-3.0
-1,831,897,223,416,880,400
28.171206
100
0.518442
false
bgoli/pysces
pysces/core2/PyscesCore2Modules.py
1
25156
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2019 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Brett G. Olivier (bgoli@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permission to us...
bsd-3-clause
-2,331,998,692,438,089,700
32.541333
123
0.550246
false
pixelspark/corespark
Libraries/Spirit/boost/miniboost/tools/build/v2/test/direct_request_test.py
1
1179
#!/usr/bin/python from BoostBuild import Tester, List import os from string import strip t = Tester() # First check some startup t.set_tree("direct-request-test") t.run_build_system(extra_args="define=MACROS") t.expect_addition("bin/$toolset/debug/" * (List("a.obj b.obj b.dll a.exe")...
lgpl-3.0
5,083,666,287,021,169,000
23.630435
65
0.651399
false
nickhand/pyRSD
pyRSD/rsd/power/gal/Pcc/PcAcB.py
1
1101
from .. import TwoHaloTerm, DampedGalaxyPowerTerm from . import SOCorrection class PcAcB_2h(TwoHaloTerm): """ The 2-halo term for `PcAcB` """ name = 'PcAcB_2h' def __init__(self, model): super(PcAcB_2h, self).__init__(model, 'b1_cA', 'b1_cB') class PcAcB(DampedGalaxyPow...
gpl-3.0
-2,038,544,495,605,009,000
28.783784
70
0.572207
false
timpalpant/KaggleTSTextClassification
scripts/plot_feature_label_correlations.py
1
1976
#!/usr/bin/env python ''' Compute mutual information between individual features and labels ''' import argparse import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from common import * def opts(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('feat...
gpl-3.0
3,468,496,245,411,220,000
30.380952
74
0.550101
false
googleapis/python-aiplatform
samples/snippets/get_model_evaluation_image_object_detection_sample.py
1
1553
# 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
3,884,235,382,905,818,000
39.868421
89
0.745654
false
jedie/django-cms-tools
django_cms_tools/fixture_helper/page_utils.py
1
1256
""" :created: 17.09.2018 by Jens Diemer :copyleft: 2018 by the django-cms-tools team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ from cms.models import Page def get_public_cms_app_namespaces(): """ :return: a tuple() with all cms app namespaces ...
gpl-3.0
8,869,463,960,109,359,000
29.634146
79
0.65207
false
DemocracyClub/UK-Polling-Stations
polling_stations/apps/addressbase/migrations/0006_auto_20170927_1215.py
1
2374
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("addressbase", "0005_auto_20170927_1128")] operations = [ migrations.CreateModel( name="Onsud", fields=[ ...
bsd-3-clause
7,401,187,087,500,244,000
48.458333
87
0.540859
false
MannyGrewal/Manny.CIFAR
Manny.CIFAR/CIFAR/CIFARPlotter.py
1
1321
import math import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import pylab ######################################################################## # 2017 - Manny Grewal # Purpose of this class is to visualise a list of images from the CIFAR dataset # How many columns to show...
mit
-463,534,109,181,192,960
33.789474
94
0.655564
false
smarx/dropbox-sdk-python
setup.py
1
1572
# Don't import unicode_literals because of a bug in py2 setuptools # where package_data is expected to be str and not unicode. from __future__ import absolute_import, division, print_function # Ensure setuptools is available import sys try: from ez_setup import use_setuptools use_setuptools() except ImportErr...
mit
8,640,483,616,557,169,000
31.081633
75
0.640585
false
Beyond-Imagination/BlubBlub
ChatbotServer/ChatbotEnv/Lib/site-packages/jpype/_gui.py
1
1291
#***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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....
gpl-3.0
-4,746,054,084,462,884,000
34.861111
78
0.604183
false
Tisseo/navitia
source/jormungandr/jormungandr/street_network/geovelo.py
1
14245
# Copyright (c) 2001-2017, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public t...
agpl-3.0
8,930,032,594,090,224,000
46.168874
125
0.600351
false
further-reading/Dicecord
code/stats.py
1
2058
# This file contains the default stats and general stat categories ATTRIBUTE_TYPE = {'mental': ['intelligence', 'wits', 'resolve'], 'physical': ['strength', 'dexterity', 'stamina'], 'social': ['presence', 'manipulation', 'composure'] } SKILL_TYPE = {'mental...
gpl-3.0
6,500,356,239,180,065,000
32.3
69
0.332847
false
mrukhlov/gamesagent
app.py
1
3157
#!/usr/bin/env python '''used as webhook''' import os from flask import ( Flask, request, make_response, jsonify ) app = Flask(__name__) log = app.logger def index_getter(letter): index = 0 index_list = [] for i in 'kitten'.upper(): if i == letter: index_list.append(index) index+=1 return index_list...
apache-2.0
-1,465,702,173,131,409,000
18.861635
104
0.633513
false
Sensorino/SensorinoServer-legacy
server/coreEngine.py
1
7965
#!/usr/bin/python3 import logging import threading from threading import Timer import datetime import ConfigParser import sensorino import common import json import mqttThread from errors import * import singleton import traceback # create logger with 'spam_application' logger = logging.getLogger('sensorino_coreEngine...
gpl-2.0
-8,180,565,745,539,014,000
33.781659
162
0.635405
false
HazardSJ/HazardBot
enwiki/cfdMultipleMerger.py
1
2343
import re import mwparserfromhell import pywikibot pywikibot.config.family = "wikipedia" pywikibot.config.mylang = "en" site = pywikibot.Site() #site.login() class CFDMultipleMergeBot(object): def __init__(self): self.getMerges() def getMerges(self): page = pywikibot.Page(site, "Wikipedia:...
mit
302,481,474,932,378,500
31.541667
94
0.510883
false
mitmedialab/MediaCloud-Web-Tools
server/views/test/test_user.py
1
3441
import unittest import time from server.views.test import BaseAppTest, TEST_USER_EMAIL class UserLoginTest(BaseAppTest): """ Make sure a user can login with the email and password, and can't if password is wrong """ def testWrongPassword(self): response = self.app.post( '/api/log...
apache-2.0
7,806,429,714,335,631,000
35.221053
120
0.626271
false
rbrito/pkg-youtube-dl
youtube_dl/extractor/pornhub.py
1
26854
# coding: utf-8 from __future__ import unicode_literals import functools import itertools import operator import re from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, compat_urllib_request, ) from .openload import PhantomJSwrapper from ..utils import ( determine_ext...
unlicense
5,983,129,461,800,056,000
35.916094
173
0.509278
false
ghchinoy/tensorflow
tensorflow/python/autograph/impl/api.py
1
24373
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,444,612,548,841,354,000
33.719373
80
0.678579
false
reizencroft/euler_project_solutions
python/euler0004.py
1
1218
# Largest palindrome product # https://projecteuler.net/problem=4 # A palindromic number reads the same both ways. # The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. # Find the largest palindrome made from the product of two 3-digit numbers. def get_digits_array(num): q1 = nu...
unlicense
429,094,698,983,628,160
22.423077
88
0.583402
false
rlugojr/rekall
version.py
1
6722
#!/usr/bin/python """Global version file. This program is used to manage versions. Prior to each release, please run it with update. """ import argparse import json import os import yaml _VERSION_CODE = ''' import json import os import subprocess try: # We are looking for the git repo which contains this file....
gpl-2.0
-6,194,861,238,376,707,000
29.834862
79
0.626302
false
arthurmco/ghostwriter
ghostwriter/ghtest/test_postarticle.py
1
13551
import unittest from ghostwriter import app, mm # # Post basic test fixture(?) # Copyright (C) 2017 Arthur M # class PostArticleTestCase(unittest.TestCase): from flask import json def setUp(self): mm.setDatabaseURI('sqlite:////tmp/unittest.db') mm.init() mm.create() self.ap...
mit
2,503,338,949,907,682,300
35.329759
278
0.578481
false
ohmu/poni
poni/colors.py
1
2220
""" ANSI color code escapes for output Copyright (c) 2010-2012 Mika Eloranta See LICENSE for details. """ from __future__ import print_function CODES = { 'reset': '\033[0;m', 'gray' : '\033[1;30m', 'red' : '\033[1;31m', 'green' : '\033[1;32m', 'yellow' : '\033[1;33m', 'blue' : '\033[1;34m', ...
apache-2.0
4,784,208,169,511,834,000
27.101266
71
0.471622
false
jasonlingo/StreetViewRoadSafety
src/coverageMap.py
1
1734
""" These functions are used to plot the points on google map by years or road types. """ from util import plotSampledPointMap from config import CONFIG def readDatePoints(filename): f = open(filename, 'r') yearPoints = {} for line in f.readlines(): point, info = line.strip("\n").split("==") ...
mit
-4,551,314,453,734,043,000
24.880597
81
0.612457
false
xgds/xgds_sample
xgds_sample/defaultSettings.py
1
4284
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
apache-2.0
8,533,889,340,458,262,000
62
345
0.537582
false
admiyo/python-nss
doc/examples/httplib_example.py
1
12989
#!/usr/bin/python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla....
gpl-2.0
4,361,818,222,161,771,500
35.485955
100
0.619524
false
erybak90/Szkolenie-python
fixture/contact.py
1
6261
from model.contact import Contact import re class ContactHelper: def __init__(self, app): self.app = app def modify_contact_by_index(self, index, new_contact_data): wd = self.app.wd self.select_contact_by_index(index) wd.find_elements_by_css_selector("img[alt='Edit']")[index]....
apache-2.0
5,498,002,403,207,368,000
39.4
126
0.610605
false
kilon/sverchok
nodes/matrix/shear.py
1
3309
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
-7,398,982,043,408,580,000
35.766667
94
0.60955
false
ff0000/red-fab-deploy2
fab_deploy2/operating_systems/smartos/hiredis.py
1
2151
import os from fab_deploy2 import functions from fab_deploy2.tasks import ContextTask from fabric.api import run, sudo, settings from fabric.contrib.files import exists from fabric.context_managers import cd class HiRedisSetup(ContextTask): """ Setup hiredis """ context_name = 'hiredis' default_...
mit
106,749,202,448,571,200
44.765957
123
0.58252
false
uclouvain/osis
base/tests/views/test_learning_unit_deletion.py
1
12652
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
1,301,374,154,574,752,000
47.471264
114
0.684373
false
bellowsj/aiopogo
aiopogo/pogoprotos/data/raid/raid_info_pb2.py
1
5828
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/data/raid/raid_info.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impo...
mit
7,342,426,691,909,234,000
43.830769
659
0.715683
false
GNS3/gns3-server
gns3server/main.py
1
2494
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 GNS3 Technologies Inc. # # 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 optio...
gpl-3.0
-8,854,599,558,480,229,000
27.666667
87
0.665196
false
wiredrive/wtframework
wtframework/wtf/web/tests/test_page_object.py
1
5234
########################################################################## # This file is part of WTFramework. # # WTFramework 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 L...
gpl-3.0
-4,792,817,394,358,927,000
35.601399
92
0.658196
false
arenadata/ambari
contrib/version-builder/version_builder.py
1
16382
""" 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
6,374,317,724,062,182,000
32.638604
159
0.685508
false
davidwtbuxton/captain-pasty
pasty/tasks.py
1
2309
import datetime from djangae.db.migrations import mapper_library from google.appengine.api import datastore from google.appengine.ext import ndb from . import index from .models import Paste, make_relative_path def entity_to_instance(entity): """Returns an ndb model instance for the datastore entity.""" key...
mit
-7,775,970,714,760,951,000
25.238636
84
0.624513
false
rbuffat/pyidf
tests/test_surfacepropertyheattransferalgorithmsurfacelist.py
1
1610
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.advanced_construction import SurfacePropertyHeatTransferAlgorithmSurfaceList log = logging.getLogger(__name__) class TestSurfacePropertyHeatTransferAlgorithmSurfaceList(unittest...
apache-2.0
-8,604,033,729,887,504,000
31.877551
124
0.691925
false
jimsize/PySolFC
pysollib/tile/tkhtml.py
1
5073
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
-7,982,178,499,061,527,000
33.746575
79
0.528878
false
danielfrg/jupyterhub-kubernetes_spawner
kubernetes_spawner/swagger_client/models/v1_security_context.py
1
8371
# coding: utf-8 """ Copyright 2015 SmartBear Software 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,674,519,270,394,965,000
38.116822
421
0.644487
false
jmoh/WADRC_DWI_Processing
archive/determineIncludedVolumes.py
1
2771
import string, os, sys, subprocess #Use MRIConvert to convert images to nifti format. Images will be saved as a 4D file and then split into separate flip angles if len(sys.argv[1:]) < 1: print 'Correct Usage: python determineIncludedVolumes.py <Path to DTIPrep QC Report (.txt) > <output root directory> <dwi file> ...
gpl-3.0
9,062,283,979,012,112,000
25.902913
219
0.723926
false
bikalabs/bika.wine
bika/wine/controlpanel/bika_storageconditions.py
1
3289
from AccessControl.SecurityInfo import ClassSecurityInfo from bika.wine import bikaMessageFactory as _ from bika.wine.config import PROJECTNAME from bika.wine.interfaces import IStorageConditions from bika.lims import bikaMessageFactory as _b from bika.lims.browser.bika_listing import BikaListingView from plone.app.con...
agpl-3.0
-562,998,938,167,335,300
37.244186
73
0.595318
false
waterblue13/tensor2tensor
tensor2tensor/layers/modalities_test.py
1
4931
# coding=utf-8 # Copyright 2017 The Tensor2Tensor 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...
apache-2.0
-3,505,362,289,836,510,000
37.826772
78
0.665991
false
Nevtep/omniwallet
api/properties_service.py
1
8154
import urlparse import os, sys, re import time from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * #tools_dir = os.environ.get('TOOLSDIR') #lib_path = os.path.abspath(tools_dir) #sys.path.append(lib_path) data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debu...
agpl-3.0
-4,500,479,646,738,443,000
32.694215
217
0.597743
false
stuart-knock/tvb-framework
tvb/core/adapters/abcadapter.py
1
57742
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
gpl-2.0
-6,758,727,984,573,712,000
45.379116
120
0.590974
false
paulcwatts/drf-json-schema
tests/dummy/settings.py
1
2773
"""Django settings for drf_json_schema project.""" import os from typing import List # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.django...
mit
-8,205,143,553,688,864,000
25.663462
90
0.706455
false
cwurld/django_tracker
django_tracker/utils.py
1
1774
import os import codecs import csv from collections import namedtuple import dateutil.parser Record = namedtuple('Record', 'datetime url email ip') def read_tracker_file(tracker_dir: str, the_date: str, target: str, exclude_anonymous: bool = False): """ :param tracker_dir: :param the_date: :p...
mit
-7,564,037,313,264,648,000
27.15873
101
0.562007
false
xuru/pyvisdk
pyvisdk/do/customization_ip_settings.py
1
1113
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def CustomizationIPSettings(vim, *args, **kwargs): '''IP settings for a virtual network a...
mit
2,716,210,444,075,430,400
31.764706
124
0.599281
false
edermartioli/fotometria
photUtils.py
1
2674
# -*- coding: iso-8859-1 -*- """ Created on Wed Jul 12, 2017 @author: Eder Martioli & Janderson Oliveira Laboratorio Nacional de Astrofisica, Brazil """ from astropy.io.fits import getheader import astropy.io.fits as fits import photlib import numpy as np ########### READ TABLE OF COORDINATES #########...
gpl-3.0
-5,199,300,578,352,715,000
24.711538
121
0.615557
false