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 |
|---|---|---|---|---|---|---|---|---|---|---|
FescueFungiShare/hydroshare | hs_tracking/views.py | 2 | 2158 | import csv
from cStringIO import StringIO
from django.views.generic import TemplateView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import user_passes_test
from django.http import HttpResponse
from . import models as hs_tracking
class UseTrackingView(TemplateView):
t... | bsd-3-clause | -2,910,360,191,688,274,400 | 32.2 | 94 | 0.644115 | false |
avidoggy/Pygorithm | ArtificialIntelligence/Path_Finding.py | 1 | 6073 | #Your code here
#You can import some modules or create additional functions
def checkio(maze_map):
#replace this for solution
#This is just example for first maze
MOVE = {"S": (1, 0), "N": (-1, 0), "W": (0, -1), "E": (0, 1)}
copy_maze_map = [row[:] for row in maze_map]
#print type(copy_maze_map)
... | gpl-2.0 | 8,352,723,812,404,576,000 | 39.758389 | 94 | 0.378726 | false |
zbqf109/goodo | openerp/tests/common.py | 2 | 14850 | # -*- coding: utf-8 -*-
"""
The module :mod:`openerp.tests.common` provides unittest2 test cases and a few
helpers and classes to write tests.
"""
import errno
import glob
import importlib
import json
import logging
import os
import select
import subprocess
import threading
import time
import itertools
import unittest... | gpl-3.0 | 994,046,137,309,817,600 | 34.956416 | 121 | 0.599731 | false |
EnriqueIzel2/jogo | funcoes.py | 1 | 6140 | import pygame
import random
from pygame.locals import*
pygame.init()
x = 800
y = 600
janela = pygame.display.set_mode((x, y))
fundo_verde = (4, 166, 1) # cor do fundo da tela
cor_letra = (0, 0, 0) # cor da letra
cor_cursor = (50, 60, 50)
cor_cobra = (255, 55, 255)
red = (255, 0, 0)
# s... | apache-2.0 | 4,546,186,962,482,249,700 | 41.262069 | 101 | 0.569517 | false |
matrix-org/synapse | tests/storage/test_end_to_end_keys.py | 1 | 3855 | # Copyright 2016-2021 The Matrix.org Foundation C.I.C.
#
# 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 | 6,280,749,246,634,462,000 | 36.067308 | 86 | 0.603372 | false |
drybjed/ansible-modules-extras | system/osx_defaults.py | 77 | 12888 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, GeekChimp - Franck Nijhof <franck@geekchimp.com>
#
# 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 you... | gpl-3.0 | -7,894,792,945,311,848,000 | 35.613636 | 122 | 0.544848 | false |
jonathanslenders/pymux-test | pymux/rc.py | 2 | 2237 | """
Initial configuration.
"""
from __future__ import unicode_literals
__all__ = (
'STARTUP_COMMANDS'
)
STARTUP_COMMANDS = """
bind-key '"' split-window -v
bind-key % split-window -h
bind-key c new-window
bind-key Right select-pane -R
bind-key Left select-pane -L
bind-key Up select-pane -U
bind-key Down select-pa... | bsd-3-clause | 2,223,732,061,156,809,000 | 26.280488 | 61 | 0.71435 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.2/salt/runners/asam.py | 2 | 11014 | # -*- coding: utf-8 -*-
'''
Novell ASAM Runner
==================
.. versionadded:: Beryllium
Runner to interact with Novell ASAM Fan-Out Driver
:codeauthor: Nitin Madhok <nmadhok@clemson.edu>
To use this runner, set up the Novell Fan-Out Driver URL, username and password in the
master configuration at ``/etc/salt/... | apache-2.0 | 6,268,517,044,892,934,000 | 28.137566 | 128 | 0.588887 | false |
RobertABT/heightmap | build/scipy/scipy/lib/lapack/tests/test_gesv.py | 13 | 3510 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import TestCase, assert_array_almost_equal, dec, \
assert_equal, assert_, run_module_suite
from common import FUNCS_TP, FLAPACK_IS_EMPTY, CLAPACK_IS_EMPTY, FUNCS_FLAPACK, \
... | mit | 7,130,264,527,348,308,000 | 35.185567 | 82 | 0.547863 | false |
the100rabh/Barcamp-Bangalore-Android-App | gcm_flask/werkzeug/debug/__init__.py | 81 | 7867 | # -*- coding: utf-8 -*-
"""
werkzeug.debug
~~~~~~~~~~~~~~
WSGI application traceback debugger.
:copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import mimetypes
from os.path import join, dirname, basename, isfile
from werkzeu... | apache-2.0 | -5,547,111,184,283,978,000 | 41.524324 | 78 | 0.581797 | false |
mjdarby/RogueDetective | tiles.py | 1 | 2723 | # Tiles, tiles, tiles! Doors, walls.. If it's not a player but it's
# on the map, it goes here.
# Our imports
from constants import Constants
class Tile(object):
"""Represents a tile in vision.
Once seen, a tile will show what is currently on it via the game draw method.
Once a tile goes out of view, ever... | gpl-2.0 | 4,406,180,795,276,132,000 | 31.035294 | 90 | 0.574367 | false |
jiachenning/odoo | addons/stock_landed_costs/__openerp__.py | 220 | 1914 | # -*- 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 | 4,648,034,896,617,505,000 | 35.807692 | 180 | 0.598746 | false |
kornicameister/ansible-modules-extras | cloud/vmware/vmware_vmkernel.py | 75 | 7458 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Li... | gpl-3.0 | -5,307,090,107,201,982,000 | 34.855769 | 99 | 0.638509 | false |
openiitbombayx/edx-platform | common/djangoapps/track/backends/mongodb.py | 41 | 3046 | """MongoDB event tracker backend."""
from __future__ import absolute_import
import logging
import pymongo
from pymongo import MongoClient
from pymongo.errors import PyMongoError
from bson.errors import BSONError
from track.backends import BaseBackend
log = logging.getLogger(__name__)
class MongoBackend(BaseBack... | agpl-3.0 | -8,832,688,099,975,399,000 | 29.767677 | 79 | 0.616875 | false |
defionscode/ansible | lib/ansible/module_utils/azure_rm_common_rest.py | 35 | 2605 | # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
try:
from msrestazure.azure_exceptions import CloudError
from msrestazure.azure_configuration import AzureConfiguration
from msrest.service_client imp... | gpl-3.0 | 4,379,433,589,959,525,000 | 36.214286 | 99 | 0.654511 | false |
ENCODE-DCC/chip-seq-pipeline | dnanexus/make_trackhub_from_analysis.py | 1 | 18930 | #!/usr/bin/env python
import os, sys, subprocess, logging, dxpy, json, re, socket, getpass, urlparse
from posixpath import basename, dirname
import common
EPILOG = '''Notes:
Examples:
%(prog)s
'''
DEFAULT_APPLET_PROJECT = 'E3 ChIP-seq'
KEYFILE = os.path.expanduser("~/keypairs.json")
def get_args():
import... | mit | -1,601,700,042,467,889,200 | 41.254464 | 204 | 0.602905 | false |
tensorflow/agents | tf_agents/bandits/agents/mixture_agent.py | 1 | 7660 | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 1,559,765,227,660,255,000 | 41.320442 | 80 | 0.698303 | false |
amboxer21/scrapy | scrapy/spiders/sitemap.py | 56 | 2706 | import re
import logging
from scrapy.spiders import Spider
from scrapy.http import Request, XmlResponse
from scrapy.utils.sitemap import Sitemap, sitemap_urls_from_robots
from scrapy.utils.gz import gunzip, is_gzipped
logger = logging.getLogger(__name__)
class SitemapSpider(Spider):
sitemap_urls = ()
sitem... | bsd-3-clause | 9,161,895,662,068,104,000 | 33.253165 | 84 | 0.560237 | false |
NonnEmilia/OpenGenfri | pos/webpos/dbmanager.py | 2 | 2516 | from django.contrib.auth.models import User
from webpos.models import Item, Bill, BillItem
def commit_bill(output, reqdata, user):
billhd = Bill(customer_name=reqdata['customer_name'],
server=User.objects.get(pk=user.id).username)
billitms = []
reqquants = reqdata['items']
dbitms = I... | mit | -3,350,054,980,190,896,600 | 36 | 69 | 0.529809 | false |
belmiromoreira/nova | nova/console/websocketproxy.py | 12 | 6728 | # Copyright (c) 2012 OpenStack Foundation
# 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 ... | apache-2.0 | -2,402,832,276,917,528,600 | 39.047619 | 78 | 0.600327 | false |
pepeportela/edx-platform | common/lib/xmodule/xmodule/block_metadata_utils.py | 32 | 3027 | """
Simple utility functions that operate on block metadata.
This is a place to put simple functions that operate on block metadata. It
allows us to share code between the XModuleMixin and CourseOverview and
BlockStructure.
"""
def url_name_for_block(block):
"""
Given a block, returns the block's URL name.
... | agpl-3.0 | 5,362,467,486,249,102,000 | 36.8375 | 85 | 0.711926 | false |
Eric89GXL/vispy | examples/demo/gloo/quiver.py | 2 | 2368 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All Rights Reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
from vi... | bsd-3-clause | -8,971,525,523,262,989,000 | 26.534884 | 79 | 0.586993 | false |
pytroll/pygac | pygac/gac_io.py | 1 | 27380 | #!/usr/bin/env python
# Copyright (c) 2012, 2014 Abhay Devasthale
# Author(s):
# Abhay Devasthale <abhay.devasthale@smhi.se>
# Adam Dybbroe <adam.dybbroe@smhi.se>
# Sara Hornquist <sara.hornquist@smhi.se>
# Martin Raspaud <martin.raspaud@smhi.se>
# Carlos Horn <carlos.horn@external.eumetsat.int>
# This pr... | gpl-3.0 | -8,028,082,233,686,608,000 | 42.668262 | 87 | 0.581227 | false |
roderickmackenzie/gpvdm | gpvdm_gui/gui/command_args.py | 1 | 7098 | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD... | gpl-2.0 | 5,827,815,260,086,557,000 | 38.21547 | 186 | 0.72133 | false |
wweiradio/django | tests/contenttypes_tests/models.py | 70 | 1803 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.http import urlquote
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
def __str__(self):
return self.na... | bsd-3-clause | -4,748,618,555,476,502,000 | 22.115385 | 73 | 0.678314 | false |
Mozta/pagina-diagnostijuego | venv/lib/python2.7/site-packages/setuptools/ssl_support.py | 86 | 8131 | import os
import socket
import atexit
import re
from setuptools.extern.six.moves import urllib, http_client, map
import pkg_resources
from pkg_resources import ResolutionError, ExtractionError
try:
import ssl
except ImportError:
ssl = None
__all__ = [
'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_avail... | gpl-3.0 | -6,349,187,817,010,346,000 | 31.524 | 82 | 0.5939 | false |
0jpq0/kbengine | kbe/res/scripts/common/Lib/distutils/tests/test_dir_util.py | 106 | 4654 | """Tests for distutils.dir_util."""
import unittest
import os
import stat
import sys
from unittest.mock import patch
from distutils import dir_util, errors
from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree,
ensure_relative)
from distutils import log
from distu... | lgpl-3.0 | 4,762,672,828,284,328,000 | 32.482014 | 79 | 0.605071 | false |
keven/ibpy | build/lib/ib/lib/__init__.py | 3 | 8650 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# Just enough auxiliary bits to make the translated code work.
#
# This package provides the support necessary to use the translated
# code. The configuration modules used in translation take care of
# many semantic differences between Java and Python, while this
# pac... | bsd-3-clause | 865,737,044,535,097,500 | 22.315364 | 79 | 0.564509 | false |
bob-the-hamster/commandergenius | project/jni/python/src/Lib/test/test_urllib2.py | 48 | 45551 | import unittest
from test import test_support
import os
import socket
import StringIO
import urllib2
from urllib2 import Request, OpenerDirector
# XXX
# Request
# CacheFTPHandler (hard to write)
# parse_keqv_list, parse_http_list, HTTPDigestAuthHandler
class TrivialTests(unittest.TestCase):
def test_trivial(sel... | lgpl-2.1 | -8,671,686,902,326,220,000 | 38.099571 | 101 | 0.563786 | false |
markYoungH/chromium.src | tools/usb_gadget/gadget.py | 54 | 14586 | # 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.
"""Generic USB gadget functionality.
"""
import struct
import usb_constants
class Gadget(object):
"""Basic functionality for a USB device.
Implement... | bsd-3-clause | -1,844,279,497,999,782,000 | 32.763889 | 78 | 0.67983 | false |
antonve/s4-project-mooc | common/djangoapps/student/tests/test_password_policy.py | 113 | 12723 | # -*- coding: utf-8 -*-
"""
This test file will verify proper password policy enforcement, which is an option feature
"""
import json
from django.test import TestCase
from django.test.client import RequestFactory
from django.core.urlresolvers import reverse
from django.contrib.auth.models import AnonymousUser
from djan... | agpl-3.0 | 6,055,109,100,261,502,000 | 40.662295 | 102 | 0.637444 | false |
ATIX-AG/ansible | test/units/modules/network/dellos10/test_dellos10_command.py | 44 | 4313 | # (c) 2016 Red Hat Inc.
#
# (c) 2017 Dell EMC.
#
# 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 vers... | gpl-3.0 | -813,100,151,764,361,300 | 38.209091 | 104 | 0.652678 | false |
shahar-stratoscale/nova | nova/cells/state.py | 9 | 18148 | # Copyright (c) 2012 Rackspace Hosting
# 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 req... | apache-2.0 | -4,655,058,448,308,150,000 | 36.573499 | 79 | 0.590919 | false |
brookisme/gitnb | gitnb/tonb.py | 1 | 4712 | import os
import sys
import json
import re
import errno
import gitnb.config as con
import gitnb.utils as utils
from gitnb.constants import *
import gitnb.default as default
class Py2NB(object):
"""CONVERT NBPY to Notebook
Args:
path: <str> path to file
"""
def __init__(self,path,nb_pat... | mit | 1,518,598,281,540,059,400 | 25.177778 | 66 | 0.493421 | false |
thunsaker/cloudpebble | fabfile.py | 2 | 4971 | # WARNING: This file is extremely specific to how Katharine happens to have her
# local machines set up.
# In particular, to run without modification, you will need:
# - An EC2 keypair in ~/Downloads/katharine-keypair.pem
# - A keypair for the ycmd servers in ~/.ssh/id_rsa
# - The tintin source tree in ~/projects/tint... | mit | -5,468,219,566,631,605,000 | 27.084746 | 134 | 0.662241 | false |
upptalk/uppsell | uppsell/migrations/0004_auto__add_field_listing_shipping.py | 1 | 17786 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Listing.shipping'
db.add_column('listings', 'shipping',
... | mit | -2,222,364,221,784,495,600 | 79.121622 | 189 | 0.546104 | false |
sherazkasi/SabreSoftware | Lib/site-packages/scipy/setupscons.py | 59 | 1685 | from os.path import join as pjoin
def configuration(parent_package='', top_path=None, setup_name='setupscons.py'):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.misc_util import scons_generate_config_py
pkgname = 'scipy'
config = Configuration(pkgname, parent_package, top_pa... | gpl-3.0 | 129,905,835,545,465,570 | 36.444444 | 80 | 0.647478 | false |
nurmd2/nurmd | addons/product/__openerp__.py | 18 | 1558 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Products & Pricelists',
'version': '1.2',
'category': 'Sales Management',
'depends': ['base', 'decimal_precision', 'mail', 'report'],
'demo': [
'product_demo.xml',
'product... | gpl-3.0 | 9,069,364,237,347,962,000 | 28.396226 | 74 | 0.584082 | false |
akrherz/iem | htdocs/plotting/auto/scripts100/p160.py | 1 | 8613 | """
TODO: add table listing each forecast's peak and peak time...
"""
import datetime
import pytz
import numpy as np
import pandas as pd
from pandas.io.sql import read_sql
import matplotlib.dates as mdates
from pyiem.plot import figure_axes
from pyiem.util import get_autoplot_context, get_dbconn
from pyiem.exceptions ... | mit | -6,365,870,695,335,896,000 | 29.010453 | 79 | 0.504006 | false |
hnjamba/onaclone | onadata/apps/main/tests/test_past_bugs.py | 5 | 2294 | import os
from pyxform.errors import PyXFormError
from onadata.apps.logger.models import XForm, Instance
from test_base import TestBase
class TestInputs(TestBase):
"""
This is where I'll input all files that proved problematic for
users when uploading.
"""
def test_uniqueness_of_group_names_enfo... | bsd-2-clause | -1,188,908,986,743,111,700 | 34.84375 | 79 | 0.609416 | false |
Nettacker/Nettacker | lib/transactions/maltego/nettacker_transforms/src/nettacker_transforms/transforms/shodan_scan.py | 1 | 1847 | import random
from canari.maltego.transform import Transform
from canari.maltego.entities import URL
from canari.framework import EnableDebugWindow
from common.entities import NettackerScan
from lib.scan.shodan.engine import start
from database.db import __logs_by_scan_id as find_log
__author__ = 'Shaddy Garg'
__cop... | gpl-3.0 | 6,459,000,905,687,658,000 | 37.479167 | 125 | 0.650785 | false |
koss822/misc | Linux/MySettings/myvim/vim/bundle/jedi-vim/pythonx/jedi/test/run.py | 1 | 15920 | #!/usr/bin/env python
"""
|jedi| is mostly being tested by what I would call "Blackbox Tests". These
tests are just testing the interface and do input/output testing. This makes a
lot of sense for |jedi|. Jedi supports so many different code structures, that
it is just stupid to write 200'000 unittests in the manner of... | gpl-3.0 | 5,407,500,519,593,034,000 | 32.375262 | 97 | 0.571608 | false |
tavern-consulting/easter-egg | easter_egg/tests.py | 1 | 4000 | import json
import base64
import os
from django.core.urlresolvers import reverse
from django.test import TestCase, LiveServerTestCase
import requests
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from easter_egg.models import split_image
class _HelperTestCase(TestCase):
path_to... | mit | -3,499,596,097,012,622,300 | 27.169014 | 75 | 0.57675 | false |
cbrunet/ouf | src/ouf/view/fileview.py | 1 | 4520 | import os
import subprocess
import sys
from PyQt5 import QtCore, QtWidgets
from ouf.filemodel.proxymodel import FileProxyModel
from ouf.view.filenamedelegate import FileNameDelegate
from ouf import shortcuts
# TODO: modifiers to open in new window
# TODO: switch icons / tree
# TODO: modify icon size
class FileView... | gpl-3.0 | 7,858,391,601,445,140,000 | 33.503817 | 116 | 0.634513 | false |
josepht/snapcraft | snapcraft/internal/repo/__init__.py | 2 | 1151 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2017 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the h... | gpl-3.0 | -4,663,796,921,462,256,000 | 36.129032 | 71 | 0.734144 | false |
soldag/home-assistant | homeassistant/components/zha/core/typing.py | 15 | 1647 | """Typing helpers for ZHA component."""
from typing import TYPE_CHECKING, Callable, TypeVar
import zigpy.device
import zigpy.endpoint
import zigpy.group
import zigpy.zcl
import zigpy.zdo
# pylint: disable=invalid-name
CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable)
ChannelType = "ZigbeeChannel"
ChannelsType = "Ch... | apache-2.0 | -2,003,512,281,288,779,500 | 35.6 | 75 | 0.803886 | false |
wtmmac/p2pool | wstools/Utility.py | 292 | 50865 | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is ... | gpl-3.0 | -6,974,611,694,742,634,000 | 35.805355 | 101 | 0.585865 | false |
facebook/buck | third-party/py/pex/pex/tracer.py | 55 | 3628 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import sys
import threading
import time
from contextlib import contextmanager
from .variables import ENV
__all__ = ('TraceLogger',)
class Trace(object):
__slots__ = ('msg', 'verbosit... | apache-2.0 | -2,120,832,271,029,314,000 | 29.233333 | 88 | 0.62817 | false |
julien78910/CouchPotatoServer | libs/bencode/__init__.py | 171 | 3305 | # The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software di... | gpl-3.0 | 5,574,872,361,641,101,000 | 24.229008 | 78 | 0.608472 | false |
antar2801/namebench | nb_third_party/dns/rcode.py | 248 | 3106 | # Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 | 8,877,898,640,935,281,000 | 25.10084 | 72 | 0.651642 | false |
muzena/deluge | deluge/plugins/Stats/deluge/plugins/stats/core.py | 7 | 8233 | #
# core.py
#
# Copyright (C) 2009 Ian Martin <ianmartin@cantab.net>
# Copyright (C) 2008 Damien Churchill <damoxc@gmail.com>
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) Marcos Pinto 2007 <markybob@gmail.com>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under t... | gpl-3.0 | 5,731,812,272,687,434,000 | 31.932 | 86 | 0.570509 | false |
beckastar/django | django/contrib/gis/gdal/prototypes/geom.py | 79 | 4718 | from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER
from django.contrib.gis.gdal.envelope import OGREnvelope
from django.contrib.gis.gdal.libgdal import lgdal
from django.contrib.gis.gdal.prototypes.errcheck import check_envelope
from django.contrib.gis.gdal.prototypes.generation import (const_string_output... | bsd-3-clause | -8,294,103,503,891,700,000 | 46.18 | 137 | 0.732514 | false |
dtroyer/python-openstacksdk | openstack/network/v2/metering_label.py | 1 | 1534 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 3,876,483,684,326,570,500 | 33.088889 | 75 | 0.704042 | false |
jamesblunt/sympy | sympy/assumptions/handlers/matrices.py | 71 | 13732 | """
This module contains query handlers responsible for calculus queries:
infinitesimal, bounded, etc.
"""
from __future__ import print_function, division
from sympy.logic.boolalg import conjuncts
from sympy.assumptions import Q, ask
from sympy.assumptions.handlers import CommonHandler, test_closed_group
from sympy.ma... | bsd-3-clause | 5,376,741,690,166,381,000 | 28.787419 | 79 | 0.653 | false |
xcgoner/dist-mxnet | tools/caffe_converter/test_converter.py | 8 | 4408 | # 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 | 2,639,473,996,469,222,400 | 40.584906 | 100 | 0.657441 | false |
blue-yonder/pyscaffold | tests/test_termui.py | 1 | 2915 | # -*- coding: utf-8 -*-
from importlib import reload
from io import StringIO
import pytest
from pyscaffold import termui
@pytest.fixture(scope="module")
def after():
# Reload termui after tests to ensure constants are calculated
# with original logic (without mocks).
yield
reload(termui)
@pytest.... | mit | -6,427,204,275,630,213,000 | 27.861386 | 79 | 0.695712 | false |
ianjuma/usiu-app-dir | benchcare/patients/models.py | 1 | 5931 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.contrib import admin
class Patient(models.Model):
GENDER = (
('F', 'Female'),
('M', 'Male'),
)
MARRIAGE_STATUS = (
('S', 'Single'),
... | gpl-2.0 | -1,369,111,699,059,581,700 | 34.094675 | 164 | 0.656719 | false |
verma-varsha/zulip | zerver/webhooks/gosquared/view.py | 1 | 1441 | from __future__ import absolute_import
from django.utils.translation import ugettext as _
from zerver.lib.actions import check_send_message
from zerver.lib.response import json_success, json_error
from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view
from zerver.models import UserProfile
... | apache-2.0 | -802,167,973,082,556,800 | 44.03125 | 97 | 0.684247 | false |
hasadna/django | django/contrib/localflavor/pt/forms.py | 100 | 1601 | """
PT-specific Form helpers
"""
from __future__ import unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField
from django.utils.encoding import smart_text
from django.utils.translation import ugettext_lazy ... | bsd-3-clause | -2,889,766,522,740,578,000 | 31.02 | 84 | 0.626483 | false |
alexlib/Qt-Python-Binding-Examples | common_widgets/checkbox/checkbox.py | 1 | 1200 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
QCheckBox demo
Tested environment:
Mac OS X 10.6.8
http://doc.qt.nokia.com/latest/qcheckbox.html
http://doc.qt.nokia.com/latest/qabstractbutton.html
http://doc.qt.nokia.com/latest/qt.html#CheckState-enum
"""
import sys
try:
from PySide import QtCore
from Py... | bsd-3-clause | 196,785,330,957,728,670 | 22.096154 | 92 | 0.624167 | false |
vileopratama/vitech | src/addons/point_of_lounge/report/lounge_receipt.py | 1 | 1856 | from openerp.osv import osv
import time
from openerp.report import report_sxw
def titlize(journal_name):
words = journal_name.split()
while words.pop() != 'journal':
continue
return ' '.join(words)
class order(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(order, self)... | mit | -3,289,292,586,640,424,400 | 31.561404 | 96 | 0.650323 | false |
paulrouget/servo | tests/jquery/run_jquery.py | 13 | 9583 | #!/usr/bin/env python
# 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 https://mozilla.org/MPL/2.0/.
import os
import re
import subprocess
import sys
import BaseHTTPServer
import SimpleHTTPServer
i... | mpl-2.0 | 5,854,039,662,424,421,000 | 34.757463 | 114 | 0.550663 | false |
xxxIsaacPeralxxx/anim-studio-tools | probe/sources/probe/plugins/nose_tank_scratch.py | 5 | 3677 | # Dr. D Studios - Software Disclaimer
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), its
# affiliates and/or its licensors.
#
import itch.tank_scratch
import nose.plugins
class TankScratchNosePlugin(nose.plugins.Plugin):
"""
Adds Tank scratch setup and teardown capabilit... | gpl-3.0 | 1,517,581,588,301,495,300 | 29.38843 | 101 | 0.569214 | false |
cortedeltimo/SickRage | lib/sqlalchemy/ext/mutable.py | 76 | 22912 | # ext/mutable.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Provide support for tracking of in-place changes to scalar values,
which are propaga... | gpl-3.0 | 1,258,961,558,996,443,100 | 35.025157 | 84 | 0.650794 | false |
epiqc/ScaffCC | llvm/utils/benchmark/tools/gbench/util.py | 70 | 5178 | """util.py - General utilities for running, loading, and processing benchmarks
"""
import json
import os
import tempfile
import subprocess
import sys
# Input file type enumeration
IT_Invalid = 0
IT_JSON = 1
IT_Executable = 2
_num_magic_bytes = 2 if sys.platform.startswith('win') else 4
def is_executable_file... | bsd-2-clause | 7,223,303,494,514,211,000 | 31.572327 | 91 | 0.632097 | false |
duongbaoduy/gtools | third_party/boto/pyami/bootstrap.py | 89 | 5739 | # 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... | bsd-3-clause | -7,818,021,901,034,804,000 | 41.828358 | 119 | 0.610211 | false |
sumyfly/nw.js | tests/automation/buff_from_string/internal/test.py | 169 | 1430 | #!/usr/bin/env python
from selenium import webdriver
import os
import traceback
import time
from selenium import webdriver
from platform import platform
import socket
from sys import argv
port = 13013
if len(argv) >= 2:
port = int(argv[1])
path = os.path
dirname = path.abspath(path.dirname(__file__))
chromedriv... | mit | -2,451,164,643,344,662,000 | 25.018182 | 100 | 0.688112 | false |
visi0nary/mt6735-kernel-3.10.61 | tools/perf/scripts/python/futex-contention.py | 11261 | 1486 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... | gpl-2.0 | -7,490,929,928,228,385,000 | 28.72 | 96 | 0.688425 | false |
2ndy/RaspIM | usr/lib/python2.7/xml/dom/domreg.py | 238 | 3478 | """Registration facilities for DOM. This module should not be used
directly. Instead, the functions getDOMImplementation and
registerDOMImplementation should be imported from xml.dom."""
from xml.dom.minicompat import * # isinstance, StringTypes
# This is a list of well-known implementations. Well-known names
# sho... | gpl-2.0 | -540,521,787,934,644,000 | 34.131313 | 78 | 0.671075 | false |
lordsutch/MUTCDSpeedSigns | signmatch.py | 1 | 4877 | #!/usr/bin/python
# The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
#
# This example program shows how you can use dlib to make an object
# detector for things like faces, pedestrians, and any other semi-rigid
# object. In particular, we go though the steps to train the kin... | mit | 5,023,949,200,731,405,000 | 38.016 | 90 | 0.639532 | false |
tinkercnc/linuxcnc-mirror-old | tests/io-startup/test-ui.py | 6 | 1343 | #!/usr/bin/env python
import linuxcnc_util
import hal
import time
import sys
import os
# this is how long we wait for linuxcnc to do our bidding
timeout = 5.0
# unbuffer stdout
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
def wait_for_pin_value(pin_name, value, timeout=5.0):
start_time = time.time()
... | lgpl-2.1 | -3,073,658,006,003,501,600 | 21.383333 | 140 | 0.667908 | false |
alanljj/oca_hr | hr_holidays_extension/__openerp__.py | 18 | 2358 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, eit... | agpl-3.0 | -6,772,497,765,396,796,000 | 36.428571 | 96 | 0.659457 | false |
xlqian/navitia | source/jormungandr/jormungandr/parking_space_availability/car/car_park_provider_manager.py | 3 | 2267 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 | -4,376,935,729,621,410,300 | 41.773585 | 100 | 0.714601 | false |
MaPePeR/numpy | numpy/distutils/unixccompiler.py | 155 | 4656 | """
unixccompiler - can handle very long argument lists for ar.
"""
from __future__ import division, absolute_import, print_function
import os
from distutils.errors import DistutilsExecError, CompileError
from distutils.unixccompiler import *
from numpy.distutils.ccompiler import replace_method
from numpy.distutils.... | bsd-3-clause | -8,896,434,945,506,500,000 | 36.248 | 82 | 0.59622 | false |
ryfeus/lambda-packs | Sklearn_scipy_numpy/source/scipy/stats/morestats.py | 4 | 94486 | # Author: Travis Oliphant, 2002
#
# Further updates and enhancements by many SciPy developers.
#
from __future__ import division, print_function, absolute_import
import math
import warnings
from collections import namedtuple
import numpy as np
from numpy import (isscalar, r_, log, around, unique, asarray,
... | mit | 5,060,734,548,145,586,000 | 32.732953 | 103 | 0.596723 | false |
MobinRanjbar/hue | desktop/core/ext-py/Django-1.6.10/tests/view_tests/views.py | 49 | 10403 | from __future__ import absolute_import
import sys
from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.core.urlresolvers import get_resolver
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, render
from django.template import Co... | apache-2.0 | 5,810,045,380,074,093,000 | 35.247387 | 114 | 0.625204 | false |
emc-tridax/appengine-python-flask-master | lib/mysql/connector/charsets.py | 16 | 12326 | # -*- coding: utf-8 -*-
# MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. T... | apache-2.0 | -5,779,260,106,894,158,000 | 42.097902 | 78 | 0.563849 | false |
kupferlauncher/kupfer | kupfer/plugin/virtualbox/__init__.py | 2 | 5061 | # -*- coding: UTF-8 -*-
__kupfer_name__ = _("VirtualBox")
__kupfer_sources__ = ("VBoxMachinesSource", )
__description__ = _("Control VirtualBox Virtual Machines. "
"Supports both Sun VirtualBox and Open Source Edition.")
__version__ = "0.4"
__author__ = "Karol Będkowski <karol.bedkowski@gmail.com>"... | gpl-3.0 | -7,759,352,252,560,749,000 | 30.234568 | 84 | 0.602569 | false |
visualputty/Landing-Lights | django/template/debug.py | 232 | 3797 | from django.conf import settings
from django.template.base import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError
from django.utils.encoding import force_unicode
from django.utils.html import escape
from django.utils.safestring import SafeData, EscapeData
from django.utils.formats import localize
cl... | bsd-3-clause | -8,043,604,080,215,387,000 | 36.22549 | 104 | 0.62049 | false |
jhoos/django | django/contrib/gis/gdal/field.py | 122 | 6400 | from ctypes import byref, c_int
from datetime import date, datetime, time
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import ds as capi
from django.utils.encoding import force_text
# For more information, see the OG... | bsd-3-clause | -9,070,691,118,970,866,000 | 28.223744 | 93 | 0.622188 | false |
nirgal/ngw | core/management/commands/recover_contacts.py | 1 | 1347 | import logging
from django.core.management.base import BaseCommand
from ngw.core import perms
from ngw.core.models import GROUP_EVERYBODY, Contact
class Command(BaseCommand):
help = 'Recover lost contacts'
def handle(self, *args, **options):
logger = logging.getLogger('contactrecover')
hand... | bsd-2-clause | -7,663,422,970,292,973,000 | 35.405405 | 69 | 0.580549 | false |
microelly2/cadquery-freecad-module | CadQuery/Libs/docutils/languages/he.py | 148 | 2683 | # Author: Meir Kriheli
# Id: $Id: he.py 4837 2006-12-26 09:59:41Z sfcben $
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each language:... | lgpl-3.0 | -664,796,678,762,188,300 | 43.716667 | 96 | 0.666045 | false |
mzl9039/spark | examples/src/main/python/ml/estimator_transformer_param_example.py | 123 | 3952 | #
# 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 us... | apache-2.0 | -6,660,967,230,883,395,000 | 41.494624 | 88 | 0.693573 | false |
kupferlauncher/kupfer | oldplugins/epiphany.py | 2 | 1247 | __kupfer_name__ = _("Epiphany Bookmarks")
__kupfer_sources__ = ("EpiphanySource", )
__description__ = _("Index of Epiphany bookmarks")
__version__ = ""
__author__ = "Ulrik Sverdrup <ulrik.sverdrup@gmail.com>"
import os
from kupfer.objects import Source
from kupfer.objects import UrlLeaf
from kupfer.obj.apps import Ap... | gpl-3.0 | 3,443,052,306,176,774,000 | 29.414634 | 78 | 0.65437 | false |
drnextgis/QGIS | python/ext-libs/pygments/lexers/_lassobuiltins.py | 77 | 137633 | # -*- coding: utf-8 -*-
"""
pygments.lexers._lassobuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Built-in Lasso types, traits, and methods.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
BUILTINS = {
'Types': [
'null',
'... | gpl-2.0 | 5,410,021,640,020,504,000 | 24.412297 | 70 | 0.494947 | false |
andreparrish/python-for-android | python3-alpha/python3-src/Lib/tkinter/test/test_ttk/test_style.py | 54 | 2792 | import unittest
import tkinter
from tkinter import ttk
from test.support import requires, run_unittest
import tkinter.test.support as support
requires('gui')
class StyleTest(unittest.TestCase):
def setUp(self):
self.style = ttk.Style()
def test_configure(self):
style = self.style
s... | apache-2.0 | 2,120,288,092,886,496,300 | 29.681319 | 75 | 0.601361 | false |
boghison/servo | tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py | 139 | 2863 | # 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/.
import unittest
from cStringIO import StringIO
from ..backends import static
# There aren't many tests here because i... | mpl-2.0 | -1,853,606,944,721,808,400 | 26.266667 | 86 | 0.603912 | false |
akintoey/django | django/template/engine.py | 48 | 7528 | from django.core.exceptions import ImproperlyConfigured
from django.utils import lru_cache, six
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
from .base import Context, Template
from .context import _builtin_context_processors
from .exceptions import Template... | bsd-3-clause | 5,827,111,131,393,297,000 | 37.408163 | 79 | 0.606536 | false |
tobias47n9e/social-core | social_core/backends/amazon.py | 4 | 1572 | """
Amazon OAuth2 backend, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/amazon.html
"""
import ssl
from .oauth import BaseOAuth2
class AmazonOAuth2(BaseOAuth2):
name = 'amazon'
ID_KEY = 'user_id'
AUTHORIZATION_URL = 'https://www.amazon.com/ap/oa'
ACCESS_TOKEN_URL = 'https... | bsd-3-clause | 6,753,713,257,749,725,000 | 33.933333 | 76 | 0.568702 | false |
Endika/odoo | addons/account/wizard/account_report_common_journal.py | 385 | 2942 | # -*- 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,959,740,512,365,417,000 | 53.481481 | 196 | 0.619307 | false |
makc/three.js.fork | utils/exporters/max/annotate/annotate.py | 160 | 3036 | #!/usr/bin/env python
__author__ = 'Andrew Dunai <andrew@dun.ai>'
import sys
import json
import argparse
import re
from collections import namedtuple
try:
from PyQt4 import QtGui
import argparseui
except ImportError:
CAN_GUI = False
else:
CAN_GUI = True
range_regexp = re.compile(r'^([\w\d]+)\=([\d]+)... | mit | -16,626,334,993,806,738 | 28.475728 | 137 | 0.605731 | false |
pombredanne/unuk | examples/newrpc.py | 1 | 1067 | '''Experimenting with the new JSON-RPC Server
'''
import sys
import datetime
import logging
from environment import settings, local_dir
from siro.core.api import siro_api
from djpcms import http
from django.core.handlers import wsgi
from gevent.wsgi import WSGIServer
class WSGIHandler(wsgi.WSGIHandler)... | bsd-3-clause | -4,553,028,219,357,513,700 | 26.837838 | 62 | 0.595127 | false |
bmanojlovic/ansible | lib/ansible/plugins/terminal/vyos.py | 10 | 1815 | #
# (c) 2016 Red Hat Inc.
#
# 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 d... | gpl-3.0 | 3,744,758,899,025,155,600 | 31.410714 | 83 | 0.659504 | false |
mattnenterprise/servo | tests/wpt/web-platform-tests/resources/test/conftest.py | 4 | 4612 | import io
import json
import os
import html5lib
import pytest
from selenium import webdriver
from wptserver import WPTServer
ENC = 'utf8'
HERE = os.path.dirname(os.path.abspath(__file__))
WPT_ROOT = os.path.normpath(os.path.join(HERE, '..', '..'))
HARNESS = os.path.join(HERE, 'harness.html')
def pytest_addoption(pa... | mpl-2.0 | 662,426,432,532,448,600 | 32.42029 | 124 | 0.614267 | false |
tomhughes/python-mapnik | test/python_tests/python_plugin_test.py | 6 | 6233 | # #!/usr/bin/env python
# # -*- coding: utf-8 -*-
# import os
# import math
# import mapnik
# import sys
# from utilities import execution_path, run_all
# from nose.tools import *
# def setup():
# # All of the paths used are relative, if we run the tests
# # from another directory we need to chdir()
# os.... | lgpl-2.1 | -229,647,733,415,159,580 | 37.95625 | 110 | 0.567143 | false |
sfepy/sfepy | sfepy/homogenization/coefs_elastic.py | 4 | 3052 | from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, assert_, get_default, Struct
from sfepy.homogenization.coefs_base import CorrSolution, \
TCorrectorsViaPressureEVP, CorrMiniApp
from sfepy.solvers.ts import TimeStepper
from six.moves import range
class PressureRHSVecto... | bsd-3-clause | 7,432,485,059,719,970,000 | 31.468085 | 74 | 0.580931 | false |
baylee/django | tests/template_tests/syntax_tests/test_firstof.py | 177 | 3215 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class FirstOfTagTests(SimpleTestCase):
@setup({'firstof01': '{% firstof a b c %}'})
def test_firstof01(self):
output = self.engine.render_to_string('firstof01', {'a': 0, 'c': 0, 'b': 0})
... | bsd-3-clause | 763,016,106,388,113,900 | 37.27381 | 84 | 0.569518 | false |
likaiwalkman/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/port/server_process_unittest.py | 121 | 5514 | # Copyright (C) 2011 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 of conditions and the f... | bsd-3-clause | 479,073,677,663,798,500 | 35.276316 | 147 | 0.68317 | false |
dhp-denero/LibrERP | account_vat_period_end_statement/report/vat_period_end_statement.py | 2 | 4638 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>).
# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C)... | agpl-3.0 | 736,693,130,310,671,200 | 47.821053 | 143 | 0.583657 | false |
usakhelo/FreeCAD | src/Mod/Ship/shipHydrostatics/Tools.py | 3 | 18781 | #***************************************************************************
#* *
#* Copyright (c) 2011, 2016 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | lgpl-2.1 | -1,961,743,855,603,390,200 | 33.170412 | 80 | 0.569192 | 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.