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 |
|---|---|---|---|---|---|---|---|---|---|---|
NewKnowledge/punk | punk/aggregator/aggregateByNumericRange.py | 1 | 2516 | import pandas as pd
import numpy as np
from typing import List, NamedTuple
from .numeric import range_groups
from primitive_interfaces.base import PrimitiveBase
Inputs = pd.DataFrame
Outputs = np.ndarray
Params = dict
CallMetadata = dict
class AggregateByNumericRange(PrimitiveBase[Inputs, Outputs, Params]):
__a... | mit | -419,282,312,379,151,500 | 25.776596 | 114 | 0.439189 | false |
nevercast/home-assistant | homeassistant/components/device_tracker/ubus.py | 7 | 5647 | """
homeassistant.components.device_tracker.ubus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Device tracker platform that supports scanning a OpenWRT router for device
presence.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.ubus/
"""
imp... | mit | 7,077,413,438,336,141,000 | 31.641618 | 79 | 0.551974 | false |
Comunitea/l10n-spain | l10n_es_vat_book/__openerp__.py | 1 | 1560 | # -*- coding: utf-8 -*-
# See README.rst file on addon root folder for license details
{
"name": "Libro de IVA",
"version": "8.0.1.0.1",
"author": "PRAXYA, "
"Odoo Community Association (OCA)",
"website": "http://www.praxya.com",
"license": "AGPL-3",
"category": "Accounting",
... | agpl-3.0 | -827,756,064,103,522,700 | 34.454545 | 72 | 0.598077 | false |
open-io/oio-swift | oioswift/common/request_helpers.py | 1 | 1307 | # Copyright (c) 2018 OpenIO SAS
#
# 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, s... | apache-2.0 | 2,916,379,550,164,513,000 | 36.342857 | 77 | 0.706963 | false |
jmcfarlane/chula | chula/queue/messages/mail.py | 1 | 2081 | """
Chula email message object
"""
from chula import collection
from chula.mail import Mail
from chula.queue.messages import message
class Message(message.Message):
def fill(self, msg):
super(Message, self).fill(msg)
self.message = Contract()
# Update the contract
if not msg is No... | gpl-2.0 | 5,380,970,740,859,378,000 | 27.902778 | 74 | 0.583373 | false |
subodhchhabra/airflow | airflow/hooks/hive_hooks.py | 3 | 36631 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | -6,283,937,170,555,760,000 | 38.47306 | 90 | 0.540198 | false |
jphnoel/udata | udata/core/followers/models.py | 2 | 1187 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from udata.models import db
from .signals import on_follow, on_unfollow
__all__ = ('Follow', )
class FollowQuerySet(db.BaseQuerySet):
def following(self, user):
return self(follower=user, until=None)
de... | agpl-3.0 | 5,721,291,466,655,686,000 | 23.729167 | 79 | 0.625948 | false |
indautgrp/erpnext | erpnext/crm/doctype/opportunity/opportunity.py | 2 | 8376 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.utils import cstr, cint, get_fullname
from frappe import msgprint, _
from frappe.model.mapper import get_mapped_doc
from... | gpl-3.0 | 170,767,392,767,994,750 | 30.969466 | 185 | 0.675382 | false |
CloudWareChile/OpenChile | openerp/test/test_osv.py | 14 | 4143 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 OpenERP S.A. http://www.openerp.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 | 5,466,175,959,335,884,000 | 61.772727 | 240 | 0.646874 | false |
graingert/pip | docs/conf.py | 2 | 7030 | # -*- coding: utf-8 -*-
#
# pip documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 22 22:08:49 2008
#
# 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 confi... | mit | 7,698,080,838,145,617,000 | 31.100457 | 79 | 0.695164 | false |
asimshankar/tensorflow | tensorflow/contrib/distribute/python/strategy_test_lib.py | 1 | 11524 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,439,386,105,731,751,000 | 38.331058 | 84 | 0.653766 | false |
maziarraissi/ParametricGP-in-Python | PGPs_autograd/PGP/Utilities.py | 1 | 1168 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Maziar Raissi
"""
import autograd.numpy as np
def kernel(X, Xp, hyp):
output_scale = np.exp(hyp[0])
lengthscales = np.sqrt(np.exp(hyp[1:]))
X = X/lengthscales
Xp = Xp/lengthscales
X_SumSquare = np.sum(np.square(X),axis=1);
Xp_SumSquar... | mit | -4,844,009,523,158,646,000 | 23.354167 | 59 | 0.581336 | false |
andrewyoung1991/abjad | abjad/tools/documentationtools/ReSTTOCItem.py | 1 | 1154 | # -*- encoding: utf-8 -*-
from abjad.tools import stringtools
from abjad.tools.datastructuretools.TreeNode import TreeNode
class ReSTTOCItem(TreeNode):
r'''A ReST TOC item.
::
>>> item = documentationtools.ReSTTOCItem(text='api/index')
>>> item
ReSTTOCItem(
text='api/inde... | gpl-3.0 | 5,943,626,681,470,671,000 | 18.896552 | 67 | 0.551127 | false |
tinkerthaler/odoo | addons/account/account.py | 19 | 190583 | # -*- 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 | 744,763,512,084,534,700 | 52.459467 | 425 | 0.583011 | false |
hexlism/xx_net | gae_proxy/server/lib/google/appengine/tools/dev_appserver_import_hook.py | 5 | 45469 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | bsd-2-clause | -7,049,346,292,556,689,000 | 24.107123 | 112 | 0.601553 | false |
victorywang80/Maintenance | saltstack/src/salt/tops/ext_nodes.py | 1 | 1750 | # -*- coding: utf-8 -*-
'''
External Nodes Classifier
=========================
The External Nodes Classifier is a master tops subsystem used to hook into
systems used to provide mapping information used by major configuration
management systems. One of the most common external nodes classification
system is provided ... | apache-2.0 | -952,423,394,170,368,900 | 24.735294 | 74 | 0.594857 | false |
MissCatLady/AlarmEZ | venv/lib/python2.7/site-packages/passlib/handlers/cisco.py | 19 | 8517 | """passlib.handlers.cisco - Cisco password hashes"""
#=============================================================================
# imports
#=============================================================================
# core
from binascii import hexlify, unhexlify
from hashlib import md5
import logging; log = loggin... | mit | -5,510,771,039,623,949,000 | 37.890411 | 146 | 0.527885 | false |
apple/swift | utils/gyb_syntax_support/PatternNodes.py | 13 | 3650 | from .Child import Child
from .Node import Node # noqa: I201
PATTERN_NODES = [
# type-annotation -> ':' type
Node('TypeAnnotation', kind='Syntax',
children=[
Child('Colon', kind='ColonToken'),
Child('Type', kind='Type'),
]),
# enum-case-pattern -> type-identif... | apache-2.0 | -5,359,074,479,707,960,000 | 32.486239 | 73 | 0.514521 | false |
will-moore/openmicroscopy | components/tools/OmeroPy/src/omero/gateway/scripts/dbhelpers.py | 9 | 19384 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append('.')
import omero.gateway
import omero.model
import os
import subprocess
import urllib2
from types import StringTypes
from path import path
BASEPATH = os.path.dirname(os.path.abspath(__file__))
TESTIMG_URL = 'http://downloads.openmicroscopy.org... | gpl-2.0 | 331,579,324,663,315,800 | 32.478411 | 78 | 0.56851 | false |
diana-hep/femtocode | lang/tests/test_syntax.py | 1 | 77475 | #!/usr/bin/env python
# Copyright 2016 DIANA-HEP
#
# 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 o... | apache-2.0 | -5,485,388,087,580,594,000 | 90.039953 | 518 | 0.569151 | false |
ceibal-tatu/sugar-toolkit-gtk3 | src/sugar3/activity/widgets.py | 1 | 13471 | # Copyright (C) 2009, Aleksey Lim, Simon Schampijer
# Copyright (C) 2012, Walter Bender
# Copyright (C) 2012, One Laptop Per Child
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either... | lgpl-2.1 | -841,100,998,823,937,800 | 32.6775 | 80 | 0.630317 | false |
neavouli/yournextrepresentative | candidates/tests/test_merge_people.py | 3 | 12037 | from __future__ import unicode_literals
from django.test import TestCase
from ..models import merge_popit_people
class TestMergePeople(TestCase):
def test_merge_basic_unknown_details(self):
primary = {
'foo': 'bar',
'quux': 'xyzzy',
}
secondary = {
'fo... | agpl-3.0 | -4,818,878,524,292,432,000 | 31.184492 | 182 | 0.390047 | false |
alphaBenj/zipline | zipline/utils/sqlite_utils.py | 2 | 1739 | # Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -4,548,816,480,827,893,000 | 28.474576 | 75 | 0.723404 | false |
larryhynes/qutebrowser | qutebrowser/test/utils/usertypes/test_enum.py | 2 | 1944 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | 5,436,881,742,198,679,000 | 29.857143 | 74 | 0.670267 | false |
rupertsmall/DIGITS | digits/dataset/images/classification/views.py | 7 | 10610 | # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import os
import flask
from digits import utils
from digits.utils.routing import request_wants_json, job_from_request
from digits.webapp import app, scheduler, autodoc
from digits.dataset import tasks
from forms import ImageClassificationDatasetFor... | bsd-3-clause | 4,793,222,573,061,883,000 | 33.673203 | 99 | 0.542036 | false |
dmazzer/nors | remote/GrovePi/Software/Python/grove_ph_sensor.py | 2 | 2094 | #!/usr/bin/env python
#
# GrovePi Example for using the Grove PH Sensor (http://www.seeedstudio.com/wiki/Grove_-_PH_Sensor)
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this example? Ask on the fo... | mit | -4,857,175,944,731,164,000 | 34.491525 | 139 | 0.746896 | false |
GeoNode/geonode | geonode/services/tests.py | 1 | 39827 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 4,394,017,487,905,976,300 | 42.703622 | 115 | 0.559502 | false |
DaniilLeksin/theblog | posts/views.py | 1 | 1155 | from django.shortcuts import render
from rest_framework import permissions, viewsets
from rest_framework.response import Response
from posts.models import Post
from posts.permissions import IsAuthorOfPost
from posts.serializers import PostSerializer
# Create your views here.
class PostViewSet(viewsets.ModelViewSet)... | gpl-2.0 | 8,992,568,961,566,526,000 | 30.216216 | 74 | 0.750649 | false |
matthiascy/panda3d | direct/src/p3d/JavaScript.py | 8 | 12034 | """ This module defines some simple classes and instances which are
useful when writing code that integrates with JavaScript, especially
code that runs in a browser via the web plugin. """
__all__ = ["UndefinedObject", "Undefined", "ConcreteStruct", "BrowserObject", "MethodWrapper"]
import types
class UndefinedObjec... | bsd-3-clause | 8,757,385,156,152,744,000 | 39.931973 | 151 | 0.571713 | false |
jeremykohn/closure-linter | closure_linter/full_test.py | 11 | 3621 | #!/usr/bin/env python
#
# Copyright 2007 The Closure Linter 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
#... | apache-2.0 | 3,204,844,735,459,870,700 | 28.92562 | 75 | 0.674399 | false |
mmolero/pcloudpy | pcloudpy/gui/MainWindowBase.py | 1 | 11800 | """
Template MainWindowBase.py
"""
#Author: Miguel Molero <miguel.molero@gmail.com>
import sys
import os
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal as Signal
import markdown2
import yaml
import pprint
#own components
from pcloudpy.gui.reso... | bsd-3-clause | -6,592,709,447,707,165,000 | 32.714286 | 163 | 0.644153 | false |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/serial/urlhandler/protocol_cp2110.py | 2 | 8540 | #! python
#
# Backend for Silicon Labs CP2110/4 HID-to-UART devices.
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2001-2015 Chris Liechti <cliechti@gmx.net>
# (C) 2019 Google LLC
#
# SPDX-License-Identifier: BSD-3-Clause
# This backend implements support for HID-to-UART devices manu... | mit | -5,908,419,889,556,478,000 | 32.100775 | 102 | 0.582553 | false |
jimsimon/sky_engine | build/config/mac/mac_app.py | 17 | 2776 | #!/usr/bin/python
# Copyright (c) 2015 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 argparse
import os
import errno
import subprocess
import sys
PLUTIL = [
'/usr/bin/env',
'xcrun',
'plutil'
]
IBTOOL = [
... | bsd-3-clause | -6,065,640,667,594,368,000 | 23.566372 | 78 | 0.64121 | false |
narurien/ganeti-ceph | lib/http/__init__.py | 5 | 28293 | #
#
# Copyright (C) 2007, 2008, 2010, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This progr... | gpl-2.0 | 7,959,725,630,880,990,000 | 26.902367 | 79 | 0.675149 | false |
26huitailang/bsawf | cli/commands/cmd_loc.py | 2 | 1137 | from subprocess import check_output
import click
def count_locs(file_type, comment_pattern):
"""
Detect if a program is on the system path.
:param file_type: Which file type will be searched?
:param file_type: str
:param comment_pattern: Escaped characters that are comments
:param comment_pa... | gpl-2.0 | 7,817,523,204,550,687,000 | 24.840909 | 77 | 0.524186 | false |
abadger/ansible-modules-core | network/netvisor/pn_vrouter.py | 19 | 13209 | #!/usr/bin/python
""" PN CLI vrouter-create/vrouter-delete/vrouter-modify """
#
# 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 | -5,907,246,054,434,256,000 | 31.06068 | 81 | 0.611856 | false |
Ruide/angr-dev | angr-management/angrmanagement/ui/widgets/qast_viewer.py | 1 | 2770 |
from PySide.QtGui import QFrame, QHBoxLayout, QLabel, QSizePolicy
from PySide.QtCore import QSize
from PySide.QtCore import Qt
import claripy
class QASTViewer(QFrame):
def __init__(self, ast, display_size=True, byte_format=None, parent=None):
super(QASTViewer, self).__init__(parent)
self._ast =... | bsd-2-clause | -6,985,445,687,273,895,000 | 26.425743 | 82 | 0.555235 | false |
armersong/letsencrypt | letsencrypt/display/util.py | 22 | 13776 | """Let's Encrypt display."""
import os
import textwrap
import dialog
import zope.interface
from letsencrypt import interfaces
WIDTH = 72
HEIGHT = 20
# Display exit codes
OK = "ok"
"""Display exit code indicating user acceptance."""
CANCEL = "cancel"
"""Display exit code for a user canceling the display."""
HELP ... | apache-2.0 | 6,059,927,006,826,664,000 | 31.64455 | 94 | 0.569251 | false |
calebfoss/tensorflow | tensorflow/python/ops/sets.py | 16 | 1163 | # 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 | 2,818,910,167,901,884,400 | 32.228571 | 80 | 0.707653 | false |
stamhe/bitcoin | test/functional/wallet_listreceivedby.py | 1 | 7385 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 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 the listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework ... | mit | -3,615,646,710,451,650,600 | 46.954545 | 197 | 0.61476 | false |
Ernti/GG-Server | ggs/net/client.py | 1 | 1345 | import json
import socket
import re
from threading import Thread
from ggs.event import Observable
class ReceiveThread(Thread):
def __init__(self, client):
Thread.__init__(self)
self.client = client
def run(self):
while True:
try:
data = self.client.conn.re... | gpl-2.0 | 9,134,087,358,805,982,000 | 25.92 | 78 | 0.522677 | false |
jkonecny12/pykickstart | pykickstart/commands/network.py | 7 | 24769 | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that... | gpl-2.0 | 4,870,074,090,182,911,000 | 36.246617 | 136 | 0.585571 | false |
damdam-s/bank-payment | account_banking_payment_transfer/model/account_move_reconcile.py | 11 | 1700 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 ACSONE SA (<http://acsone.eu>).
# Copyright (C) 2014 Akretion (www.akretion.com)
#
# All other contributions are (C) by their respective contributors
#
# All Rights Reserved
#
# T... | agpl-3.0 | -7,925,547,129,787,654,000 | 36.777778 | 78 | 0.6 | false |
joequant/zipline | zipline/assets/assets.py | 8 | 34670 | # Copyright 2015 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 2,541,197,964,576,941,000 | 33.292779 | 79 | 0.542631 | false |
saurabh6790/aimobilize-lib-backup | webnotes/modules/utils.py | 34 | 4137 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes, os
import webnotes.modules
from webnotes.utils import cstr
from webnotes.modules import export_doc, get_module_path, scrub
def listfolders(path, only_name=0... | mit | -6,476,806,167,198,949,000 | 25.519231 | 90 | 0.656514 | false |
drkitty/metatube | data.py | 1 | 11578 | from __future__ import unicode_literals
import dateutil.parser
import os
import os.path
import subprocess
from itertools import islice
from sys import stderr
import oursql
import requests
from sqlalchemy import (
create_engine, Boolean, Column, DateTime, ForeignKey, Integer, String,
Text
)
from sqlalchemy.orm... | mit | 7,415,975,497,859,556,000 | 31.340782 | 79 | 0.553463 | false |
pra85/calibre | src/calibre/gui2/dialogs/choose_plugin_toolbars.py | 9 | 2372 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
__license__ = 'GPL v3'
from PyQt4.Qt ... | gpl-3.0 | -5,796,854,673,159,429,000 | 36.0625 | 79 | 0.631113 | false |
motord/Motorcycle-Diaries | lib/gdata/contacts/client.py | 7 | 19998 | #!/usr/bin/env python
#
# Copyright (C) 2009 Google 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 ... | bsd-3-clause | -6,521,328,686,490,687,000 | 39.4 | 95 | 0.653915 | false |
sjl/flask-urls | setup.py | 1 | 1159 | """
flask-urls
----------
A collection of URL-related functions for Flask applications.
Links
`````
* `documentation <http://sjl.bitbucket.org/flask-urls/>`_
* `development version
<http://bitbucket.org/sjl/flask-urls/get/tip.gz#egg=flask-urls-dev`_
"""
from setuptools import setup
setup(
name='flask-urls'... | mit | 3,894,851,580,772,052,000 | 24.755556 | 80 | 0.624676 | false |
thedixieflatline/mGameController | pygame/tests/transform_test.py | 23 | 24894 | if __name__ == '__main__':
import sys
import os
pkg_dir = os.path.split(os.path.abspath(__file__))[0]
parent_dir, pkg_name = os.path.split(pkg_dir)
is_pygame_pkg = (pkg_name == 'tests' and
os.path.split(parent_dir)[1] == 'pygame')
if not is_pygame_pkg:
sys.path.inser... | gpl-2.0 | -7,855,927,651,751,406,000 | 32.777476 | 162 | 0.540532 | false |
51reboot/actual_13_homework | 03/sxq/dict_file_build.py | 1 | 5067 | #!/usr/bin/env python
#coding:utf-8
print '-'*30 + 'Dict 內建函数'
#dict
my_dict = {'s':'1','x':'2','q':'3'}
new_dict = {}
#clear 清空字典
# print my_dict
# my_dict.clear()
# print my_dict
# copy 深拷贝,被拷贝对象不变
# new_dict=my_dict.copy()
# new_dict['a']=4
# print 'new_dict %s'%new_dict
# print my_dict
# fromkeys 从列表中获取key,并创建成... | mit | 6,341,058,686,912,388,000 | 17.946341 | 79 | 0.720319 | false |
adityacs/ansible | lib/ansible/plugins/action/unarchive.py | 28 | 4994 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>
#
# 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 v... | gpl-3.0 | -6,481,284,628,784,896,000 | 36.833333 | 93 | 0.594313 | false |
Timurdov/bionic | bionic/Lib/site-packages/django/db/migrations/autodetector.py | 9 | 52650 | from __future__ import unicode_literals
import re
import datetime
from itertools import chain
from django.utils import six
from django.conf import settings
from django.db import models
from django.db.migrations import operations
from django.db.migrations.migration import Migration
from django.db.migrations.questione... | apache-2.0 | 8,536,600,039,370,450,000 | 47.258478 | 166 | 0.536847 | false |
awesto/django-shop | tests/testshop/models.py | 2 | 1146 | from django.db import models
from shop.models.defaults.commodity import Commodity
from shop.models.defaults.cart import Cart
from shop.models.defaults.cart_item import CartItem
from shop.models.defaults.order import Order
from shop.models.order import BaseOrderItem
from shop.models.defaults.delivery import Delivery
fro... | bsd-3-clause | -7,376,465,464,972,806,000 | 33.727273 | 93 | 0.775742 | false |
cmu-db/cmdbac | blog/models.py | 2 | 8482 | # -*- coding: utf8 -*-
import json
try:
from urllib2 import urlopen # noqa
except ImportError:
from urllib.request import urlopen # noqa
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.contrib.auth.models import User
from django.core.urlresolvers import revers... | apache-2.0 | -1,693,174,225,490,352,400 | 29.394265 | 131 | 0.617571 | false |
RydrDojo/Ridr | pylotVenv/lib/python2.7/site-packages/alembic/testing/plugin/noseplugin.py | 15 | 2756 | # plugin/noseplugin.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
Enhance nose with extra options and behaviors for running SQLAlchemy tests.... | mit | 3,691,909,365,062,004,000 | 25.757282 | 75 | 0.616473 | false |
eufarn7sp/egads-gui | ui/Ui_downloadwindow.py | 1 | 10275 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'downloadupdatewindow.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_downloadWindow(object):
def setupUi(self, downloadWindow)... | gpl-3.0 | -3,914,230,850,875,428,400 | 48.637681 | 361 | 0.666959 | false |
andrew-aladev/samba-talloc-debug | buildtools/wafsamba/samba_wildcard.py | 34 | 4534 | # based on playground/evil in the waf svn tree
import os, datetime
import Scripting, Utils, Options, Logs, Environment, fnmatch
from Constants import *
from samba_utils import *
def run_task(t, k):
'''run a single build task'''
ret = t.run()
if ret:
raise Utils.WafError("Failed to build %s: %u" % ... | gpl-3.0 | -2,839,639,961,722,802,000 | 28.633987 | 82 | 0.574989 | false |
SmartDeveloperHub/gitlab-api-generator | utils/parse.py | 1 | 5885 | """
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-... | apache-2.0 | 2,813,399,810,699,985,000 | 29.335052 | 94 | 0.513849 | false |
film42/bitcoin-exchange | bitcoin_exchange/settings_application.py | 1 | 1658 | """
Django settings for bitcoin_exchange project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR... | mit | 801,520,769,011,760,000 | 26.180328 | 71 | 0.734017 | false |
Hearen/OnceServer | Server/utils/Tools.py | 1 | 3028 | '''
Author : LHearen
E-mail : LHearen@126.com
Time : 2015-12-16 10 : 28
Description : Used to assist other modules;
'''
from flask import make_response
from utils.OnceLogging import log, init
import subprocess
init("/var/log/xen/libvirt.log", "DEBUG", log)
def moduleLoader(packageName, moduleName):
... | mit | 2,404,669,267,171,790,300 | 30.873684 | 82 | 0.61889 | false |
gpetretto/pymatgen | pymatgen/analysis/structure_matcher.py | 6 | 43455 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes to perform fitting of structures.
"""
from __future__ import division, unicode_literals
import six
from six.moves import filter
from six.moves import zip
import numpy as np
i... | mit | -5,068,807,349,576,970,000 | 38.254743 | 98 | 0.572615 | false |
emkailu/PAT3DEM | bin/p3ctf.py | 1 | 6662 | #!/usr/bin/env python
import os
import sys
import argparse
import subprocess
from EMAN2 import *
def decim1(num):
# return a list of floats with 1 decimal
num_new = []
for i in num:
num_new += [float("{0:0.1f}".format(float(i)))]
return num_new
def ctf_read(ctftxt):
# return a list of values in ctftxt
with o... | mit | -4,892,923,597,455,956,000 | 39.13253 | 361 | 0.620684 | false |
sambitgaan/nupic | src/nupic/encoders/coordinate.py | 37 | 6557 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, 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 | 3,658,378,859,817,901,600 | 30.524038 | 79 | 0.65167 | false |
sfam/home-assistant | homeassistant/components/media_player/denon.py | 5 | 5059 | """
homeassistant.components.media_player.denon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides an interface to Denon Network Receivers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.denon/
"""
import telnetlib
import logging
from hom... | mit | 3,869,476,987,199,589,000 | 28.412791 | 76 | 0.596956 | false |
philipsd6/jrnl | jrnl/plugins/template_exporter.py | 3 | 1497 | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals
from .text_exporter import TextExporter
from .template import Template
import os
from glob import glob
class GenericTemplateExporter(TextExporter):
"""This Exporter can convert entries and journals into text files."... | mit | 8,822,666,731,958,224,000 | 29.55102 | 86 | 0.641951 | false |
jhpyle/docassemble | docassemble_base/docassemble/base/mako/ext/pygmentplugin.py | 1 | 4547 | # ext/pygmentplugin.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from pygments.lexers.web import \
HtmlLexer, XmlLexer, JavascriptLexer, CssLexer
from pyg... | mit | -4,397,171,927,666,605,000 | 34.80315 | 78 | 0.483616 | false |
whummer/moto | moto/awslambda/models.py | 1 | 25476 | from __future__ import unicode_literals
import base64
from collections import defaultdict
import copy
import datetime
import docker
import docker.errors
import hashlib
import io
import logging
import os
import json
import re
import zipfile
import uuid
import functools
import tarfile
import calendar
import threading
im... | apache-2.0 | 8,312,100,478,511,132,000 | 34.88169 | 141 | 0.558526 | false |
jdemon519/cfme_tests | utils/units.py | 6 | 3398 | # -*- coding: utf-8 -*-
import math
import re
# TODO: Split the 1000 and 1024 factor out. Now it is not an issue as it is used FOR COMPARISON ONLY
FACTOR = 1024
PREFIXES = ['', 'K', 'M', 'G', 'T', 'P']
FACTORS = {prefix: int(math.pow(FACTOR, i)) for i, prefix in enumerate(PREFIXES)}
UNITS = ['Byte', 'Bytes', 'B', 'b'... | gpl-2.0 | 1,580,423,731,653,379,800 | 34.030928 | 100 | 0.60771 | false |
mozilla/firefox-flicks | vendor-local/lib/python/djcelery/tests/test_backends/test_database.py | 3 | 3025 | from __future__ import absolute_import
from datetime import timedelta
from celery import current_app
from celery import states
from celery.result import AsyncResult
from celery.task import PeriodicTask
from celery.utils import gen_unique_id
from djcelery.backends.database import DatabaseBackend
from djcelery.utils i... | bsd-3-clause | 2,561,283,935,348,965,400 | 29.555556 | 70 | 0.615207 | false |
JBonsink/GSOC-2013 | net_config/back_traf.py | 4 | 1406 | """ parameter required
sim_t
"""
#################################
## Parameter For Normal Case ##
#################################
# sim_t = 8000
start = 0
DEFAULT_PROFILE = ((sim_t,),(1,))
# gen_desc = {'TYPE':'harpoon', 'flow_size_mean':'4e5', 'flow_size_var':'100', 'flow_arrival_rate':'0.5'}
gen_desc = {'TYPE':... | gpl-3.0 | -3,107,608,183,109,777,400 | 31.697674 | 105 | 0.470128 | false |
OptiPop/external_chromium_org | tools/perf/measurements/media.py | 26 | 2660 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from metrics import cpu
from metrics import media
from metrics import system_memory
from metrics import power
from telemetry.page import page_test
class Me... | bsd-3-clause | -1,825,316,912,215,399,700 | 38.117647 | 79 | 0.688722 | false |
apark263/tensorflow | tensorflow/contrib/timeseries/examples/lstm_test.py | 40 | 1760 | # 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 | -2,188,256,339,058,003,200 | 34.918367 | 80 | 0.707386 | false |
dvro/scikit-protopy | examples/plot_selection_example.py | 1 | 1639 | import numpy as np
import matplotlib.pyplot as plt
import random
from protopy.selection.enn import ENN
from protopy.selection.cnn import CNN
from protopy.selection.renn import RENN
from protopy.selection.allknn import AllKNN
from protopy.selection.tomek_links import TomekLinks
from protopy.selection.ssma import SSMA
... | bsd-2-clause | 1,370,264,468,952,154,000 | 28.267857 | 104 | 0.585723 | false |
bing-ads-sdk/BingAds-Python-SDK | bingads/v12/internal/bulk/object_writer.py | 1 | 1956 | from bingads.manifest import BULK_FORMAT_VERSION_6
from bingads.v12.internal.bulk.bulk_object_factory import _BulkObjectFactory
from bingads.v12.internal.bulk.csv_writer import _CsvWriter
from bingads.v12.internal.bulk.csv_headers import _CsvHeaders
from bingads.v12.internal.bulk.row_values import _RowValues
from bing... | mit | -6,633,296,943,759,418,000 | 32.724138 | 85 | 0.65593 | false |
soravux/scoop | bench/benchmark.py | 5 | 4302 | import sys
import scoop
import time
import argparse
import logging
import random
from serialization import find_pickling_speed
from functools import partial
def make_parser():
parser = argparse.ArgumentParser(
description=('Run a parametric benchmark of scoop.')
)
parser.add_argument('--time', typ... | lgpl-3.0 | -7,849,782,711,477,384,000 | 34.553719 | 80 | 0.548117 | false |
tacaswell/scikit-beam | skbeam/io/save_powder_output.py | 5 | 10661 | # ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# Redistribution and use in ... | bsd-3-clause | 4,860,976,921,087,705,000 | 35.138983 | 77 | 0.553513 | false |
bitemyapp/ganeti | lib/workerpool.py | 6 | 18604 | #
#
# Copyright (C) 2008, 2009, 2010 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | bsd-2-clause | -8,704,374,748,152,898,000 | 28.251572 | 79 | 0.639647 | false |
timlib/webXray | webxray/Client.py | 1 | 4965 | # standard python
import base64
import bz2
import datetime
import json
import multiprocessing
import optparse
import os
import re
import socket
import sys
import time
import urllib.parse
import urllib.request
from webxray.ChromeDriver import ChromeDriver
class Client:
def __init__(self, server_url, pool_size=None):... | gpl-3.0 | -6,543,108,149,990,522,000 | 27.616279 | 118 | 0.661248 | false |
apporc/cinder | cinder/volume/drivers/netapp/dataontap/fc_cmode.py | 3 | 3616 | # Copyright (c) - 2014, Clinton Knight. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | -3,784,373,204,439,991,000 | 35.16 | 78 | 0.671737 | false |
jdemel/gnuradio | gr-blocks/python/blocks/qa_block_gateway.py | 1 | 9262 | from __future__ import division
#
# Copyright 2011-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import numpy
import pmt
from gnuradio import gr, gr_unittest, blocks
class non_sync_block(gr.basic_block):
def __init__(self):
gr.... | gpl-3.0 | -8,985,375,428,202,301,000 | 30.39661 | 95 | 0.536061 | false |
cloudbau/nova | nova/tests/api/openstack/compute/test_images.py | 9 | 40740 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | apache-2.0 | -1,888,554,433,275,398,700 | 37.985646 | 79 | 0.460972 | false |
JAOSP/aosp_platform_external_chromium_org | tools/code_coverage/process_coverage.py | 51 | 14310 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Script to clean the lcov files and convert it to HTML
TODO(niranjan): Add usage information here
"""
import optparse
import ... | bsd-3-clause | 4,272,056,129,556,521,000 | 33.64891 | 79 | 0.643606 | false |
pyhedgehog/hook.io-sdk-python | tests/test_cli.py | 1 | 2861 | #!/usr/bin/env python
import os
import sys
import pytest
import logging
import runpy
import hookio.runclient
log = logging.getLogger(__name__)
def test_cli_empty(capsys):
pytest.raises(SystemExit, hookio.runclient.main, ['-'])
out, err = capsys.readouterr()
assert not out
assert 'usage:' in err
a... | unlicense | -2,773,399,889,693,449,700 | 28.802083 | 92 | 0.616218 | false |
andykimpe/chromium-test-npapi | tools/perf/page_sets/indexeddb_offline.py | 9 | 1972 | # 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
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.... | bsd-3-clause | 2,658,128,098,395,092,000 | 33.596491 | 79 | 0.670892 | false |
pombredanne/cubes | cubes/mapper.py | 7 | 3872 | # -*- coding: utf-8 -*-
"""Logical to Physical Mappers"""
import collections
from .logging import get_logger
from .errors import *
__all__ = (
"Mapper",
)
class Mapper(object):
"""Mapper is core class for translating logical model to physical database
schema.
"""
# WARNING: do not put any SQL/en... | mit | 6,382,085,092,239,933,000 | 31.233333 | 91 | 0.631851 | false |
vjpai/grpc | tools/run_tests/artifacts/artifact_targets.py | 4 | 16848 | #!/usr/bin/env python
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 5,100,993,569,728,586,000 | 40.70297 | 104 | 0.554962 | false |
Titosoft/ferry-boat | web2py/gluon/tests/test_cache.py | 18 | 2563 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Unit tests for gluon.cache
"""
import sys
import os
import unittest
def fix_sys_path():
"""
logic to have always the correct sys.path
'', web2py/gluon, web2py/site-packages, web2py/ ...
"""
def add_path_first(path):
sys.path = [path... | mit | 633,755,781,617,428,500 | 24.376238 | 66 | 0.551697 | false |
labero/kupfer | kupfer/plugin/multihead.py | 4 | 1171 | # TRANS: Multihead refers to support for multiple computer displays
# TRANS: In this case, it only concerns the special configuration
# TRANS: with multiple X "screens"
__kupfer_name__ = _("Multihead Support")
__kupfer_sources__ = ()
__description__ = ("Will run the keyboard shortcut relay service on additional"
... | gpl-3.0 | 1,557,507,452,257,198,300 | 28.275 | 79 | 0.684031 | false |
TieWei/nova | nova/api/metadata/base.py | 7 | 17455 | # 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 | -8,308,570,618,604,748,000 | 33.428008 | 79 | 0.570667 | false |
techtonik/readthedocs.org | readthedocs/restapi/views/search_views.py | 4 | 7293 | import logging
from rest_framework import decorators, permissions, status
from rest_framework.renderers import JSONPRenderer, JSONRenderer, BrowsableAPIRenderer
from rest_framework.response import Response
from readthedocs.builds.constants import LATEST
from readthedocs.builds.models import Version
from readthedocs.s... | mit | -5,960,257,018,852,270,000 | 30.034043 | 92 | 0.517483 | false |
atupal/ffbird | jinja2/nodes.py | 7 | 28857 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | apache-2.0 | 8,431,153,268,877,897,000 | 30.57221 | 81 | 0.600582 | false |
benEnsta/pyIbex | pyibex/thickset/geoimage_utils.py | 1 | 1738 | from pyibex import IntervalVector, Interval
from pyibex.thickset import * #PavingVisitor, IN, OUT, MAYBE_IN, MAYBE_OUT, UNK, MAYBE, EMPTY, ThickPaving, ThickDisk, ToVibes
from pyibex.thickset.thickimage import GeoImage, GeoMapper, ThickGeoImage
import numpy as np
import math
def grayToThickImg(gray_img, in_val=255, ma... | lgpl-3.0 | 9,104,594,568,389,917,000 | 30.035714 | 126 | 0.644994 | false |
RealTimeWeb/geocode | python/docs/conf.py | 1 | 8103 | # -*- coding: utf-8 -*-
#
# earthquakeservice documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 31 13:27:50 2013.
#
# 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 fil... | mit | 5,218,196,954,392,506,000 | 31.412 | 80 | 0.707146 | false |
DEGoodmanWilson/bacon | plugins/pdf.py | 1 | 4403 | #note that this plugin assumes that posts will be in HTML or XHTML format...
from Plugin import Plugin
import sys
import Config
from HTMLParser import HTMLParser
import string
image_base = '/home/dgoodman/www'
class StoryParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.parsedbuffer = ... | gpl-2.0 | -1,929,480,661,829,009,000 | 27.967105 | 83 | 0.546218 | false |
shoyer/xray | xarray/tutorial.py | 1 | 2729 | '''
Useful for:
* users learning xarray
* building tutorials in the documentation.
'''
import hashlib
import os as _os
from urllib.request import urlretrieve
from .backends.api import open_dataset as _open_dataset
_default_cache_dir = _os.sep.join(('~', '.xarray_tutorial_data'))
def file_md5_checksum(fname):
... | apache-2.0 | 7,904,196,227,685,292,000 | 26.019802 | 75 | 0.608281 | false |
supertom/ansible-modules-core | network/nxos/nxos_ospf_vrf.py | 10 | 20754 | #!/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 | 7,463,217,349,500,837,000 | 34.116751 | 93 | 0.547413 | false |
appknox/AFE | internals/lib/basecmd.py | 3 | 2893 | #!/usr/bin/env python
# encoding: utf-8
import cmd
import os
import readline
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
class BaseCmd(cmd.Cmd):
def __init__(self, session):
cmd.Cmd.__init__(self)... | gpl-3.0 | -4,520,084,536,532,713,000 | 28.824742 | 87 | 0.607328 | false |
faint32/MSpider | function/dbengine.py | 11 | 5628 | #!/usr/bin/env python
# coding:utf-8
# manning 2015-3-29
import os
import time
import sqlite3
import gevent
import hashlib
import Queue
def set_db_folder(name):
db_dir = os.getcwd() + '/database/'
db_name = time.strftime("%Y-%m-%d", time.localtime()) # 2015-01-20
folder = db_dir + str(db_name) + '-' + ... | gpl-2.0 | 3,505,176,095,380,545,000 | 38.090278 | 130 | 0.469616 | false |
jordanemedlock/psychtruths | temboo/core/Library/Google/Plus/Domains/Circles/Get.py | 5 | 5627 | # -*- coding: utf-8 -*-
###############################################################################
#
# Get
# Retrieves a specific circle.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in comp... | apache-2.0 | -726,109,733,821,143,900 | 43.307087 | 254 | 0.667141 | 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.