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 |
|---|---|---|---|---|---|---|---|---|---|---|
franky88/emperioanimesta | env/Lib/site-packages/django/db/backends/mysql/schema.py | 37 | 4590 | from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.models import NOT_PROVIDED
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_rename_table = "RENAME TABLE %(old_table)s TO %(new_table)s"
sql_alter_column_null = "MODIFY %(column)s %(type)s NULL"
sql_alter_column_... | gpl-3.0 | -7,214,077,675,303,888,000 | 44 | 110 | 0.62963 | false |
ccarvalheira/jangada | apps/core/tests.py | 1 | 8183 | from django.test import TestCase
from apps.core.models import FieldModel
from apps.core.models import RelationshipFieldModel
from apps.core.models import ClassModel
from apps.core.models import App
from apps.core.models import Pip
class BaseTestSetUp(TestCase):
def setUp(self):
self.app = App(name="myapp... | mit | 3,505,498,035,407,490,000 | 46.028736 | 149 | 0.644751 | false |
MechanisM/ajenti | plugins/squid_sarg/ui_sarg.py | 17 | 1116 | import os
from ajenti import apis
from ajenti.com import *
from ajenti.ui import *
from ajenti.api import *
from ajenti.utils import wsgi_serve_file, shell
class SquidReports(Plugin, URLHandler):
implements(apis.squid.IPluginPart)
weight = 20
title = 'Reports'
tab = 0
cfg = 0
parent = None
... | lgpl-3.0 | -3,175,314,974,869,028,000 | 24.363636 | 83 | 0.575269 | false |
mhbu50/erpnext | erpnext/payroll/doctype/employee_incentive/employee_incentive.py | 3 | 1225 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
class EmployeeIncentive(Document):
def validate(self):
... | gpl-3.0 | -6,447,332,821,022,435,000 | 38.516129 | 121 | 0.766531 | false |
ruuk/script.module.sharesocial | lib/SSClipboard.py | 1 | 1480 | # -*- coding: utf-8 -*-
import os, xbmc
from ShareSocial import Share
from ShareSocial import SHARE_TYPE_IMAGE, SHARE_TYPE_AUDIO, SHARE_TYPE_VIDEO, SHARE_TYPE_LINK, SHARE_TYPE_IMAGEFILE, SHARE_TYPE_VIDEOFILE, SHARE_TYPE_AUDIOFILE, SHARE_TYPE_BINARYFILE, SHARE_TYPE_HTML, SHARE_TYPE_TEXT, SHARE_TYPE_STATUS #@UnusedImport... | gpl-2.0 | -1,315,731,506,257,077,200 | 26.425926 | 250 | 0.728378 | false |
advoretsky/nose-gae | nosegae.py | 1 | 11118 | import os
import pdb
import logging
import sys
import tempfile
from imp import find_module, acquire_lock, release_lock
from warnings import warn
from nose.importer import Importer, add_path
from nose.plugins.base import Plugin
log = logging.getLogger(__name__)
class NoseGAE(Plugin):
"""
Activate this plugin... | lgpl-3.0 | 723,085,592,287,426,200 | 40.640449 | 98 | 0.585177 | false |
pattisdr/osf.io | api_tests/preprints/views/test_preprint_actions.py | 11 | 1710 | import pytest
from api.base.settings.defaults import API_BASE
from osf_tests.factories import (
AuthUserFactory,
)
from osf.utils import permissions as osf_permissions
from api_tests.reviews.mixins.filter_mixins import ReviewActionFilterMixin
from api_tests.reviews.mixins.comment_settings import ReviewActionComme... | apache-2.0 | 8,200,623,162,264,172,000 | 31.884615 | 86 | 0.687135 | false |
tsdmgz/ansible | lib/ansible/modules/network/avi/avi_systemconfiguration.py | 27 | 5996 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 | 9,053,495,143,336,564,000 | 35.560976 | 116 | 0.663276 | false |
devdelay/home-assistant | script/get_entities.py | 23 | 3135 | #! /usr/bin/python
"""
Query the Home Assistant API for available entities.
Output is printed to stdout.
"""
import sys
import getpass
import argparse
try:
from urllib2 import urlopen
PYTHON = 2
except ImportError:
from urllib.request import urlopen
PYTHON = 3
import json
def main(password, askpass,... | mit | 8,536,007,995,154,457,000 | 30.989796 | 74 | 0.584051 | false |
splee/bigdoorkit | src/bigdoorkit/resources/level.py | 1 | 1271 | from bigdoorkit.resources.base import BDResource
from bigdoorkit.resources.user import EndUser
class NamedLevelCollection(BDResource):
endpoint = "named_level_collection"
def __init__(self, **kw):
self.currency_id = kw.get('currency_id', None)
super(NamedLevelCollection, self).__init__(**kw)
... | mit | -8,697,972,916,895,498,000 | 37.515152 | 82 | 0.652242 | false |
PreludeAndFugue/PySpend | setup.py | 1 | 1179 | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import sys
from distutils.core import setup
#from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(
# py2exe
#windows=['pyspend.py'],
#cx_Freeze
#executables=[Executable('pyspend/pyspend.py', base=b... | bsd-3-clause | 8,335,991,523,227,479,000 | 27.071429 | 69 | 0.615776 | false |
botswana-harvard/edc-quota | edc_quota/controller/controller.py | 2 | 8159 | import json
import requests
from datetime import date
from django.utils import timezone
from django.contrib.auth.models import User
from tastypie.models import ApiKey
from .exceptions import ControllerError
from .models import Client, ControllerQuota, ControllerQuotaHistory
class Controller(object):
"""A class ... | gpl-2.0 | -8,579,146,239,434,428,000 | 42.398936 | 171 | 0.608776 | false |
jSherz/lsd-members | test-data/text_messages.py | 1 | 1414 | #!/usr/bin/env python3
import uuid
import random
import datetime
from hashlib import sha256
from faker import Factory
from postgres import Postgres
fake = Factory.create()
db = Postgres('postgres://luskydive@localhost/luskydive')
print('COPY text_messages (uuid, member_uuid, mass_text_uuid, status, to_number, from_nu... | mit | -4,347,668,284,197,556,000 | 39.4 | 182 | 0.699434 | false |
PalNilsson/pilot2 | pilot/test/test_utils.py | 1 | 1802 | #!/usr/bin/env python
# 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
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2018
import unittest
imp... | apache-2.0 | 1,525,461,993,596,524,000 | 25.115942 | 96 | 0.615427 | false |
Sorsly/subtle | google-cloud-sdk/lib/third_party/monotonic/__init__.py | 6 | 6953 | # -*- coding: utf-8 -*-
"""
monotonic
~~~~~~~~~
This module provides a ``monotonic()`` function which returns the
value (in fractional seconds) of a clock which never goes backwards.
On Python 3.3 or newer, ``monotonic`` will be an alias of
``time.monotonic`` from the standard library. On older versions,
... | mit | -2,948,555,834,065,863,700 | 41.396341 | 86 | 0.55228 | false |
cbitterfield/JobCard | archive/old_archive/new2_file.py | 1 | 1723 | '''
Created on Sep 30, 2017
@author: colin
'''
import yaml
import importlib
import os
import sys
# Import Local Modules
import validate
#===============================================================================
# Setup test Logging
#=============================================================================... | gpl-3.0 | 6,459,327,101,032,425,000 | 30.327273 | 137 | 0.672084 | false |
gooofy/zamia-ai | data-tools/csv/train_model.py | 3 | 1568 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Guenter Bartsch
#
# 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
#
# Unles... | apache-2.0 | 702,990,146,049,444,600 | 21.4 | 74 | 0.705995 | false |
wlonk/warehouse | tests/unit/cli/test_cli.py | 6 | 1646 | # 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
# distributed under the Li... | apache-2.0 | -7,200,680,776,735,931,000 | 34.021277 | 78 | 0.716282 | false |
lixiangning888/whole_project | modules/signatures_orignal/antivm_generic_disk.py | 1 | 3265 | # Copyright (C) 2012,2014 Claudio "nex" Guarnieri (@botherder), Accuvant, Inc. (bspengler@accuvant.com)
#
# 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
# (a... | lgpl-3.0 | 4,824,502,871,173,900,000 | 45.657143 | 157 | 0.623583 | false |
duyetdev/openerp-6.1.1 | openerp/addons/hr/__openerp__.py | 9 | 2343 | # -*- 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 | -4,381,880,410,070,221,300 | 33.970149 | 101 | 0.57149 | false |
hojel/calibre | src/calibre/ebooks/lrf/html/table.py | 24 | 13938 | __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import math, sys, re
from calibre.ebooks.lrf.fonts import get_font
from calibre.ebooks.lrf.pylrs.pylrs import TextBlock, Text, CR, Span, \
CharButton, Plot, Paragraph, \
... | gpl-3.0 | -675,818,216,413,012,200 | 34.830334 | 104 | 0.520017 | false |
erwilan/ansible | lib/ansible/modules/network/cloudengine/ce_snmp_location.py | 7 | 6778 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | 8,408,833,285,769,398,000 | 25.896825 | 95 | 0.596341 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/verification_ip_flow_result.py | 1 | 1299 | # 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 | 1,227,397,315,372,065,800 | 37.205882 | 76 | 0.597383 | false |
brian-yang/mozillians | mozillians/announcements/tests/test_models.py | 9 | 1314 | from datetime import datetime
from django.utils.timezone import make_aware, utc
from jinja2 import Markup
from mock import patch
from nose.tools import ok_
from mozillians.announcements.tests import AnnouncementFactory, TestCase
class AnnouncementTests(TestCase):
@patch('mozillians.announcements.models.timezon... | bsd-3-clause | 4,015,194,616,235,547,600 | 37.647059 | 85 | 0.671994 | false |
davidhdz/crits | documentation/src/conf.py | 17 | 8686 | # -*- coding: utf-8 -*-
#
# CRITs documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 25 15:33:49 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | mit | -1,092,684,036,117,284,000 | 30.81685 | 106 | 0.70274 | false |
indirectlylit/kolibri | setup.py | 2 | 3969 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
from setuptools import setup
from setuptools.command.install_scripts import install_scripts
import kolibri
# Windows-specific .bat script templ... | mit | 8,729,614,028,381,882,000 | 35.081818 | 90 | 0.639456 | false |
befelix/GPy | GPy/testing/serialization_tests.py | 1 | 12625 | '''
Created on 20 April 2017
@author: pgmoren
'''
import unittest, itertools
#import cPickle as pickle
import pickle
import numpy as np
import tempfile
import GPy
from nose import SkipTest
import numpy as np
fixed_seed = 11
class Test(unittest.TestCase):
def test_serialize_deserialize_kernels(self):
k1 =... | bsd-3-clause | -4,306,246,230,863,588,400 | 52.495763 | 179 | 0.637703 | false |
vighneshbirodkar/scikit-image | skimage/future/graph/_ncut.py | 21 | 1885 | try:
import networkx as nx
except ImportError:
from ..._shared.utils import warn
warn('RAGs require networkx')
import numpy as np
from scipy import sparse
from . import _ncut_cy
def DW_matrices(graph):
"""Returns the diagonal and weight matrices of a graph.
Parameters
----------
graph : R... | bsd-3-clause | -819,555,054,585,325,700 | 26.720588 | 78 | 0.608488 | false |
SigPloiter/SigPloit | gtp/attacks/dos/user_dos.py | 1 | 5623 | #!/usr/bin/env python
# encoding: utf-8
# user_dos.py
#
# Copyright 2018 Rosalia d'Alessandro
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | mit | -2,479,556,723,612,131,000 | 36.993243 | 124 | 0.604126 | false |
sanandrea/ofnic_R3.3 | src/nox/coreapps/db_manager/mysql_manager.py | 1 | 12379 | # Copyright 2013 (C) Universita' di Roma La Sapienza
#
# This file is part of OFNIC Uniroma GE.
#
# OFNIC 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... | gpl-3.0 | -5,372,603,276,951,197,000 | 32.730245 | 139 | 0.581469 | false |
bgalehouse/grr | lib/distro_entry.py | 10 | 2520 | #!/usr/bin/env python
"""This file defines the entry points for typical installations."""
# Imports must be inline to stop argument pollution across the entry points.
# pylint: disable=g-import-not-at-top
import platform
from grr.lib import config_lib
from grr.lib import flags
# Set custom options for each distro ... | apache-2.0 | -8,319,044,420,231,891,000 | 24.979381 | 78 | 0.690476 | false |
Edraak/circleci-edx-platform | openedx/core/lib/xblock_utils.py | 2 | 15714 | """
Functions that can are used to modify XBlock fragments for use in the LMS and Studio
"""
import datetime
import json
import logging
import static_replace
import uuid
import markupsafe
from lxml import html, etree
from contracts import contract
from django.conf import settings
from django.utils.timezone import UTC... | agpl-3.0 | -7,385,829,800,606,447,000 | 41.128686 | 139 | 0.645157 | false |
carefree0910/MachineLearning | e_SVM/KP.py | 1 | 3674 | import os
import sys
root_path = os.path.abspath("../")
if root_path not in sys.path:
sys.path.append(root_path)
import numpy as np
import matplotlib.pyplot as plt
from Util.Util import DataUtil
from Util.Timing import Timing
from Util.Bases import KernelBase, GDKernelBase
class KP(KernelBase):
... | mit | 3,805,659,103,802,959,400 | 30.803571 | 83 | 0.572673 | false |
Haynie-Research-and-Development/jarvis | deps/lib/python3.4/site-packages/websockets/compatibility.py | 4 | 1695 | """
The :mod:`websockets.compatibility` module provides helpers for bridging
compatibility issues across Python versions.
"""
import asyncio
import http
# Replace with BaseEventLoop.create_task when dropping Python < 3.4.2.
try: # pragma: no cover
asyncio_ensure_fu... | gpl-2.0 | -3,467,559,385,815,724,000 | 30.314815 | 72 | 0.567711 | false |
Withington/phenopolis | tests/test_gene.py | 3 | 1868 |
import unittest
import runserver
import sys
import load_data
import helper
class GenePageTestCase(unittest.TestCase):
def setUp(self):
load_data.load_data()
runserver.app.config['TESTING'] = True
runserver.app.config['DB_NAME'] = 'test_uclex'
runserver.app.config['DB_NAME_HPO'] = ... | mit | 2,537,454,229,143,793,000 | 35.627451 | 79 | 0.65257 | false |
becomingGuru/hyde | hyde.py | 6 | 3962 | #!/usr/bin/env python
import os
import sys
import threading
from optparse import OptionParser
from hydeengine import Generator, Initializer, Server
#import cProfile
PROG_ROOT = os.path.dirname(os.path.realpath( __file__ ))
def main(argv):
parser = OptionParser(usage="%prog [-f] [-q]", version="%prog 0.4")
... | mit | -5,815,827,522,196,870,000 | 36.733333 | 101 | 0.516911 | false |
18F/regulations-parser | regparser/federalregister.py | 3 | 1960 | """Fetch data from the Federal Register
See https://www.federalregister.gov/developers/api/v1 - GET "search" method
"""
import logging
from regparser.index.http_cache import http_client
FR_BASE = "https://www.federalregister.gov"
API_BASE = FR_BASE + "/api/v1/"
FULL_NOTICE_FIELDS = [
"cfr_references", "citation"... | cc0-1.0 | -8,579,109,218,934,789,000 | 36.692308 | 76 | 0.64949 | false |
garyjyao1/ansible | lib/ansible/modules/core/cloud/amazon/ec2_group.py | 11 | 17998 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | gpl-3.0 | -9,016,406,039,582,021,000 | 36.810924 | 201 | 0.564729 | false |
christiangroleau/maze-solver-python | solver.py | 1 | 1055 | from PIL import Image
from Queue import Queue
import sys
start = (18, 18)
end = (955, 479)
def is_approx_white(value):
r = value[0]
g = value[1]
b = value[2]
return r >= 240 and g >= 240 and b >= 240
def neighbours(n):
x, y = n
return [(x-1, y), (x, y+1), (x+1, y), (x, y-1)]
d... | gpl-2.0 | -9,081,671,666,137,794,000 | 19.288462 | 60 | 0.507109 | false |
jkreps/kafka | system_test/migration_tool_testsuite/migration_tool_test.py | 2 | 16689 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -4,194,514,154,318,170,600 | 53.185065 | 136 | 0.528132 | false |
christianurich/VIBe2UrbanSim | 3rdparty/opus/src/synthesizer/gui/results_menu/view_thmap.py | 2 | 18974 | # PopGen 1.1 is A Synthetic Population Generator for Advanced
# Microsimulation Models of Travel Demand
# Copyright (C) 2009, Arizona State University
# See PopGen/License
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from coreplot import *
from file_me... | gpl-2.0 | 6,166,169,101,634,186,000 | 41.122727 | 151 | 0.545167 | false |
openstack/oslo.db | oslo_db/tests/sqlalchemy/test_update_match.py | 1 | 13842 | # 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 | -8,412,389,441,677,218,000 | 30.105618 | 79 | 0.537856 | false |
bundgus/python-playground | numba-playground/numba-test2.py | 1 | 2784 | from __future__ import print_function, division
import numpy as np
from time import time
from numba import autojit, jit
def nufftfreqs(M, df=1):
"""Compute the frequency range used in nufft for M frequency bins"""
return df * np.arange(-(M // 2), M - (M // 2))
def nudft(x, y, M, df=1.0, iflag=1):
"""Non-... | mit | -3,675,053,529,809,261,000 | 31.752941 | 93 | 0.534842 | false |
shinglyu/servo | tests/wpt/web-platform-tests/webdriver/support/fixtures.py | 23 | 5150 | import json
import os
import urlparse
import webdriver
from support.http_request import HTTPRequest
from support import merge_dictionaries
default_host = "http://127.0.0.1"
default_port = "4444"
def _ensure_valid_window(session):
"""If current window is not open anymore, ensure to have a valid one selected."""
... | mpl-2.0 | 5,264,432,975,172,907,000 | 34.763889 | 85 | 0.659417 | false |
stack-of-tasks/rbdlpy | tutorial/lib/python2.7/site-packages/OpenGLContext/scenegraph/text/_toolsfont.py | 2 | 7692 | """fonttools-based direct extraction of TTF outlines
Most of the complexity of this module has been refactored
into the ttfquery package, which provides for finding
system fonts, generating registries of available fonts,
querying metadata regarding a particular font/glyph etc.
"""
from fontTools import ttLib
from Open... | lgpl-3.0 | -6,025,054,764,739,935,000 | 37.653266 | 106 | 0.593214 | false |
jejung/django-bootstrap-components | bootstrap_components/templatetags/bootstrap_components.py | 1 | 1826 | from django import template
register = template.Library()
@register.inclusion_tag('bootstrap/bootstrap_page.html', takes_context=True)
def bootstrap_page(context):
""" A useful tag to transform your page on an extension of bootstrap basic
template. Ceckout bootstrap site for more details:
http://getboots... | gpl-3.0 | -4,578,210,798,109,589,000 | 44.675 | 81 | 0.722344 | false |
notbalanced/jrnl | features/steps/core.py | 1 | 8465 | from __future__ import unicode_literals
from __future__ import absolute_import
from behave import given, when, then
from jrnl import cli, install, Journal, util, plugins
from jrnl import __version__
from dateutil import parser as date_parser
from collections import defaultdict
try: import parsedatetime.parsedatetime_c... | mit | 7,907,794,253,715,395,000 | 30.70412 | 98 | 0.680213 | false |
yamahata/neutron | neutron/tests/unit/mlnx/test_mlnx_plugin_config.py | 8 | 3923 | # Copyright (c) 2014 OpenStack Foundation
#
# 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 | 8,450,385,356,192,866,000 | 43.078652 | 76 | 0.607188 | false |
DLR-SC/DataFinder | src/datafinder/persistence/adapters/archive/metadata/adapter.py | 1 | 6501 | # $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
... | bsd-3-clause | -9,051,041,311,212,983,000 | 37.640244 | 110 | 0.652976 | false |
WendellDuncan/or-tools | examples/tests/issue128.py | 7 | 6477 | from ortools.constraint_solver import pywrapcp
def test_v0():
print 'test_v0'
solver = pywrapcp.Solver('')
# we have two tasks of durations 4 and 7
task1 = solver.FixedDurationIntervalVar(0, 5, 4, False, "task1")
task2 = solver.FixedDurationIntervalVar(0, 5, 7, False, "task2")
tasks = [task1, task2]
# ... | apache-2.0 | -5,610,711,700,263,913,000 | 40.519231 | 95 | 0.708198 | false |
ComeBertrand/metabench | metabench/display/draw_utils.py | 1 | 4568 | """
File: draw_utils.py
Author: Come Bertrand
Email: bertrand.cosme@gmail.com
Github: https://github.com/ComeBertrand
Description: bokeh drawings utilities.
"""
from itertools import chain
import numpy as np
from bokeh import palettes
from bokeh.plotting import figure, show, ColumnDataSource
from bokeh.layouts import... | mit | -4,514,050,999,230,606,000 | 33.345865 | 124 | 0.618433 | false |
Fat-Zer/FreeCAD_sf_master | src/Mod/PartDesign/PartDesignTests/TestLinearPattern.py | 27 | 7170 | # (c) Juergen Riegel (FreeCAD@juergen-riegel.net) 2011 LGPL *
# *
# This file is part of the FreeCAD CAx development system. *
# *
# This program... | lgpl-2.1 | -5,595,781,411,822,274,000 | 48.448276 | 92 | 0.621339 | false |
dwang159/oncall | setup.py | 1 | 1557 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import setuptools
import re
with open('src/oncall/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
setuptools.setup(
name='oncall',
version=version,
package_dir={'': 'src'},
pack... | bsd-2-clause | -5,598,139,929,934,084,000 | 24.52459 | 100 | 0.487476 | false |
veger/ansible | lib/ansible/module_utils/network/edgeswitch/edgeswitch.py | 11 | 5758 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 | 1,736,475,068,465,557,000 | 33.479042 | 92 | 0.684786 | false |
zstackio/zstack-woodpecker | integrationtest/vm/multihosts/vm_snapshots/paths/path34.py | 1 | 2440 | import zstackwoodpecker.test_state as ts_header
import os
TestAction = ts_header.TestAction
def path():
return dict(initial_formation="template5", checking_point=8, path_list=[
[TestAction.create_vm, 'vm1', ],
[TestAction.create_volume, 'volume1', 'flag=scsi'],
[TestAction.attach_volume, 'vm1', 'volume1'],
... | apache-2.0 | -8,096,399,857,198,965,000 | 49.833333 | 347 | 0.725 | false |
tanmaykm/edx-platform | openedx/core/djangoapps/external_auth/login_and_register.py | 11 | 3316 | """Intercept login and registration requests.
This module contains legacy code originally from `student.views`.
"""
import re
from django.conf import settings
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
import openedx.core.djangoapps.external_auth.views
from xmodule.modulestore... | agpl-3.0 | 3,176,330,818,127,330,300 | 32.836735 | 101 | 0.680941 | false |
qedsoftware/commcare-hq | corehq/apps/reports/standard/inspect.py | 1 | 7137 | import functools
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_noop, get_language
from corehq.apps.es import forms as form_es, filters as es_filters
from corehq.apps.hqcase.utils import SYSTEM_FORM_XMLNS
from corehq.apps.reports import util
from corehq.apps.reports.fi... | bsd-3-clause | -4,730,431,644,042,899,000 | 37.370968 | 133 | 0.638924 | false |
venicegeo/eventkit-cloud | eventkit_cloud/core/helpers.py | 1 | 4393 | # -*- coding: utf-8 -*-
import logging
import os
import shutil
import subprocess
import zipfile
from enum import Enum
from django.db import models
import dj_database_url
import requests
from django.conf import settings
from django.core.cache import cache
from notifications.signals import notify
from django.contrib.aut... | bsd-3-clause | 8,222,111,555,290,391,000 | 28.286667 | 113 | 0.633963 | false |
SuperDARNCanada/placeholderOS | scheduler/local_scd_server.py | 2 | 12474 | #!/usr/bin/python3
# Copyright 2019 SuperDARN Canada
#
# local_scd_server.py
# 2019-04-18
# Moniters for new SWG files and adds the SWG info to the scd if there is an update.
#
import subprocess as sp
import scd_utils
import email_utils
import os
import datetime
import time
import argparse
SWG_GIT_REPO_DIR = 'schedul... | gpl-3.0 | -1,541,475,855,291,476,500 | 35.79646 | 110 | 0.468895 | false |
csdl/makahiki | makahiki/apps/managers/player_mgr/migrations/0001_initial.py | 2 | 8253 | # -*- 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 model 'Profile'
db.create_table(u'player_mgr_profile', (
... | mit | 1,394,231,194,268,028,200 | 74.724771 | 195 | 0.571186 | false |
reingart/gestionlibre | languages/sk-sk.py | 2 | 16860 | # coding: utf8
{
' Quotas: %(quotas)s x%(quota_amount).2f': ' Quotas: %(quotas)s x%(quota_amount).2f',
' Transaction number: %s': ' Transaction number: %s',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newv... | agpl-3.0 | -593,140,976,289,536,400 | 44.298913 | 271 | 0.702519 | false |
fxia22/ASM_xf | PythonD/site_python/mx/BeeBase/Cache.py | 4 | 6738 | """ Cache - Generic cache implementation
Copyright (c) 1998-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
See the documentation for further information on copyrights,
or contact the author. All Rights Reserved.
"""
import sys
import mx.Tools.NewBuiltins
# Weight table
MAXLOCALITY = 256
_weights = [1] *... | gpl-2.0 | 2,945,018,716,508,595,700 | 25.952 | 77 | 0.513951 | false |
jaimeMF/youtube-dl | youtube_dl/extractor/xhamster.py | 7 | 6404 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
float_or_none,
int_or_none,
unified_strdate,
)
class XHamsterIE(InfoExtractor):
_VALID_URL = r'(?P<proto>https?)://(?:.+?\.)?xhamster\.com/movies/(?P<id>[0-9]+)/(?P<seo>.+?)\.html(?:\?.*)?'
... | unlicense | -5,756,276,094,176,948,000 | 35.594286 | 118 | 0.483292 | false |
auduny/home-assistant | homeassistant/components/garadget/cover.py | 7 | 8788 | """Platform for the Garadget cover component."""
import logging
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.cover import CoverDevice, PLATFORM_SCHEMA
from homeassistant.helpers.event import track_utc_time_change
from homeassistant.const i... | apache-2.0 | 2,099,804,994,104,809,200 | 32.541985 | 77 | 0.580451 | false |
tctara/calamares | src/modules/testmodule.py | 6 | 3130 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <http://github.com/calamares> ===
#
# Copyright 2014, Teo Mrnjavac <teo@kde.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... | gpl-3.0 | 2,136,100,140,854,637,600 | 27.198198 | 81 | 0.633866 | false |
tryfer/tryfer | examples/tracing-client-to-restkin.py | 1 | 2108 | # Copyright 2012 Rackspace Hosting, 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 ... | apache-2.0 | 4,985,480,875,968,085,000 | 36.642857 | 79 | 0.683112 | false |
jorsea/odoomrp-wip | mrp_project_link/models/mrp_production.py | 12 | 6131 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | agpl-3.0 | 2,138,653,206,343,383,600 | 41.874126 | 79 | 0.508074 | false |
bjarniegill/Cordova-Survey | csv_parser/.env/lib/python2.7/site-packages/setuptools/package_index.py | 54 | 39971 | """PyPI and direct package downloading"""
import sys
import os
import re
import shutil
import socket
import base64
import hashlib
import itertools
from functools import wraps
try:
from urllib.parse import splituser
except ImportError:
from urllib2 import splituser
from setuptools.extern import six
from setupt... | mit | 7,454,705,661,213,929,000 | 34.84843 | 87 | 0.564684 | false |
devananda/ironic | ironic/tests/unit/common/test_rpc.py | 2 | 4079 | # 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
# distributed under t... | apache-2.0 | 7,079,833,234,765,980,000 | 41.051546 | 78 | 0.692572 | false |
Alshak/clowdflows | workflows/ilp/treeliker/treeliker.py | 1 | 3010 | import shutil
import tempfile
import os.path
from subprocess import Popen, PIPE
class TreeLiker:
def __init__(self, dataset, template, test_dataset=None, settings={}):
self.basename = 'default'
self.dataset = dataset
self.test_dataset = test_dataset
self.template = template
... | mit | -6,274,616,354,173,264,000 | 31.717391 | 81 | 0.542193 | false |
toobaz/pandas | pandas/tests/util/test_assert_categorical_equal.py | 2 | 2785 | import pytest
from pandas import Categorical
from pandas.util.testing import assert_categorical_equal
@pytest.mark.parametrize(
"c",
[Categorical([1, 2, 3, 4]), Categorical([1, 2, 3, 4], categories=[1, 2, 3, 4, 5])],
)
def test_categorical_equal(c):
assert_categorical_equal(c, c)
@pytest.mark.parametri... | bsd-3-clause | 994,439,187,746,322,300 | 29.271739 | 87 | 0.628366 | false |
jodvova/stocks | main.py | 1 | 3100 | #!/bin/env python
import optparse
from sql import SQL, sql_sink
from common import *
class driver:
def __init__(self, symbols, options):
self.symbols_ = symbols
self.options_ = options
self.request_ = request(diag=False)
def fetch_live(self):
assert len(self.symbols_) > 0... | apache-2.0 | 5,832,388,723,488,165,000 | 36.804878 | 114 | 0.542258 | false |
toshywoshy/ansible | test/units/modules/network/f5/test_bigip_monitor_ldap.py | 22 | 2959 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# 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
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 | 531,774,032,876,011,500 | 25.9 | 91 | 0.636364 | false |
jonvestal/open-kilda | src-python/lab-service/lab/service/test/test_topology.py | 2 | 1061 | # Copyright 2018 Telstra Open Source
#
# 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 agre... | apache-2.0 | -3,259,586,292,970,030,000 | 34.366667 | 76 | 0.719133 | false |
srajag/contrail-controller | src/opserver/test/analytics_systest.py | 1 | 19604 | #!/usr/bin/env python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# analytics_systest.py
#
# System tests for analytics
#
import sys
builddir = sys.path[0] + '/../..'
import threading
threading._DummyThread._Thread__stop = lambda x: 42
import signal
import gevent
from gevent import monkey
... | apache-2.0 | 4,258,992,166,110,186,500 | 40.710638 | 80 | 0.600439 | false |
wvdschel/snippets | gdb-scripts/tracefunctionsi.py | 1 | 10498 | import gdb
from traceback import print_exc
from datetime import datetime
class TraceFunctionsI(gdb.Command):
def __init__(self):
self.threads = {}
self.context_switch_interval = 0
self.step_size = 1
self.output_filename = None
self.reset()
if hasattr(gdb.events, "ne... | bsd-2-clause | 8,476,986,076,674,132,000 | 41.84898 | 179 | 0.54839 | false |
IDragonfire/modular-client | src/stats/__init__.py | 1 | 1176 | #-------------------------------------------------------------------------------
# Copyright (c) 2012 Gael Honorez.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# htt... | gpl-3.0 | 6,342,525,656,017,083,000 | 34.75 | 80 | 0.652211 | false |
xujun10110/pth-toolkit | lib/python2.7/site-packages/openchange/tests/test_mailbox.py | 9 | 2661 | #!/usr/bin/python
# OpenChange provisioning
# Copyright (C) Jelmer Vernooij <jelmer@openchange.org> 2009
#
# 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
# ... | bsd-2-clause | -1,817,714,485,684,167,200 | 38.132353 | 88 | 0.696355 | false |
wrwrwr/mezzanine | mezzanine/project_template/urls.py | 13 | 3856 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from mezzanine.core.views import direct_to_template
admin.autodiscover()
# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homep... | bsd-2-clause | 6,464,408,715,774,169,000 | 41.373626 | 75 | 0.65249 | false |
Freeseer/freeseer | src/freeseer/frontend/qtcommon/AboutDialog.py | 1 | 2699 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# freeseer - vga/presentation capture software
#
# Copyright (C) 2011, 2013 Free and Open Source Software Learning Centre
# http://fosslc.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | gpl-3.0 | -1,502,230,007,751,245,600 | 32.164557 | 90 | 0.691738 | false |
WeblateOrg/weblate | weblate/vcs/tests/test_gpg.py | 2 | 3516 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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 Lice... | gpl-3.0 | 2,746,651,159,329,330,000 | 32.141509 | 87 | 0.646171 | false |
malderete/ninja-ide | ninja_ide/core/plugin_manager.py | 9 | 19407 | # -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE 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
# any later version.
#
# NIN... | gpl-3.0 | -6,938,131,261,176,964,000 | 32.174359 | 79 | 0.599629 | false |
rodrigolucianocosta/ControleEstoque | rOne/Storage101/django-localflavor/django-localflavor-1.3/localflavor/lv/forms.py | 4 | 2569 | from __future__ import unicode_literals
import re
from datetime import date
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, Select
from django.utils.translation import ugettext_lazy as _
from .lv_choices import MUNICIPALITY_CHOICES
zipc... | gpl-3.0 | -5,201,829,318,750,747,000 | 29.583333 | 87 | 0.625535 | false |
Raekkeri/gargoyle | runtests.py | 3 | 2012 | #!/usr/bin/env python
"""
runtests
~~~~~~~~
:copyright: (c) 2010 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
import sys
from django.conf import settings
from optparse import OptionParser
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
DATAB... | apache-2.0 | 865,979,918,716,822,800 | 25.12987 | 91 | 0.563618 | false |
pombreda/iris-panel | iris/core/migrations/0003_backup_packages.py | 7 | 15369 | # -*- coding: utf-8 -*-
# This file is part of IRIS: Infrastructure and Release Information System
#
# Copyright (C) 2013-2015 Intel Corporation
#
# IRIS is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2.0 as published by the Free Software Foundat... | gpl-2.0 | -3,501,250,292,748,019,700 | 70.483721 | 195 | 0.542456 | false |
Phoenix1369/site | judge/views/organization.py | 1 | 13395 | from itertools import chain
from django import forms
from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.cache import cache
from django.core.cache.utils import make_template_fragment_key
from django.core.exceptions import PermissionDenied
from django.core.urlr... | agpl-3.0 | -3,961,480,037,890,479,600 | 42.209677 | 120 | 0.657857 | false |
shoopio/shoop | shuup_tests/simple_cms/test_page_delete.py | 1 | 1846 | # This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import json
import pytest
from django.core.urlresolvers import reverse
from shuup.simple... | agpl-3.0 | -3,763,854,880,133,976,000 | 35.92 | 117 | 0.714518 | false |
akesandgren/easybuild-easyblocks | easybuild/easyblocks/s/shrimp.py | 3 | 3238 | ##
# Copyright 2009-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | 8,436,672,497,839,907,000 | 32.729167 | 96 | 0.64021 | false |
adamrp/qiime | tests/test_adjust_seq_orientation.py | 15 | 2314 | #!/usr/bin/env python
# File created on 07 Oct 2009.
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Greg Caporaso"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "gregcaporaso@gmail.com"
fro... | gpl-2.0 | -7,614,032,355,520,860,000 | 25 | 79 | 0.641746 | false |
sujithvm/red-alert | src/RIP_SNIP_curve.py | 3 | 3153 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
def poly_fit(x,y,deg):
#POLYNOMIAL FIT
# calculate polynomial
z = np.polyfit(x, y, deg)
f = np.poly1d(z)
# calculate new x's and y's
x_new = np.linspace(np.amin(x), np.amax(x), 50)
y... | mit | 1,565,293,112,962,755,300 | 29.61165 | 191 | 0.639708 | false |
zhengwsh/InplusTrader_Linux | rqalpha/examples/test_pt.py | 5 | 1292 | import time
import talib
# 在这个方法中编写任何的初始化逻辑。context对象将会在你的算法策略的任何方法之间做传递。
def init(context):
context.s1 = "000001.XSHE"
# 设置这个策略当中会用到的参数,在策略中可以随时调用,这个策略使用长短均线,我们在这里设定长线和短线的区间,在调试寻找最佳区间的时候只需要在这里进行数值改动
context.SHORTPERIOD = 20
context.LONGPERIOD = 120
context.count = 0
print("init")
def bef... | mit | -1,169,475,229,002,547,700 | 22.756098 | 83 | 0.717659 | false |
openstack/cinder | cinder/volume/drivers/solidfire.py | 2 | 130312 | # All Rights Reserved.
# Copyright 2013 SolidFire 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 ... | apache-2.0 | 6,493,206,346,257,849,000 | 41.267921 | 79 | 0.544263 | false |
rnicoll/bitcoin | test/functional/feature_taproot.py | 8 | 87479 | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test Taproot softfork (BIPs 340-342)
from test_framework.blocktools import (
create_coinbase,
c... | mit | -4,492,080,346,018,543,600 | 57.948113 | 363 | 0.647424 | false |
sikmir/QGIS | tests/src/python/test_qgsappstartup.py | 15 | 4749 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsApplication.
From build dir: ctest -R PyQgsAppStartup -V
.. note:: 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, ... | gpl-2.0 | -332,627,084,762,308,740 | 31.751724 | 123 | 0.57212 | false |
JioCloud/tempest | tempest/services/volume/json/admin/volume_quotas_client.py | 17 | 2858 | # Copyright (C) 2014 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. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 5,130,522,716,512,749,000 | 34.283951 | 78 | 0.651854 | false |
endlessm/chromium-browser | tools/perf/core/services/pinpoint_service.py | 10 | 1051 | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from core.services import luci_auth
from core.services import request
SERVICE_URL = 'https://pinpoint-dot-chromeperf.appspot.com/api'
def Request(endpoin... | bsd-3-clause | -4,228,830,729,423,917,000 | 26.657895 | 72 | 0.686965 | false |
MunGell/RedirectGuard | guard.py | 1 | 1868 | import sys
import csv
import time
import os.path
import argparse
import requests
parser = argparse.ArgumentParser()
parser.add_argument('--root', help="root URL to prepend to redirects URI")
parser.add_argument('--input', help="input file with URLs to check")
parser.add_argument('--output', help="output file with miss... | bsd-2-clause | -6,678,677,528,333,244,000 | 31.789474 | 131 | 0.681478 | false |
MoritzS/django | tests/utils_tests/test_text.py | 6 | 11349 | import json
from django.test import SimpleTestCase
from django.utils import text
from django.utils.functional import lazystr
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy, override
IS_WIDE_BUILD = (len('\U0001F4A9') == 1)
class TestUtilsText(SimpleTestCase):
def te... | bsd-3-clause | 4,515,946,839,409,525,000 | 45.731405 | 116 | 0.562561 | false |
haya14busa/alc-etm-searcher | nltk-3.0a3/nltk/chunk/api.py | 2 | 1735 | # Natural Language Toolkit: Chunk parsing API
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# Steven Bird <stevenbird1@gmail.com> (minor additions)
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
##//////////////////////////////////////////////////////... | mit | 8,300,143,107,947,121,000 | 33.019608 | 75 | 0.616715 | false |
pellagic-puffbomb/noaa-data | ocean_modules/noaa_parser.py | 1 | 10156 | #!/usr/bin/env python3 -tt
from collections import OrderedDict
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import urljoin
class NoaaParser(object):
'''This is an attempt to return useful data from the Noaa mobile marine
weather pages. To use this, you have to instatiate a Noa... | mit | -8,560,191,924,486,775,000 | 44.747748 | 204 | 0.668373 | 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.