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 |
|---|---|---|---|---|---|---|---|---|---|---|
weiting-chen/manila | manila/tests/share/test_share_types.py | 1 | 10100 | # Copyright 2015 Deutsche Telekom AG. All rights reserved.
# Copyright 2015 Tom Barron. All rights reserved.
# Copyright 2015 Mirantis, 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... | apache-2.0 | 3,600,138,572,918,314,500 | 38.299611 | 78 | 0.572178 | false |
gencer/sentry | src/sentry/models/organizationmember.py | 1 | 8468 | """
sentry.models.organizationmember
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import six
from bitfield import BitField
from django.conf import se... | bsd-3-clause | 6,796,139,071,126,987,000 | 30.597015 | 98 | 0.596953 | false |
diorcety/translate | translate/lang/data.py | 1 | 27541 | # -*- coding: utf-8 -*-
#
# Copyright 2007-2011 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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
# ... | gpl-2.0 | 7,579,215,694,755,113,000 | 34.118622 | 114 | 0.502706 | false |
starkfree/BioGRID-Annotation | SGD_parseGenes.py | 2 | 2124 |
# Parse annotation from SGD and use it to
# supplement the data already in place from
# entrez gene.
import Config
import sys, string
import MySQLdb
import Database
import gzip
from classes import ModelOrganisms
with Database.db as cursor :
sgd = ModelOrganisms.ModelOrganisms( Database.db, cursor )... | mit | -3,803,289,801,295,157,000 | 30.707692 | 189 | 0.618644 | false |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/unittests/namespace_matcher_tester.py | 1 | 2315 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import unittest
import autoconfig
import parser_test_case
from pygccxml import utils
from pygccxml import parser
fr... | bsd-3-clause | -21,918,521,984,624,264 | 35.983607 | 97 | 0.619438 | false |
karthik339/Agni | MainDemo/flask/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py | 18 | 16353 | # engine/__init__.py
# Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""SQL connections, SQL execution and high-level DB-API interface.
The engine pack... | apache-2.0 | 4,041,809,653,253,141,500 | 42.492021 | 127 | 0.687458 | false |
indictranstech/erpnext | erpnext/education/doctype/assessment_result/assessment_result.py | 2 | 1970 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, 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.utils import flt
from frappe.model.document import Document
from erpnext.education.api im... | agpl-3.0 | -1,406,481,047,795,354,600 | 37.627451 | 129 | 0.737563 | false |
okomestudio/moto | tests/test_emr/test_emr.py | 5 | 24251 | from __future__ import unicode_literals
import time
from datetime import datetime
import boto
import pytz
from boto.emr.bootstrap_action import BootstrapAction
from boto.emr.instance_group import InstanceGroup
from boto.emr.step import StreamingStep
import six
import sure # noqa
from moto import mock_emr_deprecated... | apache-2.0 | -2,149,370,948,167,681,300 | 35.855623 | 82 | 0.652757 | false |
ftuyama/TEEG | mindwave/pyeeg.py | 2 | 23008 | """Copyleft 2010 Forrest Sheng Bao http://fsbao.net
PyEEG, a Python module to extract EEG features, v 0.02_r2
Project homepage: http://pyeeg.org
**Data structure**
PyEEG only uses standard Python and numpy data structures,
so you need to import numpy before using it.
For numpy, please visit http://numpy.scipy.org
... | mit | -8,827,911,797,043,813,000 | 25.753488 | 88 | 0.63717 | false |
dahebolangkuan/ToughRADIUS | console/libs/pyforms/net.py | 11 | 4922 | #!/usr/bin/env python
#coding:utf-8
__all__ = [
"validipaddr", "validipport", "validip", "validaddr",
"urlquote",
"httpdate", "parsehttpdate",
"htmlquote", "htmlunquote", "websafe",
]
import urllib, time
try: import datetime
except ImportError: pass
def validipaddr(address):
"""
Returns True if `add... | bsd-2-clause | -5,806,683,970,622,282,000 | 24.905263 | 78 | 0.514019 | false |
Eureka22/ASM_xf | PythonD/site_python/OpenGL/GL/SGIX/clipmap.py | 2 | 1173 | import string
__version__ = string.split('$Revision: 1.5 $')[1]
__date__ = string.join(string.split('$Date: 2001/07/20 23:53:31 $')[1:3], ' ')
__author__ = 'Tarn Weisner Burton <twburton@users.sourceforge.net>'
__doc__ = 'http://oss.sgi.com/projects/ogl-sample/registry/SGIX/clipmap.txt'
__api_version__ = 0x109
... | gpl-2.0 | 681,592,344,489,812,600 | 38.448276 | 88 | 0.68798 | false |
marceltschoppch/osa | tests/test_client.py | 2 | 2731 | #!/usr/bin/env python
# test_client.py - test Client class, part of osa.
# Copyright 2013 Sergey Bozhenkov, boz at ipp.mpg.de
# Licensed under LGPLv3 or later, see the COPYING file.
import os
import sys
sys.path.insert(0, "../")
from osa.client import Client
from osa.wsdl import *
from osa.method import *
from osa.xm... | lgpl-3.0 | -5,961,999,119,692,928,000 | 29.010989 | 89 | 0.611131 | false |
showell/zulip | zerver/lib/retention.py | 4 | 26568 | # Core implementation of message retention policies and low-level
# helpers for deleting messages.
#
# Because bugs in code that deletes message content can cause
# irreversible harm in installations without backups, this is a
# particularly sensitive system that requires careful design,
# thoughtful database transacti... | apache-2.0 | 8,044,793,871,342,519,000 | 41.713826 | 116 | 0.678899 | false |
aequitas/home-assistant | homeassistant/components/homematicip_cloud/weather.py | 4 | 2991 |
"""Support for HomematicIP Cloud weather devices."""
import logging
from homematicip.aio.device import (
AsyncWeatherSensor, AsyncWeatherSensorPlus, AsyncWeatherSensorPro)
from homematicip.aio.home import AsyncHome
from homeassistant.components.weather import WeatherEntity
from homeassistant.config_entries impor... | apache-2.0 | -5,606,397,275,901,277,000 | 30.484211 | 78 | 0.669007 | false |
reelai/packstack | packstack/modules/puppet.py | 4 | 3854 | # -*- coding: utf-8 -*-
import logging
import os
import re
from packstack.installer.exceptions import PuppetError
# TODO: Fill logger name when logging system will be refactored
logger = logging.getLogger()
re_color = re.compile('\x1b.*?\d\dm')
re_error = re.compile(
'err:|Syntax error at|^Duplicate definition... | apache-2.0 | -8,770,513,043,752,566,000 | 35.704762 | 79 | 0.57836 | false |
turbokongen/home-assistant | homeassistant/components/hunterdouglas_powerview/const.py | 15 | 1749 | """Support for Powerview scenes from a Powerview hub."""
import asyncio
from aiohttp.client_exceptions import ServerDisconnectedError
from aiopvapi.helpers.aiorequest import PvApiConnectionError
DOMAIN = "hunterdouglas_powerview"
MANUFACTURER = "Hunter Douglas"
HUB_ADDRESS = "address"
SCENE_DATA = "sceneData"
SH... | apache-2.0 | 5,346,593,109,165,850,000 | 22.958904 | 86 | 0.744997 | false |
ludobox/ludobox | bin/migrations/set_default_state.py | 2 | 1864 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Update slug to a more complete using content_type and language code
How it works :
- Scan /data folder and check is slug and folders are correct.
- If not, flag for update
- Ask user for confirmation (y/n)
- Rewrite info.json with the right slug
- Rename folder with t... | agpl-3.0 | -8,533,191,821,972,472,000 | 26.014493 | 111 | 0.591202 | false |
erdincay/youtube-dl | youtube_dl/extractor/fc2.py | 6 | 4093 | #! -*- coding: utf-8 -*-
from __future__ import unicode_literals
import hashlib
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
compat_urlparse,
)
from ..utils import (
ExtractorError,
)
class FC2IE(InfoExtractor):
_VALID_URL = r'^http://video... | unlicense | -7,322,910,195,957,540,000 | 33.982906 | 143 | 0.560225 | false |
printedheart/opencog | opencog/python/pln_old/logic.py | 32 | 12367 | from opencog.atomspace import types, Atom
from itertools import permutations
class Logic(object):
"""
A base class for chainers or other logical sytems. Contains various
logical functions inspired by the AIMA chapter on first-order
logic. They all operate directly on Atoms.
"""
def __init__(se... | agpl-3.0 | 7,385,975,548,242,289,000 | 34.950581 | 78 | 0.560201 | false |
FireWRT/OpenWrt-Firefly-Libraries | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/test/test_poll.py | 41 | 6418 | # Test case for the os.poll() function
import os
import random
import select
try:
import threading
except ImportError:
threading = None
import time
import unittest
from test.test_support import TESTFN, run_unittest, reap_threads, cpython_only
try:
select.poll
except AttributeError:
raise unittest.Skip... | gpl-2.0 | 6,599,632,463,478,398,000 | 29.131455 | 87 | 0.549392 | false |
akretion/odoo | addons/hr_holidays/report/holidays_summary_report.py | 21 | 5828 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import calendar
from datetime import timedelta
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class HrHolidaySummaryReport(models.Abstrac... | agpl-3.0 | 5,797,469,761,828,736,000 | 45.253968 | 137 | 0.566918 | false |
jreback/pandas | pandas/tests/indexing/test_coercion.py | 1 | 39801 | from datetime import timedelta
import itertools
from typing import Dict, List
import numpy as np
import pytest
from pandas.compat import IS64, is_platform_windows
import pandas as pd
import pandas._testing as tm
###############################################################
# Index / Series common tests which may ... | bsd-3-clause | -3,278,554,693,821,692,400 | 33.700087 | 88 | 0.547072 | false |
AlertaDengue/AlertaDengue | AlertaDengue/forecast/migrations/0001_initial.py | 1 | 1221 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-27 00:23
from __future__ import unicode_literals
from django.db import migrations
import sys
def create_dengue_global():
if 'test' in sys.argv:
sql = '''
CREATE SCHEMA IF NOT EXISTS "Dengue_global";
CREATE TABLE IF ... | gpl-3.0 | -4,531,334,576,695,109,000 | 27.395349 | 66 | 0.569206 | false |
12019/cyberflex-shell | cards/vrs_application.py | 2 | 4438 | from generic_application import Application
import struct, binascii, os, datetime, sys, time
from iso_7816_4_card import ISO_7816_4_Card
import utils, TLV_utils, generic_card
class VRS_Application(Application):
DRIVER_NAME = ["VRS"]
AID_LIST = [
"d2760000254b414e4d303100",
"d2760001354b41... | gpl-2.0 | 177,444,868,787,737,900 | 36.931624 | 129 | 0.563317 | false |
xpansa/purchase-workflow | purchase_delivery_address/__openerp__.py | 9 | 1328 | # -*- coding: utf-8 -*-
# Author: Leonardo Pistone
# Copyright 2014 Camptocamp SA
#
# 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
# License, or... | agpl-3.0 | -6,373,660,281,539,396,000 | 38.058824 | 77 | 0.680723 | false |
GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/10.Custom-User-And-Email-Authentication/3.Changing-Authentication/auth_demo/accounts/models.py | 3 | 1377 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import AbstractUser, UserManager
from django.db import models
from django.utils import timezone
# Create your models here.
# Create our new user class
class AccountUserManager(UserManager):
def _create_user(self, usern... | mit | 3,389,450,783,465,902,000 | 31.785714 | 95 | 0.625999 | false |
schoolie/bokeh | examples/app/export_csv/main.py | 4 | 1399 | from os.path import dirname, join
import pandas as pd
from bokeh.layouts import row, widgetbox
from bokeh.models import ColumnDataSource, CustomJS
from bokeh.models.widgets import Slider, Button, DataTable, TableColumn, NumberFormatter
from bokeh.io import curdoc
df = pd.read_csv(join(dirname(__file__), 'salary_data... | bsd-3-clause | -1,741,369,890,174,470,000 | 31.534884 | 93 | 0.686204 | false |
jgome043/cs170-group-project | src/pacmanAgents.py | 1 | 2118 | # pacmanAgents.py
# ---------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley... | gpl-3.0 | 3,113,021,930,913,981,000 | 38.222222 | 91 | 0.711048 | false |
ZmG/openwhisk-tutorial | whisk_tutorial/migrations/0005_auto__chg_field_tutorialuser_http_user_agent__chg_field_tutorialuser_h.py | 2 | 6251 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'TutorialUser.http_user_agent'
db.alter_column(u'whisk_tutorial_tutorialuser', 'http_user_... | apache-2.0 | -8,953,336,706,515,800,000 | 62.795918 | 145 | 0.616541 | false |
FabianHahn/libstore | thirdparty/googletest/googletest/test/gtest_xml_outfiles_test.py | 11 | 5593 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | mit | -5,622,139,924,132,227,000 | 38.95 | 98 | 0.690685 | false |
swalladge/ranger | ranger/gui/colorscheme.py | 5 | 5568 | # This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.
"""Colorschemes define colors for specific contexts.
Generally, this works by passing a set of keywords (strings) to
the colorscheme.get() method to receive the tuple (fg, bg, attr).
fg, bg are t... | gpl-3.0 | -5,530,726,037,153,921,000 | 34.240506 | 95 | 0.65194 | false |
adaptivethreat/Empire | lib/modules/powershell/credentials/mimikatz/keys.py | 7 | 2569 | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-Mimikatz DumpKeys',
'Author': ['@JosephBialek', '@gentilkiwi'],
'Description': ("Runs PowerSploit's Invoke-Mimikatz function "
... | bsd-3-clause | -3,643,933,511,273,116,700 | 31.935897 | 118 | 0.543013 | false |
mmottahedi/neuralnilm_prototype | scripts/e311.py | 2 | 5625 | from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import (Net, RealApplianceSource,
BLSTMLayer, DimshuffleLayer,
Bidirectio... | mit | -267,956,758,731,910,050 | 31.142857 | 100 | 0.600711 | false |
myusuf3/hellanzb | Hellanzb/Core.py | 1 | 24219 | """
Core - All of our main()ish functions. Initialization/shutdown/etc
(c) Copyright 2005 Philip Jenvey, Ben Bangert
[See end of file]
"""
# Install our custom twisted reactor immediately
from Hellanzb.HellaReactor import HellaReactor
HellaReactor.install()
import optparse, os, signal, sys, time, thread, threading, ... | bsd-3-clause | 6,536,546,247,990,956,000 | 39.432387 | 119 | 0.639044 | false |
jeffmcnd/tfrs | server/models/FuelSupplier.py | 2 | 1714 | """
REST API Documentation for the NRS TFRS Credit Trading Application
The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation.
OpenAPI spec version: v1
... | apache-2.0 | -1,584,284,232,255,401,200 | 41.775 | 208 | 0.773046 | false |
FrankBian/kuma | vendor/packages/pyparsing/examples/indentedGrammarExample.py | 16 | 1927 | # indentedGrammarExample.py
#
# Copyright (c) 2006, Paul McGuire
#
# A sample of a pyparsing grammar using indentation for
# grouping (like Python does).
#
from pyparsing import *
data = """\
def A(z):
A1
B = 100
G = A2
A2
A3
B
def BB(a,b,c):
BB1
def BBA():
bba1
bba2
... | mpl-2.0 | 6,896,793,203,863,243,000 | 22.705128 | 98 | 0.6274 | false |
pmisik/buildbot | master/buildbot/test/regressions/test_oldpaths.py | 5 | 4230 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 1,922,292,393,852,996,900 | 33.672131 | 79 | 0.706619 | false |
laurentb/weboob | modules/creditmutuel/browser.py | 1 | 43250 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the... | lgpl-3.0 | -2,725,548,668,398,420,000 | 46.310722 | 308 | 0.584316 | false |
rew4332/tensorflow | tensorflow/contrib/distributions/python/ops/operator_pd.py | 1 | 29415 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -9,187,433,578,970,137,000 | 34.741191 | 80 | 0.637702 | false |
Nexenta/cinder | cinder/image/glance.py | 2 | 24387 | # Copyright 2010 OpenStack Foundation
# Copyright 2013 NTT corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LIC... | apache-2.0 | 3,188,328,500,356,321,000 | 37.404724 | 79 | 0.594046 | false |
zhhf/charging | charging/plugins/ibm/sdnve_api_fake.py | 19 | 2081 | # Copyright 2014 IBM Corp.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | -199,917,980,902,874,100 | 31.515625 | 78 | 0.663623 | false |
chainer/chainer | chainer/reporter.py | 1 | 14250 | from __future__ import absolute_import
import collections
import contextlib
import copy
import json
import threading
import typing as tp # NOQA
import warnings
import numpy
import six
import chainer
from chainer import backend
from chainer import configuration
from chainer import serializer as serializer_module
from... | mit | -8,370,592,927,157,155,000 | 32.928571 | 79 | 0.603368 | false |
foxbitbr/testnet | jsdev/closure-library/closure/bin/calcdeps.py | 71 | 18576 | #!/usr/bin/env python
#
# Copyright 2006 The Closure Library 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
... | gpl-3.0 | 7,585,227,829,057,054,000 | 30.484746 | 80 | 0.652132 | false |
scikit-learn-contrib/categorical-encoding | category_encoders/wrapper.py | 1 | 11845 | import copy
from category_encoders import utils
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.model_selection import StratifiedKFold
import category_encoders as encoders
import pandas as pd
import numpy as np
class PolynomialWrapper(BaseEstimator, TransformerMixin):
"""Extend supervised en... | bsd-3-clause | -3,160,571,149,759,760,400 | 43.363296 | 137 | 0.651836 | false |
evanma92/routeh | flask/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/pymssql.py | 21 | 2968 | # mssql/pymssql.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mssql+pymssql
:name: pymssql
:dbapi: pymssql
:connects... | bsd-3-clause | -1,464,268,305,426,568,400 | 30.574468 | 74 | 0.598383 | false |
lafranceinsoumise/api-django | agir/polls/admin.py | 1 | 1207 | from django import forms
from django.contrib import admin
from django.utils.html import format_html
from django.utils.translation import ugettext as _
from agir.api.admin import admin_site
from agir.lib.form_fields import AdminJsonWidget, RichEditorWidget
from agir.lib.models import DescriptionField
from .models impo... | agpl-3.0 | 7,769,119,875,542,626,000 | 23.632653 | 68 | 0.628003 | false |
eduNEXT/edunext-ecommerce | ecommerce/extensions/payment/processors/cybersource.py | 1 | 24294 | """ CyberSource payment processing. """
from __future__ import absolute_import, unicode_literals
import base64
import datetime
import json
import logging
import uuid
from decimal import Decimal
import six
from django.conf import settings
from django.urls import reverse
from oscar.apps.payment.exceptions import Gatewa... | agpl-3.0 | 4,043,310,190,785,671,700 | 44.665414 | 120 | 0.625093 | false |
ptisserand/ansible | lib/ansible/module_utils/network/f5/common.py | 14 | 9070 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 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 re
from ansible.module_utils._text import to_text
from ansible.modul... | gpl-3.0 | 1,302,024,279,466,081,800 | 29.641892 | 94 | 0.605292 | false |
ntiufalara/openerp7 | openerp/addons/account/wizard/account_fiscalyear_close_state.py | 35 | 2537 | # -*- 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... | mit | -5,330,334,011,736,422,000 | 40.52459 | 110 | 0.578366 | false |
kayarre/Tools | vmtk/calc_polygon.py | 1 | 1712 |
#!/usr/bin/env python
import vtk
import numpy as np
from vmtk import vmtkscripts
from vmtk import vtkvmtk
import argparse
import copy
# creates lines normal to surface for evaluation in the probe image with surface
def warp_surface(args):
print("warp the surface ")
reader = vmtkscripts.vmtkSurfaceReader... | bsd-2-clause | -482,486,886,400,741,900 | 31.923077 | 121 | 0.744159 | false |
SilentCircle/sentry | src/sentry/migrations/0089_auto__add_accessgroup__add_unique_accessgroup_team_name.py | 3 | 27708 | # -*- coding: utf-8 -*-
import 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 'AccessGroup'
db.create_table('sentry_accessgroup', (
('id', self.gf('django.db.m... | bsd-3-clause | 607,920,004,678,667,900 | 79.549419 | 208 | 0.554244 | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/tests/indexing/test_iloc.py | 2 | 26763 | """ test positional based indexing with iloc """
from warnings import catch_warnings, filterwarnings, simplefilter
import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Series, concat, date_range, isna
from pandas.api.types import is_scalar
from pandas.tests.indexing.common import Base
f... | apache-2.0 | 1,716,900,563,005,315,300 | 31.677656 | 88 | 0.50114 | false |
zzicewind/nova | nova/virt/libvirt/guest.py | 6 | 13722 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# Copyright (c) 2012 University Of Minho
# Copyright (c) 2013 Hewlett-Pa... | apache-2.0 | -6,999,380,690,129,891,000 | 34.457364 | 78 | 0.608439 | false |
oblique-labs/pyVM | rpython/translator/test/test_exceptiontransform.py | 2 | 8603 | import py
from rpython.translator.translator import TranslationContext, graphof
from rpython.translator.simplify import join_blocks
from rpython.translator import exceptiontransform
from rpython.flowspace.model import summary
from rpython.rtyper.test.test_llinterp import get_interpreter
from rpython.translator.backendo... | mit | 5,744,993,715,818,964,000 | 31.100746 | 83 | 0.541439 | false |
iulian787/spack | var/spack/repos/builtin/packages/r-makecdfenv/package.py | 5 | 1307 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RMakecdfenv(RPackage):
"""CDF Environment Maker.
This package has two functions. O... | lgpl-2.1 | 3,896,769,160,650,301,400 | 42.566667 | 78 | 0.713083 | false |
wexi/amforth-shadow | core/devices/at90pwm3/device.py | 5 | 3375 | # Partname: AT90PWM3
# Built using part description XML file version 179
# generated automatically, do not edit
MCUREGS = {
'ADCH': '$79',
'ADCL': '$78',
'ADCSRA': '$7A',
'ADCSRB': '$7B',
'ADMUX': '$7C',
'AMP0CSR': '$76',
'AMP1CSR': '$77',
'DIDR0': '$7E',
'DIDR1': '$7F',
'AC0CON': '$AD',
'AC1CON': '$AE',
'A... | gpl-2.0 | 3,740,517,594,388,612,600 | 18.291429 | 51 | 0.480296 | false |
Eric89GXL/scipy | benchmarks/benchmarks/cython_special.py | 10 | 2044 | from __future__ import division, absolute_import, print_function
import re
import six
import numpy as np
from scipy import special
try:
from scipy.special import cython_special
except ImportError:
pass
from .common import with_attributes
FUNC_ARGS = {
'airy_d': (1,),
'airy_D': (1,),
'beta_dd': ... | bsd-3-clause | -2,457,090,697,009,167,400 | 26.253333 | 76 | 0.511742 | false |
ageron/tensorflow | tensorflow/python/autograph/converters/call_trees_test.py | 3 | 3849 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,032,432,939,588,114,000 | 32.469565 | 80 | 0.627176 | false |
robbiet480/home-assistant | tests/util/test_pressure.py | 23 | 2247 | """Test Home Assistant pressure utility functions."""
import pytest
from homeassistant.const import (
PRESSURE_HPA,
PRESSURE_INHG,
PRESSURE_MBAR,
PRESSURE_PA,
PRESSURE_PSI,
)
import homeassistant.util.pressure as pressure_util
INVALID_SYMBOL = "bob"
VALID_SYMBOL = PRESSURE_PA
def test_convert_sa... | apache-2.0 | 1,754,149,167,649,640,400 | 30.647887 | 88 | 0.684468 | false |
michael-dev2rights/ansible | lib/ansible/module_utils/aws/rds.py | 1 | 4179 | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Author: Michael De La Rue 2017 largely rewritten but based on work
# by Will Thames taken in turn from the original rds module.
try:
import botocore
from... | gpl-3.0 | -411,790,850,942,582,100 | 28.020833 | 97 | 0.65207 | false |
asajeffrey/servo | tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_special_keys.py | 41 | 1118 | import pytest
from webdriver import error
from tests.perform_actions.support.refine import get_keys
@pytest.mark.parametrize("value", [
(u"\U0001F604"),
(u"\U0001F60D"),
(u"\u0BA8\u0BBF"),
(u"\u1100\u1161\u11A8"),
])
def test_codepoint_keys_behave_correctly(session, key_reporter, key_chain, value):
... | mpl-2.0 | -1,711,500,888,662,174,000 | 28.421053 | 87 | 0.644902 | false |
DirectXMan12/nova-hacking | nova/tests/api/openstack/compute/contrib/test_keypairs.py | 1 | 15700 | # Copyright 2011 Eldar Nugaev
# 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 ... | apache-2.0 | -7,950,758,879,303,486,000 | 37.861386 | 78 | 0.589682 | false |
floraXiao/gooderp_addons | buy/tests/test_supplier_statements.py | 6 | 4741 | # -*- coding: utf-8 -*-
from odoo.tests.common import TransactionCase
from odoo.exceptions import UserError
class TestSupplierStatements(TransactionCase):
'''测试供应商对账单'''
def setUp(self):
'''供应商对账单向导及数据'''
super(TestSupplierStatements, self).setUp()
# 业务伙伴对账单向导: else self._context.get(... | agpl-3.0 | -2,740,961,765,383,248,000 | 41.574257 | 105 | 0.598977 | false |
hailthedawn/HaikuGen | haikubot/train.py | 1 | 1282 | #builds the model from existing data
import inspect,os
import markovify
from textstat.textstat import textstat
#Read files from directory
#Add their contents to a single string
#Make a model from this string
#generate first sentence from this model
class train():
dir=os.path.dirname(os.path.dirname(os.path.abspa... | mit | 6,718,578,018,938,595,000 | 24.66 | 146 | 0.616225 | false |
elainenaomi/sciwonc-dataflow-examples | dissertation2017/Experiment 1A/instances/10_2_workflow_full_10files_secondary_wmj_3sh_3rs_with_annot_with_proj_3s_range/init_0/DataStoreInit.py | 17 | 3106 | #!/usr/bin/env python
from pymongo import MongoClient
import pymongo
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.intern... | gpl-3.0 | 6,459,247,221,181,400,000 | 37.345679 | 458 | 0.753059 | false |
spicerack/sage | sage/inbound.py | 1 | 2133 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from sage.ansi import filter_ansi
import sage
class Line(str):
""" An individual line in sage's buffer
:attribute raw: the original 'raw' value of the line
:attribute output: output that will be sent to the client
"""
def __n... | gpl-3.0 | -5,296,257,708,037,646,000 | 25.012195 | 75 | 0.591186 | false |
HybridF5/jacket | jacket/tests/compute/unit/objects/test_dns_domain.py | 1 | 3066 | # Copyright (C) 2014, Red Hat, 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 | -4,048,126,344,891,496,400 | 35.070588 | 78 | 0.651011 | false |
SarahPythonista/acmpy | spgl/io/bitstream.py | 1 | 7580 | #!/usr/bin/env python3 -tt
"""
File: bitstream.cpp
-------------------
This file defines the ibitstream and obitstream classes.
These classes are patterned after (and, in fact, inherit from) the standard
io.BufferedReader and io.BufferedWriter classes.
The ibitstream and obitstream classes are basically the
same as th... | mit | 6,341,815,058,728,473,000 | 31.255319 | 131 | 0.614116 | false |
wesabe/fixofx | 3rdparty/wsgi_intercept/setup_cmd/publish_docs.py | 4 | 6545 |
import re, pydoc
from distutils.cmd import Command
from distutils.errors import *
from distutils import log
from docutils.core import publish_string, publish_parts
from docutils import nodes
from docutils.nodes import SparseNodeVisitor
from docutils.writers import Writer
import wsgi_intercept
from mechanize import Bro... | apache-2.0 | 7,526,757,896,328,170,000 | 31.889447 | 90 | 0.567609 | false |
kylelwm/ponus | venv/build/psycopg2/examples/mogrify.py | 5 | 1688 | # mogrify.py - test all possible simple type mogrifications
# -*- encoding: latin1 -*-
#
# Copyright (C) 2004-2010 Federico Di Gregorio <fog@debian.org>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software... | mit | -3,911,824,938,929,991,000 | 34.829787 | 73 | 0.69715 | false |
openstack/ironic | ironic/common/pxe_utils.py | 1 | 53205 | #
# Copyright 2014 Rackspace, 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 ... | apache-2.0 | -485,594,768,924,118,500 | 41.092563 | 178 | 0.61622 | false |
jseabold/statsmodels | versioneer.py | 2 | 68638 |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | bsd-3-clause | 7,394,031,660,277,220,000 | 36.671789 | 79 | 0.613815 | false |
getefesto/efesto | efesto/Api.py | 1 | 1093 | # -*- coding: utf-8 -*-
from efesto.Generator import Generator
from efesto.handlers import Collections, Items
import falcon
class Api:
def __init__(self, **kwargs):
self.api = falcon.API(**kwargs)
@staticmethod
def collection(model):
return Collections(model)
@staticmethod
def ... | gpl-3.0 | 8,956,973,960,251,535,000 | 25.02381 | 69 | 0.617566 | false |
andersonjonathan/Navitas | navitas/contents/views.py | 1 | 2048 | import json
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.utils.translation import check_for_language, activate
from content... | mit | -842,173,136,335,333,800 | 27.068493 | 103 | 0.668945 | false |
palmtree5/Red-DiscordBot | redbot/core/dev_commands.py | 2 | 12729 | import ast
import asyncio
import aiohttp
import inspect
import io
import textwrap
import traceback
import types
import re
from contextlib import redirect_stdout
from copy import copy
import discord
from . import checks, commands
from .commands import NoParseOptional as Optional
from .i18n import Translator, cog_i18n
... | gpl-3.0 | -4,217,651,589,190,516,700 | 33.034759 | 111 | 0.553932 | false |
gsb-eng/tahoe-lafs | src/allmydata/test/test_sftp.py | 7 | 80359 |
import re, struct, traceback, time, calendar
from stat import S_IFREG, S_IFDIR
from twisted.trial import unittest
from twisted.internet import defer, reactor
from twisted.python.failure import Failure
from twisted.internet.error import ProcessDone, ProcessTerminated
from allmydata.util import deferredutil
conch_inte... | gpl-2.0 | 8,911,035,432,620,745,000 | 53.041022 | 136 | 0.594233 | false |
pku9104038/edx-platform | common/lib/xmodule/xmodule/tests/test_video.py | 2 | 22009 | # -*- coding: utf-8 -*-
#pylint: disable=W0212
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
We have a ModuleStoreTestCase class defined in
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can
search for usages of this in the cms and lms tests for examples.... | agpl-3.0 | -2,360,412,918,190,615,000 | 40.448211 | 226 | 0.556363 | false |
zaffra/Donate | donate/models.py | 1 | 2850 | from django.db import models
from djangotoolbox.fields import ListField
from django.contrib.auth.models import User
class CommonModel(models.Model):
"""
CommonModel contains the common fields most all other
models will use.
"""
# Auto datetime when created
created_datetime = models.DateTimeFiel... | bsd-3-clause | 7,198,623,145,001,043,000 | 28.081633 | 69 | 0.698947 | false |
cindyyu/kuma | kuma/users/tests/test_helpers.py | 16 | 1105 | import urllib
from hashlib import md5
from django.conf import settings
from nose.tools import eq_, ok_
from . import UserTestCase
from ..helpers import gravatar_url, public_email
class HelperTestCase(UserTestCase):
def setUp(self):
super(HelperTestCase, self).setUp()
self.u = self.user_model.o... | mpl-2.0 | 7,404,862,897,567,889,000 | 32.484848 | 76 | 0.597285 | false |
sagost/VideoUavTracker | vut_newproject.py | 1 | 8521 | # -*- coding: utf-8 -*-
'''
Video Uav Tracker v 2.0
Replay a video in sync with a gps track displayed on the map.
-------------------
copyright : (C) 2017 by Salvatore Agosta
email : sagost@katamail.com
This program is free software; you can redistribute it and/or modi... | gpl-2.0 | 340,023,915,727,115,900 | 53.273885 | 159 | 0.69804 | false |
projecthamster/hamster | src/hamster/lib/parsing.py | 1 | 2802 | import logging
logger = logging.getLogger(__name__) # noqa: E402
import re
from hamster.lib import datetime as dt
# separator between times and activity
ACTIVITY_SEPARATOR = "\s+"
# match #tag followed by any space or # that will be ignored
# tag must not contain '#' or ','
tag_re = re.compile(r"""
\# ... | gpl-3.0 | 7,552,497,756,821,847,000 | 27.591837 | 80 | 0.560314 | false |
ecino/compassion-modules | mobile_app_connector/mappings/wp_post_mapping.py | 3 | 1595 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | agpl-3.0 | 6,705,988,417,673,983,000 | 28 | 78 | 0.477116 | false |
hackerkid/zulip | zerver/webhooks/trello/tests.py | 4 | 9453 | from typing import Dict
from unittest.mock import patch
import orjson
from zerver.lib.test_classes import WebhookTestCase
class TrelloHookTests(WebhookTestCase):
STREAM_NAME = "trello"
URL_TEMPLATE = "/api/v1/external/trello?stream={stream}&api_key={api_key}"
FIXTURE_DIR_NAME = "trello"
def test_tr... | apache-2.0 | -2,209,405,371,688,587,800 | 50.655738 | 189 | 0.656617 | false |
jbaiter/spreads | spreadsplug/dev/chdkcamera.py | 2 | 16340 | # -*- coding: utf-8 -*-
import logging
import os
import re
import subprocess
import tempfile
import time
from fractions import Fraction
from itertools import chain
import usb
from jpegtran import JPEGImage
from spreads.vendor.pathlib import Path
from spreads.config import OptionTemplate
from spreads.plugin import Dev... | agpl-3.0 | -6,617,896,385,044,184,000 | 37.71564 | 79 | 0.547068 | false |
BrendanLeber/adventofcode | 2020/09-encoding_error/encoding_error.py | 1 | 2067 | # -*- coding: utf-8 -*-
"""Advent of Code 2020 - Day 9 - Encoding Error."""
import argparse
import pdb
import traceback
from itertools import combinations
from typing import Any, List, Set, Tuple
def parse_input(fname: str):
"""Read the input file and return the parsed data."""
data = []
with open(fname,... | mit | 3,329,311,302,426,200,600 | 25.164557 | 99 | 0.570392 | false |
benrudolph/commcare-hq | corehq/apps/reports/cache.py | 2 | 1828 | from django.utils.cache import _generate_cache_header_key
from corehq.util.quickcache import quickcache, QuickCache
DEFAULT_EXPIRY = 60 * 60 # an hour
CACHE_PREFIX = 'hq.reports' # a namespace where cache keys go
class _ReportQuickCache(QuickCache):
"""
Just like QuickCache, but intercepts the function cal... | bsd-3-clause | -2,381,033,371,840,866,300 | 29.466667 | 79 | 0.641138 | false |
hcasse/maat | maat/test.py | 1 | 9061 | # MAAT top-level script
# Copyright (C) 2016 H. Casse <hugues.casse@laposte.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 | 5,791,492,022,271,630,000 | 30.030822 | 141 | 0.65964 | false |
gion86/awlsim | awlsim/core/instructions/insn_feature.py | 2 | 1866 | # -*- coding: utf-8 -*-
#
# AWL simulator - instructions
#
# Copyright 2012-2014 Michael Buesch <m@bues.ch>
#
# 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
... | gpl-2.0 | -1,157,801,609,826,151,000 | 31.736842 | 82 | 0.722937 | false |
timrijckaert/plugin.video.vrt.livestreams | addon.py | 1 | 3408 | import sys
import xbmc
import xbmcgui
import xbmcplugin
from resources.lib.models.constants import ACTIONS
from resources.lib.models.radiochannel import get_all_radio_channels
from resources.lib.models.videochannel import get_all_video_channels
from resources.lib.service.playlistfetcher import get_playlist_for_channel
... | gpl-2.0 | 921,547,563,464,623,200 | 38.627907 | 100 | 0.595951 | false |
dycodedev/taiga-back | taiga/projects/tasks/permissions.py | 8 | 2315 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 | -350,722,921,183,585,900 | 44.352941 | 82 | 0.721141 | false |
safarmer/bazel | tools/build_rules/test_rules_test.py | 13 | 5024 | # Copyright 2018 The Bazel 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 applicable la... | apache-2.0 | 9,204,501,319,727,431,000 | 31.412903 | 79 | 0.52926 | false |
e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/system/puppet.py | 25 | 8786 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# 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',
... | bsd-3-clause | 3,229,730,367,233,816,600 | 29.61324 | 92 | 0.57751 | false |
pychess/pychess | lib/pychess/System/ping.py | 1 | 2987 | # -*- coding: UTF-8 -*-
import re
import sys
import shutil
from gi.repository import GObject
from pychess.compat import create_task
from pychess.System.Log import log
from pychess.System.SubProcess import SubProcess
class Pinger(GObject.GObject):
""" The received signal contains the time it took to get respons... | gpl-3.0 | -185,132,185,501,466,400 | 28.574257 | 81 | 0.556076 | false |
polysimtools/pysimm | Examples/04_polyethylene/gaff2/create.py | 3 | 2276 | from pysimm import system, lmps, forcefield
from pysimm.apps.random_walk import random_walk
from pysimm.models.monomers.gaff2.pe import monomer
def run(test=False):
# we'll create a pe monomer from the pysimm.models database
pe = monomer()
# we'll instantiate a GAFF2 forcefield object for use later
... | mit | 6,607,197,273,273,481,000 | 45.469388 | 143 | 0.720562 | false |
jakirkham/dask-distance | setup.py | 1 | 1828 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import setuptools
from setuptools import setup
from setuptools.command.test import test as TestCommand
import versioneer
class PyTest(TestCommand):
description = "Run test suite with pytest"
def finalize_options(self):
TestCommand.finalize_op... | bsd-3-clause | -8,600,454,990,359,348,000 | 23.702703 | 74 | 0.637856 | false |
rdhyee/PyTables | tables/tests/create_backcompat_indexes.py | 6 | 1209 | # -*- coding: utf-8 -*-
# Script for creating different kind of indexes in a small space as possible.
# This is intended for testing purposes.
import tables
class Descr(tables.IsDescription):
var1 = tables.StringCol(itemsize=4, shape=(), dflt='', pos=0)
var2 = tables.BoolCol(shape=(), dflt=False, pos=1)
... | bsd-3-clause | -919,956,977,047,702,900 | 27.785714 | 77 | 0.684864 | false |
alephdata/aleph | aleph/index/notifications.py | 1 | 1783 | import logging
from pprint import pprint # noqa
from banal import hash_data
from datetime import datetime
from followthemoney.util import get_entity_id
from aleph.index.util import index_name, index_settings, configure_index
from aleph.index.util import query_delete, index_safe
from aleph.index.util import KEYWORD
l... | mit | -4,261,842,075,724,906,500 | 29.220339 | 72 | 0.62479 | false |
Brett55/moto | tests/test_datapipeline/test_datapipeline.py | 9 | 6076 | from __future__ import unicode_literals
import boto.datapipeline
import sure # noqa
from moto import mock_datapipeline_deprecated
from moto.datapipeline.utils import remove_capitalization_of_dict_keys
def get_value_from_fields(key, fields):
for field in fields:
if field['key'] == key:
retur... | apache-2.0 | -3,070,338,029,501,897,000 | 28.784314 | 77 | 0.621297 | false |
JensTimmerman/easybuild-easyblocks | easybuild/easyblocks/b/boost.py | 1 | 6055 | ##
# Copyright 2009-2012 Ghent University
# Copyright 2009-2012 Stijn De Weirdt
# Copyright 2010 Dries Verdegem
# Copyright 2010-2012 Kenneth Hoste
# Copyright 2011 Pieter De Baets
# Copyright 2011-2012 Jens Timmerman
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://u... | gpl-2.0 | -2,797,290,798,981,957,600 | 37.814103 | 106 | 0.606441 | false |
purduesigbots/pros-cli | pros/common/ui/interactive/components/component.py | 1 | 2612 | from typing import *
from pros.common.ui.interactive.parameters.parameter import Parameter
from pros.common.ui.interactive.parameters.validatable_parameter import ValidatableParameter
class Component(object):
"""
A Component is the basic building block of something to render to users.
Components must co... | mpl-2.0 | -1,232,497,420,040,287,700 | 33.368421 | 114 | 0.647014 | 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.