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 |
|---|---|---|---|---|---|---|---|---|---|---|
alajara/servo | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_serializer.py | 451 | 7186 | from __future__ import absolute_import, division, unicode_literals
import json
import unittest
from .support import get_data_files
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals
import html5lib
from html5lib import constants
from html... | mpl-2.0 | 5,229,671,281,877,946,000 | 39.370787 | 145 | 0.58447 | false |
ckuethe/gnuradio | gr-wxgui/python/wxgui/powermate.py | 76 | 15224 | #!/usr/bin/env python
#
# 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)
# ... | gpl-3.0 | 1,993,996,983,538,044,200 | 32.982143 | 109 | 0.541776 | false |
mramire8/active | strategy/baselearner.py | 1 | 1612 | __author__ = 'mramire8'
__copyright__ = "Copyright 2013, ML Lab"
__version__ = "0.1"
__status__ = "Development"
import numpy as np
import copy
import random
class BaseLearner(object):
def __init__(self, model=None, cost_model=None, accuracy_model=None, budget=None, seed=1234567, subpool=None):
self.cur... | apache-2.0 | 7,678,119,458,460,675,000 | 29.415094 | 114 | 0.630273 | false |
makism/dyfunconn | examples/python_try_new_class_system.py | 1 | 2152 | # -*- coding: utf-8 -*-
import time
import numpy as np
np.set_printoptions(precision=3, linewidth=80)
from dyconnmap import tvfcg, tvfcg_cfc
from dyconnmap.fc import MI, PLV, PLI
from dyconnmap.fc import PAC
from dyconnmap.fc import plv_within
def try_PLV(data):
fb = [1.0, 4.0]
fs = 128
pairs = None
... | bsd-3-clause | -3,723,260,109,680,580,600 | 19.301887 | 76 | 0.559944 | false |
kasioumis/invenio | invenio/legacy/websubmit/functions/Report_Number_Generation.py | 13 | 10886 | # This file is part of Invenio.
# Copyright (C) 2004, 2005, 2006, 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, or (at your o... | gpl-2.0 | -5,038,158,921,008,335,000 | 42.027668 | 101 | 0.556862 | false |
eliasbakken/OctoPrint | src/octoprint/util/jinja.py | 2 | 1934 | # coding=utf-8
from __future__ import absolute_import
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
import os
from jinja2.loaders import FileSystemLoader, TemplateNotFound... | agpl-3.0 | -8,209,287,002,923,918,000 | 37.68 | 118 | 0.736815 | false |
redox/mongo-connector | tests/setup_cluster.py | 38 | 7179 | # Copyright 2013-2014 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | -4,642,040,352,910,907,000 | 31.931193 | 80 | 0.590751 | false |
amith01994/intellij-community | python/helpers/pydev/tests/test_pydevconsole.py | 41 | 10674 | import threading
import unittest
import sys
import pydevconsole
from pydev_imports import xmlrpclib, SimpleXMLRPCServer, StringIO
try:
raw_input
raw_input_name = 'raw_input'
except NameError:
raw_input_name = 'input'
#========================================================================================... | apache-2.0 | -8,009,938,499,909,770,000 | 40.053846 | 132 | 0.492974 | false |
trong-nguyen/algorithms | leet/count_primes.py | 1 | 2279 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Count the number of prime numbers less than a non-negative number, n.
SOLUTION:
Consider global solution:
- The algorithm scans for all non-prime numbers up to a limit
- Instead of local solution of checking if is prime for each number within a limit
... | gpl-3.0 | -7,047,460,676,325,563,000 | 23.782609 | 90 | 0.52172 | false |
UK992/servo | tests/wpt/web-platform-tests/xhr/resources/access-control-preflight-denied.py | 23 | 1608 | def main(request, response):
def fail(message):
response.content = "FAIL: " + str(message)
response.status = 400
def getState(token):
server_state = request.server.stash.take(token)
if not server_state:
return "Uninitialized"
return server_state
def setS... | mpl-2.0 | -840,914,529,685,363,300 | 31.816327 | 86 | 0.58893 | false |
aalitaiga/improved_wgan_training | gan_language.py | 4 | 6950 | import os, sys
sys.path.append(os.getcwd())
import time
import numpy as np
import tensorflow as tf
import language_helpers
import tflib as lib
import tflib.ops.linear
import tflib.ops.conv1d
import tflib.plot
# Download Google Billion Word at http://www.statmt.org/lm-benchmark/ and
# fill in the path to the extract... | mit | 4,650,973,028,392,433,000 | 35.968085 | 128 | 0.646619 | false |
DD1984/skydrop_stm32 | skydrop/utils/hex2bin/main.py | 2 | 2166 | #!/usr/bin/python
import sys
from intelhex import IntelHex
import time
import datetime
import struct
def add8(a, b):
return (a + b & 0xFF)
page_size = 255
class Hex2BinConv():
def __init__(self, out):
self.hex = IntelHex()
self.out = out
def load(self, filename):
print... | gpl-2.0 | 1,588,187,924,745,885,200 | 21.329897 | 64 | 0.472761 | false |
jaxkodex/odoo | addons/auth_oauth/auth_oauth.py | 321 | 1135 | from openerp.osv import osv, fields
class auth_oauth_provider(osv.osv):
"""Class defining the configuration values of an OAuth2 provider"""
_name = 'auth.oauth.provider'
_description = 'OAuth2 provider'
_order = 'name'
_columns = {
'name' : fields.char('Provider name', required=True), ... | agpl-3.0 | 6,211,380,607,780,180,000 | 44.4 | 126 | 0.592952 | false |
xinxian0458/dcos | packages/logrotate/extra/delete-oldest-unmanaged-files.py | 17 | 2067 | #!/opt/mesosphere/bin/python3
import logging
import os
import sys
import time
def main(directory, max_files, managed_file):
'''
Finds all files under the given `directory` and checks if the number
of files exceeds the `max_files`. If so, deletes files starting from
the oldest (except for the `manage... | apache-2.0 | -7,966,963,748,592,092,000 | 34.637931 | 96 | 0.654088 | false |
kamcpp/tensorflow | tensorflow/python/ops/control_flow_ops.py | 3 | 118286 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,359,887,752,298,301,000 | 37.466992 | 80 | 0.657905 | false |
TribeMedia/synapse | synapse/handlers/events.py | 2 | 5212 | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 2,566,429,061,273,557,000 | 33.746667 | 88 | 0.575595 | false |
erjohnso/ansible | lib/ansible/plugins/lookup/keyring.py | 82 | 1968 | # (c) 2016, Samuel Boucher <boucher.samuel.c@gmail.com>
# (c) 2017 Ansible Project
# 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
DOCUMENTATION = """
lookup: keyring
author:
... | gpl-3.0 | -970,137,281,912,683,500 | 27.114286 | 102 | 0.657012 | false |
Ayub-Khan/edx-platform | lms/djangoapps/shoppingcart/tests/test_context_processor.py | 134 | 3312 | """
Unit tests for shoppingcart context_processor
"""
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from mock import patch, Mock
from course_modes.tests.factories import CourseModeFactory
from student.tests.factories import UserFactory
from xmodule.modulestore.tests.django_utils... | agpl-3.0 | 4,021,099,158,183,027,000 | 39.390244 | 108 | 0.683877 | false |
gptech/ansible | lib/ansible/modules/network/nxos/nxos_switchport.py | 39 | 21001 | #!/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 | -3,950,704,395,899,067,400 | 32.494418 | 117 | 0.602924 | false |
linktlh/Toontown-journey | toontown/minigame/RingTracks.py | 6 | 2988 | import math
import RingTrack
import RingAction
center = (0, 0)
up = (0, 1)
down = (0, -1)
left = (-1, 0)
right = (1, 0)
ul = (-1, 1)
ur = (1, 1)
lr = (1, -1)
ll = (-1, -1)
def ringLerp(t, a, b):
omT = 1.0 - t
return (float(a[0]) * omT + float(b[0]) * t, float(a[1]) * omT + float(b[1]) * t)
def ringClerp(t, a... | apache-2.0 | -4,635,712,970,709,711,000 | 29.489796 | 167 | 0.618139 | false |
pokerregion/poker | tests/test_rank.py | 1 | 2307 | import pytest
from poker.card import Rank
def test_comparisons():
assert Rank("A") > Rank("K")
assert Rank("K") > Rank("Q")
assert Rank("Q") > Rank("J")
assert Rank("J") > Rank("T")
assert Rank("T") > Rank("9")
assert Rank("9") > Rank("2")
assert Rank("A") > Rank("2")
def test_comparison... | mit | -1,857,623,386,264,621,800 | 23.806452 | 54 | 0.545297 | false |
heromod/migrid | mig/shared/logger.py | 1 | 4910 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# logger - logging helpers
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | gpl-2.0 | -1,364,135,134,037,442,800 | 30.273885 | 90 | 0.641955 | false |
kswiat/django | django/contrib/gis/tests/maps/tests.py | 104 | 1330 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import skipUnless
from django.contrib.gis.geos import HAS_GEOS
from django.test import TestCase
from django.test.utils import override_settings
GOOGLE_MAPS_API_KEY = 'XXXX'
@skipUnless(HAS_GEOS, 'Geos is required.')
class GoogleMapsTest(... | bsd-3-clause | -3,768,351,385,002,786,000 | 32.175 | 74 | 0.66315 | false |
cnheitman/barf-project | tests/__init__.py | 98 | 1345 | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | bsd-2-clause | -3,104,222,423,660,205,600 | 57.478261 | 80 | 0.793309 | false |
taotao54321/td6502 | td6502/dis.py | 1 | 6795 | # -*- coding: utf-8 -*-
from .op import Op
from .db import DataType
from . import util
def _hex_dollar(value, size):
fmt = "${{:0{}X}}".format(2 * size)
return fmt.format(value)
def _disp_str(disp):
return "{:+d}".format(disp) if disp else ""
def _operand(addr, operand):
return operand
class MD6... | gpl-3.0 | -4,905,194,836,073,422,000 | 29.758794 | 95 | 0.499918 | false |
lllcho/CAPTCHA-breaking | keras-master/keras/optimizers.py | 3 | 7560 | from __future__ import absolute_import
import theano
import theano.tensor as T
import numpy as np
from .utils.theano_utils import shared_zeros, shared_scalar, floatX
from six.moves import zip
def clip_norm(g, c, n):
if c > 0:
g = T.switch(T.ge(n, c), g * c / n, g)
return g
def kl_divergence(p, p_ha... | mit | 1,331,476,002,159,225,900 | 32.75 | 104 | 0.55119 | false |
agincel/AdamTestBot | src/Community/utils.py | 1 | 2463 | import csv
import os
from pydblite import Base
def convertcsv2db(csvpath, dbpath): #Converts a CSV file to a PyDBLite database
db = Base(dbpath)
try:
csvfile = open(csvpath, 'rb')
except csv.Error:
print("Could not open CSV file at " + csvpath + "\n")
reader = csv.reader(csvfi... | mit | -4,960,313,044,329,329,000 | 33.185714 | 79 | 0.492895 | false |
deKupini/erp | addons/note/note.py | 7 | 8765 | # -*- 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 | -3,764,490,294,974,193,700 | 43.267677 | 131 | 0.545465 | false |
wakatime/sketch-wakatime | WakaTime.sketchplugin/Contents/Resources/wakatime/packages/pygments/lexers/theorem.py | 31 | 19034 | # -*- coding: utf-8 -*-
"""
pygments.lexers.theorem
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for theorem-proving languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, default, words
from py... | bsd-3-clause | -5,279,577,722,645,779,000 | 40.447598 | 90 | 0.491861 | false |
JizhouZhang/SDR | gr-blocks/python/blocks/qa_min.py | 46 | 5641 | #!/usr/bin/env python
#
# Copyright 2014 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)
# ... | gpl-3.0 | 9,043,698,824,032,412,000 | 30.691011 | 80 | 0.600248 | false |
bosstb/HaberPush | youtube_dl/extractor/melonvod.py | 64 | 2251 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
urljoin,
)
class MelonVODIE(InfoExtractor):
_VALID_URL = r'https?://vod\.melon\.com/video/detail2\.html?\?.*?mvId=(?P<id>[0-9]+)'
_TEST = {
'url': 'http://vod.melon.com... | mit | -2,327,395,442,052,264,000 | 30.180556 | 89 | 0.524276 | false |
DivineHime/seishirou | lib/youtube_dl/extractor/rutv.py | 21 | 7710 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none
)
class RUTVIE(InfoExtractor):
IE_DESC = 'RUTV.RU'
_VALID_URL = r'''(?x)
https?://player\.(?:rutv\.ru|vgtrk\.com)/
(?P<path>flash\... | gpl-3.0 | 6,016,491,024,670,163,000 | 36 | 190 | 0.465451 | false |
MwanzanFelipe/rockletonfortune | lib/django/contrib/gis/geos/prototypes/prepared.py | 288 | 1214 | from ctypes import c_char
from django.contrib.gis.geos.libgeos import (
GEOM_PTR, PREPGEOM_PTR, GEOSFuncFactory,
)
from django.contrib.gis.geos.prototypes.errcheck import check_predicate
# Prepared geometry constructor and destructors.
geos_prepare = GEOSFuncFactory('GEOSPrepare', argtypes=[GEOM_PTR], restype=PRE... | bsd-3-clause | -8,129,116,646,527,880,000 | 39.466667 | 88 | 0.814662 | false |
DanteOnline/free-art | venv/lib/python3.4/site-packages/django/db/migrations/topological_sort.py | 538 | 1129 | def topological_sort_as_sets(dependency_graph):
"""Variation of Kahn's algorithm (1962) that returns sets.
Takes a dependency graph as a dictionary of node => dependencies.
Yields sets of items in topological order, where the first set contains
all nodes without dependencies, and each following set co... | gpl-3.0 | 8,548,749,449,016,467,000 | 35.419355 | 75 | 0.643047 | false |
hootnot/oanda-api-v20 | oandapyV20/contrib/requests/stoplossorder.py | 1 | 2841 | # -*- coding: utf-8 -*-
from .baserequest import BaseRequest
from oandapyV20.types import TradeID, PriceValue
from oandapyV20.definitions.orders import TimeInForce, OrderType
class StopLossOrderRequest(BaseRequest):
"""create a StopLossOrderRequest.
StopLossOrderRequest is used to build the body for a StopL... | mit | 8,785,285,964,068,080,000 | 30.566667 | 75 | 0.555086 | false |
gandalfcode/gandalf | tests/paper_tests/khitest.py | 1 | 4705 | #==============================================================================
# khitest.py
#==============================================================================
from gandalf.analysis.facade import *
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib import rc
import time
rc('font',... | gpl-2.0 | -648,978,501,536,325,400 | 39.560345 | 89 | 0.63847 | false |
openweave/openweave-core | src/test-apps/happy/test-templates/WeaveMessageLayer.py | 1 | 7873 | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lic... | apache-2.0 | 7,145,592,279,625,196,000 | 31.66805 | 129 | 0.606376 | false |
gotostack/neutron-lbaas | neutron_lbaas/services/loadbalancer/agent/agent_api.py | 3 | 2665 | # Copyright 2013 New Dream Network, LLC (DreamHost)
#
# 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 a... | apache-2.0 | 8,539,340,462,518,610,000 | 38.191176 | 78 | 0.641651 | false |
malmiron/incubator-airflow | airflow/contrib/kubernetes/kubernetes_request_factory/kubernetes_request_factory.py | 5 | 6945 | # 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 | 3,499,573,402,791,177,700 | 34.984456 | 83 | 0.569906 | false |
poljeff/odoo | openerp/addons/base/tests/test_res_config.py | 398 | 3532 | import unittest2
import openerp
import openerp.tests.common as common
class test_res_config(common.TransactionCase):
def setUp(self):
super(test_res_config, self).setUp()
self.res_config = self.registry('res.config.settings')
# Define the test values
self.menu_xml_id = 'base.menu... | agpl-3.0 | 1,617,080,961,988,539,100 | 43.15 | 144 | 0.657135 | false |
slevenhagen/odoo-npg | addons/account/project/__init__.py | 427 | 1100 | # -*- 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... | agpl-3.0 | 644,465,963,271,908,000 | 38.285714 | 79 | 0.614545 | false |
astrophysicist87/iEBE-Plumberg | EBE-Node/iSS/utilities/for_paraview/lib/DataSet.py | 9 | 3486 | #!/usr/bin/env python
"""
DataSet
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | gpl-3.0 | -7,365,422,129,683,424,000 | 34.938144 | 106 | 0.590935 | false |
Bigfootjon/lowerpines | lowerpines/endpoints/message.py | 1 | 7812 | # pyre-strict
from typing import TYPE_CHECKING, Optional, Dict, List, Any
from lowerpines.endpoints.object import AbstractObject, Field, RetrievableObject
from lowerpines.endpoints.request import Request, JsonType
from lowerpines.endpoints.like import LikeCreateRequest, LikeDestroyRequest
from lowerpines.exceptions im... | lgpl-3.0 | 6,090,418,223,049,099,000 | 32.672414 | 86 | 0.562212 | false |
sszlm/MissionPlanner | Lib/ntpath.py | 52 | 18605 | # Module 'ntpath' -- common operations on WinNT/Win95 pathnames
"""Common pathname manipulations, WindowsNT/95 version.
Instead of importing this module directly, import os and refer to this
module as os.path.
"""
import os
import sys
import stat
import genericpath
import warnings
from genericpath impor... | gpl-3.0 | -1,314,451,221,797,828,400 | 33.573614 | 80 | 0.533835 | false |
chenm001/connectal | scripts/makefilegen.py | 2 | 29363 | #!/usr/bin/env python
## Copyright (c) 2013-2014 Quanta Research Cambridge, Inc.
## 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 r... | mit | 1,044,540,625,364,507,500 | 49.193162 | 286 | 0.615503 | false |
lightcn/odoo | openerp/osv/osv.py | 337 | 1384 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,869,431,102,823,165,000 | 39.705882 | 78 | 0.653902 | false |
SlimRemix/android_external_chromium_org | third_party/cython/src/Cython/Tests/TestStringIOTree.py | 113 | 1940 | import unittest
from Cython import StringIOTree as stringtree
code = """
cdef int spam # line 1
cdef ham():
a = 1
b = 2
c = 3
d = 4
def eggs():
pass
cpdef bacon():
print spam
print 'scotch'
print 'tea?'
print 'or coffee?' # line 16
"""
linemap = dict(... | bsd-3-clause | -7,696,227,429,983,951,000 | 27.955224 | 80 | 0.61701 | false |
bottompawn/kbengine | kbe/src/lib/python/Lib/test/test_sysconfig.py | 80 | 16880 | import unittest
import sys
import os
import subprocess
import shutil
from copy import copy
from test.support import (run_unittest, TESTFN, unlink, check_warnings,
captured_stdout, skip_unless_symlink)
import sysconfig
from sysconfig import (get_paths, get_platform, get_config_vars,
... | lgpl-3.0 | -8,081,205,089,061,203,000 | 38.905437 | 97 | 0.552133 | false |
aizvorski/vgg-benchmarks | benchmark_keras.py | 1 | 1707 | import argparse
import os
import os.path
parser = argparse.ArgumentParser()
parser.add_argument("--backend")
args = parser.parse_args()
os.environ['KERAS_BACKEND'] = args.backend
import tensorflow.python.keras.backend
if args.backend == "theano":
tensorflow.python.keras.backend.set_image_dim_ordering("th")
elif... | mit | -9,149,036,807,014,689,000 | 26.532258 | 88 | 0.705917 | false |
ReneVolution/memory_task_queue | memory_task_queue/tests/test_memory_task_queue.py | 1 | 1619 | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from mock import Mock
from memory_task_queue import MemoryTaskQueue
class TestMemoryTaskQueue(object):
def setup_method(self, test_method):
pass
def teardown_method(self, test_metho... | gpl-3.0 | -7,258,049,470,522,207,000 | 20.586667 | 67 | 0.579988 | false |
cluckmaster/MissionPlanner | Lib/site-packages/scipy/optimize/tests/test_slsqp.py | 59 | 3042 | from numpy.testing import assert_array_almost_equal, TestCase, run_module_suite
import numpy as np
from scipy.optimize import fmin_slsqp
class TestSLSQP(TestCase):
"""Test fmin_slsqp using Example 14.4 from Numerical Methods for
Engineers by Steven Chapra and Raymond Canale. This example
maximizes the ... | gpl-3.0 | 6,699,094,750,347,422,000 | 33.568182 | 85 | 0.506903 | false |
SatoshiNXSimudrone/sl4a-damon-clone | python/src/Lib/plat-mac/lib-scriptpackages/Netscape/Standard_URL_suite.py | 80 | 1527 | """Suite Standard URL suite: Mac URL standard, supported by many apps
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'GURL'... | apache-2.0 | 7,100,310,046,819,766,000 | 24.45 | 126 | 0.628029 | false |
azverkan/scons | test/VariantDir/nested-sconscripts.py | 5 | 2095 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | mit | -2,817,114,746,603,953,000 | 28.928571 | 73 | 0.697375 | false |
frt-arch/taiga-back | taiga/webhooks/serializers.py | 2 | 5733 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 | -4,231,179,765,393,484,300 | 31.748571 | 101 | 0.715931 | false |
GuilhermeGSousa/ardupilot | Tools/LogAnalyzer/tests/TestGPSGlitch.py | 273 | 2325 | from LogAnalyzer import Test,TestResult
import DataflashLog
class TestGPSGlitch(Test):
'''test for GPS glitch reporting or bad GPS data (satellite count, hdop)'''
def __init__(self):
Test.__init__(self)
self.name = "GPS"
def run(self, logdata, verbose):
self.result = TestResult()
self.result.status = Tes... | gpl-3.0 | -3,173,502,529,175,899,600 | 40.517857 | 146 | 0.715269 | false |
atarw/atarw.github.io | src/site.py | 1 | 1045 | import sys
from flask import Flask, render_template
from flask_flatpages import FlatPages
from flask_frozen import Freezer
DEBUG = True
FLATPAGES_AUTO_RELOAD = DEBUG
FLATPAGES_EXTENSION = '.md'
app = Flask (__name__)
app.config.from_object (__name__)
pages = FlatPages (app)
freezer = Freezer (app)
PROJECT_TAG = 'p... | cc0-1.0 | 8,500,176,312,860,004,000 | 23.880952 | 74 | 0.667943 | false |
rmosolgo/libgraphqlparser | ast/ast_js.py | 12 | 1738 | # Copyright (c) 2015, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
class Printer(object):
def __... | bsd-3-clause | -7,488,900,058,225,330,000 | 24.188406 | 81 | 0.632911 | false |
rcharp/Simple | dependencies/flask-user/flask_user/tests/conftest.py | 11 | 1758 | import os
import pytest
from flask_user.tests.tst_app import app as the_app, init_app
from flask_user.tests.tst_utils import TstClient
@pytest.fixture(scope='session')
def app(request):
test_config = dict(
SQLALCHEMY_DATABASE_URI='sqlite:///:memory:', # In-memory sqlite DB
TESTING=True, ... | bsd-2-clause | 2,041,829,279,118,016,500 | 25.636364 | 83 | 0.666667 | false |
romain-dartigues/ansible | test/units/module_utils/facts/base.py | 47 | 2309 | # base unit test classes for ansible/module_utils/facts/ tests
# -*- coding: utf-8 -*-
#
# 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 lat... | gpl-3.0 | -3,599,377,169,285,429,000 | 36.852459 | 96 | 0.666089 | false |
xedin/swift | utils/swift_build_support/swift_build_support/shell.py | 9 | 7202 | # swift_build_support/shell.py ----------------------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.tx... | apache-2.0 | 6,279,406,330,362,032,000 | 26.075188 | 78 | 0.578173 | false |
xedin/swift | utils/sil-opt-verify-all-modules.py | 65 | 5971 | #!/usr/bin/env python
# utils/sil-opt-verify-all-modules.py - Verifies Swift modules -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:/... | apache-2.0 | -8,797,990,781,757,222,000 | 33.12 | 78 | 0.604589 | false |
projectbuildcraft/buildcraft | gui.py | 1 | 23499 | """
Copyright (C) 2013 Project Buildcraft
License notice in buildcraft.py
"""
from Tkinter import *
from constants import events
from constants import CHRONO_BOOST, LARVA
from PIL import Image, ImageTk
import random
import math
import tkFileDialog
import bcorder
from ToolTip import ToolTip
from ScrolledFrame im... | gpl-3.0 | -4,562,146,217,158,803,000 | 38.427852 | 190 | 0.596238 | false |
Scthe/cnn-Super-Resolution | profile.py | 1 | 1657 | import re
import time
import subprocess
epochs = 100
seconds_per_epoch = 0.236
cmd = 'bin\\cnn.exe train dry -c data\config.json --epochs {0:} -i data\\train_samples36'.format(epochs)
kernel_profile_regex = "Kernel '.*/(.*?]).*?([\-e.\d]+)ns.*?([\-e.\d]+)s"
def get_kernel_profiling_info(out):
out = out.decode('UTF-... | mit | -808,814,625,142,033,000 | 30.264151 | 104 | 0.590223 | false |
ghickman/django | tests/model_validation/tests.py | 292 | 2117 | from django.core import management
from django.core.checks import Error, run_checks
from django.db.models.signals import post_init
from django.test import SimpleTestCase
from django.test.utils import override_settings
from django.utils import six
class OnPostInit(object):
def __call__(self, **kwargs):
pas... | bsd-3-clause | -5,621,680,966,574,324,000 | 35.5 | 79 | 0.613604 | false |
gunny26/datalogger | development/debug_raw_read_vicenter.py | 1 | 1498 | #!/usr/bin/python
import gzip
import json
import logging
logging.basicConfig(level=logging.INFO, format="%(message)s")
meta_data = json.load(open("/var/rrd/vicenter/meta/hostSystemMemoryStats.json"))
print meta_data
#last_value = {}
with gzip.open("/var/rrd/vicenter/raw/hostSystemMemoryStats_2017-03-10.csv.gz") as ra... | apache-2.0 | 2,478,782,994,937,145,000 | 44.393939 | 103 | 0.596128 | false |
lucasdavila/web2py-appreport | modules/plugin_appreport/libs/appreport/libs/pisa/xhtml2pdf/sx/w3c/cssSpecial.py | 16 | 14719 | # -*- coding: ISO-8859-1 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 requir... | lgpl-3.0 | 4,366,074,409,205,720,000 | 34.131265 | 159 | 0.463211 | false |
darktools/DarkToolsFramework | bandits/whois_domain/whois_domain.py | 1 | 2998 | from nameko.events import BROADCAST, event_handler
from sharingthelove import *
# --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- # --- #
def do_work_son(sProject, sUniqSelectorId, sUniqTargetId, sDomain, sIp, sProtocol, sOpenTcpPort, sTcpService):
g... | apache-2.0 | -2,254,514,285,132,046,000 | 38.986667 | 295 | 0.523015 | false |
cedadev/cis | cis/plotting/histogram2d.py | 2 | 2785 | """
A '2D' Histogram plot - e.g. one that has data on both the x and y axis. This is generated using numpy.histogram2d and
a call to pcolormesh. Although strictly a 2D plot it inherits from ComparativeScatter rather than Generic2D because
the unpacking has more in common with that.
"""
from cis.plotting.comparativescat... | lgpl-3.0 | 1,777,014,144,367,823,000 | 44.655738 | 118 | 0.67325 | false |
15Dkatz/pants | contrib/cpp/src/python/pants/contrib/cpp/tasks/cpp_run.py | 16 | 1449 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.base.work... | apache-2.0 | 1,693,947,376,217,543,700 | 31.931818 | 93 | 0.691511 | false |
maohongyuan/kbengine | kbe/res/scripts/common/Lib/asyncio/streams.py | 63 | 16169 | """Stream-related things."""
__all__ = ['StreamReader', 'StreamWriter', 'StreamReaderProtocol',
'open_connection', 'start_server',
'IncompleteReadError',
]
import socket
if hasattr(socket, 'AF_UNIX'):
__all__.extend(['open_unix_connection', 'start_unix_server'])
from . import co... | lgpl-3.0 | 711,626,350,286,188,500 | 32.338144 | 79 | 0.585441 | false |
KuroeKurose/gem5 | src/python/_m5/__init__.py | 2 | 2213 | # Copyright (c) 2016 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause | -7,410,492,662,183,811,000 | 55.74359 | 72 | 0.794849 | false |
eranchetz/nupic | nupic/frameworks/opf/modelfactory.py | 26 | 3154 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | -7,140,496,998,736,110,000 | 34.438202 | 79 | 0.688649 | false |
midori1/midorinoblog | site-packages/django/contrib/auth/tests/urls.py | 62 | 5301 | from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.contrib.auth import context_processors
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.urls import urlpatterns
from django.contrib.auth.views import password_reset, login
from django.contri... | apache-2.0 | -4,718,826,718,676,428,000 | 49.485714 | 169 | 0.717789 | false |
mgood7123/UPM | Sources/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/NeHe/lesson6.py | 2 | 9378 | #!
# This is statement is required by the build system to query build info
if __name__ == '__build__':
raise Exception
import string
__version__ = string.split('$Revision: 1.1.1.1 $')[1]
__date__ = string.join(string.split('$Date: 2007/02/15 19:25:21 $')[1:3], ' ')
__author__ = 'Tarn Weisner Burton <twburton@users.s... | gpl-3.0 | 3,984,050,968,254,675,000 | 39.951965 | 136 | 0.690872 | false |
tinkerthaler/odoo | addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py | 384 | 4437 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 | 2,532,412,186,721,839,000 | 37.582609 | 122 | 0.560514 | false |
longman694/youtube-dl | youtube_dl/extractor/nhl.py | 46 | 13807 | from __future__ import unicode_literals
import re
import json
import os
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
compat_urllib_parse_urlencode,
compat_urllib_parse_urlparse,
compat_str,
)
from ..utils import (
unified_strdate,
determine_ext,
int_or_none,
... | unlicense | 2,662,867,705,366,621,700 | 38.336182 | 180 | 0.529442 | false |
ville-k/tensorflow | tensorflow/contrib/rnn/python/kernel_tests/rnn_test.py | 22 | 19649 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,370,113,122,072,798,000 | 41.995624 | 80 | 0.61138 | false |
dendisuhubdy/tensorflow | tensorflow/contrib/__init__.py | 2 | 4603 | # pylint: disable=g-import-not-at-top
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | apache-2.0 | 7,634,922,910,206,906,000 | 39.734513 | 85 | 0.823593 | false |
tntC4stl3/scrapy | tests/test_utils_defer.py | 121 | 3565 | from twisted.trial import unittest
from twisted.internet import reactor, defer
from twisted.python.failure import Failure
from scrapy.utils.defer import mustbe_deferred, process_chain, \
process_chain_both, process_parallel, iter_errback
from six.moves import xrange
class MustbeDeferredTest(unittest.TestCase):
... | bsd-3-clause | -3,822,108,672,030,956,000 | 32.952381 | 95 | 0.593268 | false |
migueldiascosta/pymatgen | pymatgen/io/tests/test_nwchem.py | 1 | 13066 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
"""
TODO: Modify module doc.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "... | mit | 1,699,663,122,177,663,700 | 26.565401 | 80 | 0.57332 | false |
etzhou/edx-platform | cms/envs/dev_with_worker.py | 127 | 1180 | """
This config file follows the dev enviroment, but adds the
requirement of a celery worker running in the background to process
celery tasks.
The worker can be executed using:
django_admin.py celery worker
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from bas... | agpl-3.0 | 8,487,353,409,973,017,000 | 29.25641 | 79 | 0.721186 | false |
rbdedu/runway | singleFileApp/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/PC/VS7.1/build_ssl.py | 91 | 6554 | # Script for building the _ssl and _hashlib modules for Windows.
# Uses Perl to setup the OpenSSL environment correctly
# and build OpenSSL, then invokes a simple nmake session
# for the actual _ssl.pyd and _hashlib.pyd DLLs.
# THEORETICALLY, you can:
# * Unpack the latest SSL release one level above your main Python ... | mit | 2,078,951,284,003,792,600 | 35.209945 | 79 | 0.582392 | false |
tomasreimers/tensorflow-emscripten | tensorflow/contrib/learn/python/learn/estimators/estimator.py | 5 | 55320 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 3,002,256,116,502,207,000 | 38.798561 | 85 | 0.648952 | false |
40123210/w17b_exam | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/base.py | 603 | 4652 | #!/usr/bin/env python
## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py
'''Pygame core routines
Contains the core routines that are used by the rest of the
pygame modules. Its routines are merged directly into the pygame
namespace. This mainly includes the auto-initia... | agpl-3.0 | 5,712,614,483,447,071,000 | 28.443038 | 98 | 0.675193 | false |
vipins/ccccms | env/Lib/site-packages/django/contrib/gis/geos/base.py | 86 | 1682 | from ctypes import c_void_p
from types import NoneType
from django.contrib.gis.geos.error import GEOSException
# Trying to import GDAL libraries, if available. Have to place in
# try/except since this package may be used outside GeoDjango.
try:
from django.contrib.gis import gdal
except ImportError:
# A 'dumm... | bsd-3-clause | 4,077,555,171,441,273,300 | 31.346154 | 96 | 0.665279 | false |
idwanglu2010/git-repo | subcmds/init.py | 48 | 11402 | #
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... | apache-2.0 | 4,904,621,549,088,031,000 | 32.733728 | 102 | 0.620242 | false |
oppia/oppia | core/controllers/skill_mastery_test.py | 4 | 12773 | # Copyright 2019 The Oppia 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 applicable ... | apache-2.0 | 8,882,628,524,523,635,000 | 33.336022 | 79 | 0.584201 | false |
msumit/qds-sdk-py | qds_sdk/commands.py | 1 | 56029 | """
The commands module contains the base definition for
a generic Qubole command and the implementation of all
the specific commands
"""
from qds_sdk.qubole import Qubole
from qds_sdk.resource import Resource
from qds_sdk.exception import ParseError
from qds_sdk.account import Account
from qds_sdk.util import GentleO... | apache-2.0 | 3,582,396,788,754,164,000 | 40.969288 | 187 | 0.569937 | false |
joeyinbox/pointing-gesture-recognition | src/relevancy.py | 1 | 9582 | #! /usr/bin/python
from classes.Dataset import *
from classes.DatasetManager import *
from classes.Settings import *
from classes.Utils import *
import numpy as np
# Definition of the Relevancy class
class Relevancy():
# Load required classes
datasetManager = DatasetManager()
settings = Settings()
utils = Util... | gpl-2.0 | 1,804,242,635,603,576,300 | 36.87747 | 260 | 0.606554 | false |
jmalacho/ansible-examples | filter_plugins/etc_hosts_filters.py | 1 | 1086 | # Jinja2 filters for use in building dictionary with /etc/hosts to template
# Initialize a Dictionary keys with default value (usefull for preseting the value to an array)
def initDict( in_default, keyarray ):
r={}
for k in keyarray:
r[k]=in_default
return r
# Appends the hostname with subdomain first, then... | apache-2.0 | 5,274,725,003,633,758,000 | 32.9375 | 95 | 0.685083 | false |
atareao/calendar-indicator | src/rfc3339.py | 1 | 17200 | #rfc3339.py -- Implementation of the majority of RFC 3339 for python.
# Copyright (c) 2008, 2009, 2010 LShift Ltd. <query@lshift.net>
#
# 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... | gpl-3.0 | 7,714,191,718,791,036,000 | 36.071121 | 101 | 0.635058 | false |
zlfben/gem5 | src/arch/sparc/SparcISA.py | 71 | 2254 | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | bsd-3-clause | 8,960,463,186,993,166,000 | 51.418605 | 72 | 0.789707 | false |
aequitas/home-assistant | homeassistant/components/rpi_pfio/switch.py | 7 | 2354 | """Support for switches using the PiFace Digital I/O module on a RPi."""
import logging
import voluptuous as vol
from homeassistant.components import rpi_pfio
from homeassistant.components.switch import PLATFORM_SCHEMA
from homeassistant.const import ATTR_NAME, DEVICE_DEFAULT_NAME
import homeassistant.helpers.config_... | apache-2.0 | 2,081,109,999,267,282,700 | 28.425 | 78 | 0.657604 | false |
nelsonsar/ansible | contrib/inventory/vbox.py | 55 | 3084 | #!/usr/bin/env 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 distr... | gpl-3.0 | 6,478,785,447,342,648,000 | 26.052632 | 118 | 0.525292 | false |
larsw/guessit | guessit/transfo/guess_episode_special.py | 11 | 2935 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | lgpl-3.0 | 4,351,238,693,986,628,000 | 46.33871 | 136 | 0.681431 | false |
flyher/pymo | symbian/PythonForS60/module-repo/standard-modules/email/charset.py | 93 | 15684 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: email-sig@python.org
__all__ = [
'Charset',
'add_alias',
'add_charset',
'add_codec',
]
import email.base64mime
import email.quoprimime
from email import errors
from email.encoders import encode_... | mit | -8,818,490,494,347,881,000 | 39.010204 | 79 | 0.62229 | false |
ttm/oscEmRede | venv/lib/python2.7/site-packages/jinja2/testsuite/regression.py | 414 | 8382 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.regression
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests corner cases and bugs.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Template, Enviro... | gpl-3.0 | -6,632,094,783,735,024,000 | 29.043011 | 109 | 0.448819 | false |
dcroc16/skunk_works | google_appengine/lib/django-1.2/django/contrib/gis/tests/relatedapp/tests.py | 123 | 13948 | from django.test import TestCase
from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
from django.contrib.gis.db.models import Collect, Count, Extent, F, Union
from django.contrib.gis.geometry.backend import Geometry
from django.contrib.gis.tests.utils import mysql, oracle, no_mysql, no_oracle, no_spati... | mit | 8,010,404,387,497,184,000 | 48.112676 | 155 | 0.63873 | false |
lukovnikov/qelos | test/test_word.py | 1 | 17269 | from __future__ import print_function
from unittest import TestCase
import qelos as q
from torch.autograd import Variable
import torch
from torch import nn
import numpy as np
class TestWordEmb(TestCase):
def test_creation_simple(self):
dic = dict(zip(map(chr, range(97, 122)), range(122-97)))
m = q... | mit | -6,501,107,882,058,788,000 | 42.389447 | 127 | 0.600614 | false |
lcunquei/AliPhysics | PWGJE/EMCALJetTasks/Tracks/analysis/base/Graphics.py | 41 | 22080 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... | bsd-3-clause | -5,575,441,038,303,618,000 | 32.660061 | 107 | 0.523958 | 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.