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 |
|---|---|---|---|---|---|---|---|---|---|---|
ageron/tensorflow | tensorflow/python/kernel_tests/control_flow_util_v2_test.py | 36 | 2273 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,398,086,057,714,020,000 | 34.515625 | 80 | 0.684998 | false |
brianquinlan/learn-machine-learning | well_bouncer/well_bouncer_game.py | 1 | 5000 | # Copyright 2019 Brian Quinlan
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | mit | 6,602,574,090,602,039,000 | 28.585799 | 79 | 0.5776 | false |
timothydmorton/bokeh | examples/plotting/file/color_sliders.py | 24 | 5444 | from bokeh.plotting import figure, hplot, output_file, show
from bokeh.models import ColumnDataSource, LinearColorMapper, HoverTool
from bokeh.models.actions import Callback
from bokeh.models.widgets import Slider
from bokeh.io import vform
import colorsys
# for plot 2: create colour spectrum of resolution N and brig... | bsd-3-clause | -8,848,647,024,332,672,000 | 40.557252 | 169 | 0.682035 | false |
xiangel/hue | desktop/core/ext-py/Pygments-1.3.1/external/rst-directive.py | 47 | 2597 | # -*- coding: utf-8 -*-
"""
The Pygments reStructuredText directive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fragment is a Docutils_ 0.5 directive that renders source code
(to HTML only, currently) via Pygments.
To use it, adjust the options below and copy the code into a module
that you i... | apache-2.0 | -4,492,045,007,262,212,000 | 30.289157 | 80 | 0.67424 | false |
Tranzystorek/servo | tests/wpt/harness/wptrunner/wpttest.py | 58 | 10090 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEFAULT_TIMEOUT = 10 # seconds
LONG_TIMEOUT = 60 # seconds
import os
import mozinfo
from wptmanifest.parser import ... | mpl-2.0 | -7,018,964,911,578,706,000 | 29.668693 | 107 | 0.558077 | false |
cdegroc/scikit-learn | sklearn/datasets/lfw.py | 6 | 16362 | """Loader for the Labeled Faces in the Wild (LFW) dataset
This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:
http://vis-www.cs.umass.edu/lfw/
Each picture is centered on a single face. The typical task is called
Face Veri... | bsd-3-clause | 810,829,671,476,902,700 | 36.613793 | 79 | 0.654382 | false |
andmos/ansible | test/units/modules/network/ingate/test_ig_unit_information.py | 50 | 1986 | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ingate Systems AB
# 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
from units.compat.mock import patch
from ansible.modules.net... | gpl-3.0 | 5,257,955,383,469,042,000 | 34.464286 | 94 | 0.612286 | false |
hellsgate1001/thatforum_django | forumuser/views.py | 1 | 4005 | from django.conf import settings
from django.contrib.auth import get_user_model, authenticate, login as auth_login
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.views import login
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
For... | mit | -1,827,193,543,854,990,000 | 28.666667 | 81 | 0.683895 | false |
vinaymavi/my-stats-appengine-api | helper/user_helper.py | 1 | 1804 | from entities.entities import Device, User
from helper.device_helper import DeviceHelper
from my_stats_messages.my_stats_messages import *
import logging
class UserHelper():
def __init__(self):
logging.info("constructor calling.")
def link_device(self, user, device):
user.devices.append(devic... | mit | -1,805,295,508,085,894,000 | 33.037736 | 87 | 0.588137 | false |
dimara/synnefo | snf-astakos-app/astakos/quotaholder_app/migrations/0010_non_accepted.py | 10 | 28734 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
depends_on = (
("im", "0058_moderation_fix"),
)
def forwards(self, orm):
pass
def backwards(self, orm):
"Write y... | gpl-3.0 | 4,721,953,732,572,590,000 | 81.568966 | 219 | 0.545869 | false |
pamfilos/invenio | modules/webstyle/lib/webdoc.py | 16 | 36364 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN.
##
## 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 version 2 of the
## License, ... | gpl-2.0 | 311,653,050,238,895,170 | 39.404444 | 126 | 0.496205 | false |
lucaotta/bertos | wizard/qvariant_converter_old.py | 7 | 3250 | #!/usr/bin/env python
# encoding: utf-8
#
# This file is part of BeRTOS.
#
# Bertos 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.
#
#... | gpl-2.0 | -1,176,602,702,967,255,300 | 29.373832 | 131 | 0.701538 | false |
tjsavage/tmrwmedia | django/contrib/gis/tests/geoapp/tests.py | 36 | 35330 | import re, os, unittest
from django.db import connection
from django.contrib.gis import gdal
from django.contrib.gis.geos import *
from django.contrib.gis.measure import Distance
from django.contrib.gis.tests.utils import \
no_mysql, no_oracle, no_postgis, no_spatialite, \
mysql, oracle, postgis, spatialite
fro... | bsd-3-clause | 4,056,515,864,434,873,000 | 46.614555 | 227 | 0.619304 | false |
operant/knowledge-management | Server/settings_gui.py | 2 | 6175 | import tkinter as tk
from tkinter import filedialog
from tkinter import *
from tkinter import TOP, E
from Server import home_gui
class SettingsPage(tk.Frame):
def __init__(self, frame, gui):
# parameter: frame
# parameter: gui
"""
Init the frame.
"""
tk.Frame.__i... | mit | -7,072,055,881,282,455,000 | 35.755952 | 116 | 0.565506 | false |
pilou-/ansible | test/units/modules/network/netvisor/test_pn_cpu_class.py | 15 | 2855 | # Copyright: (c) 2018, Pluribus Networks
# 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 json
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn... | gpl-3.0 | -8,209,425,346,403,280,000 | 39.785714 | 100 | 0.616813 | false |
GREO/GNU-Radio | usrp/host/swig/usrp_fpga_regs.py | 11 | 1182 | #
# Copyright 2005 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version.
#... | gpl-3.0 | -7,140,859,503,618,638,000 | 38.4 | 78 | 0.741117 | false |
avlach/univbris-ocf | vt_manager/src/python/vt_manager/communication/sfa/drivers/VTShell.py | 1 | 3868 | from vt_manager.models.VirtualMachine import VirtualMachine
from vt_manager.models.VTServer import VTServer
from vt_manager.models.Action import Action
from vt_manager.models.expiring_components import ExpiringComponents
from vt_manager.communication.sfa.util.xrn import Xrn, hrn_to_urn, get_leaf
from vt_manager.contr... | bsd-3-clause | -5,503,883,192,088,289,000 | 37.29703 | 163 | 0.715615 | false |
valentin-krasontovitsch/ansible | lib/ansible/modules/network/nxos/nxos_snmp_host.py | 68 | 15264 | #!/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 distribut... | gpl-3.0 | 5,933,141,957,539,215,000 | 31.685225 | 99 | 0.556604 | false |
Akson/RemoteConsolePlus3 | RemoteConsolePlus3/RCP3/Backends/Processors/HtmlFormatting/Text2Html.py | 1 | 1398 | #Created by Dmytro Konobrytskyi, 2013 (github.com/Akson)
class Backend(object):
def __init__(self, parentNode):
self._parentNode = parentNode
def Delete(self):
"""
This method is called when a parent node is deleted.
"""
pass
def GetParameters(self):
"""... | lgpl-3.0 | -1,962,020,261,675,859,200 | 30.088889 | 80 | 0.595851 | false |
Saevon/Arkanoid | Line.py | 1 | 5192 | import pygame
from Vector import *
from LineSegment import *
class Barrier_Lines(pygame.sprite.Group):
def __init__(self):
pygame.sprite.Group.__init__(self)
self.lines = []
def new_line(self, pos1, pos2):
line = Line(pos1, pos2)
self.lines.append(line)... | mit | -8,258,503,544,820,241,000 | 37.348485 | 156 | 0.443374 | false |
collex100/odoo | doc/_themes/odoodoc/odoo_pygments.py | 129 | 1723 | # -*- coding: utf-8 -*-
import imp
import sys
from pygments.style import Style
from pygments.token import *
# extracted from getbootstrap.com
class OdooStyle(Style):
background_color = '#ffffcc'
highlight_color = '#fcf8e3'
styles = {
Whitespace: '#BBB',
Error: 'bg:#FAA #A00',
Key... | agpl-3.0 | 5,735,726,200,465,861,000 | 23.614286 | 48 | 0.52989 | false |
NikNitro/Python-iBeacon-Scan | sympy/parsing/mathematica.py | 96 | 1996 | from __future__ import print_function, division
from re import match
from sympy import sympify
def mathematica(s):
return sympify(parse(s))
def parse(s):
s = s.strip()
# Begin rules
rules = (
# Arithmetic operation between a constant and a function
(r"\A(\d+)([*/+-^])(\w+\[[^\]]+[^... | gpl-3.0 | 6,228,784,147,890,340,000 | 28.791045 | 89 | 0.475952 | false |
reinout/django | tests/template_tests/test_extends.py | 87 | 5759 | import os
from django.template import Context, Engine, TemplateDoesNotExist
from django.test import SimpleTestCase
from .utils import ROOT
RECURSIVE = os.path.join(ROOT, 'recursive_templates')
class ExtendsBehaviorTests(SimpleTestCase):
def test_normal_extend(self):
engine = Engine(dirs=[os.path.join(... | bsd-3-clause | 8,055,732,934,389,720,000 | 40.135714 | 119 | 0.554263 | false |
samuelkordik/pocketlib | httplib2/iri2uri.py | 706 | 3828 | """
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The character... | mit | -9,121,277,625,903,697,000 | 33.8 | 143 | 0.580721 | false |
daormar/thot | utils/smt_preproc/thot_train_detok_model.py | 1 | 3815 | # Author: Daniel Ortiz Mart\'inez
# *- python -*
# import modules
import io, sys, getopt
import thot_smt_preproc as smtpr
##################################################
def print_help():
print >> sys.stderr, "thot_train_detok_model -r <string> [-t <string>] [-n <int>]"
print >> sys.stderr, " ... | lgpl-3.0 | 583,206,991,561,979,400 | 28.804688 | 105 | 0.522149 | false |
joshuajan/odoo | addons/account_followup/report/account_followup_print.py | 40 | 5707 | # -*- 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 | 2,862,834,105,311,269,000 | 46.957983 | 334 | 0.586823 | false |
kushan02/Kushan_Kernel_I9505 | scripts/build-all.py | 133 | 9588 | #! /usr/bin/env python
# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# ... | gpl-2.0 | -3,268,065,215,557,356,500 | 34.511111 | 81 | 0.59491 | false |
nisse3000/pymatgen | pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py | 3 | 98578 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
This module provides so-called "strategies" to determine the coordination environments of an atom in a structure.
Some strategies can favour larger or smal... | mit | 1,611,937,146,487,959,000 | 48.786869 | 120 | 0.588772 | false |
pombredanne/pytest_django | setup.py | 2 | 1760 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in bel... | bsd-3-clause | 5,104,203,051,449,443,000 | 36.446809 | 79 | 0.6 | false |
valtech-mooc/edx-platform | cms/djangoapps/contentstore/tests/test_i18n.py | 133 | 3282 | from unittest import skip
from django.contrib.auth.models import User
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from contentstore.tests.utils import AjaxEnabledTestClient
class InternationalizationTest(ModuleStoreTestCase):
"""
Tests to validate Internationalization.
"""
... | agpl-3.0 | -3,959,088,806,230,609,000 | 31.82 | 86 | 0.571907 | false |
beni55/PyGithub | github/Consts.py | 74 | 2748 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2013 AKFish <akfish@gmail.com> #
# Copyright 2013 Vincent Jacques <vincent@vincent-ja... | gpl-3.0 | 7,805,222,742,562,314,000 | 61.454545 | 80 | 0.356623 | false |
IECS/MansOS | tools/seal/components/sadmote.py | 2 | 2013 | #
# Copyright (c) 2012 Atis Elsts
#
# 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 of conditions and the following disclaimer.
#... | mit | 2,875,209,730,067,867,600 | 38.470588 | 77 | 0.756085 | false |
mezz64/home-assistant | homeassistant/components/keyboard/__init__.py | 26 | 1660 | """Support to emulate keyboard presses on host machine."""
from pykeyboard import PyKeyboard # pylint: disable=import-error
import voluptuous as vol
from homeassistant.const import (
SERVICE_MEDIA_NEXT_TRACK,
SERVICE_MEDIA_PLAY_PAUSE,
SERVICE_MEDIA_PREVIOUS_TRACK,
SERVICE_VOLUME_DOWN,
SERVICE_VOLU... | apache-2.0 | 7,641,130,464,276,085,000 | 24.151515 | 72 | 0.646386 | false |
hlamer/kate | addons/kate/pate/src/plugins/gdb/cli.py | 3 | 45180 | #
# Copyright 2009, 2013, Shaheed Haque <srhaque@theiet.org>.
#
# 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) version 3 or any later versi... | lgpl-2.1 | 6,704,745,641,258,530,000 | 34.269321 | 139 | 0.540726 | false |
sposs/DIRAC | Core/Utilities/Graphs/Legend.py | 11 | 7713 | ########################################################################
# $HeadURL$
########################################################################
""" Legend encapsulates a graphical plot legend drawing tool
The DIRAC Graphs package is derived from the GraphTool plotting package of the
CMS/Phed... | gpl-3.0 | -6,979,999,797,929,931,000 | 38.152284 | 111 | 0.598729 | false |
gammapy/enrico | enrico/RunGTlike.py | 2 | 12023 | #!/usr/bin/env python
import os,glob,os.path,math
from enrico import utils
from enrico.gtfunction import Observation
from enrico.fitmaker import FitMaker
from enrico.plotting import plot_sed_fromconfig
from enrico import Loggin
import SummedLikelihood
from enrico.xml_model import XmlMaker
from enrico.extern.configobj i... | bsd-3-clause | 7,268,304,234,968,455,000 | 42.248201 | 108 | 0.592365 | false |
sysalexis/kbengine | kbe/src/lib/python/Lib/test/test_descrtut.py | 119 | 11778 | # This contains most of the executable examples from Guido's descr
# tutorial, once at
#
# http://www.python.org/2.2/descrintro.html
#
# A few examples left implicit in the writeup were fleshed out, a few were
# skipped due to lack of interest (e.g., faking super() by hand isn't
# of much interest anymore), and a f... | lgpl-3.0 | 5,470,949,090,136,709,000 | 23.284536 | 75 | 0.52199 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/docutils-0.7-py2.7.egg/docutils/io.py | 48 | 14403 | # $Id: io.py 6269 2010-03-18 22:27:53Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
I/O classes provide a uniform API for low-level input and output. Subclasses
will exist for a variety of input/output mechanisms.
"""
__docformat__ = 'reStruc... | gpl-3.0 | 516,426,016,043,095,940 | 31.512415 | 79 | 0.538221 | false |
alimuldal/numpy | numpy/core/tests/test_regression.py | 4 | 80281 | from __future__ import division, absolute_import, print_function
import copy
import pickle
import sys
import platform
import gc
import warnings
import tempfile
from os import path
from io import BytesIO
from itertools import chain
import numpy as np
from numpy.testing import (
run_module_suite, TestCase, asse... | bsd-3-clause | 992,894,612,547,452,300 | 35.211547 | 99 | 0.530736 | false |
vine/luigi | test/server_test.py | 13 | 3810 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | apache-2.0 | 4,112,797,289,493,169,000 | 28.765625 | 83 | 0.634908 | false |
petewarden/tensorflow_makefile | tensorflow/python/framework/dtypes.py | 10 | 17305 | # 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 | -4,829,260,098,791,547,000 | 31.046296 | 95 | 0.664028 | false |
younisd/django-basic-apps | basic/relationships/models.py | 8 | 4068 | from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.cache import cache
from django.conf import settings
RELATIONSHIP_CACHE = getattr(settings, 'RELATIONSHIP_CACHE', 60*60*24*7)
RELATIONSHIP_CACHE_KEYS = {
'FRIENDS': 'friends',
... | bsd-3-clause | -8,987,130,286,154,565,000 | 41.385417 | 119 | 0.644789 | false |
efortuna/AndroidSDKClone | ndk/prebuilt/linux-x86_64/lib/python2.7/test/test_xrange.py | 93 | 7825 | # Python test set -- built-in functions
import test.test_support, unittest
import sys
import pickle
import itertools
import warnings
warnings.filterwarnings("ignore", "integer argument expected",
DeprecationWarning, "unittest")
# pure Python implementations (3 args only), for comparison
def p... | apache-2.0 | -2,600,697,610,497,291,300 | 34.894495 | 81 | 0.483834 | false |
FineUploader/server-examples | python/django-fine-uploader/fine_uploader/views.py | 1 | 4519 | import json
import logging
import os
import os.path
import shutil
from django.conf import settings
from django.http import HttpResponse, HttpRequest
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from fine_uploader.forms import UploadFile... | mit | 6,755,542,936,734,100,000 | 33.496183 | 103 | 0.634875 | false |
Tiger66639/ansible-modules-core | cloud/amazon/ec2_key.py | 17 | 7291 | #!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: ec2_key
version_added: "1.5"
short_description: maintain an ec2 key pair.
description:
- maintains ec2 key pairs. This module has a dependency on python-boto >= 2.5
options:
name:
description:
- Name of the key pair.
require... | gpl-3.0 | 319,654,351,121,801,660 | 29.763713 | 108 | 0.530791 | false |
Dark-Hacker/horizon | openstack_dashboard/test/test_data/exceptions.py | 14 | 3546 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | -1,681,894,031,800,601,600 | 36.723404 | 79 | 0.733503 | false |
mKeRix/home-assistant | homeassistant/components/daikin/switch.py | 7 | 2240 | """Support for Daikin AirBase zones."""
import logging
from homeassistant.helpers.entity import ToggleEntity
from . import DOMAIN as DAIKIN_DOMAIN
_LOGGER = logging.getLogger(__name__)
ZONE_ICON = "mdi:home-circle"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old w... | mit | 7,081,196,904,327,022,000 | 27.717949 | 86 | 0.605357 | false |
eirmag/weboob | weboob/applications/qvideoob/main_window.py | 1 | 5387 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | agpl-3.0 | -952,153,824,760,297,600 | 36.93662 | 134 | 0.653239 | false |
dendisuhubdy/tensorflow | tensorflow/contrib/boosted_trees/examples/mnist.py | 64 | 5840 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,729,640,768,596,364,000 | 33.152047 | 108 | 0.689041 | false |
andrewslotin/GitRebase | git.py | 1 | 1964 | import sublime
import os, shlex
import subprocess
class Git:
def __init__(self, cwd):
self._cwd = cwd
self._git = "git"
s = sublime.load_settings("GitRebase.sublime-settings")
if s.get('git_command'):
self._git = s.get('git_command')
def log(self, limit = None):
git_command = "log --one... | mit | 76,480,398,881,288,500 | 26.661972 | 147 | 0.616599 | false |
shrimpboyho/git.js | emscript/python/2.7.5.1_32bit/Lib/site-packages/win32comext/ifilter/demo/filterDemo.py | 18 | 11010 | import pythoncom
import pywintypes
from win32com.ifilter import ifilter
from win32com.ifilter.ifiltercon import *
from win32com import storagecon
class FileParser:
# Property IDs for the Storage Property Set
PIDS_BODY = 0x00000013
# property IDs for HTML Storage Property Set
PIDH_DESC... | gpl-2.0 | -3,430,713,195,162,959,000 | 42.690476 | 148 | 0.511898 | false |
nathanial/lettuce | tests/integration/lib/Django-1.3/tests/regressiontests/select_related_regress/tests.py | 51 | 6336 | from django.test import TestCase
from regressiontests.select_related_regress.models import *
class SelectRelatedRegressTests(TestCase):
def test_regression_7110(self):
"""
Regression test for bug #7110.
When using select_related(), we must query the
Device and Building tables usin... | gpl-3.0 | 5,837,926,350,847,874,000 | 46.283582 | 129 | 0.660827 | false |
mollstam/UnrealPy | UnrealPyEmbed/Source/Python/Lib/python27/test/test_int_literal.py | 138 | 9128 | """Test correct treatment of hex/oct constants.
This is complex because of changes due to PEP 237.
"""
import unittest
from test import test_support
class TestHexOctBin(unittest.TestCase):
def test_hex_baseline(self):
# A few upper/lowercase tests
self.assertEqual(0x0, 0X0)
self.assertE... | mit | 4,925,544,497,744,827,000 | 47.553191 | 119 | 0.710451 | false |
designatednerd/Vokoder | SampleProject/Pods/xUnique/setup.py | 15 | 2107 | #!/usr/bin/env python
"""
This software is licensed under the Apache 2 license, quoted below.
Copyright 2014 Xiao Wang <wangxiao8611@gmail.com, http://fclef.wordpress.com/about>
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obt... | mit | 405,758,023,445,888,400 | 35.327586 | 94 | 0.676792 | false |
poojanihalani/xmlutils.py | setup.py | 3 | 1088 | #!/usr/bin/env python
from setuptools import setup
setup(
name="xmlutils",
version="1.1",
description="A set of utilities for processing XML documents and converting to other formats",
author="Kailash Nadh",
author_email="kailash.nadh@gmail.com",
url="http://nadh.in/code/xmlutils.py",
packages=['xmlutils'],
d... | mit | -6,967,449,287,060,855,000 | 30.085714 | 95 | 0.689338 | false |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/sympy/polys/tests/test_sqfreetools.py | 6 | 5117 | """Tests for square-free decomposition algorithms and related tools. """
from sympy.polys.sqfreetools import (
dup_sqf_p, dmp_sqf_p,
dup_sqf_norm, dmp_sqf_norm,
dup_sqf_part, dmp_sqf_part,
dup_sqf_list, dup_sqf_list_include,
dmp_sqf_list, dmp_sqf_list_include,
dup_gff_list, dmp_gff_list)
from ... | agpl-3.0 | 5,741,097,419,865,119,000 | 28.578035 | 94 | 0.476256 | false |
BeATz-UnKNoWN/python-for-android | python3-alpha/python3-src/Lib/zipfile.py | 45 | 57538 | """
Read and write ZIP files.
XXX references to utf-8 need further investigation.
"""
import io
import os
import re
import imp
import sys
import time
import stat
import shutil
import struct
import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib =... | apache-2.0 | 1,119,545,000,334,316,900 | 36.754593 | 103 | 0.551444 | false |
webmasterraj/FogOrNot | flask/lib/python2.7/site-packages/gunicorn/arbiter.py | 27 | 17557 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
from __future__ import print_function
import errno
import os
import random
import select
import signal
import sys
import time
import traceback
from gunicorn.errors import HaltServer, AppImpor... | gpl-2.0 | 7,611,438,940,510,121,000 | 29.801754 | 77 | 0.526172 | false |
hinerm/ITK | Wrapping/Generators/SwigInterface/idx.py | 13 | 1236 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
sys.path.append(sys.path[0]+os.sep+'pygccxml-1.0.0')
import pygccxml, sys, cStringIO
# the output file
outputFile = cStringIO.StringIO()
# init the pygccxml stuff
pygccxml.declarations.scopedef_t.RECURSIVE_DEFAULT = False
pygccxml.declarations.scopedef_t.A... | apache-2.0 | -1,429,555,058,095,711,700 | 29.146341 | 80 | 0.703883 | false |
AnhellO/DAS_Sistemas | Ago-Dic-2020/aguilar-cedillo-jonathan-ivan/practica 2/practica-2.py | 1 | 1353 | class Album():
def __init__(self, titulo, cancion, genero, artista, año):
self.titulo = titulo
self.cancion= cancion
self.genero = genero
self.artista = artista
self.año = año
def get_titulo(self):
return "Informacion: \nTitulo: {} \ncancion: {} \ngenero: {} \n... | mit | 8,484,572,732,320,710,000 | 37.485714 | 165 | 0.632987 | false |
devs1991/test_edx_docmode | openedx/core/djangoapps/profile_images/views.py | 29 | 8490 | """
This module implements the upload and remove endpoints of the profile image api.
"""
from contextlib import closing
import datetime
import itertools
import logging
from django.utils.translation import ugettext as _
from django.utils.timezone import utc
from rest_framework import permissions, status
from rest_frame... | agpl-3.0 | -6,780,519,723,495,015,000 | 36.236842 | 114 | 0.672085 | false |
cgstudiomap/cgstudiomap | main/eggs/reportlab-3.2.0-py2.7-linux-x86_64.egg/reportlab/lib/abag.py | 32 | 1140 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/abag.py
__version__=''' $Id$ '''
__doc__='''Data structure to hold a collection of attributes, used by styles.'''
class ABag:
"""
'Attribut... | agpl-3.0 | -5,537,030,832,504,342,000 | 30.666667 | 100 | 0.57193 | false |
RAtechntukan/Sick-Beard | lib/imdb/parser/__init__.py | 143 | 1030 | """
parser package (imdb package).
This package provides various parsers to access IMDb data (e.g.: a
parser for the web/http interface, a parser for the SQL database
interface, etc.).
So far, the http/httpThin, mobile and sql parsers are implemented.
Copyright 2004-2009 Davide Alberani <da@erlug.linux.it>
This prog... | gpl-3.0 | -510,642,093,043,434,500 | 35.785714 | 73 | 0.768932 | false |
soldag/home-assistant | homeassistant/components/dlna_dmr/media_player.py | 4 | 13775 | """Support for DLNA DMR (Device Media Renderer)."""
import asyncio
from datetime import timedelta
import functools
import logging
from typing import Optional
import aiohttp
from async_upnp_client import UpnpFactory
from async_upnp_client.aiohttp import AiohttpNotifyServer, AiohttpSessionRequester
from async_upnp_clien... | apache-2.0 | 6,576,095,535,015,073,000 | 30.594037 | 85 | 0.633975 | false |
patjak/drm-gma500 | scripts/gdb/linux/tasks.py | 630 | 2892 | #
# gdb helper commands and functions for Linux kernel debugging
#
# task & thread tools
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import utils
task_type = utils.CachedType(... | gpl-2.0 | 3,946,368,920,479,534,000 | 23.931034 | 77 | 0.597165 | false |
minhphung171093/GreenERP_V8 | openerp/addons/mrp/mrp.py | 145 | 73675 | # -*- 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 | -1,998,137,030,692,881,000 | 54.145958 | 296 | 0.599946 | false |
yufengg/tensorflow | tensorflow/contrib/data/python/kernel_tests/reader_dataset_ops_test.py | 10 | 20568 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 1,525,739,349,989,426,400 | 38.177143 | 80 | 0.609345 | false |
justathoughtor2/atomicApe | cygwin/lib/python2.7/site-packages/pylint/test/input/func_typecheck_callfunc_assigment.py | 7 | 1496 |
"""check assignment to function call where the function doesn't return
'E1111': ('Assigning to function call which doesn\'t return',
'Used when an assignment is done on a function call but the \
infered function doesn\'t return anything.'),
'W1111': ('Assigning to function call whi... | gpl-3.0 | 6,518,583,061,542,576,000 | 22.746032 | 75 | 0.64238 | false |
li-xiao-nan/gyp_tools | test/win/gyptest-link-safeseh.py | 32 | 1340 | #!/usr/bin/env python
# Copyright (c) 2014 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.
"""
Make sure safeseh setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(f... | bsd-3-clause | 5,528,941,718,456,003,000 | 32.5 | 75 | 0.723134 | false |
trishume/linux-track | python_prototype/tir4_read_version_string.py | 7 | 3222 | #! /usr/bin/python
# -*- coding: utf-8 -*-
##bc##################################################################
## (C) Copyright 2009, All Rights Reserved.
##
## Name : tir4_read_version_string.py
## Author : DT Austin
## Created : 07/14/2009
## SVN date : $Date$
##
############################... | mit | 6,822,346,667,640,004,000 | 32.216495 | 139 | 0.572315 | false |
PaulWay/spacewalk | client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 2 | 19114 | # -*- coding: utf-8 -*-
#
# String constants for the RHN Register TUI/GUI.
# Copyright (c) 2000--2014 Red Hat, Inc.
#
# Author:
# James Slagle <jslagle@redhat.com>
import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext
COPYRIGHT_TEXT = _(u"Copyright © 2006--2014 Red Hat... | gpl-2.0 | -2,421,034,015,728,201,000 | 58.542056 | 133 | 0.574949 | false |
songjmcn/machine_learning | core/kmeans.py | 1 | 3013 | #coding=utf-8
'''
Created on 2014年6月18日
K-means 算法,将数据聚类到K个中心点
距离计算:欧式距离
中心店计算:均值法
@author: sjm
'''
import numpy as np
import random
def Euclid_dist(x,y):
if len(y.shape)==1:
return np.sqrt(np.sum(np.sum((x-y)**2)))
elif len(y.shape)==2:
return np.sqrt(np.sum((x-y)**2,axis=1))
else:
... | gpl-2.0 | -3,712,052,875,470,658,600 | 25.895238 | 80 | 0.555437 | false |
selective-inference/selective-inference | doc/learning_examples/riboflavin/CV.py | 3 | 10083 | import functools, hashlib
import numpy as np
from scipy.stats import norm as normal_dbn
import regreg.api as rr
from selection.algorithms.debiased_lasso import pseudoinverse_debiasing_matrix
# load in the X matrix
import rpy2.robjects as rpy
from rpy2.robjects import numpy2ri
rpy.r('library(hdi); data(riboflavin);... | bsd-3-clause | 1,684,347,420,061,147,000 | 36.069853 | 111 | 0.472974 | false |
paulboal/pexpect-curses | swearjar/test/curses01.py | 1 | 1647 | #!/usr/bin/python
import curses
import math
import os
import sys
import fcntl
import struct
import termios
import array
import logging
import time
logging.basicConfig(filename='example.log',level=logging.DEBUG)
__doc__="""\
The program presents a series of menus that we're going to use for testing.
1. Enter new pers... | mit | 1,761,884,261,136,420,900 | 23.220588 | 145 | 0.683667 | false |
EmreAtes/spack | var/spack/repos/builtin/packages/py-maestrowf/package.py | 5 | 1771 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 351,139,676,024,738,700 | 43.275 | 78 | 0.659514 | false |
nitin-cherian/LifeLongLearning | Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/prompt_toolkit/layout/lexers.py | 15 | 11334 | """
Lexer interface and implementation.
Used for syntax highlighting.
"""
from __future__ import unicode_literals
from abc import ABCMeta, abstractmethod
from six import with_metaclass
from six.moves import range
from prompt_toolkit.token import Token
from prompt_toolkit.filters import to_cli_filter
from .utils import... | mit | 1,548,174,089,635,518,000 | 34.41875 | 95 | 0.596259 | false |
fabioz/Pydev | plugins/org.python.pydev.core/pysrc/third_party/pep8/lib2to3/lib2to3/fixes/fix_xrange.py | 326 | 2699 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes xrange(...) into range(...)."""
# Local imports
from .. import fixer_base
from ..fixer_util import Name, Call, consuming_calls
from .. import patcomp
class FixXrange(fixer_base.BaseFix):
BM_... | epl-1.0 | -1,072,868,994,169,105,700 | 35.972603 | 78 | 0.572064 | false |
wso2/product-private-paas | components/org.wso2.ppaas.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/thrift/protocol/TCompactProtocol.py | 19 | 10945 | #
# 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 u... | apache-2.0 | -166,204,609,548,981,220 | 26.024691 | 79 | 0.64952 | false |
opennode/waldur-mastermind | src/waldur_mastermind/marketplace_openstack/tests/test_metadata.py | 1 | 5277 | from waldur_mastermind.marketplace.tests import factories as marketplace_factories
from waldur_mastermind.marketplace_openstack.tests.utils import BaseOpenStackTest
from waldur_openstack.openstack_tenant.tests import (
fixtures as openstack_tenant_fixtures,
)
class VolumeMetadataTest(BaseOpenStackTest):
def s... | mit | -8,901,791,524,706,563,000 | 33.045161 | 88 | 0.653212 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/boto-2.27.0-py2.7.egg/boto/s3/bucketlogging.py | 17 | 3175 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | gpl-3.0 | 5,300,788,525,443,024,000 | 37.253012 | 98 | 0.605354 | false |
mohamed-ali/PyTables | tables/tests/test_indexes.py | 5 | 99639 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
import os
import copy
import tempfile
import numpy
import tables
from tables import (
StringCol, BoolCol, IntCol, FloatCol, Int8Col, Int32Col, Int64Col,
UInt16Col, Float32Col,
)
from tables.index import Index... | bsd-3-clause | 8,972,178,035,282,731,000 | 35.71297 | 80 | 0.586969 | false |
codeworldprodigy/lab4 | lib/jinja2/jinja2/filters.py | 598 | 29836 | # -*- coding: utf-8 -*-
"""
jinja2.filters
~~~~~~~~~~~~~~
Bundled jinja filters.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import math
from random import choice
from operator import itemgetter
from itertools import groupby
from jinja2.utils... | apache-2.0 | 5,855,974,449,614,408,000 | 29.228977 | 82 | 0.594651 | false |
intel-analytics/analytics-zoo | pyzoo/zoo/orca/learn/horovod/horovod_ray_runner.py | 1 | 5855 | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | -4,808,174,317,285,885,000 | 38.829932 | 99 | 0.618446 | false |
kunaldawn/vmouse-opencv-qt-hand-gesture-hci | servers/serverMouseEvent.py | 1 | 1649 | #----------------------------------------------------------------------
# VMouse - OpenCV Virtual Mouse (HCI)
# Copyright (C) 2014 Kunal Dawn <kunal.dawn@gmail.com>
# Copyright (C) 2014 Medha Devaraj <medha.devaraj@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | gpl-3.0 | -5,487,459,539,762,362,000 | 36.477273 | 71 | 0.615525 | false |
atruberg/django-custom | tests/admin_scripts/tests.py | 52 | 81725 | # -*- coding: utf-8 -*-
"""
A series of tests to establish that the command-line managment tools work as
advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE
and default settings.py files.
"""
from __future__ import unicode_literals
import os
import re
import shutil
import socket
import s... | bsd-3-clause | 9,099,103,135,823,155,000 | 45.803551 | 258 | 0.65095 | false |
openstack-ja/horizon | openstack_dashboard/dashboards/admin/routers/ports/tables.py | 6 | 1744 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 NEC Corporation
#
# 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
#... | apache-2.0 | 5,546,860,991,772,349,000 | 35.333333 | 78 | 0.659404 | false |
lbeckman314/dotfiles | i3/kb-light.py | 1 | 1215 | #!/usr/bin/env python3
# coding: utf-8
from sys import argv
import dbus
def kb_light_set(delta):
bus = dbus.SystemBus()
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBac... | mit | -5,892,403,452,328,827,000 | 31.837838 | 106 | 0.582716 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/numpy/lib/twodim_base.py | 34 | 25580 | """ Basic functions for manipulating 2d arrays
"""
from __future__ import division, absolute_import, print_function
from numpy.core.numeric import (
absolute, asanyarray, arange, zeros, greater_equal, multiply, ones,
asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal,
)
from numpy.c... | gpl-3.0 | -8,716,207,454,695,222,000 | 26.154989 | 79 | 0.542025 | false |
fajoy/nova | nova/api/openstack/compute/servers.py | 1 | 55112 | # Copyright 2010 OpenStack LLC.
# Copyright 2011 Piston Cloud Computing, 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/... | apache-2.0 | 902,482,512,620,937,500 | 38.591954 | 79 | 0.583158 | false |
sserrot/champion_relationships | venv/Lib/site-packages/win32comext/directsound/test/ds_test.py | 28 | 12476 | import unittest
import struct
import sys
import os
import pywintypes
import win32event, win32api
import os
from pywin32_testutil import str2bytes, TestSkipped
import win32com.directsound.directsound as ds
# next two lines are for for debugging:
# import win32com
# import directsound as ds
WAV_FORMAT_PCM = 1
WAV_HEADER... | mit | 4,591,350,569,898,189,300 | 34.143662 | 81 | 0.642113 | false |
aristotle-tek/cuny-bdif | AWS/ec2/lib/boto-2.34.0/tests/integration/swf/test_cert_verification.py | 126 | 1553 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# 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 withou... | mit | 7,780,568,795,884,037,000 | 38.820513 | 78 | 0.764971 | false |
abhisheksugam/Climate_Police | Climate_Police/tests/plot_pollutants.py | 1 | 3256 |
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import plotly.offline as py
import plotly.graph_objs as go
from plotly.graph_objs import *
import plotly.tools as tls
import seaborn as sns
import plotly
plotly.offline.init_notebook_mode()
def plot_pollutants(df, year, state... | mit | -7,322,824,712,037,822,000 | 22.594203 | 93 | 0.486794 | false |
itu-oss-project-team/oss-github-analysis-project | github_analysis_tool/analyzer/abstract_analyzer.py | 1 | 6275 | import abc
import os.path
import time
import sys
import logging
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from github_analysis_tool import OUTPUT_DIR, secret_config
from github_analysis_tool.services.database_service import DatabaseService
from github_analysis_tool.s... | mit | -2,542,327,224,335,620,000 | 46.18797 | 167 | 0.57004 | false |
haoyuchen1992/CourseBuilder | tests/functional/modules_search.py | 4 | 13398 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -1,338,456,368,048,019,500 | 38.875 | 78 | 0.630169 | false |
elelianghh/sqlalchemy | test/orm/test_subquery_relations.py | 25 | 77964 | from sqlalchemy.testing import eq_, is_, is_not_
from sqlalchemy import testing
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy import Integer, String, ForeignKey, bindparam, inspect
from sqlalchemy.orm import backref, subqueryload, subqueryload_all, \
mapper, relationship, clear_mappers, create... | mit | -6,725,256,390,222,946,000 | 36.609262 | 116 | 0.498294 | false |
maccaspacca/BismuthToolsWeb | log.py | 3 | 1767 | import logging, sys
from logging.handlers import RotatingFileHandler
def filter_status(record):
""""
Only displays log messages about status info
or ERROR level
"""
if ("Status:" in str(record.msg)) or (record.levelname == 'ERROR'):
return 1
else:
return 0
def log(logFile, l... | gpl-3.0 | -777,419,018,701,279,400 | 32.339623 | 120 | 0.645727 | false |
foobarbazblarg/stayclean | stayclean-2019-march/display.py | 26 | 24079 | #!/usr/bin/python
# TODO: issues with new oauth2 stuff. Keep using older version of Python for now.
# #!/usr/bin/env python
from participantCollection import ParticipantCollection
import re
import datetime
import pyperclip
# Edit Me!
currentMonthTotalDays = 31
currentMonthIndex = datetime.date.today().month
currentM... | mit | 5,416,585,451,873,283,000 | 76.176282 | 642 | 0.698409 | false |
Ircam-Web/mezzanine-organization | organization/projects/migrations/0055_auto_20170323_1039.py | 1 | 2059 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-03-23 09:39
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('organization-projects', '0054_auto_201... | agpl-3.0 | 8,232,201,358,168,885,000 | 38.596154 | 265 | 0.621661 | false |
YongseopKim/crosswalk-test-suite | webapi/tct-widgetpolicy-w3c-tests/inst.xpk.py | 357 | 6759 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause | 7,708,916,016,089,673,000 | 28.386957 | 106 | 0.543276 | false |
StyXman/ayrton | ayrton/parser/pyparser/pylexer.py | 1 | 8358 | # Used by genpytokenize.py to generate the parser in pytokenize.py
from ayrton.parser.pyparser.automata import DFA, DEFAULT
class EMPTY: pass
def newArcPair (states, transitionLabel):
s1Index = len(states)
s2Index = s1Index + 1
states.append([(transitionLabel, s2Index)])
states.append([])
return s... | gpl-3.0 | 6,685,381,243,004,683,000 | 33.825 | 76 | 0.495573 | 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.