text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# 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 may ...
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_generated/v7_2/aio/_configuration.py
Python
mit
2,282
0.005697
"""Tests for the array padding functions. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import (assert_array_equal, assert_raises, assert_allclose, TestCase) from numpy.lib import pad class TestConditionalShortcuts(TestCase): ...
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/numpy/lib/tests/test_arraypad.py
Python
mit
43,332
0.002285
# # The Python Imaging Library. # $Id$ # # standard image operations # # History: # 2001-10-20 fl Created # 2001-10-23 fl Added autocontrast operator # 2001-12-18 fl Added Kevin's fit operator # 2004-03-14 fl Fixed potential division by zero in equalize # 2005-05-05 fl Fixed equalize for low number of values ...
ppizarror/Hero-of-Antair
data/images/pil/ImageOps.py
Python
gpl-2.0
13,229
0.00189
#!/usr/bin/env python3 import xml.etree.ElementTree as ET from xml.etree.ElementTree import Element, SubElement import gzip import os import requests import time from xml.dom import minidom VALID_REFS = ['VENDOR', 'VERSION', 'CHANGE_LOG', 'PRODUCT', 'PROJECT', 'ADVISORY'] CPEDB_URL = "https://static.nvd.nist.gov/fee...
masahir0y/buildroot-yamada
support/scripts/cpedb.py
Python
gpl-2.0
7,878
0.003427
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from annotations.models import Corpus from annotations.exports import export_fragments from core.utils import CSV, XLSX class Command(BaseCommand): help = 'Exports existing Fragments for the given Corpus and Languages' ...
UUDigitalHumanitieslab/timealign
annotations/management/commands/export_fragments.py
Python
mit
1,823
0.003291
# Python/NLTK implementation of algorithm to detect similarity between # short sentences described in the paper - "Sentence Similarity based # on Semantic Nets and Corpus Statistics" by Li, et al. # Results achieved are NOT identical to that reported in the paper, but # this is very likely due to the differences in the...
joshtechnologygroup/dark-engine
engine/dark_matter/search_engine/similarity_checker.py
Python
gpl-3.0
9,843
0.003353
import unittest import os import shutil import filecmp import pytest import marks import options import util from controller.partition import PartitionController class PartitionControllerTest(unittest.TestCase): TEST_DATA_PATH = os.path.join(os.getcwd(), 'testdata') def setUp(self): self.control...
victorclf/jcc-web
server/test/controller/test_partition.py
Python
agpl-3.0
2,710
0.007749
import socket import pytest from urllib3.exceptions import ( NewConnectionError, ProtocolError, ProxyError, ) from tests import mock, unittest from botocore.awsrequest import ( AWSRequest, AWSHTTPConnectionPool, AWSHTTPSConnectionPool, ) from botocore.httpsession import ( get_cert_path, ...
boto/botocore
tests/unit/test_http_session.py
Python
apache-2.0
18,102
0.000221
"""Pipeline configuration parameters.""" from os.path import dirname, abspath, join from sqlalchemy import create_engine OS_TYPES_URL = ('https://raw.githubusercontent.com/' 'openspending/os-types/master/src/os-types.json') PIPELINE_FILE = 'pipeline-spec.yaml' SOURCE_DATAPACKAGE_FILE = 'source.datapa...
Victordeleon/os-data-importers
eu-structural-funds/common/config.py
Python
mit
3,382
0.002365
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:set et sts=4 sw=4: __all__ = ( "WeaselSession", "WeaselService", "service", ) import logging import logging.config import os import time import threading logfile = os.path.join(os.path.dirname(__file__), "logging.conf") logging.config.fileConfig(logfil...
lotem/rime.py
weasel/weasel.py
Python
gpl-3.0
9,656
0.003598
import sublime import sublime_plugin MARKDOWN_LINK_SNIPPET = "[${{1:{}}}](${{2:{}}})" class InsertMarkdownLinkCommand(sublime_plugin.TextCommand): def decode_page(self, page_bytes, potential_encoding=None): if potential_encoding: try: text = page_bytes.decode(pot...
rahul-ramadas/BagOfTricks
InsertMarkdownLink.py
Python
unlicense
1,987
0.003523
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for Keychain password database parser.""" import unittest from plaso.formatters import mac_keychain as _ # pylint: disable=unused-import from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import mac_keychain from tests.parsers import t...
ostree/plaso
tests/parsers/mac_keychain.py
Python
apache-2.0
3,604
0.00111
import unittest from time import mktime, strptime from knxmonitor.Knx.KnxParser import KnxParser class TestKnxParser(unittest.TestCase): def setUp(self): self.parser = KnxParser("enheter.xml", "groupaddresses.csv", False, False, { "1/1/14" : "onoff", "1/1/15...
TrondKjeldas/knxmonitor
test/test_KnxParser.py
Python
gpl-2.0
4,428
0.007227
import glob import os from distutils.dep_util import newer from distutils.core import Command from distutils.spawn import find_executable from distutils.util import change_root class build_gschemas(Command): """build message catalog files Build message catalog (.mo) files from .po files using xgettext ...
nagisa/Feeds
gdist/gschemas.py
Python
gpl-2.0
2,161
0.001851
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
xuweiliang/Codelibrary
openstack_dashboard/dashboards/admin/volumes_back/snapshots/urls.py
Python
apache-2.0
922
0
from django.test import Client, TestCase from django.core.urlresolvers import reverse class ViewTests(TestCase): def setUp(self): self.client = Client() def test_bmi_calculator_main_page_1(self): response = self.client.get(reverse('calculators:main_bmi')) self.assertEqual(response.st...
PyLadiesPoznanAdvanced/django-introduction-bmi
calculators/tests_view.py
Python
mit
1,112
0.002708
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from django_bootstrap3view.django_bootstrap3view_app.utils.render import render, render_string from django_bootstrap3view.django_bootstrap3view_app.utils.python import convert_to_bool class BaseService(object): _repo = property(fget=lambda se...
bossiernesto/django-bootstrap3-classview
django_bootstrap3view/django_bootstrap3view_app/services/base.py
Python
bsd-3-clause
6,504
0.001538
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from shuup.apps import AppConfig class ShuupNotifyAppConfig(App...
suutari-ai/shoop
shuup/notify/__init__.py
Python
agpl-3.0
1,215
0
import dragonfly import dragonfly.pandahive import bee from bee import connect import math, functools from panda3d.core import NodePath import dragonfly.scene.unbound import dragonfly.std import dragonfly.io # ## random matrix generator from random import random def random_matrix_generator(): while 1: ...
agoose77/hivesystem
manual/movingpanda/panda-5.py
Python
bsd-2-clause
3,673
0.001361
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-09-02 14:39 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reference', '0004_educationinstitution'), ] operation...
uclouvain/osis
reference/migrations/0005_auto_20160902_1639.py
Python
agpl-3.0
5,965
0.003353
# -*- coding: utf-8 -*- """ Sphinx plugins for Django documentation. """ import os import re from docutils import nodes, transforms try: import json except ImportError: try: import simplejson as json except ImportError: try: from django.utils import simplejson as json ex...
RaD/django-south
docs/djbook/_ext/djbookdocs.py
Python
apache-2.0
7,983
0.008081
# # Validator for "idlebg" Test # from pscheduler import json_validate MAX_SCHEMA = 1 def spec_is_valid(json): schema = { "type": "object", "properties": { "schema": { "$ref": "#/pScheduler/Cardinal" }, "duration": { "$ref": "#/pScheduler/Duration" }, ...
perfsonar/pscheduler
pscheduler-test-idlebgm/idlebgm/validate.py
Python
apache-2.0
1,872
0.017628
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import imp def FindModule(name): """Gets the path of the named module. This is useful for cases where we want to use subprocess.call on a module we h...
modulexcite/catapult
catapult_build/module_finder.py
Python
bsd-3-clause
551
0.005445
from setuptools import setup, Extension from Cython.Build import cythonize import numpy setup( name = 'SEGD', version = '0.a1', description = 'A Python3 reader for SEG-D rev3.1 binary data.', url = 'https://github.com/drsudow/SEG-D.git', author = 'Mattias Südow', author_email = 'mat...
drsudow/SEG-D
setup.py
Python
mit
1,008
0.029791
# maker.py # # A class representing vcdMaker specific test. # # Copyright (c) 2019 vcdMaker team # # 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 limit...
WojciechRynczuk/vcdMaker
test/functional/maker.py
Python
mit
2,819
0.000709
## ## This file is part of the sigrok-meter project. ## ## Copyright (C) 2014 Jens Steinhauser <jens.steinhauser@gmail.com> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2...
swegener/sigrok-meter
datamodel.py
Python
gpl-3.0
8,443
0.002961
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __f...
klahnakoski/MoDevETL
pyLibrary/convert.py
Python
mpl-2.0
17,324
0.003002
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2012 Jens Hoffmann (hoffmaje) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ from django.db import models from django.contrib.auth.models import User
hoffmaje/layla
layla/vocabularymanager/models.py
Python
agpl-3.0
240
0.004167
print ("I'm not a function") def my_function(): print("Hey I'm a function!") def brett(val): for i in range(val): print("I'm a function with args!") my_function() brett(5)
CiscoDevNet/coding-skills-sample-code
coding202-parsing-json/call-functions.py
Python
apache-2.0
217
0.041475
import sublime, sublime_plugin, os class CopyFilenameCommand(sublime_plugin.TextCommand): def run(self, edit): if len(self.view.file_name()) > 0: filename = os.path.split(self.view.file_name())[1] sublime.set_clipboard(filename) sublime.status_message("Copied file name: ...
nwjlyons/copy-file-name
copy_filename.py
Python
mit
435
0.004598
#!/usr/bin/env python from os.path import join from config import Config from group import HostGroup, PortGroup from parser import Parser from renderers.junos import JunosRenderer from renderers.ios import IOSRenderer from deployers.junos import JunosDeployer from deployers.ios import IOSDeployer from deployers.iosscp...
favoretti/accessninja
accessninja/device.py
Python
mit
5,511
0.000363
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Script para ejecutar PyTiger2C desde la linea de comandos. """ import os import sys import optparse import subprocess # Add the directory containing the packages in the source distribution to the path. # This should be removed when Tiger2C is installed. PACKAGES_DIR ...
yasserglez/pytiger2c
scripts/pytiger2c.py
Python
mit
4,333
0.006238
from yowsup.stacks import YowStack from .layer import EchoLayer from yowsup.layers import YowLayerEvent from yowsup.layers.auth import YowCryptLayer, YowAuthenticationProtocolLayer, AuthError from yowsup.layers.coder import YowCoderLayer from yowsup.layers.network ...
bassijtsma/chatbot
yowsup/demos/echoclient/stack.py
Python
gpl-3.0
2,467
0.008512
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
Jorge-Rodriguez/ansible
lib/ansible/modules/network/iosxr/iosxr_user.py
Python
gpl-3.0
29,071
0.002752
# Copyright 2014-2016 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import json import os from collections import OrderedDict import tarfile import re import logging import errno import copy import hashlib # PyPi/standard library > 3.4 #...
ARMmbed/yotta
yotta/lib/pack.py
Python
apache-2.0
23,065
0.002948
import os sys = os.system CC = 'g++ {} -std=gnu++0x -Wall' FLAG_clear = ['/c', '-c'] FLAG_window = ['/w', '-w'] FLAG_exit = ['/e', '-e'] def main(): print('List of existing <*.cpp> files:') files = [] counter = 0 for file in os.listdir(): if file[-4:] == '.cpp': counter += 1 files.append(file) print('...
Lipen/LipenDev
Azeroth/Pandaria/process.py
Python
gpl-3.0
2,341
0.032892
# -*- coding: utf-8 -*- # main.py import webapp2 from authomatic import Authomatic from authomatic.adapters import Webapp2Adapter from config import CONFIG # Instantiate Authomatic. authomatic = Authomatic(config=CONFIG, secret='some random secret string') # Create a simple request handler for the login procedure. ...
peterhudec/authomatic
examples/gae/simple/main.py
Python
mit
6,966
0.001005
# -*- twisted.conch.test.test_mixin -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import time from twisted.internet import reactor, protocol from twisted.trial import unittest from twisted.test.proto_helpers import StringTransport from twisted.conch import mixin class TestB...
sorenh/cc
vendor/Twisted-10.0.0/twisted/conch/test/test_mixin.py
Python
apache-2.0
1,110
0.001802
AZ09 = ["A","B","C","D"] MorseAZ09 = [".-","-...","-.-.","-.."] def str2morse(string): string = string.upper() ret = "" for c in string: ret += MorseAZ09[AZ09.index(c)] +" " return ret # alphanumeric to morse code dictionary AN2Morse = {"A":".-", "B":"-...", ...
hgijeon/NetworkLayer
morse.py
Python
gpl-2.0
5,184
0.021991
#! /usr/bin/env python """Script to find missing GLUT entry points""" from OpenGL import GLUT import subprocess, re func_finder = re.compile( 'FGAPIENTRY (\w+)\(' ) constant_finder = re.compile( '#define\W+([0-9a-zA-Z_]+)\W+((0x)?\d+)' ) INCLUDE_DIR = '/usr/include/GL' def defined( ): """Grep FGAPIENTRY headers ...
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/src/missingglut.py
Python
bsd-2-clause
1,579
0.031032
# -*- coding: utf-8 -*- """ Asset @author: Michael Howden (michael@sahanafoundation.org) @date-created: 2011-03-18 Asset Management Functionality """ prefix = request.controller resourcename = request.function #=============================================================================...
sinsai/Sahana_eden
controllers/asset.py
Python
mit
2,306
0.006071
# Copyright 2015 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 applicable law or a...
DailyActie/Surrogate-Model
01-codes/tensorflow-master/tensorflow/models/image/mnist/convolutional.py
Python
mit
13,852
0.000361
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest import simple_graph @pytest.fixture(scope="function") def create_graph(): new_graph = simple_graph.G() return new_graph @pytest.fixture(scope="function") def build_graph(create_graph): jerry = simple_gra...
jesseklein406/data-structures
tests/test_simple_graph.py
Python
mit
3,955
0.000759
import json import re from collections import defaultdict from django.conf import settings from django.db.models import Count from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.template import Context, loader from django.contrib.contenttypes.models import ContentType from...
aschampion/CATMAID
django/applications/catmaid/control/data_view.py
Python
gpl-3.0
5,209
0.011327
'''Handle configuration for zarkov. We support full configuration on the command line with defaults supplied by either an .ini-style config file or a yaml (and thus json) config file. ''' import sys import logging.config from optparse import OptionParser from ConfigParser import ConfigParser import yaml import coland...
joeywen/zarkov
zarkov/config.py
Python
apache-2.0
10,451
0.003158
import csv from django.contrib import messages from django.shortcuts import HttpResponseRedirect, resolve_url, HttpResponse from django.views.generic import FormView, ListView from lmgtfy.forms import MainForm from lmgtfy.helpers import search_bing, check_valid_tld from lmgtfy.models import Domain, DomainSearch, Doma...
opendata/lmgtdfy
lmgtfy/views.py
Python
mit
4,151
0.003854
#!/usr/bin/env python2.7 import os, sys from Bio import SeqIO import argparse from fast5tools.fxclass import * ################################################# ## Argument Parser ################################################# parser = argparse.ArgumentParser(description = """ Given path(s) to fasta/fastq file(s)...
JohnUrban/fast5tools
bin/filterFast5DerivedFastx.py
Python
mit
11,145
0.007447
#!/usr/bin/env python # # __COPYRIGHT__ # # 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 limitation the rights to use, copy, modify, merge, publish, ...
Distrotech/scons
test/Fortran/F95COMSTR.py
Python
mit
2,501
0.001599
"""Support for Etekcity VeSync switches.""" import logging from homeassistant.components.switch import SwitchEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from .common import VeSyncDevice from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS...
nkgilley/home-assistant
homeassistant/components/vesync/switch.py
Python
apache-2.0
3,095
0.000323
import numpy as np from scipy._lib._util import check_random_state def rvs_ratio_uniforms(pdf, umax, vmin, vmax, size=1, c=0, random_state=None): """ Generate random samples from a probability density function using the ratio-of-uniforms method. Parameters ---------- pdf : callable A ...
WarrenWeckesser/scipy
scipy/stats/_rvs_sampling.py
Python
bsd-3-clause
7,177
0
string = input() string[0] = "a"
LTKills/languages
python/data_structures/strings.py
Python
gpl-3.0
36
0.027778
#!/usr/bin/env python3 import re a = [[0 for x in range(25)] for y in range(13)] f=open("../distrib/spiral.txt","r") s=f.readline().strip() dx, dy = [0, 1, 0, -1], [1, 0, -1, 0] x, y, c = 0, -1, 1 l=0 for i in range(13+13-1): if i%2==0: for j in range((25+25-i)//2): x += dx[i % 4] y ...
DISMGryphons/GryphonCTF2017-Challenges
challenges/misc/Spirals/solution/solution.py
Python
gpl-3.0
812
0.032338
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2017 Georgi Georgiev # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with th...
ge0rgi/cinder
cinder/volume/manager.py
Python
apache-2.0
211,218
0.000199
# Copyright 2016 Hewlett Packard Enterprise Development Company LP. # Copyright 2016 IBM Corp # 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...
openstack/ironic
ironic/drivers/modules/storage/cinder.py
Python
apache-2.0
20,389
0
from feature_extraction.pre_processing.filter_precedent import precendent_directory_cleaner def run(command_list): precendent_directory_cleaner.run(command_list)
Cyberjusticelab/JusticeAI
src/ml_service/feature_extraction/pre_processing/pre_processing_driver.py
Python
mit
168
0.005952
class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self
jozefg/solar-system
src/attrdict.py
Python
mit
148
0
from django.db.models.aggregates import StdDev from django.db.models.expressions import Value from django.db.utils import ProgrammingError from django.utils.functional import cached_property class BaseDatabaseFeatures(object): gis_enabled = False allows_group_by_pk = False # True if django.db.backends.uti...
devops2014/djangosite
django/db/backends/base/features.py
Python
bsd-3-clause
9,722
0.001234
from sentry.testutils.cases import RuleTestCase from sentry.rules.conditions.level import LevelCondition, LevelMatchType class LevelConditionTest(RuleTestCase): rule_cls = LevelCondition def get_event(self): event = self.event event.group.level = 20 return event def test_equals(s...
wujuguang/sentry
tests/sentry/rules/conditions/test_level_event.py
Python
bsd-3-clause
1,452
0
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import pytest from ... import units as u from .. import transformations as t from ..builtin_frames import ICRS, FK5, FK4, FK4NoETerms, Galactic, AltAz from .. import representation as r from ..baseframe import ...
funbaker/astropy
astropy/coordinates/tests/test_transformations.py
Python
bsd-3-clause
14,498
0.00069
#!/usr/bin/env python from __future__ import print_function import glob import os import re import sys from argparse import ArgumentParser from param import (Library, Parameter, Vehicle, known_group_fields, known_param_fields, required_param_fields, known_units) from htmlemit import HtmlEmit from rs...
phamelin/ardupilot
Tools/autotest/param_metadata/param_parse.py
Python
gpl-3.0
17,332
0.002192
import os import os.path import glob import re from turbogears import controllers, expose, redirect, identity, validators as v, validate, config from turbogears.identity.exceptions import IdentityFailure from hubspace.validators import * from formencode import ForEach from hubspace.utilities.templates import try_render...
thehub/hubspace
hubspace/microSite.py
Python
gpl-2.0
70,144
0.011533
''' Copyright 2009, 2010 Anthony John Machin. All rights reserved. Supplied subject to The GNU General Public License v3.0 Created on 28 Jan 2009 Last Updated on 10 July 2010 As test20 with tests of: rules instantiation and query inference Related: single dict TS recursion rule plus generic rule + minimal da...
Semanticle/Semanticle
sm-mt-devel/src/metabulate/tests/test26case-009d.py
Python
gpl-2.0
18,357
0.011113
__all__ = ("settings", "urls", "wsgi") __version__ = "0.159.0"
lopopolo/hyperbola
hyperbola/__init__.py
Python
mit
63
0
## # Copyright 2013-2020 Ghent University # # This file is triple-licensed under GPLv2 (see below), MIT, and # BSD three-clause licenses. # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the...
pescobar/easybuild-framework
easybuild/toolchains/clanggcc.py
Python
gpl-2.0
1,795
0.001671
# pylint: disable=E1101,E1103,W0232 from collections import OrderedDict import datetime from sys import getsizeof import warnings import numpy as np from pandas._libs import ( Timestamp, algos as libalgos, index as libindex, lib, tslibs) import pandas.compat as compat from pandas.compat import lrange, lzip, map, ...
GuessWhoSamFoo/pandas
pandas/core/indexes/multi.py
Python
bsd-3-clause
113,443
0.000079
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the TimeSeries class which lets you build your TimeSeries charts just passing the arguments to the Chart class and calling the proper functions. """ #-----------------------------------------------------...
carlvlewis/bokeh
bokeh/charts/builder/timeseries_builder.py
Python
bsd-3-clause
6,252
0.002879
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from impact.tests.api_test_case import APITestCase from impact.tests.factories import JudgingRoundFactory class TestJudgingRound(APITestCase): def test_str(self): judging_round = JudgingRoundFactory() judging_round_string = str(judging_round)...
masschallenge/impact-api
web/impact/impact/tests/test_judging_round.py
Python
mit
445
0
from robber import expect from robber.explanation import Explanation from robber.matchers.base import Base class RespondTo(Base): """ expect(obj).to.respond_to('method') """ def matches(self): return hasattr(self.actual, self.expected) and callable(getattr(self.actual, self.expected)) @p...
vesln/robber.py
robber/matchers/respond_to.py
Python
mit
485
0.004124
from gettext import gettext as _ import logging from pulp.plugins.util.publish_step import PublishStep, UnitPublishStep from pulp_openstack.common import constants from pulp_openstack.common import openstack_utils _logger = logging.getLogger(__name__) class GlancePublisher(PublishStep): """ Openstack Imag...
rbarlow/pulp_openstack
plugins/pulp_openstack/plugins/distributors/glance_publish_steps.py
Python
gpl-2.0
4,901
0.003265
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import json, traceback from PyQt4.Qt import QDialogButtonBox from calibre.gui2 import error_dialog, warning_dialog from c...
insomnia-lab/calibre
src/calibre/gui2/preferences/template_functions.py
Python
gpl-3.0
10,331
0.002807
import urwid from pipeinspector.widgets import BlobWidget, BlobBrowser from pipeinspector.settings import UI __author__ = "Tamas Gal" __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration." __credits__ = [] __license__ = "MIT" __maintainer__ = "Tamas Gal" __email__ = "tgal@km3net.de" __status__ = "D...
tamasgal/km3pipe
pipeinspector/gui.py
Python
mit
1,923
0.00052
import requests from cStringIO import StringIO from PIL import Image from django.conf import settings from django.core.files.storage import get_storage_class from django.core.files.base import ContentFile from tempfile import NamedTemporaryFile from onadata.libs.utils.viewer_tools import get_path def flat(*nums):...
piqoni/onadata
onadata/libs/utils/image_tools.py
Python
bsd-2-clause
3,265
0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding=UTF8 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file ...
TieWei/nova
nova/tests/db/test_db_api.py
Python
apache-2.0
311,863
0.000895
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
var/spack/repos/builtin/packages/libtermkey/package.py
Python
lgpl-2.1
1,935
0.001034
# Copyright 2016, 2017 Peter Zybrick and others. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
petezybrick/iote2e
iote2e-pyclient/src/iote2epyclient/processsim/processsimhumiditytomister.py
Python
apache-2.0
3,105
0.009662
#! /usr/bin/env python import os import os.path import sys import string import getopt import re import socket import time import threading import traceback import types import exceptions import linecache from code import InteractiveInterpreter try: from Tkinter import * except ImportError: print>>sys.__stde...
xbmc/atv2
xbmc/lib/libPython/Python/Lib/idlelib/PyShell.py
Python
gpl-2.0
48,715
0.00115
# copies.py - copy detection for Mercurial # # Copyright 2008 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import heapq from . import ( node, pathu...
dscho/hg
mercurial/copies.py
Python
gpl-2.0
19,523
0.001639
from django.db import transaction from waldur_core.logging import tasks def process_hook(sender, instance, created=False, **kwargs): transaction.on_commit(lambda: tasks.process_event.delay(instance.pk))
opennode/nodeconductor-assembly-waldur
src/waldur_core/logging/handlers.py
Python
mit
210
0
""" WSGI config for {{ project_name }} project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APP...
sivaprakashniet/push_pull
push_and_pull/wsgi.py
Python
bsd-3-clause
2,240
0.005357
""" Django settings for gettingstarted project, on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/se...
TomWerner/BlunderPuzzler
gettingstarted/settings.py
Python
mit
4,580
0.001092
import os import sys import warnings from setuptools import setup version_contents = {} here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "shippo", "version.py"), encoding="utf-8") as f: exec(f.read(), version_contents) setup( name='shippo', version=version_contents['VERSION...
goshippo/shippo-python-client
setup.py
Python
mit
1,408
0
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Shinichi Nakagawa' from house import views from django.conf.urls import patterns, url, include from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'metrics', views.MetricsViewSet) urlpatterns = patterns('', url(r'...
Shinichi-Nakagawa/country-house-server
server/house/urls.py
Python
mit
349
0.002865
#! /usr/bin/python # -*- coding: utf-8 -*- import ast import pickle import numpy as np import os import socket import sys import importlib from datetime import datetime import theano as th import theanet.neuralnet as nn ################################ HELPER FUNCTIONS ############################ def share(data, d...
rakeshvar/theanet
train.py
Python
apache-2.0
7,597
0.001843
# Copyright 2012 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
kvaps/vdsm
tests/volumeTests.py
Python
gpl-2.0
2,197
0
#!/bin/python3.5 # Programa obtenido de hacker run, se le pasa lista con 0 y 1, que simbolizan puertas, 0 la puerta abierta 1 la puerta cerrada. # Nuestro objetivo es abrir todas las puertas # si se abre y las subyacentes se abrirán si no están abiertas # el programa devuelve para una lista de 0 y 1 le mínimo de puert...
BlancaCC/cultutrilla
python_aprendizaje/ejemplos_básicos/puertas.py
Python
gpl-3.0
1,203
0.030075
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ This ...
gadsbyfly/PyBioMed
PyBioMed/PyProtein/PyProteinAAIndex.py
Python
bsd-3-clause
9,731
0.002158
import falcon import json class LoginController: def on_post(self, req, resp): body = req.stream.read() loginInfo = json.loads(body) print 'user: ' + loginInfo['userName'] print 'pass: ' + loginInfo['password'] resp.status = falcon.HTTP_200 resp.body = 'ok'
yanggujun/meagram
login.py
Python
mit
312
0.00641
import re text = open('khalifa_tarikh.txt', mode="r", encoding="utf-8").read() text = re.sub(r"َ|ً|ُ|ٌ|ِ|ٍ|ْ|ّ|ـ", "", text) def search_words(checklist): search_words = open(checklist, mode='r', encoding='utf-8').read().splitlines() return search_words def index_generator(word, text): juz = 'الجزء:' ...
jedlitools/find-for-me
ex28_context_search.py
Python
mit
1,510
0.009187
# Copyright 2017 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...
kevin-coder/tensorflow-fork
tensorflow/python/data/experimental/ops/indexed_dataset_ops.py
Python
apache-2.0
4,824
0.004146
#!/usr/bin/env python3 """ Rename and organize Horos QC exported data in <BIDS Root>/incoming and place in <BIDS Root>/sourcedata AUTHOR ---- Mike Tyszka, Ph.D. MIT License Copyright (c) 2019 Mike Tyszka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated doc...
jmtyszka/CBICQA
bin/cbicqc_incoming.py
Python
mit
4,170
0.001439
# -*- coding: utf-8 -*- # Taboot - Client utility for performing deployments with Func. # Copyright © 2009-2011, Red Hat, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
tbielawa/Taboot
taboot/__init__.py
Python
gpl-3.0
1,161
0
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import ast from odoo import api, exceptions, models, _ class MailComposeMessage(models.TransientModel): _inherit = 'mail.compose.message' @api.model def _get_priorities(self): """ Load priorities...
mozaik-association/mozaik
mail_job_priority/wizards/mail_compose_message.py
Python
agpl-3.0
1,920
0
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
habibmasuro/django-wiki
wiki/plugins/attachments/migrations/0001_initial.py
Python
gpl-3.0
12,406
0.008061
# Copyright (C) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek, James Forcier and Reed Koser # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the Licen...
sckasturi/saltlake
commands/time.py
Python
gpl-2.0
1,137
0.003518
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class DeviceObjectObjectRemote(RemoteModel): """ Network Objects cross usage | ``DeviceObjectObjectID:`` The internal NetMRI identifier of this usage relationship between network objects. | ``attribute ...
infobloxopen/infoblox-netmri
infoblox_netmri/api/remote/models/device_object_object_remote.py
Python
apache-2.0
3,242
0.004318
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Meta level spider components. Each communicates with one or more servers via sub-components. """ from .pagegetter import PageGetter from .worker import Worker from .interface import Interface from .jobgetter import JobGetter from .jobscheduler import JobScheduler from...
hiidef/hiispider
hiispider/metacomponents/__init__.py
Python
mit
805
0.008696
import json import pkg_resources import pylons pylons.c = pylons.tmpl_context pylons.g = pylons.app_globals from pylons import c from ming.orm import ThreadLocalORMSession from datadiff.tools import assert_equal from allura.lib import helpers as h from allura.tests import decorators as td from allura import model as ...
pombredanne/SourceForge-Allura
ForgeHg/forgehg/tests/functional/test_controllers.py
Python
apache-2.0
9,128
0.002082
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 TickSmith Corp. # # Licensed under the MIT License # # 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, ...
TickSmith/tickvault-python-api
tickvaultpythonapi/parsing/predicate.py
Python
mit
3,342
0.002095
# -*- coding: utf-8 -*- # Copyright 2015-2016 Pavel_M <plprgt@gmail.com>, # released under the GNU GPL version 3. # This plugin is for Zim program by Jaap Karssenberg <jaap.karssenberg@gmail.com>. # # This plugin uses an icon from Tango Desktop Project (http://tango.freedesktop.org/) # (the Tango base icon theme is re...
Osndok/zim-desktop-wiki
zim/plugins/bookmarksbar.py
Python
gpl-2.0
18,469
0.030646
""" :synopsis: Setup :copyright: 2014 Nathan Lewis, See LICENSE.txt .. moduleauthor:: Nathan Lewis <natewlew@gmail.com> """ __version__ = '0.1' __author__ = 'Nathan Lewis' __email__ = 'natewlew@gmail.com' __license__ = 'GPL Version 2' try: import twisted except ImportError: raise SystemExit("twisted n...
natewlew/mythtvarchiveserver
setup.py
Python
gpl-2.0
1,038
0.014451