repo_name
stringlengths
8
92
path
stringlengths
5
221
copies
stringclasses
10 values
size
stringlengths
4
6
content
stringlengths
974
828k
license
stringclasses
15 values
hash
int64
-9,212,977,344,346,658,000
9,220,224,517B
line_mean
float64
8.67
91.6
line_max
int64
15
966
alpha_frac
float64
0.29
0.86
autogenerated
bool
1 class
nl_text
stringlengths
0
164k
nl_size
int64
0
164k
nl_language
stringclasses
17 values
nl_language_score
float64
0.04
1
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
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 program is distribut...
750
en
0.882794
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
Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors License: GNU General Public License v3. See license.txt
122
en
0.604136
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
!/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 base includes from xml.dom.minidom import parseString gettext localization locale.setlocale(locale.LC_ALL, '') locale.bindtextdom...
1,883
en
0.708767
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
0
en
0.110449
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
A data object type that links multiple alarm expressions with OR operators. Automatically generated, do not edit. do some validation checking...
146
en
0.699131
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
-*- 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. All configuration value...
8,203
en
0.648852
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
! /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 the above copyri...
1,976
en
0.868326
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
0
en
0.110449
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
from Cython.Build import cythonizethis needs to be kept up to date with shapelets/__init__.pyext_modules = cythonize('shapelets/cshapelet.pyx', annotate=True),scripts = glob.glob('scripts/*.py'),
195
en
0.561956
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
See Footnote [1] See Footnote [4] Resolve all relative URLs See Footnote [3] Footnotes ~~~~~~~~~ [1] Anchor text needs 'comments,' because Polls submitted by yourself there is a 'add choice.' Also, if the story has no comments, then the anchor text is just 'discuss.' [2] '[Dead]' links remove the 'href' attribu...
1,065
en
0.823188
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
Return the formatted version information
40
en
0.376417
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
!/bin/python Script to display test suite resultssys.exit(1)print "CRASH"print "SUCCESSFUL"print "FAILED"print "FALSO POSITIVO"print "FALSO NEGATIVO"printsys.exit("Could not open test_log.xml")XML fileprint res.find('item_01_test-name').textprint ite_ex.textprint ite_ac.textdisplay resultsort files
299
en
0.185551
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
Test Model repr function !/usr/bin/env python encoding: utf-8 convert model to primitive form check result is dict check keys match
133
en
0.582954
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
This will make Celery tasks run synchronously
45
en
0.930422
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
Iterator created from input dataset. Distributed dataset that supports prefetching to multiple devices. Common Type specification for `DistributedDataset and DistributedDatasetsFromFunction. Represents a dataset distributed among devices and machines. A `tf.distribute.DistributedDataset` could be thought of as a "dist...
41,705
en
0.698555
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
source: https://github.com/lh3/readfq this is a generator function this is a buffer keeping the last unprocessed line mimic closure; is it a bad idea? the first record or a record following a fastq search for the start of the next record fasta/q header line save this line read the sequence this is a fasta record yield ...
489
en
0.908937
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
-*- coding: utf-8 -*-
21
en
0.767281
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
SparseExpanderDataset takes a numpy/scipy sparse matrix and calls .todense() as the batches are passed out of the iterator. method inherited from Dataset method inherited from Dataset Returns ------- data : numpy matrix or 2-tuple of matrices Returns all the data, as it is internally stored. The definition and ...
1,032
en
0.769766
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
Test class for ProvValidator service. These tests check that ProvValidator is available and responds to requests directed against the `ProvValidator REST API <https://provenance.ecs.soton.ac.uk/validator/view/api.html>`_. The class expects one environment variable to be set: - ``PROVVALIDATOR_URL`` - ProvValidator ...
3,164
en
0.70833
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
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 is distributed i...
976
en
0.834641
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
-*- 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 applicable law or ag...
586
en
0.873053
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
This class builds an image based on a series of inputs. Either constructing it solely in PIL or pulling one from flickr. Converts a RGB tuple into a hex color Accepts a supposed hex color string and ensures it's 6 characters long. Builds an MD5 hash from Pyxl.getInfo, Pyxl.getSize and Pyxl.getOptions Calculates the d...
3,970
en
0.816046
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
0
en
0.110449
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
Returns the NIC current IPv4 address SIOCGIFADDR vim: set ts=4 sw=4 tw=0 et :
79
en
0.27316
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
Thread-safe progress updater !/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 y...
798
en
0.866297
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
总监登录,新增会长 总监登录 新增会长 coding:utf-8 login参数是LoginPage的实例 判断是否登录成功 进入模块 点击新增按钮 新增界面 滚动到底部 判断是否新建成功 确定 关闭浏览器 执行测试主函数 执行main全局方法,将会执行上述所有以test开头的测试方法
145
zh
0.98993
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
-*- coding: utf-8 -*- last version that supports django 1.5
59
en
0.814742
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
Update schemaforce httpsdirect URLs
35
en
0.601327
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
print 'e=' + str(e)print 'a='+str(a)print 'c['+str(e % len(c))+']='+ str(c[e % len(c)])
87
nl
0.147907
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
-*- 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. All configuration values h...
8,069
en
0.642077
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
Enter your code here. Read input from STDIN. Print output to STDOUT
67
en
0.800271
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
make an interactive grid in which users can edit ages make an interactive grid in which users can edit ages make an interactive grid in which users can edit locations make an interactive grid in which users can edit specimen names as well as which sample a specimen belongs to make an interactive grid in which users can...
8,074
en
0.763341
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
0
en
0.110449
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
Tests for certbot.errors.FailedChallenges. Tests for certbot.errors.StandaloneBindError. Tests for certbot.errors. pragma: no cover
133
en
0.266834
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
Crud operations (except create) on an empty database. Test invalid bulk requests. Test requests with invalid payload. Test requests with missing payload. Test create. Test delete. Test update. Test read. All the tests are conducted with application/json as default mime. Deserialize JSON data. Create multiple resources ...
1,483
en
0.856884
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
Taken from djangoproject/django docs. Sphinx plugins for Django documentation. RE for option descriptions without a '--' prefix
130
en
0.461431
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
Output help information. :param args: the command to output help information about. If *args* is an empty, general help will be output. 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...
1,253
en
0.84163
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
Make dmg installer for Python.org Python from Python wheels !/usr/bin/env python Python 2 Python 3 Defaults Constants Installed location of Python.org Python Path for directory that will become the dmg contents Subdirectory containing wheels and source packages Package directory within dmg_directory get-pip.py URL In...
375
en
0.676873
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
get data from simulation_ids 1 and 2 get data from simulation_ids 1 and 2 get data from simulation_ids 1 and 2 get data from simulation_ids 1 and 2 Set the supported tables dict for stage02_physiology_pairWiseTest SBaaSsystem Query from data_stage02_physiology_pairWiseTest Query data from data_stage02_physiol...
360
en
0.562969
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
0
en
0.110449
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
Return all subclasses of given class Return all leaf subclasses of given class validation_error contains a dictionary of error messages of the form {fieldname1: [messages], fieldname2: [messages]}. Return a version keyed by "objectname.fieldname" instead of "fieldname". In a couple of cases we want to be able to conver...
1,546
en
0.78966
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
-* coding: utf-8 -*- ------ OK.RU ----- ------ VK.COM ----- защита от спама
77
ru
0.751556
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
Longest common prefix. .. versionadded:: 0.4.0 Return the length of the longest common prefix of the strings. Parameters ---------- src : str Source string for comparison tar : str Target string for comparison *args : strs Additional strings for comparison Raises ------ ValueError All arguments must ...
2,440
en
0.565818
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
0
en
0.110449
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
A class to handle the inset settings. A class to inset a skein of extrusions. Set the default settings, execute title & settings fileName. Initialize. Add already filled loops around loop to alreadyFilledArounds. Add the edge paths to the output. Add the remainder of the loop which does not overlap the alreadyFilledAro...
4,622
en
0.88707
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
Make new host: self-organized. Find all events that were self-organized and set administrator for them to be "self-organized". -*- coding: utf-8 -*- some missing migration, totally healthy (changes only validators for the field)
230
en
0.969502
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
if xpath.startswith("//"): xpath = ".{}".format(xpath) Python 2 compatibility
81
en
0.419855
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
A node of a Trie object. An instance represents a single node of a trie, corresponding a specific prefix sequence of names, which may or may not be a complete sequence. All attributes must be maintained by the user (Trie). Attributes: children (dict): mapping from names to child Nodes terminal (bool): True if...
3,343
en
0.771355
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
we might already be marked as finished for various reasons (such as aborting the task) TODO(dcramer): record a FailureReason?
125
en
0.958945
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
-*- 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. All configuration val...
7,029
en
0.658129
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
OMXPlayer controller This works by speaking to OMXPlayer over DBus sending messages. Args: source (str): Path to the file (as ~/Videos/my-video.mp4) or URL you wish to play args (list/str): used to pass option parameters to omxplayer. see: https://github.com/popcornmix/omxplayer#synopsis Multiple argument ...
7,280
en
0.768833
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
Export an image to object storage. The URI for an object storage object (.vhd/.iso file) of the format: swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or cos://<regionName>/<bucketName>/<objectPath> if using IBM Cloud Object Storage Export an image. :license: MIT, see LICENSE for more details.
316
en
0.429997
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
TODO deal with the response herewhat do we want to show the user about the board?TODO need to handle comments where overall table width > 80 charstrello.getList("Current Sprint")
178
en
0.852156
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
!/usr/bin/python self.socket = scapy.L3RawSocket(iface=self.interface, promisc=True, filter='') protocol.startProtocol()
138
en
0.20121
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
Returns encoded Course Sharing UTM Parameters. Arguments: course: This can be either a course overview object or a course descriptor. Returns the course sharing url, this can be one of course's social sharing url, marketing url, or lms course about url. Arguments: course: This can be either a course overview o...
530
en
0.603048
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
Adds variable (or all its parts) to all collections with that name. Build a model variable getter that respects scope getter and renames. Internal function that delay updates moving_vars if is_training. Internal function that delay updates moving_vars if is_training. Helper function for `inner_flatten`. Internal functi...
39,631
en
0.724367
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
list of all the error states that we can see in the statement that we want to be able to react to NOTE: this thread is resistant to being stopped. A KeyboardInterrupt will NOT suffice, it will need to be killed with a "kill <pid>" on the command line FIXME: not quite sure how the __init__ function on LonglivingThread,...
1,503
en
0.930215
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
-*- 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 option) any later versio...
742
en
0.902534
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
-*- coding: utf-8 -*------------------------------------------------------------- pelisalacarta - XBMC Plugin Canal para yaske http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/------------------------------------------------------------ Se captura la excepción, para no interrumpir al canal novedades si un canal fa...
998
es
0.706361
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
coding: utf8 noinspection PyUnresolvedReferences noinspection PyUnresolvedReferences noinspection PyUnusedLocal noinspection PyUnusedLocal noinspection PyUnusedLocal noinspection PyUnusedLocal
192
en
0.295838
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
The network resource topology information for the given resource group. :param name: Name of the resource. :type name: str :param id: ID of the resource. :type id: str :param location: Resource location. :type location: str :param associations: Holds the associations the resource has with other resources in the resou...
871
en
0.684546
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
Parser for micro-ML. The only public method here is parse_decl that parses a 'decl' from a string. Usage: p = Parser() decl = p.parse_decl(<some micro-ML code>) # decl is now an ast.Decl node parse_decl() can be called multiple times with the same parser to parse multiple decls (state is wiped out between call...
1,743
en
0.742803
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
encoding: utf-8 Removing M2M table for field project on 'New' Adding M2M table for field projects_relateds on 'New' Adding M2M table for field project on 'New' Removing M2M table for field projects_relateds on 'New'
215
en
0.52959
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
The base calss for all tests. All tests must override these functions! !/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 Lesser Genera...
919
en
0.900752
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
Graph Hist. Graph Map. Attributes ---------- parent : parent reference to the parent routine Polygon Interactor. Main Graph Tool Routine. Attributes ---------- parent : parent reference to the parent routine indata : dictionary dictionary of input datasets outdata : dictionary dictionary of output dat...
4,789
en
0.513802
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
Open a pdf document. Adding JavaScript at Document Level Instantiate JavascriptAction with desried JavaScript statement Assign JavascriptAction object to desired action of Document Adding JavaScript at Page Level Save PDF Document Open a pdf document. Get access to first page of PDF file Create object to represent TOC ...
1,729
en
0.486465
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
* 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 print "Triggering event: " + event + " with " + str(len(args)) + " arg(s)"
265
en
0.605716
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
-*- coding: utf-8 -*- Adding model 'Country' Deleting field 'Address.country' Deleting model 'Country' Adding field 'Address.country'
133
en
0.688818
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
NetApp C-mode FibreChannel volume driver. Volume driver for NetApp Data ONTAP (C-mode) FibreChannel storage systems. 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 ...
783
en
0.855572
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
Setup the subscriber Leave it some time to register Get one message at a time Give people time to read the message Get message continuously
139
en
0.866353
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
!/usr/bin/python Arguments Logging Handler Maindoesn't block
60
en
0.435393
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
Unit test class of GceApi. Sets up mocks for Google Client API library. Args: credentials_validity: Type/validity of locally cached credentials. None for no local credentials, False for invalid local credentials, True for valid local credentials. Returns: Dictionary that holds mocks created. Unit test ...
1,682
en
0.79018
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
!/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/licenses/lgpl.html EPL: http://www.eclipse.org/org/documents/epl-v10.php See the LICENSE file in t...
1,286
en
0.67075
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
2D Vector. Calculates cross product. It's a scalar which absolute value equals to square of a parallelogram constructed on the current vector and vector v2. The sign tells either v2 is on the left side (positive value) of the current vector or on the right side (negative value). Calculated dot product of current vector...
674
en
0.836074
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
Example sequence-to-sequence model that uses GRU cells. Example sequence-to-sequence model that uses GRU cells. Test the model behavior when feed_previous is True. For example, the following two cases have the same effect: - Train `embedding_rnn_seq2seq` with `feed_previous=True`, which contains a `embedding_rnn...
2,975
en
0.866409
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
-*- coding: utf-8 -*- @j00zek 2015TODO move this to skin.xml dont start before gui is finishedstart of container application failed... so we must call runFinished manualstart of container application failed... so we must call runFinished manuallastpage = self["text"].isAtLastPage()str = self["text"].getText()str += _("...
790
pl
0.727477
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
Test installation of osm.buildout into Plone. Custom shared utility setup for tests. Test that IosmBuildoutLayer is registered. Test if osm.buildout is installed with portal_quickinstaller. Test if osm.buildout is cleanly uninstalled. Setup/installation tests for this package. -*- coding: utf-8 -*- browserlayer.xmlw
319
en
0.827063
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
Tests for reclassify a raster. Test if we can reclassify a raster according to some thresholds. Tests for reclassify implementation. coding=utf-8 value <= 0.2 0.2 < value <= 1 1 < value <= 1.3 and gap in output classes value > 1.3
232
en
0.737227
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
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 (failed to read) rev...
1,523
en
0.738182
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
@Author Chloe-Agathe Azencott chloe-agathe.azencott@mines-paristech.fr April 2016 Get expression data, sample labels. Do not normalize the data while loading it (so as not to use test data for normalization). Output directory Read train indices from file Read test indices from file Create networks
299
en
0.724249
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
This has to be imported after the settings so statsd knows where to log to. Go configure the log. If you accessing this from unit tests, then before calling is valid, you can assign your own cursor. Version can be blank. no further SQL modification required. When file has strict_compatibility enabled, or file has binar...
598
en
0.844578
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
Portal returns information on your organization and is accessible to administrators. Publishers and information workers can view users and resources of the organization. A multitenant portal contains multiple portals, each one of which is owned by and represents an organization. Each user in the multitenant portal belo...
25,918
en
0.457292
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
0
en
0.110449
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
Add user Add alias address Bulk account delete form Admin change user password Edit user User reset password form User password change check account is legible to reset check account check domain check password strength accounts forms -*- coding: utf-8 -*- vim: ai ts=4 sts=4 et sw=4 Baruwa - Web 2.0 MailScanner front...
1,004
en
0.850541
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
Created on Mar 17, 2014 @author: mschilonka
44
en
0.753443
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
========================================================================= 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 License. You may...
801
en
0.712465
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
this exception is raised when a hotfix is applied twice applies a hotfix to a specific branch Args: branch (string) - the branch to apply the hotfix hash (string) - the commit hash to use Raises: EmptyHotfixError - raised when the hotfix is empty Error - critical error such as conflict stopped with hotfix f...
2,004
en
0.770459
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
Baselines to compare runs to. Give test-suites a baseline order. Version 8 of the database updates FieldChanges as well as adds tables for Regression Tracking features. Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not change the actual schema, but rather adds functionality vis-a-vis o...
694
en
0.712196
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
Gets the HTML to display for reCAPTCHA public_key -- The public api key use_ssl -- Should the request be sent over ssl? error -- An error message to display (from RecaptchaResponse.error_code) Submits a reCAPTCHA request for verification. Returns RecaptchaResponse for the request recaptcha_challenge_field -- The valu...
520
en
0.550261
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
IPsec process manager. Exception to raise when the process returns an unexpected code. Set internal fields for the IPsec process. Create a IPsec process object. Start the IPsec process. Stop the IPsec process. Add an IPsec tunnel and its corresponding PSK to the database which gets used to configure the IPsec process. ...
1,327
en
0.884749
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
ReportStore implementation that delegates to django's storage api. Stores information about background tasks that have been submitted to perform work by an instructor (or course staff). Examples include grading and rescoring. `task_type` identifies the kind of task being performed, e.g. rescoring. `course_id` uses the...
4,844
en
0.818746
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
-*- coding: utf-8 -*-
21
en
0.767281
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
An ROI displaying mini ROIs of different shapes as a grid one line for the subgrid Base class for all cells in a grid shape = ['Rect', 'Square', 'Circular', 'Pseudosquare'] update thickness and position from current state returns bool array Return a qpainterpath including all cells add grid and its cells to the ViewBox...
1,101
en
0.695784
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
coding: utf8 TODO: consider angle at nl, nr 8 pixel neighborhood Dimensions Max magnitude Pixels > t_high are kept automatically Pixels > t_low will be ad ded later if they prove to be adjacent to another pixel which has been included in the thinned list Create an initial list of strong edge pixels If the previous...
734
en
0.891554
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
Check if SGE was importable, fail if not 'watched' and 'queue' are both used to keep track of jobs to watch. 'queue' is used to add new watched jobs, and can be called from any thread (usually by the 'queue_job' method). 'watched' must only be modified by the monitor thread, which will move items from 'queue' to 'watch...
1,301
en
0.942086
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
This is called by the applet to notify the application an event happened on a menu item. eventId can be one of the following:: * "clicked" * "hovered" * "opened" * "closed" Vendor specific events can be added by prefixing them with "x-<vendor>-" Used to pass a set of events as a single message for possi...
970
en
0.902258
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
The `NestMap` network processes nested inputs via nested layers. It is a TF-Agents network that can be used to process nested inputs. Stateful Keras layers (e.g. LSTMCell, RNN, LSTM, TF-Agents DynamicUnroll) are all supported. The `state_spec` of `NestMap` has a structure matching that of `nested_layers`. `NestMap`...
4,219
en
0.80605
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
initialization, we use a tuple the resulting array init while variable fill the array get the series order as a string convert the string to an integer number get the Fibonacci's series value print the values
208
en
0.568626
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
-*- encoding: utf-8 -*- noqa Way: Crystal Springs Rest Area (97057565) noqa NOTE: this has been remapped as an area now. the test data here is superseded by the 1698-too-many-service-areas test. node: Tiffin River noqa Way: Nicole Driveway (274732386) noqa
256
en
0.90222
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
0
en
0.110449