repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
wido/cloudstack | tools/ngui/api.py | 7 | 1481 | #Licensed to the Apache Software Foundation (ASF) under one
#or more contributor license agreements. See the NOTICE file
#distributed with this work for additional information
#regarding copyright ownership. The ASF licenses this file
#to you under the Apache License, Version 2.0 (the
#"License"); you may not use thi... | apache-2.0 | 5,381,673,089,288,709,000 | 39.027027 | 102 | 0.740041 | false |
Belgabor/django | django/contrib/gis/gdal/prototypes/geom.py | 315 | 4821 | import re
from datetime import date
from ctypes import c_char, c_char_p, c_double, c_int, c_ubyte, c_void_p, POINTER
from django.contrib.gis.gdal.envelope import OGREnvelope
from django.contrib.gis.gdal.libgdal import lgdal, GEOJSON
from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope
from... | bsd-3-clause | 5,107,185,897,152,000,000 | 44.481132 | 137 | 0.728272 | false |
apdjustino/DRCOG_Urbansim | src/opus_core/resource_factory.py | 1 | 2293 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
from opus_core.resources import Resources
from opus_core.storage_factory import StorageFactory
class ResourceFactory(object):
""" Class for creating a... | agpl-3.0 | -7,942,508,891,477,226,000 | 44.88 | 105 | 0.58744 | false |
andrewpollock/grpc | tools/gcp/stress_test/run_server.py | 37 | 5970 | #!/usr/bin/env python2.7
# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, thi... | bsd-3-clause | -7,807,885,494,732,641,000 | 42.26087 | 80 | 0.689615 | false |
lukas-krecan/tensorflow | tensorflow/python/ops/linalg_grad.py | 17 | 2430 | # 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... | apache-2.0 | -3,058,256,088,958,562,300 | 33.714286 | 80 | 0.635391 | false |
pombredanne/MOG | tools/install_venv_common.py | 15 | 7428 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# Copyright 2013 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.a... | apache-2.0 | -9,019,303,833,624,986,000 | 33.873239 | 79 | 0.58643 | false |
lbjay/cds-invenio | modules/bibformat/lib/elements/bfe_photos.py | 4 | 5570 | # -*- coding: utf-8 -*-
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either versio... | gpl-2.0 | 595,953,332,581,147,400 | 44.284553 | 245 | 0.582406 | false |
purepitch/trove | tests/test_view.py | 1 | 2089 | # -*- coding: utf-8 -*-
import unittest
import StringIO
import sys
import re
from modules.view import View
class TestView(unittest.TestCase):
def setUp(self):
self.view = View()
def testPrintInfoExpectsArgument(self):
with self.assertRaises(TypeError):
self.view.print_line()
... | gpl-3.0 | -1,116,729,715,636,350,300 | 31.138462 | 62 | 0.653423 | false |
databrary/curation | tools/scripts/utils/openproject/update.py | 1 | 5971 | #!/usr/bin/env python2.7
import sys, os
'''smoother more informative version check'''
if sys.version_info >= (3, 0, 0):
sys.exit("You need to run this with python 2.7, exiting now so you can get your stuff together")
'''Run from ../scripts/ with `python -m utils.openproject.update`'''
import json
from .. impor... | gpl-3.0 | -2,786,448,086,821,386,000 | 33.12 | 316 | 0.596885 | false |
kustodian/ansible | lib/ansible/modules/source_control/bitbucket/bitbucket_pipeline_key_pair.py | 37 | 6115 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Evgeniy Krysanov <evgeniy.krysanov@gmail.com>
# 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 = {
'm... | gpl-3.0 | -3,603,212,077,573,208,000 | 27.70892 | 131 | 0.641864 | false |
FescueFungiShare/hydroshare | hs_core/views/discovery_json_view.py | 1 | 3195 | import json
from django.http import HttpResponse
from haystack.generic_views import FacetedSearchView
from hs_core.discovery_form import DiscoveryForm
# View class for generating JSON data format from Haystack
# returned JSON objects array is used for building the map view
class DiscoveryJsonView(FacetedSearchView):
... | bsd-3-clause | 1,549,041,135,639,713,000 | 50.532258 | 137 | 0.58748 | false |
dushu1203/chromium.src | chrome/common/extensions/docs/server2/jsc_view_test.py | 22 | 15249 | #!/usr/bin/env python
# Copyright 2014 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 json
import os
import unittest
from jsc_view import GetEventByNameFromEvents
from api_schema_graph import APISchemaGraph
from a... | bsd-3-clause | 3,795,724,604,769,226,000 | 34.964623 | 80 | 0.627058 | false |
google/lkml-gerrit-bridge | src/message.py | 1 | 2859 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -6,645,432,135,169,708,000 | 35.189873 | 87 | 0.578874 | false |
hgl888/chromium-crosswalk | chrome/common/extensions/docs/server2/app_yaml_helper_test.py | 53 | 6154 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from app_yaml_helper import AppYamlHelper
from extensions_paths import SERVER2
from host_file_system_provider import H... | bsd-3-clause | 7,926,481,948,426,720,000 | 33.379888 | 80 | 0.643646 | false |
tchernomax/ansible | lib/ansible/modules/cloud/openstack/os_group.py | 34 | 4758 | #!/usr/bin/python
# Copyright (c) 2016 IBM
# 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',
'status': ['preview'],
... | gpl-3.0 | -2,193,676,315,343,591,700 | 27.491018 | 125 | 0.603405 | false |
MattsFleaMarket/python-for-android | python3-alpha/python3-src/Lib/lib2to3/fixes/fix_map.py | 170 | 3058 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.
As a special case, map(None, X) is changed into list(X). (This is
... | apache-2.0 | -1,656,485,600,551,944,400 | 32.604396 | 78 | 0.516024 | false |
skoczen/correlationbot | tests/test_post.py | 1 | 1928 | from bot_tests import BotTests
class ValidPostTests(BotTests):
def test_two_column_works(self):
resp = self.app.post_json('/', {
"data": [
[1,2,3,4,6,7,8,9],
[2,4,6,8,10,12,13,15],
]
})
self.assertEqual(resp.status_int, 200)
... | mit | 1,592,703,209,701,723,100 | 29.619048 | 56 | 0.34751 | false |
liberation/django-elasticsearch | test_project/test_app/models.py | 6 | 4045 | from datetime import datetime
from django.db import models
from django.contrib.auth.models import User
from django_elasticsearch.models import EsIndexable
from django_elasticsearch.serializers import EsJsonSerializer
class TestSerializer(EsJsonSerializer):
# Note: i want this field to be null instead of u''
... | mit | -206,594,376,945,400,420 | 32.991597 | 101 | 0.659827 | false |
hale36/SRTV | lib/sqlalchemy/testing/plugin/plugin_base.py | 76 | 14817 | # plugin/plugin_base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Testing extensions.
this module is designed to work as a testing-framework-a... | gpl-3.0 | 5,509,093,584,656,215,000 | 31.564835 | 94 | 0.604306 | false |
alistairlow/tensorflow | tensorflow/examples/tutorials/mnist/input_data.py | 165 | 1107 | # 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 | -7,825,658,111,054,377,000 | 37.172414 | 80 | 0.721771 | false |
jonatanblue/flask | scripts/flaskext_compat.py | 153 | 5038 | # -*- coding: utf-8 -*-
"""
flaskext_compat
~~~~~~~~~~~~~~~
Implements the ``flask.ext`` virtual package for versions of Flask
older than 0.7. This module is a noop if Flask 0.8 was detected.
Usage::
import flaskext_compat
flaskext_compat.activate()
from flask.ext import ... | bsd-3-clause | 1,676,566,584,735,214,000 | 39.304 | 78 | 0.597261 | false |
SirAnthony/marvin-xmpp | plugins/urlhead.py | 1 | 1360 | # -*- coding: utf-8 -*-
import lxml.html
import re
from functions import goUrl
class UrlHead:
_marvinModule = True
public = ['urlhead']
def urlhead():
None
def _urlhead(self,message):
if 'http://' or 'https://' in message.text:
try:
foo = re.findall(r'... | mit | -2,215,610,532,836,480,000 | 35.702703 | 154 | 0.469809 | false |
kalaspuff/tomodachi | tomodachi/discovery/dummy_registry.py | 1 | 1160 | import logging
from typing import Any, Dict
# An example discovery class which would could be extended to register which
# the started service' HTTP endpoints are.
class DummyRegistry(object):
http_endpoints: Dict = {}
@classmethod
async def add_http_endpoint(cls, service: Any, host: str, port: int, meth... | mit | -3,238,731,071,140,974,600 | 39 | 108 | 0.65 | false |
davidwtbuxton/search | search/tests/test_ql.py | 3 | 3162 | import datetime
import unittest
from search.ql import Query, Q, GeoQueryArguments
from search.fields import TextField, GeoField, DateField
from search.indexes import DocumentModel
class FakeDocument(DocumentModel):
foo = TextField()
bar = DateField()
class FakeGeoDocument(DocumentModel):
my_loc = GeoFi... | mit | -846,240,630,540,917,800 | 27.745455 | 95 | 0.590133 | false |
mdrio/pydoop | test/backward_compatibility/test_task_context.py | 3 | 1995 | # BEGIN_COPYRIGHT
#
# Copyright 2009-2015 CRS4.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -950,733,306,138,611,800 | 34 | 78 | 0.67218 | false |
joshblum/django-with-audit | django/contrib/gis/geos/point.py | 403 | 4253 | from ctypes import c_uint
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos import prototypes as capi
class Point(GEOSGeometry):
_minlength = 2
_maxlength = 3
def __init__(self, x, y=None, z=None, srid=None):
... | bsd-3-clause | 6,507,393,299,635,238,000 | 30.503704 | 87 | 0.563837 | false |
mmetak/streamlink | docs/ext_argparse.py | 1 | 4619 | """Convert a argparse parser to option directives.
Inspired by sphinxcontrib.autoprogram but with a few differences:
- Instead of relying on private argparse structures uses hooking
to extract information from a argparse parser.
- Contains some simple pre-processing on the help messages to make
the Sphinx versio... | bsd-2-clause | 7,007,146,270,116,127,000 | 28.608974 | 68 | 0.572851 | false |
deepakantony/sms-tools | software/transformations_interface/harmonicTransformations_function.py | 20 | 5398 | block=False# function call to the transformation functions of relevance for the hpsModel
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import get_window
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/'))
sys.path.append(os.path.join(os.path.di... | agpl-3.0 | -4,697,103,074,808,371,000 | 30.940828 | 147 | 0.705632 | false |
CoolProp/CoolProp | dev/Tickets/524.py | 2 | 1561 | import CoolProp
from CoolProp.CoolProp import PropsSI
from CoolProp.CoolProp import set_reference_state
print("CoolProp version %s" % CoolProp.__version__)
print("CoolProp revision %s" % CoolProp.__gitrevision__)
REF = 'R134a'
T0 = 273.15
RefState = 'IIR'
set_reference_state(REF, RefState)
print(REF, RefState)
print... | mit | -7,684,209,428,663,868,000 | 35.302326 | 93 | 0.606662 | false |
sbalde/edx-platform | lms/envs/aws_migrate.py | 288 | 1256 | """
A Django settings file for use on AWS while running
database migrations, since we don't want to normally run the
LMS with enough privileges to modify the database schema.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=... | agpl-3.0 | -4,782,532,784,825,021,000 | 40.866667 | 81 | 0.718949 | false |
automatthias/aubio | waflib/Tools/flex.py | 314 | 1057 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import waflib.TaskGen,os,re
def decide_ext(self,node):
if'cxx'in self.features:
return['.lex.cc']
return['.lex.c']
def flexfun(tsk):
env=tsk.env
bld=tsk.generator.bld
w... | gpl-3.0 | -3,755,693,672,671,253,000 | 32.03125 | 102 | 0.689688 | false |
wkeyword/pip | tests/functional/test_uninstall.py | 17 | 13733 | from __future__ import with_statement
import textwrap
import os
import sys
import pytest
from os.path import join, normpath
from tempfile import mkdtemp
from mock import patch
from tests.lib import assert_all_changes, pyversion
from tests.lib.local_repos import local_repo, local_checkout
from pip.utils import rmtree
... | mit | 5,465,819,814,812,617,000 | 32.413625 | 79 | 0.628559 | false |
hlange/LogSoCR | .waf/waflib/Tools/xlcxx.py | 1 | 1468 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2016 (ita)
# Ralf Habacker, 2006 (rh)
# Yinon Ehrlich, 2009
# Michael Kuhn, 2009
from waflib.Tools import ccroot, ar
from waflib.Configure import conf
@conf
def find_xlcxx(conf):
"""
Detects the Aix C++ compiler
"""
cxx = conf.find_program(['xlc++_r', 'x... | agpl-3.0 | 7,030,532,117,857,186,000 | 21.584615 | 62 | 0.568801 | false |
mysteryjeans/doorsale-demo | doorstep/accounts/models.py | 2 | 5736 | from __future__ import unicode_literals
from datetime import timedelta
from django.db import models
from django.contrib.auth import get_user_model
from django.utils import timezone
from django.core.exceptions import ValidationError
from django.contrib.auth.models import AbstractUser as _AbstractUser, UserManager as _... | gpl-2.0 | 841,217,162,521,892,700 | 36.986755 | 116 | 0.558229 | false |
Protocol-X/plugin.video.funimationnow | resources/lib/modules/trakt.py | 1 | 8240 | # -*- coding: utf-8 -*-
'''
Funimation|Now Add-on
Copyright (C) 2016 Funimation|Now
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at yo... | gpl-3.0 | 5,781,380,733,623,459,000 | 29.981203 | 241 | 0.593811 | false |
ivano666/tensorflow | tensorflow/contrib/util/__init__.py | 5 | 1447 | # 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... | apache-2.0 | 1,646,377,162,740,159,500 | 34.292683 | 80 | 0.733932 | false |
chauhanmohit/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/w3c/test_importer.py | 115 | 20224 | #!/usr/bin/env python
# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above
# copyright n... | bsd-3-clause | -8,548,164,923,579,631,000 | 43.942222 | 138 | 0.620748 | false |
dondieselkopf/amgcl | examples/make_poisson.py | 1 | 2435 | #!/usr/bin/python
import numpy as np
from scipy.sparse import csr_matrix
def numba_jit_if_available():
try:
from numba import jit
return jit
except ImportError:
return lambda f: f
#----------------------------------------------------------------------------
# Assemble matrix for Poiss... | mit | -6,715,250,416,436,728,000 | 26.988506 | 99 | 0.408624 | false |
wasn-lab/visual-positioning | cpp/scons/scons-local-2.0.0.final.0/SCons/SConf.py | 34 | 39052 | """SCons.SConf
Autoconf-like configuration support.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal i... | apache-2.0 | 756,569,871,858,430,600 | 36.914563 | 96 | 0.58353 | false |
joelddiaz/openshift-tools | ansible/roles/lib_openshift_3.2/build/src/oadm_manage_node.py | 9 | 6045 | # pylint: skip-file
class ManageNodeException(Exception):
''' manage-node exception class '''
pass
class ManageNodeConfig(OpenShiftCLIConfig):
''' ManageNodeConfig is a DTO for the manage-node command.'''
def __init__(self, kubeconfig, node_options):
super(ManageNodeConfig, self).__init__(None... | apache-2.0 | -9,021,958,956,466,719,000 | 37.75 | 110 | 0.54756 | false |
ibmsoe/tensorflow | tensorflow/contrib/input_pipeline/python/ops/input_pipeline_ops.py | 49 | 4117 | # 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,125,936,997,226,870,000 | 37.12037 | 80 | 0.712655 | false |
bayolau/seqan | apps/ngs_roi/tool_shed/rois.py | 18 | 1820 | #!/usr/bin/env python
class RoiRecord(object):
"""Represent one record in a ROI file."""
def __init__(self, ref, start_pos, end_pos, region_name, region_length,
strand, max_count, data, points):
"""Initialize RoiRecord."""
self.ref = ref
self.start_pos = start_pos
... | bsd-3-clause | -6,175,257,125,299,301,000 | 33.339623 | 78 | 0.5 | false |
TaskEvolution/Task-Coach-Evolution | taskcoach/taskcoachlib/i18n/po2dict.py | 1 | 2930 | #! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
"""Generate python dictionaries catalog from textual translation description.
This program converts a textual Uniforum-style message catalog (.po file) into
a python dictionary
Based on msgfmt.py by Martin v. Löwis <loewis@informatik.hu-berlin.de>
"""
import sys... | gpl-3.0 | 2,397,016,724,270,267,400 | 25.396396 | 131 | 0.548805 | false |
SamplesAndDemos/division42pos1 | src/division42pos/division42pos/main/models.py | 1 | 1269 | import uuid
from django.db import models
from django.contrib.auth.models import User
STATE_CODE_CHOICES = (
('AL','Alabama'),
('AK','Alaska'),
('CO','Colorado'),
('CT','Connecticut'),
('DE','Delaware'),
('FL','Florida'),
('GA','Georgia'),
('LA','Lousiana'),
('MA','Massachusetts'),
('ME','Maine'),
('MI','Mic... | mit | -5,278,518,399,757,831,000 | 31.564103 | 131 | 0.676123 | false |
dcrosta/ansible | lib/ansible/playbook/block.py | 30 | 13215 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 | -992,071,965,753,633,400 | 36.120787 | 145 | 0.568067 | false |
aimas/TuniErp-8.0 | addons/account/account_cash_statement.py | 283 | 15868 | # encoding: utf-8
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# i... | agpl-3.0 | 2,267,754,697,502,580,000 | 42.593407 | 197 | 0.580287 | false |
zhaochl/python-utils | verify_code/Imaging-1.1.7/build/lib.linux-x86_64-2.7/ImtImagePlugin.py | 40 | 2203 | #
# The Python Imaging Library.
# $Id$
#
# IM Tools support for PIL
#
# history:
# 1996-05-27 fl Created (read 8-bit images only)
# 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.2)
#
# Copyright (c) Secret Labs AB 1997-2001.
# Copyright (c) Fredrik Lundh 1996-2001.
#
# See the README file for informatio... | apache-2.0 | -3,973,355,818,431,233,000 | 22.688172 | 70 | 0.433954 | false |
darkryder/django | tests/admin_views/models.py | 4 | 25377 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
import tempfile
import uuid
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from d... | bsd-3-clause | -6,062,716,396,123,983,000 | 24.886619 | 110 | 0.687527 | false |
Versent/ansible-modules-core | cloud/amazon/ec2_eip.py | 1 | 9973 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 | 7,650,753,511,779,120,000 | 31.275081 | 88 | 0.650857 | false |
nitzmahone/ansible | test/units/modules/network/f5/test_bigip_smtp.py | 21 | 5016 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 | 5,708,921,683,412,216,000 | 32 | 91 | 0.63437 | false |
Pintor95/django-jukebox | includes/json.py | 3 | 1337 | """
This file contains everything needed to send and receive JSON requests.
"""
from django.utils.functional import Promise
from django.utils import simplejson
class JSMessage(object):
"""
The JSMessages class is used to pass JSON messages to client JavaScripts.
Use this as a vessel for JSON stuff instead ... | gpl-3.0 | -7,172,712,630,842,558,000 | 35.162162 | 77 | 0.619297 | false |
mistercrunch/airflow | airflow/providers/amazon/aws/operators/glacier.py | 6 | 1894 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -1,496,449,530,701,960,700 | 34.074074 | 83 | 0.704329 | false |
scholer/cadnano2.5 | cadnano/extras/__init__.py | 2 | 1253 | # The MIT License
#
# Copyright (c) 2011 Wyss Institute at Harvard University
#
# 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
# ... | mit | 5,845,931,635,588,238,000 | 40.766667 | 79 | 0.768555 | false |
sumedhasingla/VTK | Filters/Hybrid/Testing/Python/TestGreedyTerrainDecimation.py | 20 | 1948 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
lut = vtk.vtkLookupTable()
lut.SetHueRange(0.6, 0)
lut.SetSaturationRange(1.0, 0)
lut.SetValueRange(0.5, 1.0)
# Read the data: a height field results
demReader = vtk.vtkDEMReader()
d... | bsd-3-clause | 3,052,508,174,115,363,300 | 26.055556 | 63 | 0.791581 | false |
serensoner/CouchPotatoServer | libs/gntp/cli.py | 122 | 4143 | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
import logging
import os
import sys
from optparse import OptionParser, OptionGroup
from gntp.notifier import GrowlNotifier
from gntp.shim import RawConfigParser
from gntp.version import __version__
DEFAULT_CON... | gpl-3.0 | 4,628,882,713,008,139,000 | 28.382979 | 80 | 0.689114 | false |
benfinke/ns_python | build/lib/nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_filterpolicy_binding.py | 3 | 14851 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# 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 l... | apache-2.0 | -2,206,839,184,825,346,000 | 35.759901 | 430 | 0.730725 | false |
jhgoebbert/cvl-fabric-launcher | pyinstaller-2.1/tests/basic/test_module__file__attribute.py | 14 | 1175 | #-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this softwa... | gpl-3.0 | -5,539,479,761,952,040,000 | 28.375 | 78 | 0.584681 | false |
Sumith1896/sympy | sympy/combinatorics/tensor_can.py | 4 | 40951 | from __future__ import print_function, division
from sympy.core.compatibility import range
from sympy.combinatorics.permutations import Permutation, _af_rmul, \
_af_invert, _af_new
from sympy.combinatorics.perm_groups import PermutationGroup, _orbit, \
_orbit_transversal
from sympy.combinatorics.util import _d... | bsd-3-clause | -114,056,885,535,940,300 | 33.586993 | 145 | 0.562306 | false |
danny200309/anaconda | anaconda_lib/linting/anaconda_mccabe.py | 9 | 1577 | # -*- coding: utf8 -*-
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org>
# This program is Free Software see LICENSE file for details
"""
Anaconda McCabe
"""
import ast
from .mccabe import McCabeChecker
class AnacondaMcCabe(object):
"""Wrapper object around McCabe python script
"""
ch... | gpl-3.0 | 8,689,864,748,901,092,000 | 24.852459 | 75 | 0.574509 | false |
linjk/mysql-5.6 | xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/bug606981_test.py | 19 | 5429 | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | gpl-2.0 | -9,108,359,535,533,477,000 | 39.514925 | 110 | 0.577639 | false |
sfam/home-assistant | homeassistant/components/device_tracker/demo.py | 9 | 1257 | """
homeassistant.components.device_tracker.demo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo platform for the device tracker.
device_tracker:
platform: demo
"""
import random
from homeassistant.components.device_tracker import DOMAIN
def setup_scanner(hass, config, see):
""" Set up a demo tracker. """
... | mit | -884,261,330,498,163,300 | 24.653061 | 78 | 0.564837 | false |
OpenSTC-Eleger/stc-achats | account.py | 1 | 6485 | # -*- coding: utf-8 -*-
##############################################################################
# Copyright (C) 2012 SICLIC http://siclic.fr
#
# This program 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 Fr... | agpl-3.0 | 6,554,240,706,995,700,000 | 41.89404 | 194 | 0.60593 | false |
pinax/pinax-announcements | setup.py | 2 | 3593 | from setuptools import find_packages, setup
VERSION = "4.0.0"
LONG_DESCRIPTION = """
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-announcements.svg
:target: https://pypi.python.org/pypi/pinax-announcements/
===================
Pinax Announcements
===================
.. image:: https://img.shield... | mit | 9,047,119,632,050,888,000 | 33.548077 | 87 | 0.618146 | false |
danmergens/mi-instrument | mi/core/driver_scheduler.py | 5 | 15720 | #!/usr/bin/env python
"""
@package mi.core.driver_scheduler Event Scheduler used in drivers
@file mi/core/driver_scheduler.py
@author Bill French
@brief Provides task/event scheduling for drivers
uses the PolledScheduler and provides a common, simplified interface
for instrument and platform drivers.
The scheduler is... | bsd-2-clause | 8,924,218,871,820,338,000 | 36.339667 | 123 | 0.644466 | false |
blaze33/django | django/conf/locale/ko/formats.py | 107 | 2105 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y년 n월 j일'
TIME_FORMAT = 'A g:i:s'... | bsd-3-clause | 2,224,589,443,596,827,100 | 38.392157 | 81 | 0.507218 | false |
Jacobichou/electron | script/cpplint.py | 153 | 1850 | #!/usr/bin/env python
import fnmatch
import os
import sys
from lib.util import execute
IGNORE_FILES = [
os.path.join('atom', 'app', 'atom_main.cc'),
os.path.join('atom', 'browser', 'mac', 'atom_application.h'),
os.path.join('atom', 'browser', 'mac', 'atom_application_delegate.h'),
os.path.join('atom', 'brows... | mit | -7,144,347,197,517,798,000 | 33.90566 | 78 | 0.630811 | false |
sbellem/django-rest-framework | rest_framework/utils/humanize_datetime.py | 144 | 1285 | """
Helper functions that convert strftime formats into more readable representations.
"""
from rest_framework import ISO_8601
def datetime_formats(formats):
format = ', '.join(formats).replace(
ISO_8601,
'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]'
)
return humanize_strptime(format)
... | bsd-2-clause | -9,189,681,227,853,836,000 | 26.340426 | 82 | 0.54786 | false |
bohlian/erpnext | erpnext/controllers/status_updater.py | 22 | 14617 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, comma_or, nowdate, getdate
from frappe import _
from frappe.model.document import Document
def validate_sta... | gpl-3.0 | 5,669,877,712,528,662,000 | 40.174648 | 201 | 0.652665 | false |
LukeC92/iris | lib/iris/tests/integration/plot/test_netcdftime.py | 3 | 2243 | # (C) British Crown Copyright 2016 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... | lgpl-3.0 | -6,989,007,306,716,357,000 | 33.507692 | 76 | 0.691039 | false |
Yannig/ansible | lib/ansible/modules/inventory/add_host.py | 16 | 2112 | # -*- mode: python -*-
#
# Copyright: Ansible Team
# 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',
'status': ['stablein... | gpl-3.0 | 7,055,968,463,526,600,000 | 30.522388 | 110 | 0.653883 | false |
hefen1/chromium | chrome/test/data/nacl/gdb_rsp.py | 99 | 2431 | # Copyright (c) 2012 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.
# This file is based on gdb_rsp.py file from NaCl repository.
import re
import socket
import time
def RspChecksum(data):
checksum = 0
for char in ... | bsd-3-clause | 8,271,119,997,895,116,000 | 29.772152 | 78 | 0.625668 | false |
Akasurde/bodhi | bodhi/services/overrides.py | 1 | 8799 | # 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 hope that it will be useful,
# bu... | gpl-2.0 | -112,274,493,101,357,650 | 35.970588 | 81 | 0.603364 | false |
phdowling/scikit-learn | sklearn/utils/tests/test_linear_assignment.py | 421 | 1349 | # Author: Brian M. Clapper, G Varoquaux
# License: BSD
import numpy as np
# XXX we should be testing the public API here
from sklearn.utils.linear_assignment_ import _hungarian
def test_hungarian():
matrices = [
# Square
([[400, 150, 400],
[400, 450, 600],
[300, 225, 300]],
... | bsd-3-clause | -2,570,489,902,927,458,000 | 21.483333 | 55 | 0.447739 | false |
lekum/ansible-modules-extras | packaging/os/opkg.py | 114 | 5208 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com>
# Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules
#
# This module 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 Softwa... | gpl-3.0 | 1,351,075,541,198,791,400 | 29.816568 | 194 | 0.625384 | false |
damien-dg/horizon | openstack_dashboard/dashboards/project/stacks/mappings.py | 12 | 15003 | # 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
# distributed under th... | apache-2.0 | -4,652,282,223,652,116,000 | 41.381356 | 79 | 0.649937 | false |
putcn/Paddle | tools/aws_benchmarking/client/cluster_launcher.py | 7 | 12777 | # Copyright (c) 2018 PaddlePaddle 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 app... | apache-2.0 | 7,141,779,924,866,873,000 | 29.787952 | 96 | 0.616498 | false |
siddhartha-chandra/i_cake_python | 20.py | 1 | 1719 | # You want to be able to access the largest element in a stack.
# You've already implemented this Stack class:
class Stack:
# initialize an empty list
def __init__(self):
self.items = []
# push a new item to the last index
def push(self, item):
self.items.append(item)
# remove th... | gpl-3.0 | 8,218,064,899,164,200,000 | 29.157895 | 172 | 0.62071 | false |
kellinm/anaconda | pyanaconda/ui/gui/xkl_wrapper.py | 3 | 15362 | #
# Copyright (C) 2012-2014 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 distributed in the hope that it wi... | gpl-2.0 | -6,848,959,228,302,923,000 | 37.891139 | 121 | 0.629931 | false |
broferek/ansible | lib/ansible/modules/notification/bearychat.py | 52 | 5908 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Jiangge Zhang <tonyseek@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 Li... | gpl-3.0 | -5,230,945,677,076,728,000 | 31.461538 | 104 | 0.640657 | false |
uwdata/termite-data-server | web2py/gluon/languages.py | 9 | 35572 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
| This file is part of the web2py Web Framework
| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
| Plural subsystem is created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop@gmail.com>
Translation sys... | bsd-3-clause | -6,423,560,203,809,788,000 | 34.895055 | 153 | 0.514168 | false |
dmoliveira/networkx | networkx/algorithms/operators/unary.py | 30 | 1747 | """Unary operations on graphs"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = """\n""".join(['Aric Hagberg <aric.hagberg@gmail.com>',
... | bsd-3-clause | -4,466,940,595,108,524,500 | 24.318841 | 74 | 0.556955 | false |
norayr/unisubs | apps/videos/migrations/0039_auto__add_field_subtitleversion_is_forked__add_field_subtitlelanguage_.py | 5 | 20292 | # 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):
# Adding field 'SubtitleVersion.is_forked'
db.add_column('videos_subtitleversion', 'is_forked', self.g... | agpl-3.0 | 8,544,339,602,614,510,000 | 78.889764 | 172 | 0.555293 | false |
dischinator/pyload | module/plugins/hooks/SkipRev.py | 4 | 3016 | # -*- coding: utf-8 -*-
import re
from module.PyFile import PyFile
from module.plugins.internal.Addon import Addon
class SkipRev(Addon):
__name__ = "SkipRev"
__type__ = "hook"
__version__ = "0.37"
__status__ = "testing"
__config__ = [("activated", "bool" , "Activated" ... | gpl-3.0 | -8,606,556,976,885,780,000 | 34.482353 | 106 | 0.507626 | false |
fentas/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/cmake.py | 123 | 7236 | # Copyright (C) 2012 Intel Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | -3,950,742,356,907,028,000 | 47.24 | 114 | 0.621338 | false |
stackforge/cloudbase-init | cloudbaseinit/tests/metadata/services/test_nocloudservice.py | 1 | 9767 | # Copyright 2020 Cloudbase Solutions Srl
#
# 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 l... | apache-2.0 | 2,213,590,478,950,928,000 | 34.908088 | 79 | 0.549503 | false |
zenmoto/splunk-ref-pas-code | spikes/googledrive_addon/bin/splunklib/searchcommands/decorators.py | 5 | 10708 | # Copyright 2011-2014 Splunk, Inc.
#
# 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 wri... | apache-2.0 | 5,928,008,961,594,241,000 | 32.151703 | 123 | 0.577792 | false |
cgroll/j_r_docker | launcher/windows/python/Lib/filecmp.py | 110 | 9588 | """Utilities for comparing files and directories.
Classes:
dircmp
Functions:
cmp(f1, f2, shallow=1) -> int
cmpfiles(a, b, common) -> ([], [], [])
"""
import os
import stat
from itertools import ifilter, ifilterfalse, imap, izip
__all__ = ["cmp","dircmp","cmpfiles"]
_cache = {}
BUFSIZE=8*1024
def cmp(... | mit | 6,159,925,190,720,770,000 | 31.391892 | 84 | 0.572695 | false |
kenglishhi/gae-django-sandbox | django/contrib/sessions/backends/base.py | 90 | 9240 | import base64
import os
import random
import sys
import time
from datetime import datetime, timedelta
try:
import cPickle as pickle
except ImportError:
import pickle
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.utils.hashcompat import md5_constructor
# Us... | apache-2.0 | 1,615,816,144,211,927,300 | 31.195122 | 86 | 0.604545 | false |
LeeYiFang/Carkinos | src/probes/views.py | 1 | 122212 | from django.shortcuts import render,render_to_response
from django.http import HttpResponse, Http404,JsonResponse
from django.views.decorators.http import require_GET
from .models import Dataset, CellLine, ProbeID, Sample, Platform, Clinical_Dataset,Clinical_sample,Gene
from django.template import RequestContext
from d... | mit | -1,586,038,723,568,720,100 | 43.075036 | 175 | 0.50397 | false |
chaosk/trinitee | trinitee/wiki/views.py | 1 | 6179 | from datetime import datetime
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, redirect
from django.contrib import messages
from django.http import Http404, HttpResponseForbidden
from django.template.response import TemplateResponse
from reversion import revision
from reversi... | bsd-3-clause | 3,111,516,469,836,567,600 | 29.289216 | 70 | 0.70772 | false |
elahejalalpour/ELRyu | ryu/services/protocols/bgp/operator/commands/set.py | 51 | 2182 | import logging
from ryu.services.protocols.bgp.operator.command import Command
from ryu.services.protocols.bgp.operator.command import CommandsResponse
from ryu.services.protocols.bgp.operator.command import STATUS_OK
from ryu.services.protocols.bgp.operator.command import STATUS_ERROR
from ryu.services.protocols.bgp.... | apache-2.0 | 3,253,670,541,293,088,000 | 30.623188 | 79 | 0.607241 | false |
yencarnacion/jaikuengine | .google_appengine/lib/cherrypy/cherrypy/tutorial/tut10_http_errors.py | 36 | 2826 | """
Tutorial: HTTP errors
HTTPError is used to return an error response to the client.
CherryPy has lots of options regarding how such errors are
logged, displayed, and formatted.
"""
import os
localDir = os.path.dirname(__file__)
curpath = os.path.normpath(os.path.join(os.getcwd(), localDir))
import cherrypy
cl... | apache-2.0 | -411,551,758,686,231,700 | 33.888889 | 85 | 0.602619 | false |
olapaola/olapaola-android-scripting | python/src/Tools/freeze/winmakemakefile.py | 39 | 4824 | import sys, os
# Template used then the program is a GUI program
WINMAINTEMPLATE = """
#include <windows.h>
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmd... | apache-2.0 | -7,540,953,272,769,949,000 | 32.041096 | 97 | 0.572968 | false |
insomnia-lab/calibre | src/calibre/ebooks/metadata/lrx.py | 10 | 2432 | #!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
'''
Read metadata from LRX files
'''
import struct
from zlib import decompress
from lxml import etree
from calibre.ebooks.metadata import MetaInformation, string_to_authors
... | gpl-3.0 | -1,053,442,505,069,345,700 | 28.658537 | 71 | 0.574836 | false |
JohnGriffiths/nipype | nipype/utils/onetime.py | 16 | 2548 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Descriptor support for NIPY.
Utilities to support special Python descriptors [1,2], in particular the use of
a useful pattern for properties we call 'one time properties'. These are
object attributes w... | bsd-3-clause | 2,034,723,094,597,288,700 | 30.45679 | 79 | 0.635008 | false |
carlos-ferras/Sequence-ToolKit | view/dialogs/about/ui_credits.py | 1 | 4861 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/krl1to5/Work/FULL/Sequence-ToolKit/2016/resources/ui/dialogs/about/credits.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui... | gpl-3.0 | -3,694,349,771,710,376,000 | 90.660377 | 439 | 0.706258 | false |
chrislit/abydos | abydos/distance/_rogot_goldberg.py | 1 | 4654 | # 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 | -1,071,463,639,137,194,000 | 28.0875 | 78 | 0.569188 | false |
ngaranko/bak | bak/projects/management/commands/backup.py | 1 | 1064 | from django.core.management.base import BaseCommand
from django.core.management.base import CommandError
from bak.projects.models import Project
from bak.actions.dump_db import dump_database
from bak.actions.dump_directory import rsync_directory
from bak.actions.exceptions import ActionError
class Command(BaseCommand... | gpl-2.0 | -3,409,112,878,703,964,000 | 34.466667 | 74 | 0.593985 | false |
KiChjang/servo | tests/wpt/web-platform-tests/fetch/api/resources/redirect.py | 7 | 2869 | import time
from six.moves.urllib.parse import urlencode, urlparse
from wptserve.utils import isomorphic_decode, isomorphic_encode
def main(request, response):
stashed_data = {b'count': 0, b'preflight': b"0"}
status = 302
headers = [(b"Content-Type", b"text/plain"),
(b"Cache-Control", b"no... | mpl-2.0 | -1,637,259,686,932,726,000 | 39.408451 | 94 | 0.595678 | false |
sumitsourabh/opencog | opencog/python/pln/rules/context_rules_old.py | 32 | 2706 | from opencog.atomspace import types, TruthValue
import formulas
from pln.rule import Rule
# Todo:
# It may be better to use SubsetLinks instead of ContextLinks, or at
# least implicitly convert them.
# (Context C x).tv = (Subset C x).tv
# (Context C: Subset x y).tv = (Subset (x AND C) (y AND C))
# DeductionRule prod... | agpl-3.0 | 800,855,428,334,231,400 | 28.413043 | 75 | 0.613082 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.