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 |
|---|---|---|---|---|---|---|---|---|---|---|
atyenoria/seafile | scripts/upgrade/db_update_helper.py | 18 | 10798 | #coding: UTF-8
import sys
import os
import ConfigParser
import glob
HAS_MYSQLDB = True
try:
import MySQLdb
except ImportError:
HAS_MYSQLDB = False
HAS_SQLITE3 = True
try:
import sqlite3
except ImportError:
HAS_SQLITE3 = False
class EnvManager(object):
def __init__(self):
self.upgrade_dir... | gpl-2.0 | 4,865,397,214,910,636,000 | 30.573099 | 97 | 0.562697 | false |
OriHoch/Open-Knesset | persons/models.py | 3 | 8989 | from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from django.forms.fields import IntegerField
from django.dispatch import receiver
from django.db.models.signals import post_save
from mks.... | bsd-3-clause | 2,833,651,343,132,175,400 | 37.088983 | 113 | 0.627656 | false |
ellio167/lammps | examples/SPIN/test_problems/validation_damped_precession/plot_precession.py | 9 | 1126 | #!/usr/bin/env python3
import numpy as np, pylab, tkinter
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from decimal import *
import sys, string, os
argv = sys.argv
if len(argv) != 3:
print("Syntax: ./plot_precession.py res_lammps.dat res_llg.dat")
sys.exit()
lammps_file = sys.argv[1]
llg... | gpl-2.0 | -3,260,827,091,300,556,300 | 24.022222 | 101 | 0.658082 | false |
jardiacaj/finem_imperii | turn/building_production.py | 1 | 2510 | from world.models.buildings import Building
from world.models.geography import World
field_input_months = (0, 1, 2, 3, 4, 5, 8, 9, 10, 11)
field_output_months = (4, 5, 6, 7, 8)
field_output_multipliers = {4: 0.5, 5: 1, 6: 0.5, 7: 1, 8: 0.5}
field_production_reset_month = 8
def worldwide_building_production(world: Wo... | agpl-3.0 | -6,371,737,180,009,782,000 | 35.376812 | 74 | 0.598406 | false |
gkotton/neutron | neutron/tests/unit/vmware/extensions/test_qosqueues.py | 20 | 13063 | # Copyright (c) 2014 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | 4,460,923,737,718,054,400 | 45.653571 | 79 | 0.5191 | false |
basmot/futsal_management | futsal_management/wsgi.py | 1 | 1159 | ##############################################################################
#
# Copyright 2015-2016 Bastien Mottiaux
#
# 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.apac... | apache-2.0 | 2,817,613,756,585,528,000 | 33.088235 | 78 | 0.661777 | false |
okuta/chainer | chainer/distributions/cauchy.py | 2 | 3110 | import warnings
import numpy
import chainer
from chainer.backends import cuda
from chainer import distribution
from chainer.functions.math import exponential
from chainer.functions.math import trigonometric
from chainer.utils import cache
def _cauchy_icdf(x):
x = chainer.as_variable(x)
h = (x - 0.5) * numpy... | mit | -7,719,349,248,181,158,000 | 26.522124 | 78 | 0.599035 | false |
coxmediagroup/googleads-python-lib | examples/dfp/v201411/workflow_request_service/get_workflow_approval_requests_by_statement.py | 4 | 2211 | #!/usr/bin/python
#
# Copyright 2014 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 | -655,117,663,579,758,700 | 31.043478 | 80 | 0.669833 | false |
partofthething/home-assistant | homeassistant/components/august/__init__.py | 1 | 14632 | """Support for August devices."""
import asyncio
import itertools
import logging
from aiohttp import ClientError, ClientResponseError
from august.authenticator import ValidationResult
from august.exceptions import AugustApiAIOHTTPError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT, C... | mit | -3,008,204,262,912,377,000 | 33.591017 | 119 | 0.598551 | false |
Daniel-CA/odoomrp-wip-public | stock_quant_name_search/tests/test_stock_quant_name_search.py | 11 | 2993 | # -*- coding: utf-8 -*-
# © 2016 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import openerp.tests.common as common
class TestStockQuantNameSearch(common.TransactionCase):
def setUp(self):
super(TestStockQuantNameSearch, self).setUp()
self.lot_nam... | agpl-3.0 | -7,587,487,223,193,359,000 | 40.555556 | 79 | 0.598262 | false |
willprice/arduino-sphere-project | scripts/example_direction_finder/temboo/Library/Utilities/Text/Lowercase.py | 5 | 2883 | # -*- coding: utf-8 -*-
###############################################################################
#
# Lowercase
# Returns the contents of the specified string converted to lowercase.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License... | gpl-2.0 | 9,085,289,131,971,519,000 | 34.158537 | 128 | 0.673604 | false |
stackdio/stackdio | stackdio/api/users/filters.py | 2 | 1651 | # -*- coding: utf-8 -*-
# Copyright 2017, Digital Reasoning
#
# 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,748,405,130,019,256,300 | 30.75 | 84 | 0.670503 | false |
vbicer/RealmStore | Carthage/Checkouts/realm-cocoa/plugin/rlm_lldb.py | 6 | 10776 | #!/usr/bin/python
##############################################################################
#
# Copyright 2014 Realm 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.ap... | mit | 7,322,575,906,561,276,000 | 38.328467 | 141 | 0.64523 | false |
lsst-sqre/ltd-keeper | keeper/editiontracking/trackingmodes.py | 1 | 3019 | from __future__ import annotations
from typing import Union
from keeper.editiontracking.base import TrackingModeBase
from keeper.editiontracking.eupsdailymode import EupsDailyReleaseTrackingMode
from keeper.editiontracking.eupsmajormode import EupsMajorReleaseTrackingMode
from keeper.editiontracking.eupsweeklymode im... | mit | 3,918,184,076,186,657,000 | 28.598039 | 79 | 0.595561 | false |
aurix/lammps-induced-dipole-polarization-pair-style | tools/i-pi/ipi/utils/prng.py | 33 | 4174 | """Contains the classes used to generate pseudo-random numbers.
Copyright (C) 2013, Joshua More and Michele Ceriotti
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, ... | gpl-2.0 | -7,860,324,772,582,543,000 | 31.356589 | 79 | 0.688548 | false |
cysuncn/python | spark/crm/PROC_O_LNA_XDXT_VILLAGE_INFO.py | 1 | 4073 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_LNA_XDXT_VILLAGE_INFO').setMaster(sys.argv[2])
sc = SparkContext(conf = con... | gpl-3.0 | 1,761,726,224,240,423,700 | 41.136842 | 174 | 0.601049 | false |
Maronato/aosalunos | misago/models/checkpointmodel.py | 3 | 2728 | from django.db import models
from misago.signals import (merge_post, merge_thread, move_forum_content,
move_post, move_thread, rename_forum, rename_user)
class Checkpoint(models.Model):
forum = models.ForeignKey('Forum')
thread = models.ForeignKey('Thread')
action = models.CharF... | gpl-2.0 | 5,986,445,095,160,315,000 | 43.721311 | 111 | 0.648827 | false |
blrm/openshift-tools | ansible/roles/lib_openshift_3.2/library/oadm_router.py | 6 | 79435 | #!/usr/bin/env python # pylint: disable=too-many-lines
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _|
# | |) | (_) ... | apache-2.0 | 8,668,944,091,224,195,000 | 32.759031 | 118 | 0.53314 | false |
JorisDeRieck/Flexget | flexget/components/sites/sites/wordpress.py | 4 | 3229 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.parse import urlencode
import logging
import re
from flexget import plugin
from flexget.event import event
from flexget.plugin import PluginError
... | mit | -7,364,879,603,703,187,000 | 31.94898 | 111 | 0.621555 | false |
jamespcole/home-assistant | homeassistant/components/onboarding/views.py | 7 | 3642 | """Onboarding views."""
import asyncio
import voluptuous as vol
from homeassistant.components.http.data_validator import RequestDataValidator
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.core import callback
from .const import DOMAIN, STEP_USER, STEPS
async def async_setup(ha... | apache-2.0 | 5,741,273,418,620,851,000 | 29.099174 | 77 | 0.595003 | false |
PhilipsIII/ndnSIM | PyNDN/Face.py | 15 | 3883 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
#
# Copyright (c) 2011-2013, Regents of the University of California
# Alexander Afanasyev
#
# GNU 3.0 license, See the LICENSE file for more information
#
# Author: Alexander Afanasyev <alexander.afanasyev@ucla... | gpl-3.0 | -5,620,824,200,922,968,000 | 30.064 | 106 | 0.617306 | false |
MelbourneGenomics/UcscBed | ucsc_bed/__init__.py | 1 | 4224 | #!/usr/bin/env python3
import argparse
import ftplib
import gzip
import functools
import io
import pandas as pd
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('reference',
help='The version of the reference genome to use. Must start with "hg", e.g. "hg38"')
... | gpl-3.0 | -1,142,844,148,849,937,200 | 33.341463 | 120 | 0.602273 | false |
mola/qgis | python/plugins/fTools/tools/doVectorGrid.py | 3 | 8539 | # -*- coding: utf-8 -*-
#-----------------------------------------------------------
#
# Generate Vector Grid
#
# A QGIS plugin for generating a line or polygon grid
#
# Copyright (C) 2008 Carson Farmer
#
# EMAIL: carson.farmer (at) gmail.com
# WEB : www.geog.uvic.ca/spar/carson
#
#----------------------------------... | gpl-2.0 | -7,316,185,131,752,502,000 | 45.407609 | 263 | 0.585666 | false |
atsaki/ansible-modules-extras | cloud/misc/virt.py | 72 | 14049 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Virt management features
Copyright 2007, 2012 Red Hat, Inc
Michael DeHaan <michael.dehaan@gmail.com>
Seth Vidal <skvidal@fedoraproject.org>
This software may be freely redistributed under the terms of the GNU
general public license.
You should have received a copy of th... | gpl-3.0 | 1,615,391,288,458,508,300 | 26.875 | 116 | 0.556552 | false |
VinaCorp/HV | medcal/migrations/0001_initial.py | 1 | 3248 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-12-13 14:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | isc | 1,665,061,046,442,569,500 | 40.641026 | 148 | 0.563116 | false |
henrysher/yum | yum/failover.py | 12 | 5125 | #!/usr/bin/python
# 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 program is distributed in the hope that it wi... | gpl-2.0 | 1,171,450,252,914,406,000 | 35.091549 | 81 | 0.638439 | false |
jbogaardt/chainladder-python | chainladder/development/learning.py | 1 | 8140 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import numpy as np
import pandas as pd
from sklearn.preprocessing import OneHotEncoder, StandardScaler, PolynomialFeat... | mit | 6,286,292,862,475,518,000 | 37.578199 | 104 | 0.583292 | false |
gangadharkadam/vlinkfrappe | frappe/utils/bench_helper.py | 9 | 1943 | from __future__ import unicode_literals
import click
import frappe
import os
import json
import importlib
import frappe.utils
def main():
commands = get_app_groups()
commands.update({'get-frappe-commands': get_frappe_commands,
'get-frappe-help': get_frappe_help
})
click.Group(commands=commands)(prog_name='ben... | mit | 537,282,905,177,141,400 | 23.910256 | 71 | 0.683994 | false |
Sweetgrassbuffalo/ReactionSweeGrass-v2 | .meteor/local/dev_bundle/python/Lib/macpath.py | 35 | 6289 | """Pathname and path-related operations for the Macintosh."""
import os
import warnings
from stat import *
import genericpath
from genericpath import *
from genericpath import _unicode
__all__ = ["normcase","isabs","join","splitdrive","split","splitext",
"basename","dirname","commonprefix","getsize","getmt... | gpl-3.0 | 999,285,283,670,129,400 | 28.115741 | 79 | 0.603912 | false |
kikocorreoso/brython | www/src/Lib/_dummy_thread.py | 12 | 6027 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import _thread
except ImportError:
import _dummy_thread as _thread
"""
# Exports ... | bsd-3-clause | 4,998,584,670,166,008,000 | 30.227979 | 79 | 0.630164 | false |
sdlBasic/sdlbrt | win32/mingw/opt/lib/python2.7/_pyio.py | 28 | 69294 | """
Python implementation of the io module.
"""
from __future__ import (print_function, unicode_literals)
import os
import abc
import codecs
import warnings
import errno
# Import thread instead of threading to reduce startup cost
try:
from thread import allocate_lock as Lock
except ImportError:
from dummy_thr... | lgpl-2.1 | -8,064,648,548,969,156,000 | 33.134975 | 81 | 0.574465 | false |
google/mediapipe | mediapipe/python/packet_creator.py | 1 | 11356 | # Copyright 2020 The MediaPipe 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 or agreed to ... | apache-2.0 | -5,221,229,872,574,769,000 | 40.445255 | 116 | 0.712575 | false |
yongtang/tensorflow | tensorflow/python/ops/tensor_array_ops.py | 6 | 54164 | # 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,391,439,884,115,813,000 | 37.116819 | 98 | 0.64853 | false |
rockychen-dpaw/oim-cms | registers/migrations/0002_auto_20160919_1303.py | 1 | 4044 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-19 05:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('organisation', '0001_initial'),
... | apache-2.0 | -8,746,682,839,214,624,000 | 39.039604 | 163 | 0.599654 | false |
danakj/chromium | tools/android/loading/tracing.py | 7 | 19070 | # Copyright 2016 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.
"""Monitor tracing events on chrome via chrome remote debugging."""
import itertools
import logging
import operator
import clovis_constants
import devtools... | bsd-3-clause | 8,472,489,861,337,986,000 | 32.397548 | 80 | 0.637703 | false |
repology/repology | repology/parsers/parsers/crux.py | 1 | 2026 | # Copyright (C) 2017-2019 Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# This file is part of repology
#
# repology 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 optio... | gpl-3.0 | -8,551,845,393,287,674,000 | 43.043478 | 120 | 0.674729 | false |
partofthething/home-assistant | homeassistant/components/demo/weather.py | 9 | 5451 | """Demo platform that offers fake meteorological data."""
from datetime import timedelta
from homeassistant.components.weather import (
ATTR_CONDITION_CLOUDY,
ATTR_CONDITION_EXCEPTIONAL,
ATTR_CONDITION_FOG,
ATTR_CONDITION_HAIL,
ATTR_CONDITION_LIGHTNING,
ATTR_CONDITION_LIGHTNING_RAINY,
ATTR_... | mit | 4,714,112,650,781,788,000 | 28.306452 | 83 | 0.545588 | false |
whbruce/upm | examples/python/adxrs610.py | 7 | 2285 | #!/usr/bin/python
# Author: Jon Trulson <jtrulson@ics.com>
# Copyright (c) 2015 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without l... | mit | 8,625,103,420,399,247,000 | 37.083333 | 82 | 0.72035 | false |
uhef/fs-uae-gles | launcher/fs_uae_launcher/ui/settings/SettingsDialog.py | 2 | 2128 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import fs_uae_launcher.fsui as fsui
from ...I18N import _, ngettext
from ...Settings import Settings
from ...Signal import Signal
from ..PagedDialog import PagedDialog
fr... | gpl-2.0 | -1,679,251,159,061,336,000 | 41.56 | 75 | 0.720865 | false |
dlazz/ansible | lib/ansible/modules/cloud/cloudscale/cloudscale_server.py | 7 | 13316 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ve... | gpl-3.0 | -942,680,401,781,059,200 | 32.373434 | 152 | 0.633674 | false |
tpaszkowski/quantum | quantum/plugins/cisco/extensions/credential.py | 4 | 6038 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Cisco Systems, 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... | apache-2.0 | 8,391,760,036,689,786,000 | 36.503106 | 78 | 0.629347 | false |
OCA/l10n-brazil | l10n_br_currency_rate_update/models/res_currency_rate_provider_bcb.py | 1 | 3106 | # Copyright 2019 Akretion - Renato Lima <renato.lima@akretion.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import requests
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
class ResCurrencyRateProviderBCB... | agpl-3.0 | 2,351,460,399,164,173,300 | 35.541176 | 83 | 0.507083 | false |
SUSE/azure-sdk-for-python | azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/__init__.py | 9 | 3914 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -6,897,030,004,351,346,000 | 35.240741 | 102 | 0.766735 | false |
shootstar/novatest | nova/openstack/common/rpc/service.py | 3 | 2738 | # 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.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not... | apache-2.0 | -1,106,720,765,065,482,100 | 35.026316 | 78 | 0.676041 | false |
mjudsp/Tsallis | sklearn/ensemble/tests/test_gradient_boosting_loss_functions.py | 65 | 5529 | """
Testing for the gradient boosting loss functions and initial estimators.
"""
import numpy as np
from numpy.testing import assert_array_equal
from numpy.testing import assert_almost_equal
from numpy.testing import assert_equal
from nose.tools import assert_raises
from sklearn.utils import check_random_state
from ... | bsd-3-clause | 4,057,296,839,598,219,000 | 30.414773 | 79 | 0.567553 | false |
simonwydooghe/ansible | test/units/utils/test_encrypt.py | 31 | 7816 | # (c) 2018, Matthias Fuchs <matthias.s.fuchs@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) any l... | gpl-3.0 | -6,380,241,083,227,367,000 | 46.369697 | 141 | 0.712769 | false |
ajnirp/servo | tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py | 26 | 2371 | from .. import manifest, item as manifestitem, sourcefile
def test_local_reftest_add():
m = manifest.Manifest()
s = sourcefile.SourceFile("/", "test", "/")
test = manifestitem.RefTest(s, "/test", [("/ref", "==")])
m.local_changes.add(test)
m.update_reftests()
assert list(m) == [(test.path, {te... | mpl-2.0 | -4,457,116,378,822,364,700 | 28.6375 | 85 | 0.570224 | false |
zzxuanyuan/root-compressor-dummy | interpreter/llvm/src/tools/clang/tools/clang-format/clang-format.py | 33 | 3927 | # This file is a minimal clang-format vim-integration. To install:
# - Change 'binary' if clang-format is not on the path (see below).
# - Add to your .vimrc:
#
# map <C-I> :pyf <path-to-this-file>/clang-format.py<cr>
# imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr>
#
# The first line enables clang-fo... | lgpl-2.1 | -2,842,902,930,187,002,400 | 36.04717 | 82 | 0.68602 | false |
hrayr-artunyan/shuup | shuup_tests/functional/test_order_edit_with_coupons.py | 2 | 6112 | # This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import decimal
import json
import pytest
from django.core... | agpl-3.0 | 8,872,476,895,792,468,000 | 37.2 | 108 | 0.6893 | false |
yan12125/youtube-dl | youtube_dl/extractor/savefrom.py | 20 | 1081 | # coding: utf-8
from __future__ import unicode_literals
import os.path
import re
from .common import InfoExtractor
class SaveFromIE(InfoExtractor):
IE_NAME = 'savefrom.net'
_VALID_URL = r'https?://[^.]+\.savefrom\.net/\#url=(?P<url>.*)$'
_TEST = {
'url': 'http://en.savefrom.net/#url=http://yout... | unlicense | -5,230,064,784,322,526,000 | 30.794118 | 159 | 0.561517 | false |
candrews/portage | pym/portage/debug.py | 9 | 3316 | # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os
import sys
try:
import threading
except ImportError:
import dummy_threading as threading
import portage.const
from portage.util import writemsg
def set_trace(on=True):
if on:
t = trace_handler()... | gpl-2.0 | 6,545,502,493,311,585,000 | 26.633333 | 105 | 0.675814 | false |
1flow/1flow | oneflow/core/migrations/0051_auto.py | 2 | 43273 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field users on 'Author'
m2m_table_name = db.shorte... | agpl-3.0 | 3,578,384,178,647,015,000 | 94.107692 | 226 | 0.557553 | false |
bloff/ZeroNet | plugins/Zeroname/updater/zeroname_updater.py | 13 | 5379 | import time
import json
import os
import sys
import re
import socket
from bitcoinrpc.authproxy import AuthServiceProxy
def publish():
print "* Signing..."
os.system("python zeronet.py siteSign %s %s" % (config["site"], config["privatekey"]))
print "* Publishing..."
os.system("python zeronet.py sitePu... | gpl-2.0 | 6,412,441,550,314,338,000 | 33.480769 | 124 | 0.618702 | false |
nigelsmall/py2neo | setup.py | 1 | 2349 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2016, Nigel Small
#
# 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
#
# Unle... | apache-2.0 | 7,692,302,430,956,157,000 | 35.703125 | 96 | 0.624521 | false |
apruden/opal | opal-python-client/src/main/python/opal/perm_project.py | 1 | 1309 | """
Apply permissions on a project.
"""
import sys
import opal.core
import opal.perm
PERMISSIONS = {
'administrate': 'PROJECT_ALL'
}
def add_arguments(parser):
"""
Add command specific options
"""
opal.perm.add_permission_arguments(parser, PERMISSIONS.keys())
parser.add_argument('--project', ... | gpl-3.0 | 1,997,492,389,920,859,100 | 22.818182 | 135 | 0.59893 | false |
lagopus/lagopus | test/datastore/long_run/lib/async_datastore_cmd.py | 1 | 3080 | #!/usr/bin/env python
import sys
import socket
import ssl
import os
import select
import json
import logging
import asyncore
import threading
import six
from six.moves import _thread
from six.moves import queue
from contextlib import contextmanager
from const import *
class AsyncDataStoreCmd(asyncore.dispatcher):
... | apache-2.0 | 3,564,457,098,798,977,000 | 23.444444 | 81 | 0.546429 | false |
AutorestCI/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/replica_health_state_chunk_list.py | 1 | 1121 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -5,207,206,099,925,429,000 | 35.16129 | 80 | 0.618198 | false |
scsouthw/project-oxford-python | setup.py | 1 | 2297 | from setuptools import setup, find_packages # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8... | mit | 850,265,618,725,846,100 | 34.338462 | 89 | 0.673923 | false |
glaubitz/fs-uae-debian | arcade/OpenGL/GL/IBM/rasterpos_clip.py | 9 | 1248 | '''OpenGL extension IBM.rasterpos_clip
This module customises the behaviour of the
OpenGL.raw.GL.IBM.rasterpos_clip to provide a more
Python-friendly API
Overview (from the spec)
IBM_rasterpos_clip extends the semantics of the RasterPos functions. It
provides an enable that allows a raster position that would ... | gpl-2.0 | -8,012,672,822,462,096,000 | 35.735294 | 73 | 0.795673 | false |
DrEVILish/Plex-Remote-Transcoder | setup.py | 2 | 1237 | from setuptools import setup, find_packages
from codecs import open
from os import path
import re
here = path.abspath(path.dirname(__file__))
def get_version():
return re.search("__version__ = \"([\d\.]+)\"", open("prt.py").read()).groups()[0]
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
... | mit | -6,703,332,722,801,700,000 | 29.170732 | 87 | 0.611964 | false |
Klearnel-Devs/klearnel-manager | controller/Networker.py | 1 | 3096 | ## @package controller
# Handles communication between Klearnel & Klearnel Manager
#
# @author Antoine Ceyssens <a.ceyssens@nukama.be> & Derek Van Hove <d.vanhove@nukama.be>
import socket, re
from controller.Crypter import Crypter
from model.Exceptions import *
## Class that sends/receives information between Klear... | gpl-2.0 | 2,496,705,820,686,153,700 | 33.4 | 98 | 0.57655 | false |
evansd/django | django/db/backends/postgresql/features.py | 6 | 1830 | from django.db.backends.base.features import BaseDatabaseFeatures
from django.db.utils import InterfaceError
from django.utils.functional import cached_property
class DatabaseFeatures(BaseDatabaseFeatures):
allows_group_by_selected_pks = True
can_return_id_from_insert = True
can_return_ids_from_bulk_inser... | bsd-3-clause | -2,447,477,456,076,253,000 | 32.272727 | 65 | 0.712022 | false |
slohse/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_organization.py | 27 | 2759 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1... | gpl-3.0 | -7,042,290,459,153,168,000 | 28.042105 | 105 | 0.647336 | false |
gangadhar-kadam/verve_erp | erpnext/controllers/recurring_document.py | 12 | 6770 | from __future__ import unicode_literals
import frappe
import frappe.utils
import frappe.defaults
from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \
get_first_day, get_last_day, comma_and
from frappe.model.naming import make_autoname
from frappe import _, msgprint, throw
from erpnext.a... | agpl-3.0 | 2,741,673,846,773,061,600 | 32.02439 | 101 | 0.695569 | false |
matthijsvk/multimodalSR | code/Experiments/neon-master/neon/transforms/cost.py | 1 | 22947 | # ----------------------------------------------------------------------------
# Copyright 2014-2016 Nervana Systems 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.apa... | mit | 5,673,044,647,442,742,000 | 34.303077 | 99 | 0.55419 | false |
voutilad/courtlistener | cl/cleanup/scripts_archive/correct_citations_with_untitled_disposition_as_casename_182.py | 5 | 2519 | import os
import sys
execfile('/etc/courtlistener')
sys.path.append(INSTALL_ROOT)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
from django.utils.text import slugify
from alert.search.models import Document
from alert.lib.string_utils import trunc
from optparse import OptionParser
def cleaner(simulate... | agpl-3.0 | 1,924,817,315,147,393,500 | 36.044118 | 84 | 0.628821 | false |
unicefuganda/rapidsms-bednets | bednets/spreadsheets_utils.py | 1 | 1693 | import xlrd
def is_empty(arg):
if arg is None:
return True
if isinstance(arg, basestring):
arg = arg.strip()
try:
if not len(arg):
return True
except TypeError:
# wasn't a sequence
pass
return False
class XlsParser(object):
def parse(self,... | bsd-3-clause | 8,240,008,530,787,729,000 | 26.322581 | 72 | 0.564087 | false |
bjanesh/odi-tools | .bpms/bpm_reg_class.py | 1 | 2576 | import numpy as np
from astropy.io import fits
import matplotlib.pyplot as plt
from pyraf import iraf
class reg_to_bpm(object):
def __init__(self, reg_file, img_file):
self.reg_file = reg_file
self.img_file = img_file
self.ota = 'OTA'+self.reg_file.strip('bpm_xy, .reg')+'.SCI'
self... | bsd-3-clause | -8,498,234,974,841,395,000 | 32.454545 | 76 | 0.494177 | false |
prakhar0402/morph3D | shape.py | 1 | 7033 | # MAD Lab, University at Buffalo
# Copyright (C) 2018 Prakhar Jaiswal <prakharj@buffalo.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or... | gpl-3.0 | 1,962,431,219,134,627,600 | 31.410138 | 80 | 0.568321 | false |
allanino/nupic | nupic/engine/__init__.py | 11 | 24520 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | agpl-3.0 | 2,147,315,528,524,643,800 | 30.597938 | 156 | 0.657953 | false |
uphold/bitcoin | qa/rpc-tests/test_framework/address.py | 64 | 2246 | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Encode and decode BASE58, P2PKH and P2SH addresses."""
from .script import hash256, hash160, sha256, CScrip... | mit | 4,220,560,689,061,288,400 | 31.550725 | 71 | 0.658949 | false |
conda/kapsel | conda_kapsel/plugins/provider.py | 1 | 25554 | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright © 2016, Continuum Analytics, Inc. All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -------------------------------------------------------------------... | bsd-3-clause | 7,948,325,205,841,965,000 | 40.281099 | 120 | 0.62071 | false |
anirudhSK/chromium | mojo/public/bindings/pylib/parse/mojo_translate.py | 1 | 5181 | #!/usr/bin/env python
# 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.
"""Translate parse tree to Mojom IR"""
import os
import sys
class MojomBuilder():
def __init__(self):
self.mojom = {}
def ... | bsd-3-clause | 713,136,918,399,017,500 | 27.944134 | 78 | 0.550666 | false |
childresslab/MicrocavityExp1 | logic/automation.py | 1 | 8918 | # -*- coding: utf-8 -*-
"""
Execution tree for auto measurements
Qudi 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.
Qudi is distributed i... | gpl-3.0 | 6,549,909,363,573,408,000 | 27.860841 | 82 | 0.580063 | false |
shaded-enmity/cryptopals | set-2/aes_cbc.py | 1 | 1367 | #!/usr/bin/python
import Crypto.Cipher.AES, os, sys, binascii
key, file_ = sys.argv[1:]
def ord_str(string):
return [ord(c) for c in string]
def chars(lst):
return ''.join([chr(c) for c in lst])
cipher = Crypto.Cipher.AES.new(key, mode=Crypto.Cipher.AES.MODE_ECB)
text = binascii.a2b_base64("".join([s.strip... | mit | 1,247,901,839,241,740,500 | 26.897959 | 81 | 0.648135 | false |
giampaolo/psutil | scripts/internal/print_downloads.py | 2 | 4099 | #!/usr/bin/env python3
# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Print PYPI statistics in MarkDown format.
Useful sites:
* https://pepy.tech/project/psutil
* https://pypistats.org/packages/psut... | bsd-3-clause | -827,577,229,933,360,000 | 24.459627 | 77 | 0.601366 | false |
0--key/lib | portfolio/Python/scrapy/hadrianequine/petsensedirectcouk.py | 2 | 3072 | import re
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse
from scrapy.utils.url import urljoin_rfc
from product_spiders.items import Product, ProductLoader
class PetSenseDirectSpider(BaseSpider):
name = 'petsensedirect.co.uk'
al... | apache-2.0 | 8,825,509,672,500,765,000 | 34.732558 | 125 | 0.574544 | false |
taras-sereda/pytorch-seq2seq | scripts/generate_toy_data.py | 1 | 1473 | from __future__ import print_function
import argparse
import os
import shutil
import random
parser = argparse.ArgumentParser()
parser.add_argument('--dir', help="data directory", default="../data")
parser.add_argument('--max-len', help="max sequence length", default=10)
args = parser.parse_args()
def generate_dataset... | apache-2.0 | 8,982,934,713,930,129,000 | 31.021739 | 75 | 0.606925 | false |
andrei4ka/fuel-web-redhat | tasklib/tasklib/actions/puppet.py | 4 | 2354 | # Copyright 2014 Mirantis, 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 ... | apache-2.0 | -5,012,215,877,036,417,000 | 33.617647 | 78 | 0.636788 | false |
thejdeep/CoAPthon | coverage_test_proxy.py | 4 | 55609 | from Queue import Queue
import random
import socket
import threading
import unittest
from coapclient import HelperClient
from coapforwardproxy import CoAPForwardProxy
from coapserver import CoAPServer
from coapthon import defines
from coapthon.messages.option import Option
from coapthon.messages.request import Request
... | mit | 1,140,289,532,587,326,200 | 38.133709 | 123 | 0.576184 | false |
INTI-CMNB-FPGA/fpga_lib | scripts/plotter.py | 1 | 1557 | #!/usr/bin/python
#
# Plotter
#
# Authors:
# * Bruno Valinoti
# * Rodrigo A. Melo
#
# Copyright (c) 2018 Authors and INTI
# Distributed under the BSD 3-Clause License
#
import numpy as np
import matplotlib.pyplot as plot
import matplotlib as mpl
import argparse, sys
## Parsing the command line #######################... | bsd-3-clause | 1,320,421,314,315,734,000 | 16.693182 | 79 | 0.621066 | false |
gitpan/Games-Solitaire-BlackHole-Solver | contrib/make_pysol_board.py | 2 | 20866 | #!/usr/bin/python
#
# make_pysol_freecell_board.py - Program to generate the boards of
# PySol for input into Freecell Solver.
#
# Usage: make_pysol_freecell_board.py [board number] | fc-solve
#
# Or on non-UNIXes:
#
# python make_pysol_freecell_board.py [board number] | fc-solve
#
# This program is platform independan... | mit | 2,585,555,502,783,666,700 | 26.895722 | 149 | 0.527078 | false |
kbdick/RecycleTracker | recyclecollector/scrap/gdata-2.0.18/tests/gdata_tests/apps/emailsettings/data_test.py | 23 | 7153 | #!/usr/bin/python
#
# Copyright (C) 2010 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 | 9,015,260,266,122,555,000 | 27.612 | 79 | 0.73228 | false |
serzans/wagtail | wagtail/wagtailadmin/views/home.py | 1 | 2524 | from django.shortcuts import render
from django.conf import settings
from django.db.models import F
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import PageRevision, UserPagePermissionsProxy
from wagtail.utils.compat import render_to_string
from wagtail.wagtailadmin.site_summary import SiteSu... | bsd-3-clause | -7,972,610,040,625,939,000 | 29.780488 | 108 | 0.658479 | false |
PyFilesystem/pyfilesystem | fs/base.py | 1 | 53209 | #!/usr/bin/env python
"""
fs.base
=======
This module defines the most basic filesystem abstraction, the FS class.
Instances of FS represent a filesystem containing files and directories
that can be queried and manipulated. To implement a new kind of filesystem,
start by sublcassing the base FS class.
For more infor... | bsd-3-clause | 7,546,556,319,514,486,000 | 35.925052 | 155 | 0.585991 | false |
c0cky/mediathread | mediathread/projects/migrations/0014_auto_20151104_1513.py | 2 | 1149 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def delete_orphan_collaborations(apps, schema_editor):
Project = apps.get_model('projects', 'Project')
Collaboration = apps.get_model('structuredcollaboration', 'Collaboration')
ContentType = apps.get_model('... | gpl-2.0 | 8,739,052,059,690,337,000 | 30.916667 | 78 | 0.650131 | false |
xlevus/babel | tests/messages/test_frontend.py | 22 | 35766 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause | 4,559,972,466,620,809,700 | 31.544131 | 97 | 0.623218 | false |
fintech-circle/edx-platform | lms/djangoapps/certificates/queue.py | 1 | 22075 | """Interface for adding certificate generation tasks to the XQueue. """
import json
import random
import logging
import lxml.html
from lxml.etree import XMLSyntaxError, ParserError
from uuid import uuid4
from django.test.client import RequestFactory
from django.conf import settings
from django.core.urlresolvers import... | agpl-3.0 | 1,843,334,779,938,168,800 | 36.670648 | 130 | 0.572956 | false |
vtemian/django-openid-auth | django_openid_auth/tests/test_views.py | 7 | 58521 | # django-openid-auth - OpenID integration for django.contrib.auth
#
# Copyright (C) 2009-2010 Canonical Ltd.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above ... | bsd-2-clause | -123,652,948,512,215,820 | 45.519078 | 117 | 0.635515 | false |
bsmr-eve/Pyfa | gui/builtinContextMenus/factorReload.py | 1 | 1362 | from gui.contextMenu import ContextMenu
import gui.mainFrame
import gui.globalEvents as GE
# noinspection PyPackageRequirements
import wx
from gui.bitmap_loader import BitmapLoader
from service.fit import Fit
from service.settings import ContextMenuSettings
class FactorReload(ContextMenu):
def __init__(self):
... | gpl-3.0 | 3,722,753,544,549,574,000 | 33.05 | 115 | 0.712922 | false |
titeuf87/evennia | evennia/scripts/manager.py | 3 | 9652 | """
The custom manager for Scripts.
"""
from django.db.models import Q
from evennia.typeclasses.managers import TypedObjectManager, TypeclassManager
from evennia.typeclasses.managers import returns_typeclass_list
from evennia.utils.utils import make_iter
__all__ = ("ScriptManager",)
_GA = object.__getattribute__
VALI... | bsd-3-clause | 3,465,243,356,789,461,500 | 34.226277 | 94 | 0.579983 | false |
igemsoftware2017/USTC-Software-2017 | biohub/core/tasks/result.py | 1 | 4308 | from operator import or_
from functools import reduce
from biohub.core.tasks.storage import storage
from biohub.core.tasks.status import TaskStatus
from django.utils.functional import cached_property
def get_result_timeout():
from biohub.utils.detect import features
return 1.5 if features.testing else 2 * 60... | gpl-3.0 | 672,421,886,842,469,400 | 26.43949 | 105 | 0.59169 | false |
Raviyanto/sunflower-fm | application/plugin_base/find_extension.py | 9 | 1253 | import gtk
class FindExtension:
"""Base class for extending find files tool.
Use this class to provide find files tool with additional
options. Objects are created every time tool is created!
"""
def __init__(self, parent):
self._parent = parent
# create and configure container
self.vbox = gtk.VBox(Fa... | gpl-3.0 | -5,319,260,084,456,056,000 | 23.096154 | 66 | 0.708699 | false |
Endika/edx-platform | cms/djangoapps/contentstore/views/tests/test_certificates.py | 19 | 29500 | #-*- coding: utf-8 -*-
"""
Certificates Tests.
"""
import json
import mock
import ddt
from django.conf import settings
from django.test.utils import override_settings
from opaque_keys.edx.keys import AssetKey
from opaque_keys.edx.locations import AssetLocation
from contentstore.utils import reverse_course_url
from ... | agpl-3.0 | 3,490,135,686,985,350,000 | 36.247475 | 115 | 0.605898 | false |
cowhi/HFO | predator_prey/expLeno.py | 1 | 1502 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 11 08:49:36 2016
Experiment facilitation
@author: Felipe Leno
"""
import subprocess
from threading import Thread
import math
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('-a','--algorithm', default='Dummy')
parser.add... | mit | 8,878,990,623,513,268,000 | 24.913793 | 111 | 0.555925 | false |
linuxmidhun/0install | tests/testalias.py | 9 | 3546 | #!/usr/bin/env python
from basetest import BaseTest, StringIO
import sys, tempfile, os
import unittest
sys.path.insert(0, '..')
from zeroinstall import alias
expected_script = """#!/bin/sh
exec 0launch 'http://example.com/foo.xml' "$@"
"""
old_script = """#!/bin/sh
if [ "$*" = "--versions" ]; then
exec 0launch -g... | lgpl-2.1 | -7,265,845,992,342,441,000 | 26.068702 | 80 | 0.663847 | false |
seoester/Git-Deployment-Handler | gitdh/modules/deployment.py | 1 | 3563 | # -*- coding: utf-8 -*-
from gitdh.modules import Module
from syslog import syslog, LOG_INFO, LOG_WARNING
from gitdh.gitdhutils import filterOnStatusExt, deleteDir, deleteDirContent
import os
from os.path import abspath, join, exists, isdir, isfile
from subprocess import check_call, check_output, CalledProcessError
t... | mit | 1,584,386,687,040,601,300 | 32.933333 | 144 | 0.69071 | false |
deanhiller/databus | webapp/play1.3.x/python/Lib/CGIHTTPServer.py | 4 | 13053 | """CGI-savvy HTTP Server.
This module builds on SimpleHTTPServer by implementing GET and POST
requests to cgi-bin scripts.
If the os.fork() function is not present (e.g. on Windows),
os.popen2() is used as a fallback, with slightly altered semantics; if
that function is not present either (e.g. on Macintosh), ... | mpl-2.0 | -5,609,523,342,159,247,000 | 33.663934 | 79 | 0.514441 | false |
eharney/cinder | cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py | 1 | 15058 | # (c) Copyright 2014 Cisco Systems 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
#
# Unl... | apache-2.0 | -1,724,089,720,864,074,500 | 40.827778 | 78 | 0.505379 | false |
arruda/cloudfuzzy | fuzzy_modeling/models/rules.py | 1 | 3338 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from fuzzy_modeling.models.adjectives import AdjectiveModel
from fuzzy_modeling.models.norms import NormModel
from fuzzy_modeling.models.systems import SystemModel
from fuzzy_modeling.models.operators impor... | mit | -7,112,351,851,709,359,000 | 29.072072 | 110 | 0.636309 | 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.