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
PieterMostert/Lipgloss
view/pretty_names.py
1
1617
# LIPGLOSS - Graphical user interface for constructing glaze recipes # Copyright (C) 2017 Pieter Mostert # 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, version 3 of the License. # This progra...
gpl-3.0
344,815,602,470,841,860
32
70
0.594929
false
gsnbng/erpnext
erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py
2
2129
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe from frappe.utils import flt def execute(): from erpnext.stock.stock_balance import repost repost(allow_zero_rate=True,...
agpl-3.0
-6,838,263,425,813,662,000
38.425926
100
0.672147
false
alessio/prey
platform/linux/prey-config.py
1
21957
#!/usr/bin/env python ################################################ # Prey Configurator for Linux # By Tomas Pollak # (c) 2010 - Fork Ltd. (usefork.com) ################################################ # if having trouble with the GTK theme as root, do this: # sudo ln -s ~/.themes/ /root/.themes #################...
gpl-3.0
-2,701,603,045,709,129,000
35.53411
455
0.644851
false
xrmx/pylokit
setup.py
1
1072
from setuptools import setup, find_packages import os VERSION = "0.8.1" CLASSIFIERS = [ 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', 'Operating System :: OS Independent'...
mpl-2.0
-7,979,361,998,995,849,000
28.777778
88
0.655784
false
xuru/pyvisdk
pyvisdk/do/or_alarm_expression.py
1
1024
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def OrAlarmExpression(vim, *args, **kwargs): '''A data object type that links multiple al...
mit
7,627,906,779,953,518,000
30.060606
124
0.598633
false
jmschrei/blueberry
docs/source/conf.py
1
10487
# -*- coding: utf-8 -*- # # blueberry documentation build configuration file, created by # sphinx-quickstart on Thu Jun 23 00:00:07 2016. # # 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 file. # #...
mit
-7,591,383,865,380,614,000
31.367284
79
0.704491
false
hroark13/android_kernel_zte_draconis
scripts/gcc-wrapper.py
2
3383
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
7,115,874,685,368,545,000
34.239583
97
0.668342
false
rouxcode/django-cms-plugins
cmsplugins/baseplugin/utils.py
1
1125
from __future__ import unicode_literals from importlib import import_module from django.utils import six from django.utils.html import mark_safe from django.utils.translation import ugettext_lazy as _ def get_indicator_hidden(request, instance): html = '' is_visible = getattr(instance, 'is_visible', True) ...
mit
25,095,546,226,057,910
29.405405
70
0.636444
false
griffinfoster/shapelets
setup.py
1
1460
from setuptools import setup, find_packages #from Cython.Build import cythonize import numpy as np import os, sys, glob __version__ = '0.2' #this needs to be kept up to date with shapelets/__init__.py setup(name = 'shapelets', version = __version__, description = 'Shapelet fitting and plotting', long_desc...
bsd-3-clause
9,192,524,142,672,802,000
40.714286
173
0.644521
false
bsandrow/hn-saved-stories
hn_saved_stories/__init__.py
1
8406
import os import json import re import sys import requests import lxml.html from datetime import datetime, timedelta from pprint import pprint as PP from time import sleep from urlparse import urljoin from .utils import hn_relatime_to_datetime, get_story_id from .logger import logger def parse_date_header(date): ...
mit
7,238,045,857,086,352,000
35.868421
134
0.557935
false
rosarior/mayan
apps/main/__init__.py
1
2420
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from django.conf import settings from navigation.api import register_top_menu from navigation.api import register_links from project_setup.api import register_setup from project_tools.api import register_tool from .conf.se...
gpl-3.0
7,616,351,844,105,236,000
35.119403
177
0.659504
false
ssvlab/esbmc-gpu
regression/esbmc-cpp/resultados.py
1
2672
#!/bin/python ############################# # Script to display test suite results ############################## import sys import os from sys import argv import xml.etree.ElementTree as ET def error(message): sys.stderr.write("error: %s\n" % message) #sys.exit(1) error_file = "resultados_error.log" f = op...
apache-2.0
-8,661,437,765,248,857,000
23.290909
80
0.552395
false
475Cumulus/TBone
tests/data/test_models.py
1
3358
#!/usr/bin/env python # encoding: utf-8 import pytest import datetime from itertools import zip_longest from tbone.data.fields import * from tbone.data.models import * from tbone.testing.fixtures import event_loop def test_model_repr(): ''' Test Model repr function ''' class M(Model): pass m = M(...
mit
3,444,917,842,115,831,300
24.633588
102
0.611376
false
rbarlow/pulp
nodes/test/nodes_tests/base.py
1
3158
from ConfigParser import SafeConfigParser from unittest import TestCase import logging import mock import os import shutil import unittest import okaara import pymongo from pulp.bindings.bindings import Bindings from pulp.bindings.server import PulpConnection from pulp.client.extensions.core import PulpCli, ClientCont...
gpl-2.0
2,768,533,297,069,624,000
29.365385
92
0.649778
false
annarev/tensorflow
tensorflow/python/distribute/input_lib.py
1
101510
# 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
2,909,316,437,415,284,700
39.799839
110
0.663353
false
dellytools/maze
readfq.py
1
1674
# source: https://github.com/lh3/readfq def readfq(fp): # this is a generator function last = None # this is a buffer keeping the last unprocessed line while True: # mimic closure; is it a bad idea? if not last: # the first record or a record following a fastq for l in fp: # search for the ...
mit
-3,479,504,749,326,615,600
39.829268
74
0.492832
false
hello-base/web
apps/merchandise/music/managers.py
1
1125
# -*- coding: utf-8 -*- from django.db import models from django.db.models.query import QuerySet class EditionManager(models.Manager): def find_edition(self, release, edition, **kwargs): if release: kwargs[release.identifier] = release if edition: kwargs[edition.parent.iden...
apache-2.0
4,398,973,060,987,976,000
30.25
106
0.648
false
ndronen/pylearnutils
pylearnutils/datasets/sparse_expander.py
1
7801
# From https://gist.github.com/ccsevers/10295174 import os.path import numpy as np from .utils import take_subset from pylearn2.datasets.dataset import Dataset from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.utils.iteration import (SequentialSubsetIterator, FiniteDatasetIterator,...
bsd-3-clause
-6,055,127,632,347,842,000
32.337607
195
0.542879
false
prov-suite/service-tests
prov_service_tests/test_provvalidator.py
1
8645
"""Test class for ProvValidator service. """ # Copyright (c) 2015 University of Southampton # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitati...
mit
3,297,192,996,235,916,000
36.751092
89
0.695084
false
FedoraScientific/salome-paravis
test/VisuPrs/IsoSurfaces/E8.py
1
1513
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library 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; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
lgpl-2.1
3,320,585,536,059,934,000
37.794872
84
0.734964
false
watson-developer-cloud/python-primer-companion-code
episode-2/flask/src/translation.py
1
2054
# -*- coding: utf-8 -*- # Copyright 2016 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-5,859,510,575,257,219,000
36.345455
111
0.729309
false
justanr/pyxl
pyxl.py
1
13205
''' This simple module consists of the Pyxl class and a few helper functions. ''' from os.path import basename, join from glob import glob from PIL import Image, ImageDraw, ImageFont #import flickrapi #Helper functions. def buildHex(hexStr): ''' Accepts a supposed hex color string and ensures it's 6 chara...
mit
8,869,948,142,380,855,000
29.780886
79
0.526089
false
elemel/drillion
drillion/cannon_entity_creator.py
1
1825
from drillion.animation_component import AnimationComponent from drillion.collision import CollisionBody from drillion.collision_component import CollisionComponent from drillion.entity import Entity from drillion.maths import Polygon2, Transform2 from drillion.sprite import PolygonSprite from drillion.sprite_component...
mit
-3,641,659,004,998,115,000
42.452381
78
0.647123
false
desmo999r/cmssysadmin
cmssysadmin/__init__.py
1
1437
import os import socket import fcntl import struct import subprocess import logging logger = logging.getLogger(__name__) class CmdLine(object): options = {} class __metaclass__(type): def __new__(cls, *kargs, **kwargs): t = type.__new__(cls, *kargs, **kwargs) with open("/proc/...
gpl-2.0
-8,696,028,773,016,488,000
28.9375
77
0.551844
false
spadev/chatlogsync
chatlogsync.py
1
10218
#!/usr/bin/env python # Copyright 2013 Evan Vitero # This file is part of chatlogsync. # chatlogsync 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) an...
gpl-3.0
-4,886,149,893,731,973,000
29.777108
79
0.534743
false
uyaly/test
testcase/0_add1/Case05_HZ_add.py
1
2884
# coding:utf-8 import time import unittest import ddt from pageobject.account.Page_Account import Page_Account from selenium import webdriver from pageobject.Page_Login import Page_Login from pageobject.account.Page_Account_HZ_ADD import Page_Account_HZ_ADD from utils.config import Config from utils.log1 import Log imp...
gpl-2.0
6,771,792,635,812,235,000
30.321429
118
0.597719
false
aldryn/aldryn-news
setup.py
1
1204
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from aldryn_news import __version__ REQUIREMENTS = [ 'django-filer', 'django-hvad', 'django_select2', # last version that supports django 1.5 'django-taggit<=0.18.1', 'djangocms-text-ckeditor', 'translitcodec', 'Unideco...
bsd-3-clause
-8,503,469,181,565,606,000
27
75
0.649502
false
KittyHawkIrc/modules
reddit.py
1
3560
import json, random, urllib2 #Update schema __url__ = "https://raw.githubusercontent.com/KittyHawkIrc/modules/production/" + __name__ + ".py" __version__ = 1.0 def declare(): return {"reddit": "privmsg", "guess": "privmsg"} def callback(self): channel = self.channel command = self.command user = self...
apache-2.0
-6,751,224,005,319,157,000
29.689655
164
0.504494
false
evilsephiroth/plugin.video.vvvvid
vvvvid.py
1
1369
import urllib2 def f(m): l = list() o = 0 b = None while not b and o < len(m): n = m[o] <<2 o +=1 k = -1 j = -1 if o < len(m): n += m[o] >> 4 o += 1 if o < len(m): k = (m[o - 1] << 4) & 255; ...
gpl-2.0
-2,904,059,955,838,083,000
22.482143
74
0.308985
false
yola/yolapy
docs/conf.py
1
9271
# -*- coding: utf-8 -*- # # Yolapy documentation build configuration file, created by # sphinx-quickstart on Thu Aug 27 12:47:53 2015. # # 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 file. # # Al...
mit
7,168,053,449,254,915,000
30.968966
79
0.70672
false
shree-shubham/Unitype
Coupling Passions.py
1
1941
import math # Enter your code here. Read input from STDIN. Print output to STDOUT def distance_between(point1, point2): EARTH_RADIUS = 6371 point1_lat_in_radians = math.radians( point1['latitude'] ) point2_lat_in_radians = math.radians( point2['latitude'] ) point1_long_in_radians = math.radians( poin...
gpl-3.0
-4,238,094,887,164,742,700
38.612245
127
0.578568
false
lfairchild/PmagPy
dialogs/pmag_er_magic_dialogs.py
1
52576
""" dialogs for ErMagicBuilder """ # pylint: disable=W0612,C0111,C0103,W0201,C0301 import os import wx import wx.grid import numpy as np from . import drop_down_menus2 as drop_down_menus from . import pmag_widgets as pw from . import magic_grid2 as magic_grid from . import grid_frame2 from . import grid_frame3 from pma...
bsd-3-clause
-1,870,059,521,684,590,800
42.059787
323
0.604953
false
kevinarpe/kevinarpe-rambutan3
tests/check_args/other/test_RRangeSizeStr.py
1
1887
import pytest from rambutan3.check_args.RCheckArgsError import RCheckArgsError from rambutan3.check_args.other.RRangeSizeStr import RRangeSizeStr from tests.check_args.collection import test_RRangeSizeMatcher def test_ctor(): test_RRangeSizeMatcher.core_test_ctor(RRangeSizeStr) def test_check_arg(): with py...
gpl-3.0
-8,604,642,178,105,160,000
28.484375
92
0.656598
false
nohona/cron-crm
usr/local/certbot/certbot/tests/errors_test.py
4
1328
"""Tests for certbot.errors.""" import unittest import mock from acme import messages from certbot import achallenges from certbot.tests import acme_util class FailedChallengesTest(unittest.TestCase): """Tests for certbot.errors.FailedChallenges.""" def setUp(self): from certbot.errors import Fail...
gpl-3.0
-5,918,238,343,923,517,000
29.181818
73
0.676958
false
project-hypr/hypr2
tests/providers/crud/test_crud_crud.py
1
12472
# Copyright 2014-2016 Morgan Delahaye-Prat. All Rights Reserved. # # Licensed under the Simplified BSD License (the "License"); # you may not use this file except in compliance with the License. """Test basic CRUD operations of the CRUDProvider.""" import json import pytest from hypr.providers import CRUDProvider d...
bsd-2-clause
4,588,177,312,490,519,600
28.980769
76
0.552357
false
sergei-maertens/django-systemjs
docs/_ext/djangodocs.py
1
2159
""" Taken from djangoproject/django docs. Sphinx plugins for Django documentation. """ import re from sphinx import addnodes from sphinx.util.compat import Directive from sphinx.writers.html import SmartyPantsHTMLTranslator # RE for option descriptions without a '--' prefix simple_option_desc_re = re.compile( r'...
mit
5,868,693,548,885,009,000
29.842857
83
0.6151
false
dmach/dnf
dnf/cli/commands/shell.py
1
9173
# shell.py # Shell CLI command. # # Copyright (C) 2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribu...
gpl-2.0
-4,418,039,998,933,164,500
31.299296
97
0.528181
false
matthew-brett/dmg-wheel-installer
make_installer.py
1
6064
#!/usr/bin/env python """ Make dmg installer for Python.org Python from Python wheels """ from __future__ import division, print_function DESCRIP = "Make dmg installer for Python.org Python from Python wheels" EPILOG = \ """Make DMG installer from wheels * Collect source packages for pip, setuptools * Collect needed ...
bsd-2-clause
407,317,834,380,431,300
33.850575
81
0.636873
false
dmccloskey/SBaaS_COBRA
SBaaS_COBRA/stage02_physiology_pairWiseTest_query.py
1
9833
#SBaaS from .stage02_physiology_pairWiseTest_postgresql_models import * from SBaaS_base.sbaas_base import sbaas_base from SBaaS_base.sbaas_base_query_update import sbaas_base_query_update from SBaaS_base.sbaas_base_query_drop import sbaas_base_query_drop from SBaaS_base.sbaas_base_query_initialize import sbaas_base_qu...
mit
-7,389,374,455,009,166,000
55.511494
137
0.58924
false
Arcbot-Org/Arcbot
bolt/discord/models/channel.py
1
1176
from bolt.discord.models.base import Snowflake, Model, Field, ListField, Enum, Timestamp from bolt.discord.models.user import User from bolt.discord.permissions import Permission class ChannelType(Enum): GUILD_TEXT = 0 DM = 1 GUILD_VOICE = 2 GROUP_DM = 3 GUILD_CATEGORY = 4 class PermissionOverwr...
gpl-3.0
4,696,457,051,982,362,000
26.348837
88
0.668367
false
gnowledge/OTM2
opentreemap/treemap/util.py
1
7219
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import datetime from collections import OrderedDict from urlparse import urlparse from django.shortcuts import get_object_or_404, resolve_url from django.http import HttpResponse from ...
gpl-3.0
-7,807,075,686,139,737,000
33.706731
78
0.677102
false
Ra93POL/VKAPI
__init__.py
1
4277
# -* coding: utf-8 -*- import VKAPI, dataMngt, time vk = None one_account = {'vk.com': True, 'ok.ru': True, 'disk.yandex.ru': True} number_account = dataMngt.get_number_account() def check_app_data(one_account, res_auth, site): if res_auth == 'frozen': print 'Account of "'+vk.user_data[site][1]+'" is froz...
gpl-3.0
-2,256,723,707,737,997,300
33.112
75
0.579737
false
chrislit/abydos
abydos/distance/_lcprefix.py
1
4129
# Copyright 2018-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
6,304,868,237,515,560,000
23.873494
79
0.534996
false
renalreg/radar
tests/api/serializers/test_salt_wasting_clinical_features_serializer.py
1
7742
from datetime import date from cornflake.exceptions import ValidationError import pytest from radar.api.serializers.salt_wasting import SaltWastingClinicalFeaturesSerializer from radar.models.patient_demographics import PatientDemographics from radar.models.patients import Patient from radar.models.users import User ...
agpl-3.0
-9,060,480,136,143,703,000
30.991736
104
0.740765
false
AlexeyKruglov/Skeinforge-fabmetheus
skeinforge_application/skeinforge_plugins/craft_plugins/inset.py
1
21880
#! /usr/bin/env python """ This page is in the table of contents. Inset will inset the outside outlines by half the edge width, and outset the inside outlines by the same amount. The inset manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Inset ==Settings== ===Add Custom Code for Temperature ...
agpl-3.0
3,616,575,776,640,460,000
44.774059
409
0.782038
false
wking/swc-amy
workshops/migrations/0054_self_organized_host.py
1
1799
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import django from django.db import models, migrations from django.db.models import Q def add_self_organized_host(apps, schema_editor): """Make new host: self-organized.""" Host = apps.get_model('workshops', 'Host') Host.objects.cr...
mit
1,508,810,104,354,600,000
35.714286
336
0.645359
false
jackuess/listmodel
listmodel/models.py
1
6658
import re try: import ujson as json except ImportError: import json try: import jsonpath_rw except ImportError: jsonpath_rw = None try: import lxml.etree except ImportError: lxml = None try: import yaml except ImportError: yaml = None class QueryAttr(object): def __init__(self, q...
lgpl-3.0
-9,084,589,181,227,222,000
26.399177
79
0.542055
false
johnwilmes/py-data-structures
py_data_structures/trie.py
1
8045
"""A simple trie, or prefix tree, data structure.""" import itertools import collections.abc class Trie(collections.abc.MutableSet): """A simple prefix tree data structure. A Trie is data structure for storing sequences of "names," which can be aribtrary hashable objects. In the prototypical trie, names ...
mit
6,371,751,390,622,885,000
33.978261
79
0.558484
false
alex/changes
changes/jobs/create_job.py
1
1548
from flask import current_app from changes.backends.base import UnrecoverableException from changes.config import db from changes.constants import Status, Result from changes.jobs.sync_job import sync_job from changes.models import Job, JobPlan from changes.queue.task import tracked_task def abort_create(task): ...
apache-2.0
-5,937,665,670,571,321,000
29.352941
83
0.684755
false
adamatan/polycircles
docs/conf.py
1
8304
# -*- coding: utf-8 -*- # # Polycircles documentation build configuration file, created by # sphinx-quickstart on Mon Apr 21 13:22:59 2014. # # 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 file. #...
mit
-1,545,247,187,615,187,200
30.454545
79
0.706888
false
willprice/python-omxplayer-wrapper
omxplayer/player.py
1
27179
import subprocess import time import os import signal import logging import threading import atexit import sys try: # python 3 from pathlib import Path except ImportError: # python2 from pathlib2 import Path from decorator import decorator from dbus import DBusException, Int64, String, ObjectPath import d...
lgpl-3.0
3,440,031,027,014,566,400
28.965821
124
0.570845
false
kyubifire/softlayer-python
SoftLayer/CLI/image/export.py
1
1270
"""Export an image.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import helpers @click.command() @click.argument('identifier') @click.argument('uri') @click.option('--ibm-api-key', ...
mit
-1,651,164,738,944,447,200
34.277778
77
0.680315
false
skeletalbassman/pytix
wrappers/trello.py
1
10975
'''wrapper class for Trello REST API''' import requests import yaml import datetime BASE = "https://api.trello.com/1/" class Trello(): def __init__(self, project=None, username=None, password=None): self._key = None self._token = None self._authorize() if project: self._board = self.setProject(project) ...
mit
-8,722,405,353,362,999,000
31.093567
167
0.613759
false
enki/muXTCP
scapyLink.py
1
1540
#!/usr/bin/python from muxlib.scapy import * import sys from twisted.internet import base, fdesc, reactor, protocol import socket import iptables class ScapyLink(base.BasePort): def __init__(self, interface=None, plusIPs=[]): base.BasePort.__init__(self, reactor) self.protocols = [] self....
mit
3,709,210,830,107,390,500
27.518519
87
0.634416
false
eduNEXT/edunext-platform
common/djangoapps/util/course.py
1
2804
""" Utility methods related to course """ import logging import six from django.conf import settings from django.utils.timezone import now from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers log = logging.getLogger(__name__) COURSE_SHARING_UTM_PARAMETERS = { 'facebook': { ...
agpl-3.0
3,148,199,023,560,329,000
29.150538
101
0.662981
false
sugartom/tensorflow-alien
tensorflow/contrib/layers/python/layers/layers.py
1
95215
# 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
-7,573,405,888,971,894,000
42.89811
80
0.645266
false
dataflow/DataStage
datastage/dataset/longliving/sword_statement_check.py
1
4734
import logging import time import thread import urllib2 import sys import datetime from django_longliving.base import LonglivingThread from datastage.dataset import SUBMISSION_QUEUE from datastage.web.dataset.models import DatasetSubmission from datastage.web.dataset import openers from sword2 import Connection, Url...
mit
5,942,489,631,099,173,000
40.165217
158
0.636671
false
laurent-george/weboob
modules/cmso/web/pages.py
1
3661
# -*- coding: utf-8 -*- # Copyright(C) 2014 smurail # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
agpl-3.0
2,973,286,327,672,497,700
34.892157
106
0.643267
false
r0balo/pelisalacarta
python/main-classic/channels/yaske.py
1
68313
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para yaske # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re, sys, urllib, urlparse from core import config ...
gpl-3.0
-1,300,616,030,855,172,400
83.053549
134
0.492533
false
CyrilWaechter/pyRevitMEP
pyRevitMEP.tab/Create.panel/BatchCreation.pulldown/BatchDependentViewCreation.pushbutton/script.py
1
2538
# coding: utf8 import rpw # noinspection PyUnresolvedReferences from rpw import revit, DB from pyrevit.forms import WPFWindow from pyrevit import script from pyrevitmep.workset import Workset # noinspection PyUnresolvedReferences from System.Collections.ObjectModel import ObservableCollection __doc__ = "Batch create ...
gpl-3.0
2,052,743,929,366,040,600
35.782609
113
0.644208
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/topology_resource.py
1
1570
# 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
-4,338,701,136,379,454,000
36.380952
81
0.591083
false
eliben/code-for-blog
2018/type-inference/parser.py
1
7046
# EBNF specification for micro-ML. { x } means zero or more repetitions of x. # # The top-level is decl. # # decl: ID { ID } '=' expr # # expr: INT # | bool # | ID # | ID '(' { expr ',' } ')' # | ...
unlicense
-3,593,171,190,825,320,400
31.925234
80
0.453591
false
nsi-iff/nsi_site
apps/news/migrations/0002_auto.py
1
6169
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field project on 'New' db.delete_table('news_new_project') # Adding M2M ...
mit
7,173,289,495,667,929,000
61.94898
182
0.556006
false
fifengine/fifengine
tests/fife_test/scripts/test.py
1
3991
#!/usr/bin/env python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU ...
lgpl-2.1
1,703,994,664,542,917,000
27.105634
86
0.656978
false
Patrick-Cole/pygmi
pygmi/clust/graphtool.py
1
26477
# ----------------------------------------------------------------------------- # Name: graph_tool.py (part of PyGMI) # # Author: Patrick Cole # E-Mail: pcole@geoscience.org.za # # Copyright: (c) 2013 Council for Geoscience # Licence: GPL-3.0 # # This file is part of PyGMI # # PyGMI is free softw...
gpl-3.0
3,424,058,039,443,024,000
25.583333
79
0.526721
false
aspose-pdf/Aspose.Pdf-for-Java
Plugins/Aspose_Pdf_Java_for_Python/WorkingWithDocumentObject/__init__.py
1
9774
__author__ = 'fahadadeel' import jpype import re import datetime class AddJavascript: def __init__(self, dataDir): self.dataDir = dataDir self.Document = jpype.JClass("com.aspose.pdf.Document") self.JavascriptAction=jpype.JClass("com.aspose.pdf.JavascriptAction") def main(se...
mit
-4,455,166,005,678,652,000
32.907143
246
0.593513
false
andr3wmac/metaTower
mt/EventManager.py
1
1710
""" * metaTower v0.4.5 * http://www.metatower.com * * Copyright 2012, Andrew Mac * http://www.andrewmac.ca * Licensed under GPL v3. * See license.txt * or http://www.metatower.com/license.txt """ import mt, inspect class EventManager: class EventItem: def __init__(self, event, function, source):...
gpl-3.0
-5,570,807,352,983,404,000
30.090909
83
0.523392
false
andreagrandi/workshopvenues
workshopvenues/venues/migrations/0007_auto__add_country__chg_field_address_country__add_index_address_countr.py
1
3797
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Country' db.create_table(u'venues_country', ( (u'id', self.gf('django.db.models....
bsd-3-clause
-1,636,155,754,172,928,000
50.324324
141
0.54148
false
bswartz/cinder
cinder/volume/drivers/netapp/dataontap/fc_cmode.py
1
5282
# Copyright (c) - 2014, Clinton Knight. All rights reserved. # Copyright (c) - 2016 Mike Rooney. 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 # # htt...
apache-2.0
-1,633,660,446,188,067,300
39.320611
78
0.65373
false
cloudbrain/cloudbrain_examples
sandbox/print_data.py
1
1223
import time from cloudbrain.subscribers.rabbitmq import PikaSubscriber from cloudbrain_examples.settings import (base_routing_key, metric_name, num_channels, buffer_size, rabbitmq_address, rabbitmq_user, rabbitmq_pwd) def _print_callback(unsed_ch, unsed_method, unsed_prope...
agpl-3.0
-5,175,418,729,232,379,000
28.829268
99
0.623876
false
dazzzl/transwhat
transwhat.py
1
3061
#!/usr/bin/python __author__ = "Steffen Vogel" __copyright__ = "Copyright 2015, Steffen Vogel" __license__ = "GPLv3" __maintainer__ = "Steffen Vogel" __email__ = "post@steffenvogel.de" """ This file is part of transWhat transWhat is free software: you can redistribute it and/or modify it under the terms of the GN...
gpl-3.0
6,710,417,840,655,057,000
23.488
82
0.733747
false
GoogleCloudPlatform/Solutions-Using-ETL-tool-on-Google-Compute-Engine
gce_api_test.py
1
12371
#!/usr/bin/python # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
-1,525,027,034,134,814,000
38.273016
80
0.681432
false
Programie/Capture2Net
webinterface/generate.py
1
4933
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2008 - 2012 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/...
mit
4,677,451,899,272,812,000
32.107383
94
0.569836
false
rokuz/pygeom
vec2.py
1
4197
import math import copy import geom_exceptions import functions import vec2_gen class Vec2(vec2_gen.GenVec2): """2D Vector.""" def __init__(self, x=0.0, y=0.0): vec2_gen.GenVec2.__init__(self, x, y) def __getitem__(self, key): if key == 0: return self.x elif key == 1: ...
mit
6,090,678,753,408,154,000
27.358108
100
0.554205
false
HaebinShin/tensorflow
tensorflow/python/kernel_tests/seq2seq_test.py
1
31311
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,968,389,051,978,527,700
45.249631
80
0.601578
false
j00zek/PolishTranslations
TranslationsUpdater/myComponents.py
1
15911
# -*- coding: utf-8 -*- # @j00zek 2015 from __init__ import * from Components.ActionMap import ActionMap from Components.config import * from Components.MenuList import MenuList from Components.ScrollLabel import ScrollLabel from Components.Sources.StaticText import StaticText from enigma import eConsoleAppContainer...
gpl-2.0
976,306,449,887,808,500
44.583333
390
0.592889
false
a25kk/osm
src/osm.sitetheme/osm/sitetheme/tests/test_setup.py
1
1144
# -*- coding: utf-8 -*- """Setup/installation tests for this package.""" from osm.buildout.testing import IntegrationTestCase from plone import api class TestInstall(IntegrationTestCase): """Test installation of osm.buildout into Plone.""" def setUp(self): """Custom shared utility setup for tests.""...
mit
-2,264,357,882,213,975,300
37.133333
75
0.701049
false
borysiasty/inasafe
safe/gis/test/test_reclassify.py
1
1890
# coding=utf-8 """Tests for reclassify implementation.""" import unittest from collections import OrderedDict from qgis.core import QgsVectorLayer, QgsFeatureRequest from safe.gis.reclassify_gdal import reclassify_polygonize from safe.test.utilities import test_data_path, get_qgis_app QGIS_APP, CANVAS, IFACE, PARENT ...
gpl-3.0
-3,354,358,767,574,145,500
32.157895
78
0.631746
false
eddienigma/rpi-rht
GraphIndexTH.py
1
4632
# # pull data from sql, plot using matplotlib # see http://stackoverflow.com/questions/18663746/matplotlib-multiple-lines-with-common-date-on-x-axis-solved # # rev 1.0 12/02/2013 WPNS built from GraphAirmuxSD.py V1.1 # rev 1.1 12/02/2013 WPNS remove large delta values # rev 1.2 12/02/2013 WPNS remove -0.1 values (faile...
gpl-3.0
-4,583,286,232,077,759,000
36.354839
185
0.676166
false
chagaz/SamSpecCoEN
code/setupCV_computeNetworks.py
1
4177
# @Author # Chloe-Agathe Azencott # chloe-agathe.azencott@mines-paristech.fr # April 2016 import argparse import h5py import numpy as np import os import sys import CoExpressionNetwork def main(): """ Create sample-specific co-expression networks for one fold and one repeat of a cross-validation for which f...
mit
-4,337,070,075,003,851,000
38.037383
113
0.639454
false
anaran/olympia
services/update.py
1
14315
import smtplib import sys import traceback from email.Utils import formatdate from email.mime.text import MIMEText from time import time from urlparse import parse_qsl from django.utils.http import urlencode import settings_local as settings # This has to be imported after the settings so statsd knows where to log ...
bsd-3-clause
-7,104,861,223,561,318,000
36.473822
79
0.533147
false
pLeBlanc93/ArcREST
src/arcrest/manageorg/_portals.py
1
82353
from __future__ import absolute_import from __future__ import print_function from __future__ import division from ..security import PortalServerSecurityHandler from ..manageags import AGSAdministration from ..hostedservice import Services from ..common.general import local_time_to_online from .._abstract.abstract impo...
apache-2.0
4,190,805,069,658,481,000
37.992898
101
0.445108
false
avanc/mopidy-usbplaylist
mopidy_usbplaylist/playlists.py
1
1414
from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) from mopidy import backend from mopidy.models import Playlist from mopidy.models import Track import os import fnmatch import glob def find_files(path): matches = glob.glob(os.path.join(path,'*.mp3')) return matches ...
apache-2.0
-1,820,384,431,323,083,800
24.25
75
0.603253
false
TetraAsh/baruwa2
baruwa/forms/accounts.py
1
6737
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net> # # 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 S...
gpl-3.0
4,717,546,960,922,763,000
38.629412
78
0.614962
false
Schille/weimar-graphstore
weimar.py
1
1485
''' Created on Mar 17, 2014 @author: mschilonka ''' import argparse, sys from remote import server as Server from remote import worker as Worker if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("-w", "--worker", help="Starts a weimar worker instance.", action="store_true") ...
mit
6,257,446,607,517,198,000
46.935484
167
0.665993
false
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/notification/describe_notification_items.py
1
2183
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
3,015,553,966,601,937,400
45.446809
102
0.584059
false
room77/py77
pylib/util/git_util.py
1
7051
#!/usr/bin/env python """ utility file for various git functions """ __author__ = 'edelman@room77.com (Nicholas Edelman)' __copyright__ = 'Copyright 2013 Room77, Inc.' import os import subprocess from pylib.base.exec_utils import ExecUtils from pylib.base.term_color import TermColor class Error(Exception): def _...
mit
3,375,290,544,081,113,600
35.158974
168
0.636505
false
llvm/llvm-lnt
lnt/server/db/migrations/upgrade_10_to_11.py
1
1936
# Version 8 of the database updates FieldChanges as well as adds tables # for Regression Tracking features. import sqlalchemy from sqlalchemy import String, Integer, Column, ForeignKey # Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not # change the actual schema, but rather adds functional...
apache-2.0
2,749,207,809,383,893,500
32.964912
78
0.682851
false
hack4impact/Givology
mainSite/source/proj/giv/captcha.py
1
4110
import urllib2, urllib from proj.settings import * API_SSL_SERVER="https://www.google.com/recaptcha/api" API_SERVER="http://www.google.com/recaptcha/api" VERIFY_SERVER="www.google.com" class RecaptchaResponse(object): def __init__(self, is_valid, error_code=None): self.is_valid = is_valid self....
mit
701,470,126,479,050,600
32.414634
125
0.62871
false
catalyst/l3overlay
src/l3overlay/l3overlayd/process/ipsec.py
1
6516
# # IPsec overlay network manager (l3overlay) # l3overlay/l3overlayd/process/ipsec.py - IPsec process manager # # Copyright (c) 2017 Catalyst.net Ltd # 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 Foundati...
gpl-3.0
-8,255,464,561,798,610,000
29.166667
98
0.604819
false
mbareta/edx-platform-ft
lms/djangoapps/instructor_task/models.py
1
12291
""" WE'RE USING MIGRATIONS! If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py schemamigration instructor_task --auto description_of_your_change 3. Add the migration file cr...
agpl-3.0
6,095,885,579,733,219,000
39.564356
109
0.629973
false
meta-it/misc-addons
web_debranding/models/web_planner.py
1
1046
# -*- coding: utf-8 -*- import re from openerp import models, api class Planner(models.Model): _inherit = 'web.planner' @api.model def render(self, template_id, planner_app): res = super(Planner, self).render(template_id, planner_app) params = self.env['ir.config_parameter'].get_debrandi...
lgpl-3.0
-2,570,573,885,413,056,500
48.809524
124
0.616635
false
radjkarl/dataArtist
dataArtist/items/GridROI.py
1
14750
# coding=utf-8 from __future__ import division from __future__ import absolute_import import pyqtgraph_karl as pg import numpy as np from math import cos, sin, pi import cv2 from qtpy import QtCore from .PseudoSquareROI import PseudoSquareROI from dataArtist.items.QPainterPath import QPainterPath class GridROI(pg....
gpl-3.0
-2,420,680,918,911,564,000
28.324056
118
0.51722
false
jekahy/EIASR
src/canny.py
1
3842
# coding: utf8 from math import pi import numpy as np from scipy.signal import convolve2d SOBEL_X = np.array([ [ 1, 0, -1], [ 2, 0, -2], [ 1, 0, -1], ]) SOBEL_Y = np.array([ [ 1, 2, 1], [ 0, 0, 0], [-1, -2, -1], ]) class GradientImage(object): def __init__(self, magnitudes, angles)...
mit
-4,143,740,423,269,810,000
27.671642
104
0.558303
false
volpino/Yeps-EURAC
lib/galaxy/jobs/runners/sge.py
1
13219
import os, logging, threading, time from Queue import Queue, Empty from galaxy import model from paste.deploy.converters import asbool import pkg_resources try: pkg_resources.require( "DRMAA_python" ) DRMAA = __import__( "DRMAA" ) except: DRMAA = None log = logging.getLogger( __name__ ) if DRMAA is not...
mit
-2,320,704,567,637,543,400
40.180685
146
0.577956
false
sharad/calibre
src/calibre/gui2/dbus_export/menu.py
1
14852
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # Support for excporting Qt's MenuBars/Menus over DBUS. The API is defined in...
gpl-3.0
4,996,963,048,490,460,000
37.677083
115
0.597832
false
tensorflow/agents
tf_agents/networks/nest_map.py
1
8386
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
7,011,251,411,921,298,000
38.744076
80
0.673503
false
AmI-2014/Python-Lab1
fibonacci.py
1
1295
''' Created on Mar 18, 2014 @author: Dario Bonino <dario.bonino@polito.it> Copyright (c) 2014 Dario Bonino 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/LICE...
apache-2.0
-4,332,876,673,079,846,400
24.9
74
0.657143
false
mapzen/vector-datasource
integration-test/480-rest_area-services.py
2
3053
# -*- encoding: utf-8 -*- from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class RestAreaServices(FixtureTest): def test_rest_area_node(self): self.generate_fixtures(dsl.way(159773030, wkt_loads('POINT (-76.73912905210828 40.99079246918038)'), {u'source': u'openstreetmap.org...
mit
-6,235,184,751,376,499,000
77.282051
861
0.677039
false
janusnic/dj-21v
unit_07/mysite/blog/models.py
1
1898
from django.db import models import datetime from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible class Category(models.Model): name = models.CharField(max_length=100) slug = models.SlugField(max_length=100, unique=True, verbose_name='slug') description = models.T...
mit
9,192,965,130,482,229,000
39.382979
137
0.68862
false