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 |
|---|---|---|---|---|---|---|---|---|---|---|
jaruba/chromium.src | tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_websocket.py | 11 | 6437 | # 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 collections
import json
import logging
import socket
import time
from telemetry.core.backends.chrome_inspector import websocket
_DomainHandler = co... | bsd-3-clause | 3,315,547,056,991,166,500 | 34.174863 | 80 | 0.687898 | false |
Livefyre/agency_tools | streamhub_app_generator.py | 2 | 9031 | import sys, itertools, os, argparse, urllib2, json, re
class Application_Type(object):
LIST = "list"
WALL = "wall"
class Application(object):
LIST_TYPE = "list"
WALL_TYPE = "wall"
def __init__(self, network, site_id, article_id, instance_type):
self.network = network
self.site_id ... | mit | -3,347,605,190,159,661,000 | 34.555118 | 168 | 0.565497 | false |
gnuhub/intellij-community | python/lib/Lib/encodings/mac_croatian.py | 593 | 13889 | """ Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.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_table)
def decode(self,inp... | apache-2.0 | 1,460,277,965,143,584,000 | 44.241042 | 118 | 0.547628 | false |
cloudera/hue | apps/search/src/search/controller.py | 2 | 1827 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | -7,750,711,898,194,428,000 | 29.966102 | 78 | 0.711549 | false |
ArneBab/pypyjs | website/demo/home/rfk/repos/pypy/lib-python/2.7/curses/__init__.py | 46 | 1817 | """curses
The main package for curses support for Python. Normally used by importing
the package, and perhaps a particular module inside it.
import curses
from curses import textpad
curses.initwin()
...
"""
__revision__ = "$Id$"
from _curses import *
from curses.wrapper import wrapper
import os as _os... | mit | 1,475,989,010,377,561,300 | 29.79661 | 77 | 0.682994 | false |
BRCDcomm/pynos | pynos/versions/ver_7/ver_7_0_0/yang/brocade_terminal.py | 4 | 2453 | #!/usr/bin/env python
import xml.etree.ElementTree as ET
class brocade_terminal(object):
"""Auto generated class.
"""
def __init__(self, **kwargs):
self._callback = kwargs.pop('callback')
def terminal_cfg_line_sessionid(self, **kwargs):
"""Auto Generated Code
"""
... | apache-2.0 | -2,744,403,395,678,361,000 | 37.952381 | 107 | 0.618019 | false |
gylian/headphones | lib/unidecode/x0cb.py | 253 | 5012 | data = (
'jjwaels', # 0x00
'jjwaelt', # 0x01
'jjwaelp', # 0x02
'jjwaelh', # 0x03
'jjwaem', # 0x04
'jjwaeb', # 0x05
'jjwaebs', # 0x06
'jjwaes', # 0x07
'jjwaess', # 0x08
'jjwaeng', # 0x09
'jjwaej', # 0x0a
'jjwaec', # 0x0b
'jjwaek', # 0x0c
'jjwaet', # 0x0d
'jjwaep', # 0x0e
'jjw... | gpl-3.0 | 4,895,164,431,698,401,000 | 18.426357 | 20 | 0.487829 | false |
lociii/googleads-python-lib | examples/adspygoogle/adwords/v201309/basic_operations/add_keywords.py | 2 | 2787 | #!/usr/bin/python
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -2,051,276,545,035,153,400 | 28.03125 | 79 | 0.616792 | false |
ds-hwang/chromium-crosswalk | chromecast/tools/trace.py | 19 | 2980 | #!/usr/bin/env python
#
# Copyright 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.
#
# This script was originally written by Alok Priyadarshi (alokp@)
# with some minor local modifications.
import contextlib
import j... | bsd-3-clause | -8,498,445,012,116,900,000 | 28.8 | 79 | 0.674832 | false |
felixma/nova | nova/tests/unit/scheduler/filters/test_core_filters.py | 17 | 4514 | # 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 | -1,118,712,251,938,863,700 | 47.537634 | 78 | 0.628489 | false |
srvg/ansible | test/units/template/test_safe_eval.py | 58 | 1820 | # (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 | -7,465,371,785,716,037,000 | 40.363636 | 90 | 0.704396 | false |
sinkuri256/python-for-android | python-build/python-libs/gdata/src/gdata/analytics/service.py | 213 | 13293 | #!/usr/bin/python
#
# Copyright (C) 2006 Google Inc.
# Refactored in 2009 to work for Google Analytics by Sal Uryasev at Juice 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
#
# ht... | apache-2.0 | -1,201,229,534,587,199,000 | 39.160121 | 79 | 0.633416 | false |
SlashRoot/WHAT | what_apps/main/models.py | 1 | 2208 | from django.db import models
from itertools import chain
BUBBLE_ACTIONS = (
(1, 'link'),
(2, 'pop'),
(3, 'modal'),
(4, 'ajax_crumb'),
)
class Bubble(models.Model):
url=models.CharField... | mit | -6,342,958,906,977,628,000 | 31.485294 | 108 | 0.564764 | false |
hufsm/tu_gen2_libsigrokdecode | decoders/cfp/__init__.py | 7 | 1583 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2018 Elias Oenal <sigrok@eliasoenal.com>
## 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... | gpl-3.0 | -4,650,766,062,340,091,000 | 45.558824 | 79 | 0.765635 | false |
amanuel/bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Tool/f77.py | 61 | 2056 | """engine.SCons.Tool.f77
Tool-specific initialization for the generic Posix f77 Fortran compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2... | apache-2.0 | -2,879,549,820,191,078,400 | 32.16129 | 95 | 0.745623 | false |
quom/google-cloud-python | docs/logging_snippets.py | 6 | 12290 | # Copyright 2016 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 or agreed to in writing, ... | apache-2.0 | 370,908,914,346,466,500 | 29.122549 | 79 | 0.663548 | false |
spunkmars/ProFTPD-Admin | src/proftpd/ftpadmin/models/ftpacl.py | 1 | 4142 | #coding=utf-8
from django.db import models
from proftpd.ftpadmin.lib.common import set_hexdigest, fix_path, check_safe_range
from proftpd.ftpadmin.settings import DISABLED_CHOICES, SHELL_CHOICES, FILE_PATH, FTP_GROUP_DEFAULT_GID, FTP_USER_SAFE_HOMEDIR, FTP_ACL_CHOICES
from proftpd.ftpadmin import signals
from proftp... | bsd-3-clause | 4,780,994,311,556,186,000 | 36.752294 | 144 | 0.614244 | false |
Splo0sh/3DCT | test/test_TDCT_correlation.py | 2 | 6800 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# @Title : test_TDCT_correlation
# @Project : 3DCTv2
# @Description : pytest test
# @Author : Jan Arnold
# @Email : jan.arnold (at) coraxx.net
# @Copyright : Copyright (C) 2016 Jan Arnold
# @License : GPLv3 (see LICENSE file)
# @Credits :
# @Maintainer ... | gpl-3.0 | -2,414,214,076,446,822,400 | 34.789474 | 121 | 0.701765 | false |
samvarankashyap/googlecloudutility2 | lib/simplejson/simplejson/compat.py | 155 | 1036 | """Python 3 compatibility shims
"""
import sys
if sys.version_info[0] < 3:
PY3 = False
def b(s):
return s
def u(s):
return unicode(s, 'unicode_escape')
import cStringIO as StringIO
StringIO = BytesIO = StringIO.StringIO
text_type = unicode
binary_type = str
string_types =... | apache-2.0 | -4,714,297,911,925,072,000 | 21.521739 | 53 | 0.593629 | false |
tprrt/linux-stable | tools/perf/python/tracepoint.py | 291 | 1504 | #! /usr/bin/env python
# SPDX-License-Identifier: GPL-2.0
# -*- python -*-
# -*- coding: utf-8 -*-
import perf
class tracepoint(perf.evsel):
def __init__(self, sys, name):
config = perf.tracepoint(sys, name)
perf.evsel.__init__(self,
type = perf.TYPE_TRACEPOINT,
... | gpl-2.0 | 6,872,729,223,369,229,000 | 30.333333 | 134 | 0.492686 | false |
liujinliu/squirrel | src/squirrel/controllers/worker.py | 1 | 1946 | # -*- coding: utf-8 -*-
import logging
from datetime import datetime
from tornado import gen
from tornado.queues import Queue
from concurrent.futures import ThreadPoolExecutor
from db.cache import Cache
from db.persis import Persis
from squirrel.utils import USER_CACHE_MAX, DAY_FMT
q = Queue(maxsize=1000)
LOG = logging... | apache-2.0 | -7,385,836,377,033,772,000 | 33.75 | 70 | 0.608941 | false |
jendap/tensorflow | tensorflow/python/kernel_tests/scatter_ops_test.py | 6 | 12310 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,174,124,197,377,692,000 | 32.091398 | 80 | 0.653859 | false |
ch3lo/zookeeper | src/contrib/rest/src/python/demo_master_election.py | 115 | 2920 | #! /usr/bin/env python
# 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 | -3,886,839,221,831,640,600 | 31.444444 | 80 | 0.573288 | false |
Erethon/synnefo | snf-branding/distribute_setup.py | 82 | 15757 | #!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of se... | gpl-3.0 | -3,165,972,533,108,857,300 | 31.48866 | 80 | 0.599607 | false |
Edraak/edraak-platform | lms/djangoapps/mobile_api/users/tests.py | 9 | 20141 | """
Tests for users API
"""
# pylint: disable=no-member
import datetime
import ddt
import pytz
from django.conf import settings
from django.template import defaultfilters
from django.test import RequestFactory, override_settings
from django.utils import timezone
from milestones.tests.utils import MilestonesTestCaseMix... | agpl-3.0 | 2,916,031,628,582,995,500 | 37.882239 | 120 | 0.640187 | false |
ilyes14/scikit-learn | sklearn/utils/class_weight.py | 63 | 7227 | # Authors: Andreas Mueller
# Manoj Kumar
# License: BSD 3 clause
import warnings
import numpy as np
from ..externals import six
from ..utils.fixes import in1d
from .fixes import bincount
def compute_class_weight(class_weight, classes, y):
"""Estimate class weights for unbalanced datasets.
Paramete... | bsd-3-clause | -8,156,360,381,310,762,000 | 38.928177 | 80 | 0.576311 | false |
rest-of/the-deck | lambda/lib/python2.7/site-packages/setuptools/command/install.py | 496 | 4685 | from distutils.errors import DistutilsArgError
import inspect
import glob
import warnings
import platform
import distutils.command.install as orig
import setuptools
# Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for
# now. See https://bitbucket.org/pypa/setuptools/issue/199/
_install = orig.... | mit | -132,627,986,381,934,820 | 36.48 | 79 | 0.629456 | false |
frank10704/DF_GCS_W | MissionPlanner-master/packages/IronPython.StdLib.2.7.5-beta1/content/Lib/ftplib.py | 50 | 36764 | """An FTP client class and some helper functions.
Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds
Example:
>>> from ftplib import FTP
>>> ftp = FTP('ftp.python.org') # connect to host, default port
>>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@
'230 Guest log... | gpl-3.0 | -6,062,112,633,803,773,000 | 33.486486 | 98 | 0.519476 | false |
BlueBrain/NeuroM | neurom/features/__init__.py | 1 | 6149 | # Copyright (c) 2020, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | bsd-3-clause | -1,972,831,414,719,588,600 | 38.928571 | 99 | 0.714425 | false |
ionelmc/django-easyfilters | tests/test_app/tests/test_ranges.py | 2 | 3677 | from decimal import Decimal
import unittest
from django_easyfilters.ranges import auto_ranges
class TestRanges(unittest.TestCase):
def test_auto_ranges_simple(self):
"""
Test that auto_ranges produces 'nice' looking automatic ranges.
"""
# An easy case - max_items is just what we... | mit | -6,502,209,669,346,150,000 | 42.77381 | 71 | 0.452271 | false |
transifex/openformats | openformats/tests/formats/structuredkeyvaluejson/test_keyvaluejson.py | 1 | 19720 | # -*- coding: utf-8 -*-
import unittest
import six
from openformats.formats.json import StructuredJsonHandler
from openformats.exceptions import ParseError
from openformats.strings import OpenString
from openformats.tests.formats.common import CommonFormatTestMixin
from openformats.tests.utils.strings import (gener... | gpl-3.0 | -984,731,356,585,395,100 | 43.693878 | 149 | 0.53445 | false |
DARKPOP/external_chromium_org | ppapi/generators/idl_thunk.py | 44 | 20936 | #!/usr/bin/env python
# Copyright (c) 2012 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.
""" Generator for C++ style thunks """
import glob
import os
import re
import sys
from idl_log import ErrOut, InfoOut, WarnOut
fr... | bsd-3-clause | -2,837,584,663,561,505,300 | 34.424704 | 80 | 0.62094 | false |
jaor/bigmler | bigmler/options/execute.py | 2 | 7974 | # -*- coding: utf-8 -*-
#
# Copyright 2015 BigML
#
# 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 ag... | apache-2.0 | 8,454,337,657,930,820,000 | 36.791469 | 79 | 0.528969 | false |
coteyr/home-assistant | homeassistant/components/switch/wink.py | 1 | 1109 | """
homeassistant.components.switch.wink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for Wink switches.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.wink/
"""
import logging
from homeassistant.components.wink import WinkToggleDevice
from homea... | mit | 7,189,512,233,521,884,000 | 30.685714 | 77 | 0.669973 | false |
alon/polinax | libs/external_libs/markdown-1.7/markdown.py | 21 | 61612 | #!/usr/bin/env python
version = "1.7"
version_info = (1,7,0,"rc-2")
__revision__ = "$Rev: 72 $"
"""
Python-Markdown
===============
Converts Markdown to HTML. Basic usage as a module:
import markdown
md = Markdown()
html = md.convert(your_text_string)
See http://www.freewisdom.org/projects/python-mark... | gpl-2.0 | -5,551,722,385,668,865,000 | 30.939865 | 158 | 0.518454 | false |
KamranMackey/readthedocs.org | fabfile.py | 35 | 1521 | from fabric.api import lcd, local
from fabric.decorators import runs_once
import os
fabfile_dir = os.path.dirname(__file__)
def update_theme():
theme_dir = os.path.join(fabfile_dir, 'readthedocs', 'templates', 'sphinx')
if not os.path.exists('/tmp/sphinx_rtd_theme'):
local('git clone https://github.... | mit | -5,699,806,473,283,415,000 | 33.568182 | 131 | 0.619987 | false |
niun/motty | motty/com.py | 1 | 7626 | import logging
from logging import debug, info, warning, error, critical
import serial
from serial.tools import list_ports
import time
import threading
from collections.abc import Iterable
from motty.config import Config
class HistoryObserver(object):
def __init__(self):
pass
def onNewHistoryEntry(se... | mit | -6,095,279,312,184,106,000 | 33.821918 | 98 | 0.575793 | false |
Donkyhotay/MoonPy | twisted/mail/maildir.py | 4 | 15496 | # -*- test-case-name: twisted.mail.test.test_mail -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Maildir-style mailbox support
"""
import os
import stat
import socket
import time
from zope.interface import implements
try:
import cStringIO as StringIO
except ImportErro... | gpl-3.0 | 8,267,360,452,181,871,000 | 28.972921 | 105 | 0.583441 | false |
coreos/depot_tools | third_party/boto/roboto/awsqueryrequest.py | 70 | 18654 | # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# withou... | bsd-3-clause | -5,789,155,147,657,026,000 | 36.011905 | 88 | 0.518495 | false |
won0089/oppia | core/domain/recommendations_jobs_continuous.py | 1 | 4744 | # coding: utf-8
#
# Copyright 2015 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | -3,311,242,314,840,729,000 | 35.775194 | 84 | 0.669477 | false |
tanjot/trimfilename | create_test_directory.py | 1 | 1235 | #!/usr/bin/python3
import os
def main():
test_folder = 'tmp'
for file_name in get_file_structure():
create(os.path.join(test_folder, file_name))
list_files(test_folder)
def get_file_structure():
simple_files = ['123abc.txt', '123xyz.txt', 'fooabc.barmp3', 'abc.abc', '00000000.txt']
level... | gpl-3.0 | 2,084,338,971,401,158,400 | 24.729167 | 91 | 0.592713 | false |
tlakshman26/cinder-new-branch | cinder/volume/drivers/dothill/dothill_client.py | 4 | 12185 | # Copyright 2014 Objectif Libre
# Copyright 2015 DotHill Systems
#
# 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
#
# U... | apache-2.0 | -2,369,313,715,385,980,400 | 34.943953 | 79 | 0.547641 | false |
loco-odoo/localizacion_co | openerp/addons-extra/odoo-pruebas/odoo-server/addons/report_webkit/convert.py | 322 | 2581 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
#
# WARNING: This program as such is intended to be used by professional
# programmers who ... | agpl-3.0 | 3,012,153,537,692,216,000 | 44.280702 | 80 | 0.656335 | false |
araines/moto | tests/test_sns/test_application.py | 15 | 8932 | from __future__ import unicode_literals
import boto
from boto.exception import BotoServerError
from moto import mock_sns
import sure # noqa
@mock_sns
def test_create_platform_application():
conn = boto.connect_sns()
platform_application = conn.create_platform_application(
name="my-application",
... | apache-2.0 | -804,020,911,579,898,600 | 35.457143 | 162 | 0.701747 | false |
cathyyul/sumo-0.18 | tests/complex/traci/pythonApi/lane/runner.py | 1 | 2329 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, subprocess, sys
sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "..", "..", "..", "tools"))
import traci, sumolib
sumoBinary = sumolib.checkBinary('sumo')
sumoProcess = subprocess.Popen("%s -c sumo.sumocfg" % (sumoBinary), shell=True, std... | gpl-3.0 | -4,408,629,877,880,681,000 | 40.589286 | 98 | 0.765135 | false |
dipspb/ardupilot | mk/VRBRAIN/Tools/genmsg/src/genmsg/msg_loader.py | 51 | 20963 | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain ... | gpl-3.0 | 2,734,824,519,041,150,000 | 41.311983 | 115 | 0.641416 | false |
jkandasa/integration_tests | artifactor/plugins/filedump.py | 6 | 4156 | """ FileDump plugin for Artifactor
Add a stanza to the artifactor config like this,
artifactor:
log_dir: /home/username/outdir
per_run: test #test, run, None
overwrite: True
plugins:
filedump:
enabled: True
plugin: filedump
"""
from artifactor import ArtifactorBasePlugi... | gpl-2.0 | -8,823,760,158,629,757,000 | 37.12844 | 92 | 0.551011 | false |
ehealthafrica-ci/onadata | onadata/apps/viewer/management/commands/sync_mongo.py | 8 | 1981 | #!/usr/bin/env python
from optparse import make_option
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.utils.translation import ugettext_lazy
from onadata.apps.logger.models import XForm
from onadata.libs.utils.logger_tools import mongo_sync_st... | bsd-2-clause | -3,070,710,025,928,482,300 | 38.62 | 75 | 0.594144 | false |
BeDjango/intef-openedx | cms/djangoapps/contentstore/utils.py | 22 | 15660 | """
Common utility functions useful throughout the contentstore
"""
import logging
import re
from datetime import datetime
from pytz import UTC
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from django_comment_common.models import assi... | agpl-3.0 | -7,753,078,859,180,698,000 | 33.266958 | 116 | 0.638378 | false |
zxtstarry/src | user/karl/display1.py | 5 | 8972 | from traits.api import HasTraits, Instance, Button, Enum, Int, Float, Range
from traitsui.api import View, Item, Group
from chaco.api import HPlotContainer, Plot, ArrayPlotData, DataRange1D
from chaco.tools.api import PanTool, ZoomTool
from enable.api import ColorTrait
from enable.component_editor import ComponentEdito... | gpl-2.0 | -4,594,332,212,451,156,000 | 37.016949 | 80 | 0.597414 | false |
kool79/intellij-community | python/lib/Lib/site-packages/django/contrib/contenttypes/views.py | 295 | 3025 | from django import http
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site, get_current_site
from django.core.exceptions import ObjectDoesNotExist
def shortcut(request, content_type_id, object_id):
"Redirect to an object's page based on a content-type ID and an ... | apache-2.0 | 1,950,682,146,996,222,200 | 41.605634 | 100 | 0.617521 | false |
secdev/scapy | scapy/contrib/spbm.py | 5 | 2442 | # This file is part of Scapy
# Scapy 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
# any later version.
#
# Scapy is distributed in the hope that it will be useful,
# but ... | gpl-2.0 | -4,815,096,797,782,140,000 | 39.7 | 159 | 0.700246 | false |
chienlieu2017/it_management | odoo/addons/payment_paypal/controllers/main.py | 1 | 4633 | # -*- coding: utf-8 -*-
import json
import logging
import pprint
import urllib2
import werkzeug
from odoo import http
from odoo.http import request
_logger = logging.getLogger(__name__)
class PaypalController(http.Controller):
_notify_url = '/payment/paypal/ipn/'
_return_url = '/payment/paypal/dpn/'
_c... | gpl-3.0 | -745,103,968,935,849,100 | 44.871287 | 185 | 0.616447 | false |
pixelgremlins/ztruck | dj/lib/python2.7/site-packages/django/contrib/sitemaps/__init__.py | 84 | 6499 | import warnings
from django.apps import apps as django_apps
from django.conf import settings
from django.core import urlresolvers, paginator
from django.core.exceptions import ImproperlyConfigured
from django.utils import translation
from django.utils.deprecation import RemovedInDjango19Warning
from django.utils.six.m... | apache-2.0 | -1,929,745,932,302,384,000 | 35.307263 | 113 | 0.617326 | false |
Dancore/SubTrigger | SubTrigger.py | 1 | 2599 | import sublime, sublime_plugin
class MytestCommand(sublime_plugin.TextCommand):
def run(self, edit):
# self.view.insert(edit, 0, "Hello, World! ")
self.view.run_command("show_panel", {"panel": "console"}) # "toggle": 0})
# print self.view.file_name(), "is now the active view"
class SublimeOnSave(sublime_plugin... | gpl-3.0 | 2,388,659,439,743,564,300 | 35.605634 | 137 | 0.694113 | false |
prds21/barrial-movie | lib/atom/http.py | 27 | 10236 | #!/usr/bin/python
#
# Copyright (C) 2008 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 ... | gpl-3.0 | -414,355,509,971,354,750 | 34.79021 | 79 | 0.655725 | false |
odooindia/odoo | addons/project_issue_sheet/__openerp__.py | 120 | 1851 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 | -3,107,620,662,748,895,000 | 36.77551 | 88 | 0.576445 | false |
yuvipanda/zulip | puppet/zulip_internal/files/postgresql/pg_backup_and_purge.py | 114 | 1575 | #!/usr/bin/python
import subprocess
import sys
import logging
import dateutil.parser
import pytz
from datetime import datetime, timedelta
logging.basicConfig(format="%(asctime)s %(levelname)s: %(message)s")
logger = logging.getLogger(__name__)
def run(args, dry_run=False):
if dry_run:
print "Would have r... | apache-2.0 | -4,915,651,480,030,616,000 | 29.882353 | 77 | 0.620317 | false |
adalke/rdkit | rdkit/ML/DecTree/UnitTestQuantTree.py | 3 | 7680 | ## Automatically adapted for numpy.oldnumeric Jun 27, 2008 by -c
#
# Copyright (C) 2001,2003 greg Landrum and Rational Discovery LLC
#
""" unit tests for the QuantTree implementation """
from __future__ import print_function
import unittest
import io
from rdkit import RDConfig
from rdkit.ML.DecTree import BuildQuan... | bsd-3-clause | -1,270,667,071,428,813,800 | 32.103448 | 105 | 0.580729 | false |
mraduldubey/webpage2kindle | webpage2kindle.py | 1 | 3273 | #!/usr/bin/python
import os,os.path,sys,pdfkit,requests,re
import getpass
import pynotify
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEBase import MIMEBase
from email import encoders
#IMPORTANT--Make sure your gmail settings' access to 'less-secure ap... | gpl-3.0 | -1,687,208,103,624,151,600 | 25.609756 | 134 | 0.707608 | false |
tigerbunny/bitmessage | src/class_objectHashHolder.py | 15 | 2004 | # objectHashHolder is a timer-driven thread. One objectHashHolder thread is used
# by each sendDataThread. The sendDataThread uses it whenever it needs to
# advertise an object to peers in an inv message, or advertise a peer to other
# peers in an addr message. Instead of sending them out immediately, it must
# wait a ... | mit | 9,104,127,570,577,058,000 | 43.555556 | 133 | 0.688623 | false |
asimshankar/tensorflow | tensorflow/python/kernel_tests/padding_fifo_queue_test.py | 1 | 59357 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,433,804,936,346,545,000 | 36.35494 | 80 | 0.603939 | false |
hangzhang925/WhereHows | wherehows-etl/src/main/resources/jython/LdapTransform.py | 3 | 9171 | #
# Copyright 2015 LinkedIn Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -3,446,747,300,276,571,000 | 40.310811 | 192 | 0.557518 | false |
ibuler/jumpserver | connect.py | 1 | 33558 | #!/usr/bin/env python
# coding: utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import os
import re
import time
import datetime
import textwrap
import getpass
import readline
import django
import paramiko
import errno
import struct, fcntl, signal, socket, select
from io import open as copen
import uuid
... | gpl-2.0 | 2,503,802,177,334,187,500 | 37.665037 | 134 | 0.460763 | false |
jmacmahon/invenio | modules/websession/lib/webuser_config.py | 16 | 1790 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 | 1,593,291,101,930,926,800 | 36.291667 | 77 | 0.67095 | false |
tswast/google-cloud-python | trace/google/cloud/trace_v1/gapic/trace_service_client_config.py | 1 | 1368 | config = {
"interfaces": {
"google.devtools.cloudtrace.v1.TraceService": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
},
"retry_params": {
"default": {
"ini... | apache-2.0 | -7,595,018,230,649,111,000 | 35 | 67 | 0.38962 | false |
Achuth17/scikit-bio | skbio/io/_base.py | 1 | 7700 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | bsd-3-clause | -8,607,395,293,773,900,000 | 34.321101 | 79 | 0.554805 | false |
home-assistant/home-assistant | tests/components/mfi/test_switch.py | 5 | 3581 | """The tests for the mFi switch platform."""
import unittest.mock as mock
import pytest
import homeassistant.components.mfi.switch as mfi
import homeassistant.components.switch as switch_component
from homeassistant.setup import async_setup_component
PLATFORM = mfi
COMPONENT = switch_component
THING = "switch"
GOOD_... | apache-2.0 | -1,817,772,666,641,239,000 | 27.879032 | 88 | 0.632226 | false |
COCS4950G7/COSC4950 | Source/Network/Obsolete/NetworkServer_r13B.py | 1 | 56657 | __author__ = 'chris hamm'
#NetworkServer_r13B
#Created: 2/19/2015
#DEsigned to run with NetworkClient_r13B
#Changes from previous revision:
#(Implemented) Replace the stackOfChunksThatNeedToBeReassigned with the queue of chunks
#changed receive chunk from controller setup to have chunk stored in the queue... | gpl-3.0 | -670,558,682,601,006,800 | 62.588103 | 199 | 0.521983 | false |
Mitame/YRS2014-Death-Game | data/settings.py | 2 | 1586 | '''
Created on 28 Jul 2014
@author: Levi Wright
'''
import os
if os.getcwd()[-4:] == "data":
os.chdir("..")
running = True
imported = False
import data
import pygame
import time
class level():
pixelsToGrid = 10
fillGaps = True
originLatLong = ([52, 56, 23.44],[0,4,10.75])
origi... | gpl-2.0 | -2,273,998,920,902,960,600 | 22.4 | 102 | 0.582598 | false |
hbiyik/tribler | src/tribler-core/tribler_core/tests/test_bootstrap.py | 1 | 1532 | from binascii import unhexlify
from ipv8.keyvault.crypto import ECCrypto
from tribler_core.modules.bootstrap import Bootstrap
from tribler_core.tests.tools.base_test import MockObject
from tribler_core.tests.tools.test_as_server import TestAsServer
from tribler_core.utilities.utilities import succeed
class FakeDHT(... | lgpl-3.0 | -1,326,796,016,116,297,000 | 33.818182 | 77 | 0.69517 | false |
blackye/luscan-devel | thirdparty_libs/dns/rdtypes/IN/NSAP.py | 100 | 2181 | # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... | gpl-2.0 | 3,231,114,705,271,473,000 | 35.966102 | 79 | 0.675837 | false |
etxc/namebench | tools/check_nameserver_popularity.py | 174 | 2456 | #!/usr/bin/env python
import os
import re
import sys
import pickle
import time
import traceback
import yahoo.search
from yahoo.search.web import WebSearch
APP_ID = 'P5ihFKzV34G69QolFfb3nN7p0rSsYfC9tPGq.IUS.NLWEeJ14SG9Lei0rwFtgwL8cDBrA6Egdw--'
QUERY_MODIFIERS = '-site:txdns.net -site:sitedossier.com -mx -site:dataopedi... | apache-2.0 | 2,041,882,573,153,117,000 | 42.857143 | 945 | 0.685261 | false |
Scotchester/owning-a-home | test/browser_testing/features/steps/steps_rate_checker_loan_details.py | 11 | 4431 | from behave import given, when, then
from hamcrest.core import assert_that
from hamcrest.core.core.isequal import equal_to
from hamcrest.library.number.ordering_comparison import greater_than, less_than
from hamcrest.library.text.stringcontains import contains_string
from pages.base import Base
from pages.rate_checker... | cc0-1.0 | 9,049,096,797,051,839,000 | 33.348837 | 81 | 0.731663 | false |
IronLanguages/ironpython2 | Src/StdLib/Lib/site-packages/win32/lib/rasutil.py | 38 | 1737 | import win32ras
stateStrings = {
win32ras.RASCS_OpenPort : "OpenPort",
win32ras.RASCS_PortOpened : "PortOpened",
win32ras.RASCS_ConnectDevice : "ConnectDevice",
win32ras.RASCS_DeviceConnected : "DeviceConnected",
win32ras.RASCS_AllDevicesConnected : "AllDevicesConnected",
win32ras.RASCS_Authentica... | apache-2.0 | 1,507,895,711,088,438,300 | 44.736842 | 79 | 0.753022 | false |
lyoniionly/django-cobra | src/cobra/apps/svnkit/abstract_models.py | 1 | 20237 | from __future__ import absolute_import, print_function
import datetime
import mimetypes
import os
import posixpath
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db import transaction
from django.utils.encoding import python_2_unicode_... | apache-2.0 | 47,064,571,029,829,176 | 34.505263 | 175 | 0.622177 | false |
danielharbor/openerp | addons/account_check_writing/wizard/__init__.py | 437 | 1082 | # -*- 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 | -7,138,752,567,987,986,000 | 44.083333 | 78 | 0.619224 | false |
ZeitOnline/zeit.ldap | bootstrap.py | 299 | 5686 | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | bsd-3-clause | -154,321,133,968,043,940 | 32.447059 | 79 | 0.608336 | false |
davidzchen/tensorflow | tensorflow/python/distribute/ps_values.py | 6 | 10000 | # Copyright 2020 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,599,920,328,647,396,000 | 28.154519 | 99 | 0.6385 | false |
levkar/odoo | addons/point_of_sale/models/pos_order.py | 2 | 46267 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from datetime import timedelta
from functools import partial
import psycopg2
from odoo import api, fields, models, tools, _
from odoo.tools import float_is_zero
from odoo.exceptions import UserError
from ... | agpl-3.0 | 1,788,195,554,821,148,700 | 49.181128 | 219 | 0.576523 | false |
openrisc/or1k-src | gdb/contrib/exsummary.py | 33 | 5735 | # Copyright 2011, 2013 Free Software Foundation, Inc.
#
# This 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 pro... | gpl-2.0 | -1,822,935,145,357,469,000 | 30 | 106 | 0.616042 | false |
dksr/REMIND | python/base/utils/Logging.py | 1 | 8007 | import os
import sys
import logging
import logging.handlers
from Singleton import Singleton
class attrdict(dict):
""" Dictionary with attribute like access """
def __init__(self, *args, **kwargs):
dict.__init__(self, *args, **kwargs)
self.__dict__ = self
class Logging_Manager(Singlet... | mit | 4,871,048,822,783,755,000 | 39.236181 | 124 | 0.517922 | false |
adcomp/super-fruit-pie | tuto/04_platform.py | 1 | 5701 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# David Art <david.madbox@gmail.com>
# Program Arcade Games With Python And Pygame - Build a Platformer
# http://programarcadegames.com
import pygame
import random
# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
YELLOW = (255, 255, 0)
WIDTH, HEIG... | mit | 1,031,072,940,009,067,400 | 26.083744 | 92 | 0.570251 | false |
jeffbryner/configlib | tests/test_configlib.py | 1 | 1147 |
class TestConfigLib(object):
def setup(self):
self.config_path = 'tests/fixture/fqdnblocklist.conf'
def test_current_behavior(self):
from configlib import getConfig
res = getConfig('mongohost', 'defaultvalue', self.config_path)
assert res == 'mongodb'
def test_option_pars... | mpl-2.0 | -818,607,641,773,670,300 | 30 | 70 | 0.633827 | false |
rahul67/hue | desktop/libs/hadoop/java/scripts/jobtracker_test.py | 38 | 1768 | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | apache-2.0 | 6,467,295,039,198,972,000 | 33.666667 | 77 | 0.727376 | false |
NRGunby/UCONGA | linalg.py | 1 | 2541 | import math
import numpy
def normalise(a):
'''
Normalises a vector
Accepts: a numpy vector
Returns: a numpy vector pointing in the same direction with magnitude 1
'''
a_norm = numpy.linalg.norm(a)
return numpy.array([float(each)/a_norm for each in a])
def rotation_axis_angle(axis, angle)... | bsd-3-clause | 1,874,089,720,291,955,500 | 32.434211 | 83 | 0.583628 | false |
simzacks/jjb | jenkins_jobs/modules/project_workflow.py | 3 | 2543 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 David Caro <david@dcaro.es>
#
# Based on jenkins_jobs/modules/project_flow.py by
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | apache-2.0 | -8,751,261,257,633,136,000 | 33.835616 | 75 | 0.662603 | false |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/core/application.py | 2 | 72779 | """This module implements data recording and reporting for an application.
"""
import logging
import sys
import threading
import time
import os
import traceback
import imp
from functools import partial
import newrelic.packages.six as six
from newrelic.samplers.data_sampler import DataSampler
from newrelic.core.co... | agpl-3.0 | -6,046,307,316,096,256,000 | 42.141079 | 79 | 0.549719 | false |
2014c2g1/c2g1 | exts/exts/sphinxcontrib/bibtex/latex_lexer.py | 38 | 12344 | # -*- coding: utf-8 -*-
"""
Simple incremental latex lexer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import codecs
import collections
import re
class Token(collections.namedtuple("Token", "name text")):
"""Stores information about a matched token."""
__slots__ = () # efficiency
def __new__(cls, name=Non... | gpl-2.0 | 211,486,954,619,856,700 | 37.322981 | 79 | 0.528282 | false |
jwinzer/OpenSlides | server/openslides/mediafiles/migrations/0004_directories_and_permissions_1.py | 7 | 2062 | # Generated by Django 2.2.2 on 2019-06-28 06:06
from django.db import migrations, models
import openslides.mediafiles.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [("mediafiles", "0003_auto_20190119_1425")]
operations = [
migrations.AlterModelOptions(... | mit | 2,441,541,100,533,031,400 | 30.723077 | 88 | 0.525218 | false |
walkers-mv/luigi | luigi/util.py | 22 | 8150 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 7,613,724,085,534,362,000 | 32.677686 | 114 | 0.643926 | false |
blaggacao/server-tools | __unported__/fetchmail_attach_from_folder/wizard/attach_mail_manually.py | 6 | 5137 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>)
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 | 3,642,711,475,559,043,600 | 44.061404 | 78 | 0.528324 | false |
MaheshBhosale/totem-tosha | distribute-0.6.35/setuptools/command/install_egg_info.py | 357 | 3833 | from setuptools import Command
from setuptools.archive_util import unpack_archive
from distutils import log, dir_util
import os, shutil, pkg_resources
class install_egg_info(Command):
"""Install an .egg-info directory for the package"""
description = "Install an .egg-info directory for the package"
user_... | apache-2.0 | 2,799,021,233,399,775,000 | 29.664 | 85 | 0.519958 | false |
Reflexe/doc_to_pdf | Windows/program/python-core-3.5.0/lib/mailbox.py | 5 | 78418 | """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses:
#
# Remember to fsync() changes to disk before closing a modified file
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
import os
import time
import calendar... | mpl-2.0 | 8,511,278,432,863,483,000 | 35.609711 | 89 | 0.528399 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_1_0/collection_schedule_broker.py | 17 | 28107 | from ..broker import Broker
class CollectionScheduleBroker(Broker):
controller = "collection_schedules"
def index(self, **kwargs):
"""Lists the available collection schedules. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists,... | apache-2.0 | 5,527,004,766,665,639,000 | 44.85155 | 474 | 0.575479 | false |
pk-sam/crosswalk-test-suite | wrt/tct-rt02-wrt-tests/inst.apk.py | 903 | 3180 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... | bsd-3-clause | 1,567,336,760,014,492,700 | 28.719626 | 92 | 0.543396 | false |
Radagast-red/golem | golem/interface/client/environments.py | 1 | 1641 | from golem.interface.command import group, CommandHelper, Argument, command, CommandResult
@group(name="envs", help="Manage environments")
class Environments(object):
name = Argument('name', help="Environment name")
table_headers = ['name', 'supported', 'active', 'performance', 'description']
sort = Ar... | gpl-3.0 | -652,449,734,486,537,700 | 31.176471 | 90 | 0.632541 | false |
pymedusa/SickRage | ext/tornado/platform/auto.py | 4 | 1877 | #
# Copyright 2011 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 by applicable law or agreed to in writing, s... | gpl-3.0 | 137,944,749,172,538,960 | 31.362069 | 77 | 0.741609 | false |
google/llvm-propeller | llvm/bindings/python/llvm/tests/test_object.py | 36 | 2201 | from numbers import Integral
from .base import TestBase
from ..object import ObjectFile
from ..object import Relocation
from ..object import Section
from ..object import Symbol
class TestObjectFile(TestBase):
def get_object_file(self):
source = self.get_test_binary()
return ObjectFile(filename=sou... | apache-2.0 | 717,577,544,563,070,100 | 30.898551 | 67 | 0.612449 | false |
wavewave/madgraph-auto-model | modelrepo/ADMXQLD333/particles.py | 8 | 24125 | # This file was automatically created by FeynRules $Revision: 510 $
# Mathematica version: 7.0 for Linux x86 (64-bit) (February 18, 2009)
# Date: Wed 2 Mar 2011 15:09:55
from __future__ import division
from object_library import all_particles, Particle
import parameters as Param
a = Particle(pdg_code = 22,
... | bsd-2-clause | -3,648,602,252,764,644,400 | 26.571429 | 69 | 0.339067 | 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.