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 |
|---|---|---|---|---|---|---|---|---|---|---|
corbindavenport/me-irl-bot | memebot.py | 1 | 13750 | import praw
import json
import requests
import tweepy
import time
import os
import csv
import re
import configparser
import urllib.parse
import sys
from glob import glob
from gfycat.client import GfycatClient
from imgurpython import ImgurClient
import distutils.core
import itertools
import photohash
from PIL import Ima... | gpl-3.0 | -8,101,126,520,493,362,000 | 38.514368 | 131 | 0.6776 | false |
jhayworth/config | .emacs.d/elpy/rpc-venv/lib/python2.7/encodings/cp862.py | 593 | 33626 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | gpl-3.0 | -2,426,445,617,653,243,000 | 47.174785 | 97 | 0.60132 | false |
IceCTF/ctf-platform | api/api_manager.py | 1 | 12262 | #!/usr/bin/python3
"""
Problem management script.
"""
import argparse
import sys
import logging
import api
from api.common import APIException, InternalException
from os import path, walk, makedirs
from bson import json_util
import shutil
import glob
def check_files_exist(files):
for f in files:
if not p... | mit | 4,395,772,352,281,482,000 | 36.613497 | 128 | 0.644185 | false |
BigBoss424/a-zplumbing | Magento-CE-2/update/vendor/justinrainbow/json-schema/docs/conf.py | 74 | 7837 | # -*- coding: utf-8 -*-
#
# JsonSchema documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 10 15:34:44 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | gpl-3.0 | 3,338,543,430,352,561,000 | 31.518672 | 92 | 0.70601 | false |
burkesquires/pyeq2 | UnitTests/Test_IndividualPolyFunctions.py | 3 | 10863 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import sys, os, unittest
# the pyeq2 directory is located up one level from here
if -1 != sys.path[0].find('pyeq2-master'):raise Exception('Please rename git checkout directory from "pyeq2-master" to "... | bsd-2-clause | -4,480,170,528,405,380,000 | 33.268139 | 128 | 0.621744 | false |
mheap/ansible | test/units/parsing/utils/test_addresses.py | 135 | 3742 | # -*- coding: utf-8 -*-
import unittest
from ansible.parsing.utils.addresses import parse_address
class TestParseAddress(unittest.TestCase):
tests = {
# IPv4 addresses
'192.0.2.3': ['192.0.2.3', None],
'192.0.2.3:23': ['192.0.2.3', 23],
# IPv6 addresses
'::': ['::', Non... | gpl-3.0 | 8,125,984,778,501,942,000 | 38.031579 | 104 | 0.504315 | false |
alexlo03/ansible | test/units/plugins/action/test_action.py | 21 | 27119 | # -*- coding: utf-8 -*-
# (c) 2015, Florian Apolloner <florian@apolloner.eu>
#
# 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
# (... | gpl-3.0 | -1,024,811,941,109,154,300 | 40.013616 | 157 | 0.605865 | false |
ffsdmad/af-web | cgi-bin/plugins2/volontirs/delo_list_stat.py | 1 | 1104 | # -*- coding: utf8 -*-
import libs
SQL = (
("achiv", "SELECT SQL_CALC_FOUND_ROWS ANAME,L1,L2,L3 FROM `af3_arhiv` limit 1;"),
("list_opis","""select @FOND_ID:=FOND_ID as FOND_ID, @OPIS_ID:=OPIS_ID as OPIS_ID, O.OKOD, O.ONAME, G3, G5, O.G7, G46 FROM `af3_opis` O LEFT JOIN `afweb_opis` o on(o.OPIS_ID=O.KOD) %(wher... | gpl-3.0 | 6,038,469,489,246,387,000 | 51.85 | 201 | 0.650899 | false |
gkoelln/youtube-dl | youtube_dl/extractor/crackle.py | 4 | 6114 | # coding: utf-8
from __future__ import unicode_literals, division
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_HTTPError,
)
from ..utils import (
determine_ext,
float_or_none,
int_or_none,
parse_age_limit,
parse_duration,
ExtractorError
)
clas... | unlicense | 3,279,963,684,173,612,500 | 36.280488 | 111 | 0.474158 | false |
noslenfa/tdjangorest | uw/lib/python2.7/site-packages/IPython/core/magics/logging.py | 5 | 6458 | """Implementation of magic functions for IPython's own logging.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distribut... | apache-2.0 | -7,658,132,241,163,395,000 | 36.988235 | 82 | 0.554661 | false |
drammock/mne-python | mne/viz/_brain/_linkviewer.py | 8 | 5503 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
#
# License: Simplified BSD
import numpy as np
from ...utils import warn
class _LinkViewer(object):
"""Class to link multiple Brain objects."""
... | bsd-3-clause | -178,746,514,853,375,780 | 34.275641 | 76 | 0.529529 | false |
rzambre/servo | python/servo/post_build_commands.py | 7 | 9270 | # Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
#... | mpl-2.0 | -994,088,317,251,109,400 | 38.113924 | 112 | 0.549515 | false |
ohjay/sysadmin-scripts | video2images.py | 1 | 1558 | #!/usr/bin/env python
import os
import cv2
import numpy as np
from scipy.misc import imresize
from scipy.signal import medfilt
### Parameters (you should edit these)
output_folder = '.'
video_path = 'angrywalk.mp4'
### ----------------------------------
def get_fps(capture):
if int((cv2.__version__).split('.')[0... | mit | -6,729,438,562,058,385,000 | 27.851852 | 70 | 0.632221 | false |
winnukem/racehound | examples/events.py | 1 | 8304 | #!/usr/bin/env python3
# This example demonstrates how to control the set of the locations in the
# binary code of the kernel monitored by RaceHound.
#
# This can be used, for example, to create a system that dynamically adds
# and removes the breakpoints according to some policy to sweep through
# the given area of t... | gpl-2.0 | -1,237,186,278,090,935,000 | 35.743363 | 77 | 0.580323 | false |
arruda/rmr | rmr/libs/utils/decorators.py | 1 | 2387 | # -*- coding: utf-8 -*-
"""
libs.utils.decorators
~~~~~~~~~~~~~~
here are the generic decorators for RMR
:copyright: (c) 2012 by arruda.
"""
from functools import wraps
from django.utils import simplejson
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpRespo... | mit | -8,863,783,506,560,553,000 | 29.615385 | 125 | 0.596984 | false |
alxgu/ansible | lib/ansible/module_utils/network/frr/providers/cli/config/base.py | 76 | 2532 | #
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from ansible.module_utils.six import iteritems
from ansible.module_utils.network.common.utils import to_list
from ansible.module_utils.network.common.config import NetworkConfig
class C... | gpl-3.0 | -5,733,066,396,038,510,000 | 31.883117 | 92 | 0.603476 | false |
keisuke-umezawa/chainer | tests/chainer_tests/links_tests/connection_tests/test_zoneoutlstm.py | 3 | 7915 | import unittest
import numpy
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import gradient_check
from chainer import links
from chainer import testing
from chainer.testing import attr
def _sigmoid(x):
xp = backend.get_array_module(x)
half = x.dtype.type(0.5)
r... | mit | 6,218,436,936,758,365,000 | 34.493274 | 77 | 0.566772 | false |
happyleavesaoc/home-assistant | homeassistant/components/sensor/rflink.py | 7 | 4096 | """
Support for Rflink sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.rflink/
"""
import asyncio
from functools import partial
import logging
from homeassistant.components.rflink import (
CONF_ALIASSES, CONF_AUTOMATIC_ADD, CONF_DEVICE... | apache-2.0 | -3,012,778,633,813,117,400 | 31.251969 | 79 | 0.652832 | false |
hhclam/bazel | third_party/py/mock/tests/testmagicmethods.py | 109 | 14863 | # Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
from tests.support import unittest2, inPy3k
try:
unicode
except NameError:
# Python 3
unicode = str
long = int
import inspect
import sys
from mock import M... | apache-2.0 | 907,056,420,148,366,600 | 29.582305 | 79 | 0.561461 | false |
codeworm96/shadowsocks | shadowsocks/common.py | 945 | 8921 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2015 clowwindy
#
# 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 requi... | apache-2.0 | 6,333,071,899,935,899,000 | 30.747331 | 79 | 0.543773 | false |
garnertb/redis-py | tests/test_pubsub.py | 43 | 14956 | from __future__ import with_statement
import pytest
import time
import redis
from redis.exceptions import ConnectionError
from redis._compat import basestring, u, unichr
from .conftest import r as _redis_client
def wait_for_message(pubsub, timeout=0.1, ignore_subscribe_messages=False):
now = time.time()
tim... | mit | 5,716,969,973,086,304,000 | 37.153061 | 79 | 0.574017 | false |
Jumpscale/jumpscale_core8 | tests/sal/TestSSHD.py | 1 | 3126 | import unittest
from JumpScale import j
class TestSSHD(unittest.TestCase):
def setUp(self):
self.sshd = j.sal.sshd
self.key1 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCUlY0UEUNExAQF/sIw2L2AJEmHj0eTCnSCwg7gYOQDNhrrzD0+HJulD1UTz+zZqiC2nIPWMfWBoEs3i4jDj79fyiGx4pgQJXFwioIqTONlEyvPIY0eCm3eeSaWrK9G0STd... | apache-2.0 | -830,069,248,243,737,700 | 34.123596 | 420 | 0.701536 | false |
khallaghi/mongoengine | mongoengine/queryset/transform.py | 15 | 15345 | from collections import defaultdict
import pymongo
from bson import SON
from mongoengine.base.fields import UPDATE_OPERATORS
from mongoengine.connection import get_connection
from mongoengine.common import _import_class
from mongoengine.errors import InvalidQueryError
from mongoengine.python_support import IS_PYMONGO... | mit | 6,662,525,342,485,832,000 | 39.488127 | 87 | 0.498599 | false |
jessekl/flixr | venv/lib/python2.7/site-packages/pip/utils/deprecation.py | 271 | 2152 | """
A module that implments tooling to enable easy warnings about deprecations.
"""
from __future__ import absolute_import
import logging
import warnings
class PipDeprecationWarning(Warning):
pass
class RemovedInPip8Warning(PipDeprecationWarning, PendingDeprecationWarning):
pass
class RemovedInPip9Warnin... | mit | 874,898,573,204,256,300 | 30.647059 | 78 | 0.664033 | false |
matthieudumont/dipy | scratch/very_scratch/tractography_clustering_using_larch.py | 22 | 1428 | import time
import os
import numpy as np
from nibabel import trackvis as tv
from dipy.viz import fos
from dipy.io import pickles as pkl
from dipy.core import track_learning as tl
from dipy.core import track_performance as pf
from dipy.core import track_metrics as tm
fname='/home/eg01/Data/PBC/pbc2009icdm/brain1/bra... | bsd-3-clause | 8,222,715,298,512,954,000 | 21.3125 | 79 | 0.689776 | false |
darthm0e/WeatherStation-RPI | luxreader.py | 1 | 3198 | from Adafruit_I2C import Adafruit_I2C
import time
class TSL2561:
i2c = None
def __init__(self, address=0x29, debug=0, pause=0.8):
self.i2c = Adafruit_I2C(address)
self.address = address
self.pause = pause
self.debug = debug
self.gain = 0 # no gain preselected
s... | gpl-2.0 | -4,782,885,541,020,720,000 | 34.533333 | 121 | 0.513133 | false |
shaananc/security-proj2 | bindings/python/apidefs/gcc-LP64/ns3_module_uan.py | 58 | 3516 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
def register_types(module):
root_module = module.get_root()
## Register a nested module for the namespace Config
nested_module = module.add_cpp_namespace('Config')
register_types_ns3_Config(nested_module)
... | gpl-2.0 | -4,343,857,610,205,085,000 | 27.128 | 90 | 0.705631 | false |
aktech/sympy | sympy/functions/special/tests/test_hyper.py | 19 | 13589 | from sympy import (hyper, meijerg, S, Tuple, pi, I, exp, log,
cos, sqrt, symbols, oo, Derivative, gamma, O)
from sympy.series.limits import limit
from sympy.abc import x, z, k
from sympy.utilities.pytest import raises, slow
from sympy.utilities.randtest import (
random_complex_number as randcplx,... | bsd-3-clause | 3,419,359,906,246,349,000 | 38.85044 | 82 | 0.513356 | false |
anti1869/aeroport | src/aeroport/destinations/stream.py | 1 | 1293 | """
Send payload to the Stream (messaging abstraction, provided by SunHead framework.
"""
import asyncio
from sunhead.events.stream import init_stream_from_settings
from sunhead.metrics import get_metrics
from aeroport.abc import AbstractDestination, AbstractPayload
from aeroport.utils import register_metric
class... | apache-2.0 | -2,371,657,239,685,647,000 | 30.536585 | 97 | 0.651972 | false |
h2oai/h2o | py/testdir_single_jvm/notest_parse_commented_header.py | 9 | 5097 | import unittest, time, sys, random
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_import as h2i
import h2o_browse as h2b
def write_syn_dataset(csvPathname, rowCount, headerData, rList):
dsf = open(csvPathname, "w+")
dsf.write(headerData + "\n")
for i in range(rowCount):
# two cho... | apache-2.0 | 1,773,897,421,797,319,400 | 43.321739 | 109 | 0.572494 | false |
samliu/servo | tests/wpt/web-platform-tests/referrer-policy/generic/subresource/subresource.py | 50 | 3167 | import os, sys, json, urlparse, urllib
def get_template(template_basename):
script_directory = os.path.dirname(os.path.abspath(__file__))
template_directory = os.path.abspath(os.path.join(script_directory,
"..",
... | mpl-2.0 | 3,690,764,529,207,333,000 | 32.691489 | 77 | 0.649826 | false |
asm-products/kanshu-backend | dictionary/node/node_modules/bunyan/node_modules/dtrace-provider/compile.py | 228 | 1769 | {
'conditions': [
['OS=="mac" or OS=="solaris"', {
'variables': {
'escaped_root': '<!(printf %q "<(module_root_dir)")',
},
# If we are on the Mac, or a Solaris derivative, attempt
# to build the DTrace provider extension.
'targets':... | agpl-3.0 | 5,239,764,027,399,075,000 | 29.5 | 70 | 0.314867 | false |
openstack/octavia | octavia/amphorae/drivers/haproxy/data_models.py | 1 | 3400 | # Copyright 2014 Rackspace
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 | 8,906,243,856,882,791,000 | 29.909091 | 78 | 0.621176 | false |
TNosredna/CouchPotatoServer | libs/tornado/locale.py | 40 | 22014 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2009 Facebook
#
# 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 ... | gpl-3.0 | 4,895,484,680,862,435,000 | 41.908382 | 117 | 0.570734 | false |
zstackio/zstack-woodpecker | integrationtest/vm/multihosts/backup/paths/path65.py | 1 | 1455 | import zstackwoodpecker.test_state as ts_header
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template2",
path_list=[[TestAction.create_volume, "volume1", "=scsi"],\
[TestAction.attach_volume, "vm1", "volume1"], \
[TestAction.create_volume_backup, "volume1", "... | apache-2.0 | 3,721,514,398,360,690,700 | 45.935484 | 75 | 0.635739 | false |
formath/mxnet | example/image-classification/symbols/alexnet.py | 57 | 3218 | # 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 | 4,382,501,403,630,177,300 | 46.323529 | 181 | 0.678682 | false |
pyatil/jenkins-job-builder | jenkins_jobs/modules/general.py | 14 | 7540 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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 | 2,449,119,866,395,842,600 | 40.888889 | 79 | 0.639788 | false |
rosswhitfield/mantid | Framework/PythonInterface/test/python/mantid/geometry/BoundingBoxTest.py | 3 | 1529 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 | 908,414,665,691,111,000 | 38.205128 | 84 | 0.64879 | false |
TeddyDesTodes/PyRfK | setup.py | 4 | 1807 | import os
from setuptools import setup
def find_packages(dir_):
packages = []
for _dir, subdirectories, files in os.walk(os.path.join(dir_, 'rfk')):
if '__init__.py' in files:
lib, fragment = _dir.split(os.sep, 1)
packages.append(fragment.replace(os.sep, '.'))
return packag... | bsd-3-clause | 100,832,134,975,680,960 | 38.282609 | 91 | 0.429994 | false |
edocappelli/oasys-crystalpy | diff_pat.py | 1 | 3239 |
def plot_crystal_sketch(v0_h,v0_v,vH_h ,vH_v ,H_h ,H_v):
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
hshift = 0.2
vshift = 0.0
plt.figure(1, figsize=(6,6))
ax = plt.subplot(111)
ax.xaxis.set_ticks_position('none)
... | mit | 84,390,020,494,597,840 | 25.683761 | 86 | 0.495215 | false |
TeamEOS/external_chromium_org_third_party_WebKit | Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py | 60 | 6449 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
def result_contains_repaint_rects(text):
return isinstance(text, str) and (
re.search('"repaintRects": \[$', text, re.MULTILINE) != N... | bsd-3-clause | -5,283,267,857,324,104,000 | 29.856459 | 120 | 0.646922 | false |
maheshp/novatest | nova/tests/test_iptables_network.py | 12 | 12448 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | -7,330,645,677,889,280,000 | 47.815686 | 79 | 0.492368 | false |
kingvuplus/ME-TEST2 | lib/python/Plugins/Extensions/PicturePlayer/plugin.py | 81 | 1489 | from Plugins.Plugin import PluginDescriptor
#------------------------------------------------------------------------------------------
def Pic_Thumb(*args, **kwa):
import ui
return ui.Pic_Thumb(*args, **kwa)
def picshow(*args, **kwa):
import ui
return ui.picshow(*args, **kwa)
def main(session, **kwargs):
from... | gpl-2.0 | -1,658,553,951,281,871,000 | 30.680851 | 198 | 0.653459 | false |
koolfreak/volunteer_planner | scheduler/migrations/0008_blueprint_needcreator.py | 17 | 1714 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('scheduler', '0007_auto_20150819_0138'),
]
operations = [
migrations.CreateModel(
name='BluePrint',
f... | agpl-3.0 | 3,955,122,810,786,510,000 | 45.324324 | 118 | 0.568845 | false |
wunderlins/learning | python/zodb/lib/osx/persistent/tests/utils.py | 2 | 2415 |
class ResettingJar(object):
"""Testing stub for _p_jar attribute.
"""
def __init__(self):
from persistent import PickleCache # XXX stub it!
from persistent.interfaces import IPersistentDataManager
from zope.interface import directlyProvides
self.cache = self._cache = PickleC... | gpl-2.0 | 6,614,345,577,042,522,000 | 28.45122 | 68 | 0.595031 | false |
dbrattli/RxPY | rx/observable.py | 1 | 1867 | import types
from rx import Lock
from .observer import Observer, AbstractObserver
class Observable(object):
"""Represents a push-style collection."""
_methods = []
def __init__(self, subscribe):
self._subscribe = subscribe
self.lock = Lock()
# Deferred method assignment
... | apache-2.0 | -6,613,315,682,597,062,000 | 35.607843 | 79 | 0.652384 | false |
tchernomax/ansible | lib/ansible/modules/network/nso/nso_query.py | 52 | 3295 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Cisco and/or its affiliates.
#
# 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... | gpl-3.0 | -5,453,383,749,825,434,000 | 25.134921 | 91 | 0.66778 | false |
bwrsandman/OpenUpgrade | addons/crm/report/__init__.py | 313 | 1127 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 1,131,049,869,736,405,800 | 42.346154 | 78 | 0.628217 | false |
Zhongqilong/mykbengineer | kbe/src/lib/python/Lib/distutils/tests/test_spawn.py | 146 | 1857 | """Tests for distutils.spawn."""
import unittest
import os
import time
from test.support import captured_stdout, run_unittest
from distutils.spawn import _nt_quote_args
from distutils.spawn import spawn, find_executable
from distutils.errors import DistutilsExecError
from distutils.tests import support
class SpawnTes... | lgpl-3.0 | -8,493,190,630,535,468,000 | 31.017241 | 61 | 0.562197 | false |
thisispuneet/potato-blog | django/contrib/gis/utils/srs.py | 311 | 3157 | from django.contrib.gis.gdal import SpatialReference
from django.db import connections, DEFAULT_DB_ALIAS
def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,
database=DEFAULT_DB_ALIAS):
"""
This function takes a GDAL SpatialReference system and adds its information
... | bsd-3-clause | -1,192,355,081,094,176,000 | 40 | 81 | 0.668039 | false |
ligthyear/wokkel | wokkel/compat.py | 2 | 3735 | # -*- test-case-name: wokkel.test.test_compat -*-
#
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.internet import protocol
from twisted.words.protocols.jabber import xmlstream
class BootstrapMixin(object):
"""
XmlStream factory mixin to install bootstrap event ... | mit | 6,505,281,514,650,096,000 | 30.923077 | 78 | 0.640696 | false |
sdarji/lpthw | Lib/site-packages/setuptools/command/setopt.py | 125 | 5068 | import os
import distutils
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
def config_file(kind="local"):
"""Get the filename of the distutils, loca... | unlicense | 8,037,705,684,617,144,000 | 33.951724 | 79 | 0.569258 | false |
juergenhamel/cuon | cuon_client/cuon/Finances/InvoiceBook/SingleInpayment.py | 2 | 1544 | # -*- coding: utf-8 -*-
##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne]
##This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as
##published by the Free Software Foundation; either version 3 of the License, or (at your option) any later versio... | gpl-3.0 | -4,139,533,894,877,459,000 | 32.543478 | 126 | 0.68677 | false |
mrquim/repository.mrquim | script.module.covenant/lib/resources/lib/modules/utils.py | 6 | 1811 | # -*- coding: utf-8 -*-
"""
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | gpl-2.0 | 86,848,534,590,845,360 | 31.927273 | 126 | 0.657096 | false |
snahelou/awx | awx/main/tests/functional/models/test_inventory.py | 1 | 4620 | import pytest
import mock
from django.core.exceptions import ValidationError
# AWX
from awx.main.models import (
Host,
Inventory,
InventorySource,
InventoryUpdate,
)
from awx.main.utils.filters import SmartFilter
@pytest.mark.django_db
class TestSCMUpdateFeatures:
def test_automatic_project_upd... | apache-2.0 | 4,292,061,630,950,391,000 | 35.666667 | 98 | 0.650433 | false |
ska-sa/casperfpga | src/i2c_sn.py | 1 | 1106 | import numpy as np, logging, time, struct
import collections,crcmod
logger = logging.getLogger(__name__)
class DS28CM00:
"""
DS28CM00 I2C/SMBus Silicon Serial Number
"""
crcPoly = 0b100110001
crcInitVal = 0
def __init__(self,itf,addr=0x50):
self.itf = itf
self.addr = addr
... | gpl-2.0 | -3,998,607,008,545,963,500 | 24.72093 | 64 | 0.586799 | false |
rkmaddox/mne-python | tutorials/preprocessing/25_background_filtering.py | 3 | 48286 | # -*- coding: utf-8 -*-
r"""
.. _disc-filtering:
===================================
Background information on filtering
===================================
Here we give some background information on filtering in general, and
how it is done in MNE-Python in particular.
Recommended reading for practical applications ... | bsd-3-clause | -4,242,253,024,000,330,000 | 44.456685 | 79 | 0.62581 | false |
WillieMaddox/scipy | scipy/io/matlab/tests/test_streams.py | 109 | 5442 | """ Testing
"""
from __future__ import division, print_function, absolute_import
import os
import sys
import zlib
from io import BytesIO
if sys.version_info[0] >= 3:
cStringIO = BytesIO
else:
from cStringIO import StringIO as cStringIO
from tempfile import mkstemp
import numpy as np
from numpy.testing i... | bsd-3-clause | -4,083,965,023,010,521,600 | 26.907692 | 79 | 0.574605 | false |
ozburo/youtube-dl | youtube_dl/extractor/bfmtv.py | 4 | 4216 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import extract_attributes
class BFMTVBaseIE(InfoExtractor):
_VALID_URL_BASE = r'https?://(?:www\.)?bfmtv\.com/'
_VALID_URL_TMPL = _VALID_URL_BASE + r'(?:[^/]+/)*[^/?&#]+_%s[A-Z]-(?P<id>\d{12})\.h... | unlicense | 9,140,744,356,304,041,000 | 39.893204 | 163 | 0.595679 | false |
mitsei/dlkit | dlkit/abstract_osid/relationship/sessions.py | 1 | 129947 | """Implementations of relationship abstract base class sessions."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and inc... | mit | 8,647,386,721,252,239,000 | 37.029558 | 238 | 0.645894 | false |
slevenhagen/odoo | addons/web/controllers/main.py | 9 | 65864 | # -*- coding: utf-8 -*-
import ast
import base64
import csv
import functools
import glob
import itertools
import jinja2
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import sys
import time
import urllib2
import zlib
from xml.etree import ElementTree
from cStringIO ... | agpl-3.0 | 8,834,974,329,453,321,000 | 39.357843 | 152 | 0.587817 | false |
marcosdiez/ansible-modules-extras | monitoring/stackdriver.py | 61 | 6988 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | gpl-3.0 | -8,490,915,219,717,711,000 | 31.337963 | 132 | 0.641661 | false |
dmachard/extensive-testing | src/ea/scripts/helps/DocInspect.py | 1 | 5628 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Copyright (c) 2010-2019 Denis Machard
# This file is part of the extensive automation project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Le... | lgpl-2.1 | -3,468,082,371,706,255,000 | 26.188406 | 84 | 0.536603 | false |
wheeler-microfluidics/opendrop_plugin | __init__.py | 1 | 18899 | """
Copyright 2015 Ryan Fobel
This file is part of opendrop_plugin.
opendrop_plugin 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.
opendr... | gpl-3.0 | 2,620,710,506,910,875,000 | 39.382479 | 86 | 0.57765 | false |
shaolinfry/litecoin | qa/rpc-tests/prioritise_transaction.py | 22 | 5961 | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test PrioritiseTransaction code
#
from test_framework.test_framework import BitcoinTestFramework
fro... | mit | 8,262,065,954,139,483,000 | 40.685315 | 128 | 0.62825 | false |
DomBlack/oh-my-zsh | plugins/git-prompt/gitstatus.py | 492 | 2648 | #!/usr/bin/env python
from __future__ import print_function
import sys
import re
import shlex
from subprocess import Popen, PIPE, check_output
def get_tagname_or_hash():
"""return tagname if exists else hash"""
cmd = 'git log -1 --format="%h%d"'
output = check_output(shlex.split(cmd)).decode('utf-8').str... | mit | 3,885,891,818,179,085,300 | 30.52381 | 87 | 0.518127 | false |
zguangyu/wechat-python-sdk | examples/tutorial_official_1.py | 23 | 1717 | # -*- coding: utf-8 -*-
from wechat_sdk import WechatBasic
# 下面这些变量均假设已由 Request 中提取完毕
token = 'WECHAT_TOKEN' # 你的微信 Token
signature = 'f24649c76c3f3d81b23c033da95a7a30cb7629cc' # Request 中 GET 参数 signature
timestamp = '1406799650' # Request 中 GET 参数 timestamp
nonce = '1505845280' # Request 中 GET 参数 nonce
# 用户的请... | bsd-2-clause | 7,469,258,483,978,451,000 | 30.733333 | 84 | 0.691661 | false |
halfak/python-mwtypes | mwtypes/page.py | 2 | 1517 | """
.. autoclass:: mwtypes.Page
:members:
"""
import jsonable
from .util import none_or
class Page(jsonable.Type):
"""
Page metadata
:Attributes:
.. autoattribute:: mwtypes.Page.id
:annotation: = Page ID : int
.. autoattribute:: mwtypes.Page.title
:annotatio... | mit | 8,786,540,851,994,108,000 | 24.283333 | 77 | 0.531312 | false |
SET001/three.js | utils/converters/ctm/join_ctm.py | 399 | 2521 | """Join multiple binary files into single file and generate JSON snippet with offsets
-------------------------------------
How to use
-------------------------------------
python join_ctm.py -i "part_*.ctm" -o joined.ctm [-j offsets.js]
Will read multiple files following wildcard pattern (ordered lexicographically)... | mit | 366,978,502,236,521,500 | 21.122807 | 105 | 0.466482 | false |
amith01994/intellij-community | python/lib/Lib/tempfile.py | 86 | 15003 | """Temporary files.
This module provides generic, low- and high-level interfaces for
creating temporary files and directories. The interfaces listed
as "safe" just below can be used without fear of race conditions.
Those listed as "unsafe" cannot, and are provided for backward
compatibility only.
This module also pr... | apache-2.0 | -8,541,121,356,912,105,000 | 29.743852 | 79 | 0.605012 | false |
nishn/pymol-script | pyca.py | 1 | 3908 | #!/usr/bin/env python
import os.path
import sys
from optparse import OptionParser
# check if the pymol module is installed
try :
import pymol
except :
sys.exit( "error : This script needs 'pymol' module. Please install pymol before running." )
######################################## function ################... | mit | 138,229,276,682,456,450 | 31.566667 | 104 | 0.499744 | false |
NeCTAR-RC/nova | nova/cells/filters/availability_zone.py | 1 | 1443 | # 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
# d... | apache-2.0 | 603,323,629,282,458,500 | 35.075 | 78 | 0.697852 | false |
karthik339/Agni | MainDemo/venv/lib/python2.7/site-packages/jinja2/meta.py | 659 | 4190 | # -*- coding: utf-8 -*-
"""
jinja2.meta
~~~~~~~~~~~
This module implements various functions that exposes information about
templates that might be interesting for various kinds of applications.
:copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.
:license: BSD, see LICENSE fo... | apache-2.0 | -6,464,497,208,425,876,000 | 39.679612 | 78 | 0.634606 | false |
agoravoting/agora-identity | docs/conf.py | 62 | 7233 | # -*- coding: utf-8 -*-
#
# project documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 4 15:11:09 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | agpl-3.0 | -3,974,519,782,159,036,400 | 31.877273 | 125 | 0.708835 | false |
hwmrocker/hysbakstryd | config.py | 1 | 1187 | """
Configuration for Hysbakstryd server.
"""
class AttrDict(dict):
"""Access a dictionary like a dict OR like a class, and also act like a defaultdict with None as its factory.
Nice little tool, taken from: http://stackoverflow.com/a/14620633
"""
def __init__(self, *args, **kwargs):
super()... | gpl-2.0 | 5,315,385,806,290,548,000 | 19.824561 | 113 | 0.595619 | false |
aelkikhia/pyduel_engine | pyduel_engine/model/board.py | 1 | 11091 | from math import fabs
import logging
from pyduel_engine.content import default_boards as boards
from pyduel_engine.content.engine_states import SqState, BoardType
from pyduel_engine.model import position as ps
def _adjacent_square_pos(pos):
return [ps.shift_down(pos), ps.shift_up(pos),
ps.shift_left... | apache-2.0 | 6,938,774,020,713,516,000 | 34.321656 | 79 | 0.515553 | false |
CroceRossaItaliana/jorvik | posta/tasks.py | 1 | 2602 | from celery import shared_task
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
@shared_task(bind=True)
def invia_mail(self, pk):
from .models import Messaggio
messaggio = Messaggio.objects.get(pk=pk)
logger.info("messaggio id=%d" % pk)
# Controlla che il messaggio si... | gpl-3.0 | 3,359,543,278,918,891,500 | 30.719512 | 99 | 0.65321 | false |
Cinntax/home-assistant | homeassistant/components/nissan_leaf/sensor.py | 4 | 3155 | """Battery Charge and Range Support for the Nissan Leaf."""
import logging
from homeassistant.const import DEVICE_CLASS_BATTERY
from homeassistant.helpers.icon import icon_for_battery_level
from homeassistant.util.distance import LENGTH_KILOMETERS, LENGTH_MILES
from homeassistant.util.unit_system import IMPERIAL_SYSTE... | apache-2.0 | -2,491,238,684,549,451,000 | 26.920354 | 85 | 0.627575 | false |
kamcpp/tensorflow | tensorflow/python/ops/math_ops.py | 3 | 68893 | # 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 | -1,689,827,173,771,594,800 | 33.054869 | 86 | 0.659095 | false |
amirm3hdi/donate-clan | account/migrations/0001_initial.py | 2 | 2112 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-03-09 16:21
from __future__ import unicode_literals
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
ope... | gpl-3.0 | 5,067,739,524,754,057,000 | 47 | 220 | 0.59517 | false |
harshita-gupta/Harvard-FRSEM-Catalog-2016-17 | flask/lib/python2.7/site-packages/setuptools/depends.py | 41 | 6474 | import sys
import imp
import marshal
from distutils.version import StrictVersion
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from setuptools.extern import six
__all__ = [
'Require', 'find_module', 'get_module_constant', 'extract_constant'
]
class Require:
"""A prerequisite to building o... | mit | 7,734,135,316,867,144,000 | 28.834101 | 78 | 0.592833 | false |
lsk112233/Clone-test-repo | boxes/migrations/0001_initial.py | 10 | 1607 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import markupfield.fields
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODE... | apache-2.0 | 3,813,364,211,292,915,700 | 44.914286 | 229 | 0.609832 | false |
caesar2164/edx-platform | lms/djangoapps/course_api/tests/mixins.py | 58 | 1069 | """
Common mixins for Course API Tests
"""
from datetime import datetime
from student.tests.factories import UserFactory
from xmodule.modulestore.tests.factories import ToyCourseFactory
TEST_PASSWORD = u'edx'
class CourseApiFactoryMixin(object):
"""
Mixin to allow creation of test courses and users.
"... | agpl-3.0 | 8,068,288,216,339,178,000 | 23.860465 | 78 | 0.594013 | false |
wpstudio/blazecoin | contrib/spendfrom/spendfrom.py | 1 | 10054 | #!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bit... | mit | -4,695,611,186,069,858,000 | 36.655431 | 111 | 0.619853 | false |
archf/ansible | lib/ansible/module_utils/facts/compat.py | 31 | 3161 | # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... | gpl-3.0 | -3,182,010,582,676,750,000 | 41.146667 | 94 | 0.640936 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/WGL/NV/vertex_array_range.py | 8 | 4786 | '''OpenGL extension NV.vertex_array_range
This module customises the behaviour of the
OpenGL.raw.WGL.NV.vertex_array_range to provide a more
Python-friendly API
Overview (from the spec)
The goal of this extension is to permit extremely high vertex
processing rates via OpenGL vertex arrays even when the CPU lack... | gpl-3.0 | -8,670,701,787,421,980,000 | 47.846939 | 71 | 0.799415 | false |
CorySpitzer/ansible | v1/ansible/playbook/play.py | 85 | 42915 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | 1,823,204,515,088,898,300 | 44.221286 | 190 | 0.535174 | false |
PTDreamer/dRonin | python/calibration/mag_calibration.py | 4 | 4543 | #!/usr/bin/python
from numpy import *
from matplotlib.pylab import *
def mag_calibration(mag,gyros=None,LH=200,LV=500):
""" Calibrates the magnetometer data by fitting it to a sphere,
ideally when constantly turning to spread the data around that
sphere somewhat evenly (or at least in a horizo... | gpl-3.0 | -4,671,574,825,214,863,000 | 37.5 | 112 | 0.526965 | false |
ychfan/tensorflow | tensorflow/contrib/layers/python/layers/normalization_test.py | 31 | 7237 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,784,289,506,045,645,000 | 41.570588 | 82 | 0.689789 | false |
fly19890211/edx-platform | openedx/core/djangoapps/call_stack_manager/core.py | 38 | 8963 | """
Call Stack Manager deals with tracking call stacks of functions/methods/classes(Django Model Classes)
Call Stack Manager logs unique call stacks. The call stacks then can be retrieved via Splunk, or log reads.
classes:
CallStackManager - stores all stacks in global dictionary and logs
CallStackMixin - used for Mo... | agpl-3.0 | -1,130,832,188,897,357,700 | 39.192825 | 111 | 0.639741 | false |
asterisk/pjproject | tests/pjsua/scripts-recvfrom/230_reg_bad_fail_stale_true.py | 42 | 1625 | # $Id$
import inc_sip as sip
import inc_sdp as sdp
# In this test we simulate broken server, where it always sends
# stale=true with all 401 responses. We should expect pjsip to
# retry the authentication until PJSIP_MAX_STALE_COUNT is
# exceeded. When pjsip retries the authentication, it should
# use the new nonce fr... | gpl-2.0 | 609,518,332,355,735,700 | 38.634146 | 93 | 0.670154 | false |
sctigercat1/panda3d | direct/src/distributed/DistributedObjectOV.py | 11 | 6524 |
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.DistributedObjectBase import DistributedObjectBase
#from PyDatagram import PyDatagram
#from PyDatagramIterator import PyDatagramIterator
# Values for DistributedObjectOV.activeState
# these should match DistributedObject.ES*
ESN... | bsd-3-clause | -1,827,341,731,560,406,000 | 33.336842 | 80 | 0.610668 | false |
jamesthechamp/zamboni | mkt/ratings/tests/test_cron.py | 18 | 2091 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core import mail
from django.utils.encoding import smart_str
import mock
from nose.tools import eq_
import mkt.site.tests
from mkt.ratings.cron import email_daily_ratings
from mkt.ratings.models import Review
from mkt.site.fixtures import fixture
fr... | bsd-3-clause | -4,900,488,712,577,676,000 | 36.339286 | 79 | 0.662363 | false |
Depado/pexpect | tests/qa.py | 22 | 1079 | #!/usr/bin/env python
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WIT... | isc | -3,867,685,053,438,317,600 | 40.5 | 76 | 0.753475 | false |
petrleocompel/gnome15 | src/pylibg19/g19/receivers.py | 8 | 10382 | # Gnome15 - Suite of tools for the Logitech G series keyboards and headsets
# Copyright (C) 2010 Brett Smith <tanktarta@blueyonder.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, e... | gpl-3.0 | -3,435,618,176,896,320,000 | 32.382637 | 79 | 0.544885 | false |
securionpay/securionpay-python | securionpay/resource.py | 2 | 1099 | import securionpay as api
import requests
class Resource(object):
def name(self):
return self.__class__.__name__.lower()
def _get(self, path, params=None):
return self.request('GET', path, params)
def _post(self, path, params=None):
return self.request('POST', path, params)
... | mit | -5,669,333,196,867,857,000 | 34.451613 | 98 | 0.588717 | false |
jeroenj/CouchPotatoServer | libs/CodernityDB/storage.py | 81 | 3736 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | gpl-3.0 | -4,786,252,029,121,020,000 | 23.418301 | 81 | 0.583779 | false |
mcocdawc/chemcoord | src/chemcoord/configuration.py | 1 | 3385 | # -*- coding: utf-8 -*-
try:
import configparser
except ImportError:
# Due to PY27 compatibility
import ConfigParser as configparser
import os
from warnings import warn
def _give_default_file_path():
HOME = os.path.expanduser('~')
filepath = os.path.join(HOME, '.chemcoordrc')
return filepath
... | lgpl-3.0 | 5,131,276,547,646,404,000 | 30.933962 | 79 | 0.638996 | false |
courtarro/gnuradio | gr-utils/python/modtool/__init__.py | 40 | 1424 | #
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... | gpl-3.0 | -1,002,909,854,562,152,800 | 37.486486 | 70 | 0.801966 | false |
sertac/django | tests/template_tests/filter_tests/test_cut.py | 521 | 2269 | from django.template.defaultfilters import cut
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class CutTests(SimpleTestCase):
@setup({'cut01': '{% autoescape off %}{{ a|cut:"x" }} {{ b|cut:"x" }}{% endautoescape %}'})
def test_cut01(self):
... | bsd-3-clause | -2,663,046,584,539,598,000 | 40.254545 | 95 | 0.579991 | 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.