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 |
|---|---|---|---|---|---|---|---|---|---|---|
Suite5/DataColibri | articles/migrations/0001_initial.py | 10 | 13440 | # 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 model 'Tag'
db.create_table('articles_tag', (
('id', self.gf('django.db.models.fields... | mit | 8,652,920,357,814,581,000 | 64.242718 | 191 | 0.580952 | false |
pombreda/fs-googledrive | test_googledrivefs.py | 1 | 3955 | # -*- coding: utf-8 -*-
from __future__ import (print_function, division,
absolute_import, unicode_literals)
import unittest
from mock import Mock
from pytest import fixture
from oauth2client.client import OAuth2Credentials
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDri... | gpl-2.0 | -7,381,709,161,170,457,000 | 44.988372 | 801 | 0.647788 | false |
vaygr/ansible | lib/ansible/module_utils/k8s/raw.py | 30 | 8686 | #
# Copyright 2018 Red Hat | Ansible
#
# 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.
#
# ... | gpl-3.0 | 6,600,243,783,054,078,000 | 40.165877 | 118 | 0.586116 | false |
ubc/edx-platform | lms/lib/comment_client/user.py | 144 | 6343 | from .utils import merge_dict, perform_request, CommentClientRequestError
import models
import settings
class User(models.Model):
accessible_fields = [
'username', 'follower_ids', 'upvoted_ids', 'downvoted_ids',
'id', 'external_id', 'subscribed_user_ids', 'children', 'course_id',
'group_... | agpl-3.0 | 6,615,430,159,723,928,000 | 36.755952 | 117 | 0.583478 | false |
morucci/repoxplorer | repoxplorer/auth/__init__.py | 1 | 7152 | # Copyright 2019, Matthieu Huin
# Copyright 2019, Red Hat
#
# 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 applic... | apache-2.0 | -2,327,107,811,699,455,000 | 39.868571 | 79 | 0.623043 | false |
ajose01/rethinkdb | test/interface/metadata_persistence.py | 29 | 2500 | #!/usr/bin/env python
# Copyright 2010-2014 RethinkDB, all rights reserved.
from __future__ import print_function
import sys, os, time
startTime = time.time()
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, scenario_common, utils, vcoptparse
op = v... | agpl-3.0 | 9,140,369,993,927,767,000 | 38.0625 | 153 | 0.6836 | false |
sebrandon1/neutron | neutron/tests/unit/agent/linux/test_ip_link_support.py | 38 | 7364 | # Copyright 2014 Mellanox Technologies, Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -5,817,444,157,821,414,000 | 39.461538 | 74 | 0.479902 | false |
ATIX-AG/ansible | lib/ansible/modules/monitoring/datadog_monitor.py | 25 | 13345 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Sebastian Kornehl <sebastian.kornehl@asideas.de>
# 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_vers... | gpl-3.0 | -2,195,777,915,135,692,300 | 38.717262 | 159 | 0.638291 | false |
Arafatk/sympy | sympy/polys/densebasic.py | 92 | 36015 | """Basic tools for dense recursive polynomials in ``K[x]`` or ``K[X]``. """
from __future__ import print_function, division
from sympy.core import igcd
from sympy import oo
from sympy.polys.monomials import monomial_min, monomial_div
from sympy.polys.orderings import monomial_key
from sympy.core.compatibility import... | bsd-3-clause | -417,864,396,992,419,840 | 18.116242 | 82 | 0.468943 | false |
ALISCIFP/tensorflow-resnet-segmentation | convert_mhd2jpg_png_LUNA16.py | 1 | 3214 | #!/usr/bin/env python
# This script belongs to https://github.com/
# this script convert LUNA 16 mhd file to RGB-jpg file.
__author__ = "Zengming Shen,Email:szm0219@gmail.com"
import os,glob
import argparse
import numpy as np
import SimpleITK as sitk
from PIL import Image
import cv2
import scipy.misc
DATA_DIRE... | mit | -5,409,096,295,083,091,000 | 29.903846 | 148 | 0.615432 | false |
theguardian/KodiDB | cherrypy/_cpdispatch.py | 39 | 24149 | """CherryPy dispatchers.
A 'dispatcher' is the object which looks up the 'page handler' callable
and collects config for the current request based on the path_info, other
request attributes, and the application architecture. The core calls the
dispatcher as early as possible, passing it a 'path_info' argument.
The de... | gpl-2.0 | 5,562,146,750,668,525,000 | 36.970126 | 104 | 0.592405 | false |
criccomini/airflow | airflow/example_dags/example_skip_dag.py | 14 | 1865 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | -5,657,619,431,137,434,000 | 30.610169 | 89 | 0.738338 | false |
poryfly/scikit-learn | sklearn/kernel_ridge.py | 155 | 6545 | """Module :mod:`sklearn.kernel_ridge` implements kernel ridge regression."""
# Authors: Mathieu Blondel <mathieu@mblondel.org>
# Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# License: BSD 3 clause
import numpy as np
from .base import BaseEstimator, RegressorMixin
from .metrics.pairwise import pairwise... | bsd-3-clause | 5,534,036,230,444,517,000 | 34.765027 | 79 | 0.616196 | false |
jeffmarcom/checkbox | checkbox_gtk/hyper_text_view.py | 2 | 4689 | #
# This file is part of Checkbox.
#
# Copyright 2008 Canonical Ltd.
#
# Checkbox 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.
#
# C... | gpl-3.0 | 1,305,901,743,856,613,400 | 40.131579 | 123 | 0.610578 | false |
reyha/zulip | zerver/views/pointer.py | 11 | 1988 | from __future__ import absolute_import
from django.core.exceptions import ValidationError
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from six import text_type
from zerver.decorator import to_non_negative_int
from zerver.lib.actions import do_update_pointer
fro... | apache-2.0 | -1,106,144,610,460,456,000 | 35.814815 | 97 | 0.692656 | false |
shellyw19-meet/meet2017y1final-proj | showcase.py | 1 | 13266 | ### Shelly's code
import turtle
import random
import time
SIZE_X=1300
SIZE_Y=750
turtle.setup(SIZE_X,SIZE_Y)
UP_EDGE = SIZE_Y/2
DOWN_EDGE = -SIZE_Y/2
RIGHT_EDGE = SIZE_X/2
LEFT_EDGE = -SIZE_X/2
#how far the snake moves
SQUARE_SIZE=40
pos_list=[]
turtle.tracer(1,0)
#def first_screen():
w = turtle.clone()
turtle.bg... | mit | 2,420,007,856,340,504,000 | 23.612245 | 127 | 0.586386 | false |
synconics/odoo | addons/account_payment/__init__.py | 436 | 1279 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -5,362,979,987,094,659,000 | 38.96875 | 78 | 0.573104 | false |
ensemblr/llvm-project-boilerplate | include/llvm/utils/lit/lit/util.py | 3 | 9754 | import errno
import itertools
import math
import os
import platform
import signal
import subprocess
import sys
import threading
def to_bytes(str):
# Encode to UTF-8 to get binary data.
return str.encode('utf-8')
def to_string(bytes):
if isinstance(bytes, str):
return bytes
return to_bytes(byte... | mit | -5,832,508,073,166,578,000 | 32.290102 | 83 | 0.580275 | false |
snava10/sqlRunner | websqlrunner/websqlrunner/views.py | 1 | 3365 | import datetime
import re
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.shortcuts import redirect
from .core.sqlRunner import *
from .core.SqlRunnerThread import *
from .forms import SqlScriptForm
from .forms import RunForm
... | apache-2.0 | 5,661,288,072,208,293,000 | 32.65 | 100 | 0.614264 | false |
liamf/suds | suds/bindings/binding.py | 191 | 19047 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | lgpl-3.0 | -8,751,945,274,539,019,000 | 34.405204 | 87 | 0.569434 | false |
wenjoy/homePage | node_modules/geetest/node_modules/request/node_modules/karma/node_modules/optimist/node_modules/tap/node_modules/yamlish/yamlish-py/test/__init__.py | 161 | 3430 | # -*- coding: utf-8 -*- IGNORE:C0111
from __future__ import absolute_import, print_function, unicode_literals
import logging
import yamlish
import yaml
import tempfile
import textwrap
INPUT = 1
OUTPUT = 2
if yamlish.py3k:
unicode = str
#logging.basicConfig(level=logging.DEBUG)
def _generate_test_name(source):... | mit | 7,560,231,898,189,568,000 | 32.300971 | 77 | 0.549854 | false |
pcarrier/linux | tools/perf/scripts/python/compaction-times.py | 958 | 7950 | # report time spent in compaction
# Licensed under the terms of the GNU GPL License version 2
# testing:
# 'echo 1 > /proc/sys/vm/compact_memory' to force compaction of all zones
import os
import sys
import re
import signal
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
usage = "usage: perf script report compaction-... | gpl-2.0 | 5,668,654,525,239,555,000 | 24.562701 | 130 | 0.649811 | false |
evax/ansible-modules-core | cloud/amazon/ec2_vol.py | 50 | 15330 | #!/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 | -1,062,248,617,243,396,200 | 32.253796 | 270 | 0.614155 | false |
tarc/gyp | test/mac/gyptest-lto.py | 69 | 2050 | #!/usr/bin/env python
# Copyright (c) 2015 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that LTO flags work.
"""
import TestGyp
import os
import re
import subprocess
import sys
if sys.platform == 'darwin':
test... | bsd-3-clause | 7,805,014,245,021,200,000 | 30.538462 | 72 | 0.597073 | false |
jjdicharry/godot | tools/scripts/makeargs.py | 50 | 1945 |
text="""
#define FUNC$numR(m_r,m_func,$argt)\\
virtual m_r m_func($argtp) { \\
if (Thread::get_caller_ID()!=server_thread) {\\
m_r ret;\\
command_queue.push_and_ret( visual_server, &VisualServer::m_func,$argp,&ret);\\
return ret;\\
} else {\\
return visual_server->m_func($argp);\\
}\\
}
#define FU... | mit | -7,330,262,224,962,121,000 | 21.102273 | 91 | 0.575835 | false |
angelmtenor/IDSFC | L1_intro/H_olympics_medal_points.py | 1 | 1606 | import numpy as np
from pandas import DataFrame
def numpy_dot():
"""
Imagine a point system in which each country is awarded 4 points for each
gold medal, 2 points for each silver medal, and one point for each
bronze medal.
Using the numpy.dot function, create a new dataframe called
'oly... | mit | 6,231,642,565,624,961,000 | 41.263158 | 93 | 0.581569 | false |
karban/field | resources/python/rope/base/oi/__init__.py | 112 | 1684 | """Rope object analysis and inference package
Rope makes some simplifying assumptions about a python program. It
assumes that a program only performs assignments and function calls.
Tracking assignments is simple and `PyName` objects handle that. The
main problem is function calls. Rope uses these two approaches fo... | gpl-2.0 | -5,128,744,767,208,530,000 | 43.315789 | 70 | 0.789192 | false |
rgerkin/python-neo | neo/test/coretest/test_block.py | 1 | 32775 | # -*- coding: utf-8 -*-
"""
Tests of the neo.core.block.Block class
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division, print_function
from datetime import datetime
from copy import deepcopy
import unittest
import numpy as np
try:
from IPython.lib.pretty import pretty
exce... | bsd-3-clause | 1,990,102,301,567,499,000 | 38.631197 | 81 | 0.559878 | false |
yoyo2k/l10n-romania | account_compensation_vat_on_payment/account_compensation.py | 2 | 10256 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012 Domsense s.r.l. (<http://www.domsense.com>).
# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
#
# This program is ... | agpl-3.0 | -6,054,684,893,767,761,000 | 50.537688 | 195 | 0.523498 | false |
mganeva/mantid | scripts/Interface/reduction_gui/widgets/inelastic/dgs_pd_sc_conversion.py | 1 | 5097 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
from __future__... | gpl-3.0 | -2,858,507,349,164,029,400 | 43.321739 | 112 | 0.64332 | false |
jualvarez/charlex | 03-Bonus/charlexapi/charlas/models.py | 2 | 2443 | from django.db import models
from django.conf import settings
class Orador(models.Model):
class Meta:
verbose_name = "orador"
verbose_name_plural = "oradores"
nombre = models.CharField(verbose_name='nombre', max_length=100)
bio = models.TextField(verbose_name='curriculum vitae')
foto... | gpl-3.0 | -708,000,062,447,423,600 | 29.5 | 95 | 0.663934 | false |
vicente-gonzalez-ruiz/QSVC | trunk/src/old_py/motion_expand_COPIA_SIN_LIST.py | 1 | 4326 | #!/usr/bin/python
# -*- coding: iso-8859-15 -*-
# motion_expand.py
# Descomprime los datos con el movimiento.
import os
import sys
from GOP import GOP
from subprocess import check_call
from subprocess import CalledProcessError
from MCTF_parser import MCTF_parser
#MOTION_DECODER_NAME = "gzip"
#MOTION_DECODER_NAME = "... | gpl-2.0 | 6,844,768,240,237,397,000 | 28.630137 | 88 | 0.574434 | false |
anhaidgroup/py_entitymatching | benchmarks/benchmark_sn_blocker.py | 1 | 11105 | # Write the benchmarking functions here.
# See "Writing benchmarks" in the asv docs for more information.
import os
import sys
import py_entitymatching as mg
p = mg.get_install_path()
datasets_path = os.sep.join([p, 'datasets', 'example_datasets'])
snb = mg.SortedNeighborhood... | bsd-3-clause | 2,245,673,775,480,971,000 | 35.771523 | 80 | 0.535795 | false |
sencha/chromium-spacewalk | third_party/closure_compiler/processor_test.py | 33 | 3425 | #!/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.
"""Test resources processing, i.e. <if> and <include> tag handling."""
import unittest
from processor import FileCache, Processor, Lin... | bsd-3-clause | -3,318,801,330,395,282,400 | 29.04386 | 72 | 0.677664 | false |
openstack-dev/devstack | roles/write-devstack-local-conf/library/devstack_local_conf.py | 3 | 12720 | # Copyright (C) 2017 Red Hat, 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 writ... | apache-2.0 | -1,782,150,664,127,316,500 | 35.239316 | 79 | 0.535299 | false |
AndroidOpenDevelopment/android_external_chromium_org | mojo/public/tools/bindings/generators/mojom_cpp_generator.py | 8 | 9880 | # 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.
"""Generates C++ source files from a mojom.Module."""
import mojom.generate.generator as generator
import mojom.generate.module as mojom
import mojom.genera... | bsd-3-clause | 7,320,768,438,576,670,000 | 33.545455 | 80 | 0.697267 | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Sphinx-1.2.3-py2.7.egg/sphinx/config.py | 11 | 10843 | # -*- coding: utf-8 -*-
"""
sphinx.config
~~~~~~~~~~~~~
Build configuration file handling.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import re
import sys
from os import path
from sphinx.errors import ConfigError
from sp... | apache-2.0 | -2,239,708,325,841,953,500 | 37.179577 | 80 | 0.515448 | false |
daviddao/luminosity | sklearn-server/flask/lib/python2.7/site-packages/werkzeug/serving.py | 116 | 25317 | # -*- coding: utf-8 -*-
"""
werkzeug.serving
~~~~~~~~~~~~~~~~
There are many ways to serve a WSGI application. While you're developing
it you usually don't want a full blown webserver like Apache but a simple
standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in
the standa... | bsd-3-clause | 4,549,302,009,272,451,000 | 36.618128 | 81 | 0.596121 | false |
lambdamusic/testproject | konproj/libs/django_extensions/management/commands/runscript.py | 5 | 5776 | from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from optparse import make_option
import sys
import os
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
def vararg_callback(option, opt_str, opt_value, parser):
parser.rargs.... | gpl-2.0 | 1,356,080,805,958,714,000 | 35.556962 | 96 | 0.515409 | false |
oiertwo/vampyr | pdftoexcel.py | 1 | 8194 | __author__ = 'oier'
import os
import numpy as np
from data.parameters import true_params
from data.parameters import false_params
import distance as dist
import numpy as np
def pdftotext(path):
os.system("pdftotext {data}".format(data=path))
return(path.replace(".pdf",".txt"))
import pandas as pd
def parse(p... | mit | -6,777,632,973,228,448,000 | 24.84858 | 105 | 0.461679 | false |
russdill/juniper-vpn-py | tncc.py | 1 | 22051 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import logging
import StringIO
import mechanize
import cookielib
import struct
import socket
import ssl
import base64
import collections
import zlib
import HTMLParser
import socket
import netifaces
import urlgrabber
import urllib2
import platform
import js... | lgpl-2.1 | 5,726,034,952,718,490,000 | 33.347352 | 125 | 0.539749 | false |
cjayb/mne-python | mne/datasets/tests/test_datasets.py | 6 | 6158 | import os
from os import path as op
import shutil
import zipfile
import sys
import pytest
from mne import datasets, read_labels_from_annot, write_labels_to_annot
from mne.datasets import testing
from mne.datasets._fsaverage.base import _set_montage_coreg_path
from mne.datasets.utils import _manifest_check_download
f... | bsd-3-clause | -5,556,583,623,025,122,000 | 38.474359 | 79 | 0.620656 | false |
wufangjie/leetcode | 640. Solve the Equation.py | 1 | 1269 | class Solution(object):
def solveEquation(self, equation):
"""
:type equation: str
:rtype: str
"""
left, right = equation.split('=')
a1, b1 = self._parse(left)
a2, b2 = self._parse(right)
if a1 == a2:
if b1 == b2:
return "In... | gpl-3.0 | -166,488,784,348,331,420 | 31.538462 | 62 | 0.463357 | false |
Pointedstick/ReplicatorG | skein_engines/skeinforge-35/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py | 6 | 4607 | """
This page is in the table of contents.
The gts.py script is an import translator plugin to get a carving from an gts file.
An import plugin is a script in the interpret_plugins folder which has the function getCarving. It is meant to be run from the interpret tool. To ensure that the plugin works on platforms wh... | gpl-2.0 | -3,633,897,840,715,864,600 | 48.010638 | 441 | 0.763186 | false |
zooba/PTVS | Python/Tests/TestData/VirtualEnv/env/Lib/encodings/cp852.py | 593 | 35258 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP852.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | apache-2.0 | 3,126,205,067,138,561,500 | 49.512894 | 97 | 0.608231 | false |
arangodb/arangodb | 3rdParty/rocksdb/6.8/tools/advisor/advisor/db_options_parser.py | 14 | 16518 | # Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
# This source code is licensed under both the GPLv2 (found in the
# COPYING file in the root directory) and Apache 2.0 License
# (found in the LICENSE.Apache file in the root directory).
import copy
from advisor.db_log_parser import DataSource, NO_C... | apache-2.0 | 3,116,506,955,234,241,500 | 45.139665 | 79 | 0.51792 | false |
vlaznev/gui_plotter | plot_window/color_picker.py | 1 | 1419 | __author__ = 'user'
from PyQt4 import Qt, QtGui
class QColorComboBox(QtGui.QComboBox):
ColorNames = ["darkGreen", "green", "gray", "red", "white", "blue", "cyan", "darkMagenta", "yellow",
"darkRed", "black", "magenta"]
ColorRole = Qt.Qt.UserRole + 1
def __init__(self, parent=None):
... | mit | -48,099,799,798,734,580 | 30.533333 | 104 | 0.582805 | false |
Fritz449/SRLF | models/feed_forward.py | 1 | 5832 | import tensorflow as tf
import os
import sys
sys.path.append(os.path.realpath(".."))
from helpers.layers import denselayer
from models.base_model import BaseModel
import numpy as np
class FeedForward(BaseModel):
def __init__(self, sess, args):
BaseModel.__init__(self, sess)
self.n_hiddens = arg... | apache-2.0 | -8,037,661,740,209,013,000 | 42.522388 | 117 | 0.592078 | false |
Stefan-Schmidt/linux-wpan-next | tools/power/pm-graph/analyze_boot.py | 84 | 31499 | #!/usr/bin/python
#
# Tool for analyzing boot timing
# Copyright (c) 2013, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is dis... | gpl-2.0 | -6,030,210,531,176,947,000 | 30.125494 | 222 | 0.640147 | false |
sqlobject/sqlobject | sqlobject/sqlite/sqliteconnection.py | 2 | 16587 | import base64
import os
try:
from _thread import get_ident
except ImportError:
from thread import get_ident
try:
from urllib import quote
except ImportError:
from urllib.parse import quote
from sqlobject import col
from sqlobject import dberrors
from sqlobject.dbconnection import DBAPI, Boolean
sqlite... | lgpl-2.1 | -5,854,149,150,050,310,000 | 36.358108 | 79 | 0.544764 | false |
OrmondHugh/2048Bot | src/src/utility.py | 1 | 3044 | import readBoard as rb
import State
import copy
def getPossibilities(state):
possibilities = []
#Loop through each tile to find the spaces that can be filled by a spawning tile
for i in range(4):
for j in range(4):
#If we find an empty space, add a child to children where a two is spawned, and a ... | mit | 3,313,365,850,199,771,600 | 26.46729 | 114 | 0.624179 | false |
mcfletch/AutobahnPython | autobahn/autobahn/websocket/interfaces.py | 10 | 11716 | ###############################################################################
##
## Copyright (C) 2013-2014 Tavendo GmbH
##
## 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
##
## h... | apache-2.0 | 7,840,253,424,867,178,000 | 35.049231 | 123 | 0.659696 | false |
jgelens/AutobahnTestSuite | autobahntestsuite/autobahntestsuite/case/case7_1_3.py | 14 | 1670 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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
##
## ht... | apache-2.0 | 7,240,432,347,486,264,000 | 33.531915 | 112 | 0.590419 | false |
KyleMao/simple-ner-ie | .ropeproject/config.py | 387 | 3461 | # The default ``config.py``
def set_prefs(prefs):
"""This function is called before opening the project"""
# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# No... | mit | 1,864,530,390,412,672,500 | 39.717647 | 71 | 0.661947 | false |
myerpengine/odoo | addons/product_extended/__init__.py | 374 | 1068 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 | -4,024,408,698,511,193,600 | 45.434783 | 79 | 0.61985 | false |
mediathread/mdtprint | app/bower_components/phantom/src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/text_format.py | 261 | 21737 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | mit | 5,885,096,438,276,071,000 | 30.457308 | 79 | 0.655426 | false |
zofuthan/airmozilla | airmozilla/surveys/views.py | 9 | 3959 | from collections import defaultdict
from django.shortcuts import get_object_or_404, render, redirect
from django.db import transaction
from django import forms
from .models import Survey, Question, Answer
@transaction.atomic
def load(request, id):
survey = get_object_or_404(Survey, id=id, active=True)
conte... | bsd-3-clause | 156,609,386,087,001,900 | 32.837607 | 78 | 0.532458 | false |
waseem18/bedrock | vendor-local/packages/chardet/chardet/langthaimodel.py | 235 | 11298 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mpl-2.0 | 2,781,892,771,507,009,000 | 55.49 | 74 | 0.541069 | false |
idea4bsd/idea4bsd | python/helpers/pydev/tests_pydevd_python/performance_check.py | 12 | 6676 | import debugger_unittest
import sys
import re
import os
CHECK_BASELINE, CHECK_REGULAR, CHECK_CYTHON = 'baseline', 'regular', 'cython'
class PerformanceWriterThread(debugger_unittest.AbstractWriterThread):
CHECK = None
debugger_unittest.AbstractWriterThread.get_environ # overrides
def get_environ(self):
... | apache-2.0 | 342,902,274,577,849,000 | 37.148571 | 118 | 0.63601 | false |
HyperBaton/ansible | lib/ansible/modules/network/f5/bigip_sys_daemon_log_tmm.py | 38 | 13357 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 6,186,121,262,179,803,000 | 26.093306 | 91 | 0.595493 | false |
Hasimir/brython | www/src/Lib/test/test_with.py | 83 | 26527 | #!/usr/bin/env python3
"""Unit tests for the with statement specified in PEP 343."""
__author__ = "Mike Bland"
__email__ = "mbland at acm dot org"
import sys
import unittest
from collections import deque
from contextlib import _GeneratorContextManager, contextmanager
from test.support import run_unittest
class Mo... | bsd-3-clause | 8,240,573,627,408,270,000 | 34.275266 | 111 | 0.613375 | false |
APCVSRepo/sdl_core | src/3rd_party-static/jsoncpp/scons-tools/globtool.py | 256 | 1667 | import fnmatch
import os
def generate( env ):
def Glob( env, includes = None, excludes = None, dir = '.' ):
"""Adds Glob( includes = Split( '*' ), excludes = None, dir = '.')
helper function to environment.
Glob both the file-system files.
includes: list of file name pattern included i... | bsd-3-clause | -6,193,818,490,681,867,000 | 30.45283 | 84 | 0.54769 | false |
yangleo/cloud-github | openstack_dashboard/dashboards/admin/networks/agents/tests.py | 9 | 7633 | # Copyright 2012 NEC Corporation
# Copyright 2015 Cisco 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
#
# Un... | apache-2.0 | 5,939,888,068,796,748,000 | 45.542683 | 79 | 0.55129 | false |
xtao/code | tools/update_issue.py | 3 | 1349 | # -*- coding: utf-8 -*-
from vilya.libs.store import store
def main():
rs = store.execute("select id, type "
"from issues "
"where type='project'")
for r in rs:
id, _ = r
rs1 = store.execute("select id, project_id, issue_id "
... | bsd-3-clause | -7,259,733,509,700,299,000 | 29.659091 | 62 | 0.368421 | false |
yglazko/socorro | webapp-django/bin/linting.py | 9 | 1558 | #!/usr/bin/env python
"""
Use like this:
find somedir | xargs flake8 | python linting.py
or:
flake8 somedir | python linting.py
or:
git ls-files somedir | python linting.py
"""
import os
import sys
# Enter any part of a warning that we deem OK.
# It can be a pep8 warning error code or any other par... | mpl-2.0 | -4,406,283,696,547,520,000 | 19.773333 | 68 | 0.600128 | false |
DrPantera/gsiege | resistencia/tests/test_round.py | 3 | 5377 | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# This file is part of Resistencia Cadiz 1812.
#
# 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, e... | gpl-3.0 | -8,459,068,154,937,609,000 | 34.375 | 97 | 0.540264 | false |
blackzw/openwrt_sdk_dev1 | staging_dir/host/lib/python2.7/compileall.py | 144 | 7763 | """Module/script to byte-compile all .py files to .pyc (or .pyo) files.
When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
recursing into directories.
Without arguments, if compiles all modules on sys.path, without
recursing into subdir... | gpl-2.0 | -8,446,471,044,155,858,000 | 33.198238 | 80 | 0.526343 | false |
chromium/chromium | third_party/blink/tools/blinkpy/w3c/test_importer.py | 5 | 28640 | # 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.
"""Fetches a copy of the latest state of a W3C test repository and commits.
If this script is given the argument --auto-update, it will also:
1. Upload a CL... | bsd-3-clause | 8,107,221,156,276,999,000 | 40.871345 | 104 | 0.617493 | false |
aliclark/libquic | src/third_party/protobuf/objectivec/DevTools/pddm_tests.py | 66 | 16785 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2015 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
... | bsd-3-clause | 3,504,362,308,927,901,700 | 31.592233 | 134 | 0.614001 | false |
tianzhihen/python-mode | pymode/libs/pylama/lint/pylama_pyflakes/pyflakes/messages.py | 42 | 3808 | """
Provide the class Message and its subclasses.
"""
class Message(object):
message = ''
message_args = ()
def __init__(self, filename, loc):
self.filename = filename
self.lineno = loc.lineno
self.col = getattr(loc, 'col_offset', 0)
def __str__(self):
return '%s:%s: ... | lgpl-3.0 | -2,205,412,686,024,001,500 | 27.207407 | 77 | 0.623687 | false |
sienatime/python_koans | python2/libs/colorama/win32.py | 86 | 2730 |
# from winbase.h
STDOUT = -11
STDERR = -12
try:
from ctypes import windll
except ImportError:
windll = None
SetConsoleTextAttribute = lambda *_: None
else:
from ctypes import (
byref, Structure, c_char, c_short, c_uint32, c_ushort
)
handles = {
STDOUT: windll.kernel32.GetStdHa... | mit | 4,412,570,073,133,768,700 | 27.736842 | 76 | 0.595604 | false |
2015fallproject/2015fallcase1 | static/Brython3.2.0-20150701-214155/Lib/heapq.py | 628 | 18065 | """Heap queue algorithm (a.k.a. priority queue).
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
all k, counting elements from 0. For the sake of comparison,
non-existing elements are considered to be infinite. The interesting
property of a heap is that a[0] is always its smallest element.
Usag... | agpl-3.0 | -6,920,392,999,057,494,000 | 36.870021 | 81 | 0.646701 | false |
RT-Thread/rt-thread | bsp/qemu-vexpress-a9/rtconfig.py | 11 | 2352 | import os
import uuid
def get_mac_address():
mac=uuid.UUID(int = uuid.getnode()).hex[-12:]
return "#define AUTOMAC".join([str(int(e/2) + 1) + ' 0x' + mac[e:e+2] + '\n' for e in range(5,11,2)])
header = '''
#ifndef __MAC_AUTO_GENERATE_H__
#define __MAC_AUTO_GENERATE_H__
/* Automatically generated file; DO ... | apache-2.0 | 145,130,191,266,513,860 | 26.034483 | 106 | 0.574405 | false |
2013Commons/hue | desktop/core/ext-py/tablib-develop/tablib/packages/openpyxl/shared/exc.py | 118 | 2259 | # file openpyxl/shared/exc.py
# Copyright (c) 2010 openpyxl
#
# 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, mod... | apache-2.0 | 2,244,202,596,040,726,300 | 37.288136 | 79 | 0.762727 | false |
loic/django | tests/middleware/test_security.py | 4 | 7727 | from django.http import HttpResponse
from django.test import RequestFactory, SimpleTestCase
from django.test.utils import override_settings
class SecurityMiddlewareTest(SimpleTestCase):
@property
def middleware(self):
from django.middleware.security import SecurityMiddleware
return SecurityMid... | bsd-3-clause | 8,942,098,614,826,478,000 | 37.829146 | 97 | 0.63867 | false |
collmot/ardupilot | Tools/LogAnalyzer/tests/TestDupeLogData.py | 21 | 2700 | from __future__ import print_function
from LogAnalyzer import Test,TestResult
import DataflashLog
class TestDupeLogData(Test):
'''test for duplicated data in log, which has been happening on PX4/Pixhawk'''
def __init__(self):
Test.__init__(self)
self.name = "Dupe Log Data"
def __matchSample(self, sample, ... | gpl-3.0 | 2,794,930,126,047,329,300 | 33.177215 | 158 | 0.681111 | false |
2015fallproject/2015fallcase2 | static/Brython3.2.0-20150701-214155/Lib/decimal.py | 623 | 230510 | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz <aahz at pobox.com>
# and Tim Peters
# This module should be kept in sync with ... | agpl-3.0 | 513,497,992,010,984,800 | 34.567042 | 100 | 0.551356 | false |
xcbat/vnpy | examples/CtaBacktesting/runBacktesting.py | 5 | 1089 | # encoding: UTF-8
"""
展示如何执行策略回测。
"""
from __future__ import division
from vnpy.trader.app.ctaStrategy.ctaBacktesting import BacktestingEngine, MINUTE_DB_NAME
if __name__ == '__main__':
from vnpy.trader.app.ctaStrategy.strategy.strategyAtrRsi import AtrRsiStrategy
# 创建回测引擎
engine = BacktestingEng... | mit | 7,037,243,917,143,781,000 | 20.333333 | 88 | 0.649162 | false |
MiLk/ansible | lib/ansible/modules/network/avi/avi_networksecuritypolicy.py | 44 | 4118 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 | 6,513,402,620,016,340,000 | 29.058394 | 99 | 0.628946 | false |
blowekamp/SimpleITK | Examples/AdvancedImageReading/AdvancedImageReading.py | 4 | 3257 | #!/usr/bin/env python
# =========================================================================
#
# Copyright NumFOCUS
#
# 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:/... | apache-2.0 | -7,246,275,664,811,980,000 | 36.011364 | 88 | 0.670556 | false |
kmod/icbd | stdlib/python2.5/ctypes/test/__init__.py | 15 | 6870 | import glob, os, sys, unittest, getopt, time
use_resources = []
class ResourceDenied(Exception):
"""Test skipped because it requested a disallowed resource.
This is raised when a test calls requires() for a resource that
has not be enabled. Resources are defined by test modules.
"""
def is_resource... | mit | -1,031,678,062,843,490,400 | 33.009901 | 87 | 0.572489 | false |
beezee/GAE-Django-site | django/db/backends/postgresql/creation.py | 247 | 3753 | from django.db.backends.creation import BaseDatabaseCreation
from django.db.backends.util import truncate_name
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated PostgreSQL column
# types, as strings. Column-type strings can contain format strings; they'll
... | bsd-3-clause | -1,955,286,500,210,131,700 | 48.381579 | 146 | 0.548095 | false |
SubhasisDutta/subhasisdutta.com | src/controller/WorkAdminController.py | 2 | 10845 | import webapp2
import os
from google.appengine.ext.webapp import template
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.ext import ndb
from google.appengine.api import images
from src.model.WorkModels import Work,PhotoModel,WorkResourceAttribute
class WorkAdminCreate... | mit | -768,249,547,126,028,700 | 43.633745 | 167 | 0.500415 | false |
jarussi/riotpy | riotpy/managers/match_history.py | 1 | 1786 | # coding: utf-8
from riotpy.resources.match import MatchResource
from base import Manager
class MatchHistoryManager(Manager):
"""
We are spliting this one and MatchManager because Riot did it.
That way, our lib is closer to their documentation.
"""
def get_summoner_match_history(self, sum... | bsd-3-clause | -5,487,607,660,670,831,000 | 34.019608 | 87 | 0.570549 | false |
proxysh/Safejumper-for-Desktop | buildlinux/env64/lib/python2.7/site-packages/Crypto/PublicKey/__init__.py | 124 | 1876 | # -*- coding: utf-8 -*-
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# non-exclusive license to e... | gpl-2.0 | 1,403,783,864,913,097,200 | 44.756098 | 71 | 0.60661 | false |
10clouds/edx-platform | cms/djangoapps/course_creators/models.py | 62 | 4060 | """
Table for storing information about whether or not Studio users have course creation privileges.
"""
from django.db import models
from django.db.models.signals import post_init, post_save
from django.dispatch import receiver, Signal
from django.contrib.auth.models import User
from django.utils import timezone
from... | agpl-3.0 | 2,717,426,107,728,951,000 | 40.010101 | 118 | 0.646552 | false |
Gamebasis/3DGamebasisServer | GameData/blender-2.71-windows64/2.71/scripts/addons/game_engine_save_as_runtime.py | 5 | 8665 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -7,549,425,269,370,830,000 | 32.585271 | 111 | 0.594114 | false |
wrightni/OSSP | segment.py | 1 | 6298 | # title: Watershed Transform
# author: Nick Wright
# adapted from: Justin Chen, Arnold Song
import numpy as np
import gc
import warnings
from skimage import filters, morphology, feature, img_as_ubyte
from scipy import ndimage
from ctypes import *
from lib import utils
# For Testing:
from skimage import segmentation
i... | mit | 6,013,892,367,951,991,000 | 40.715232 | 119 | 0.656558 | false |
shaistaansari/django | django/db/backends/base/schema.py | 339 | 43421 | import hashlib
import logging
from django.db.backends.utils import truncate_name
from django.db.transaction import atomic
from django.utils import six
from django.utils.encoding import force_bytes
logger = logging.getLogger('django.db.backends.schema')
def _related_non_m2m_objects(old_field, new_field):
# Filte... | bsd-3-clause | 1,051,814,205,494,674,800 | 45.890929 | 113 | 0.578867 | false |
toshywoshy/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_certificate_info.py | 25 | 3570 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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__ = ty... | gpl-3.0 | 4,173,002,048,607,667,700 | 29.254237 | 141 | 0.684034 | false |
FRidh/Sea | Sea/adapter/couplings/Coupling.py | 2 | 3004 | import abc
import logging
import Sea
import numpy as np
from ..base import Base
class Coupling(Base):
"""
Abstract base class for all :mod:`Sea.adapter.couplings` classes.
"""
__metaclass__ = abc.ABCMeta
def __init__(self, obj, connection, subsystem_from, subsystem_to):
Base.__init__(... | bsd-3-clause | 8,337,189,614,351,210,000 | 38.025974 | 142 | 0.625166 | false |
gtacoin-dev/gtacoin | qa/rpc-tests/test_framework/comptool.py | 1 | 18090 | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Gtacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from .mininode import *
from .blockstore import BlockStore, TxStore
from .util import p2p_port
'''
This ... | mit | 1,838,214,201,828,971,800 | 44.112219 | 145 | 0.585627 | false |
NL66278/odoo | addons/resource/faces/plocale.py | 433 | 1910 | ############################################################################
# Copyright (C) 2005 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free software; you can redistribute it and/or modify
# ... | agpl-3.0 | 4,346,833,483,868,535,000 | 33.107143 | 76 | 0.577487 | false |
arrabito/DIRAC | FrameworkSystem/private/standardLogging/Formatter/ColoredBaseFormatter.py | 4 | 2106 | """
ColoredBaseFormatter
"""
__RCSID__ = "$Id$"
import sys
from DIRAC.FrameworkSystem.private.standardLogging.Formatter.BaseFormatter import BaseFormatter
class ColoredBaseFormatter(BaseFormatter):
"""
ColoredBaseFormatter is used to format log record to create a string representing a log message.
It is bas... | gpl-3.0 | -4,829,345,305,667,525,000 | 31.4 | 113 | 0.639126 | false |
TheBigW/DRC | XMLSerializer.py | 1 | 4179 | # -*- coding: utf-8 -*-
import lxml.etree as ET
class Serializer(object):
def __init__(self):
return None
@staticmethod
def getSerializeMembers(SerializeObject):
strSerializeMembers = []
for member in dir(SerializeObject):
strMember = str(member)
strType = ... | gpl-3.0 | 6,235,422,881,603,661,000 | 39.182692 | 79 | 0.622158 | false |
luiseduardohdbackup/odoo | openerp/modules/registry.py | 220 | 19731 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -5,729,547,210,829,207,000 | 38.541082 | 126 | 0.58588 | false |
EDUlib/edx-platform | lms/djangoapps/mobile_api/tests/test_middleware.py | 5 | 7822 | """
Tests for Version Based App Upgrade Middleware
"""
from datetime import datetime
from unittest import mock
import ddt
from django.core.cache import caches
from django.http import HttpRequest, HttpResponse
from pytz import UTC
from lms.djangoapps.mobile_api.middleware import AppVersionUpgrade
from lms.djangoapps... | agpl-3.0 | -3,368,105,167,040,972,300 | 47.283951 | 119 | 0.643697 | false |
adamrp/qiime | scripts/compare_alpha_diversity.py | 15 | 12087 | #!/usr/bin/env python
# File created on 06 Jun 2011
from __future__ import division
__author__ = "William Van Treuren"
__copyright__ = "Copyright 2011, The QIIME project"
__credits__ = ["William Van Treuren", "Greg Caparaso", "Jai Ram Rideout"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "William Va... | gpl-2.0 | 6,847,303,833,885,605,000 | 50.653846 | 165 | 0.601555 | false |
GameKinger123x/mtasa-blue | vendor/google-breakpad/src/testing/gtest/test/gtest_test_utils.py | 408 | 10444 | #!/usr/bin/env python
#
# Copyright 2006, 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, this list... | gpl-3.0 | 5,013,386,302,030,868,000 | 33.242623 | 79 | 0.672731 | false |
ettrig/NIPAP | nipap/nipap/errors.py | 2 | 1301 |
class NipapError(Exception):
""" NIPAP base error class.
"""
error_code = 1000
class NipapInputError(NipapError):
""" Erroneous input.
A general input error.
"""
error_code = 1100
class NipapMissingInputError(NipapInputError):
""" Missing input.
Most input is passed ... | mit | -2,064,641,483,649,590,000 | 18.41791 | 80 | 0.661799 | 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.