text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# encoding: utf-8 """Definition of supported languages""" ENGLISH = 'english' FRENCH = 'french' DEFAULT = 'english'
brouberol/pynlg
pynlg/lexicon/lang.py
Python
mit
118
0
from memory_profiler import profile @profile def my_func(): a = [1] * (10 ** 6) b = [2] * (2 * 10 ** 7) del b return a if __name__ == '__main__': my_func()
olivetree123/memory_profiler
test/test_import.py
Python
bsd-3-clause
179
0.005587
# -*- coding: utf-8 -*- # vispy: testskip # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ OSMesa backend for offscreen rendering on Linux/Unix """ from __future__ import division from ...util.ptime import time from ..base import ...
Eric89GXL/vispy
vispy/app/backends/_osmesa.py
Python
bsd-3-clause
7,645
0
import pcs from socket import AF_INET, inet_ntop import struct import time import pcs.packets.ipv4 import pcs.packets.igmpv2 as igmpv2 import pcs.packets.igmpv3 as igmpv3 #import pcs.packets.dvmrp #import pcs.packets.mtrace IGMP_HOST_MEMBERSHIP_QUERY = 0x11 IGMP_v1_HOST_MEMBERSHIP_REPORT = 0x12 IGMP_DVMRP = 0x13 IGM...
gvnn3/PCS
pcs/packets/igmp.py
Python
bsd-3-clause
3,526
0.011344
__author__ = 'bett' import MySQLdb as db import pandas.io.sql as psql from config import db_config def getData(symbols,start,end): database = db.connect(**db_config) data=psql.frame_query("SELECT * FROM tbl_historical where start", database) return data; if(__name__=='__main__'): getData('00000...
dingmingliu/quanttrade
quanttrade/core/data.py
Python
apache-2.0
350
0.025714
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # Portions copyright @ 2015 VMware, Inc. # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
calamityman/ansible-modules-extras
network/openvswitch_bridge.py
Python
gpl-3.0
8,748
0.000572
import os import io import stat import time import threading import sublime import sublime_plugin # Set of IDs of view that are being monitored. TAILF_VIEWS = set() STATUS_KEY = 'tailf' class TailF(sublime_plugin.TextCommand): ''' Start monitoring file in `tail -f` line style. ''' def __init__(self...
delicb/SublimeConfig
tailf.py
Python
mit
3,015
0
from __future__ import absolute_import import sure from .. import Chain, NoApiKeyId, OpReturn, get_block_op_returns_by_height from .mock_http_adapter import * def test_get_block_op_returns_by_height(): get_block_op_returns_by_height(block_height, api_key_id=api_key_id, http_ada...
chris-martin/chain-bitcoin-python
chain_bitcoin/tests/test_get_block_op_returns_by_height.py
Python
mit
1,761
0
import numpy as np import cPickle as pickle from sklearn.svm import LinearSVC import gp from full_marginal import compute_means_covs from fastfood import FastfoodEGK def main(): np.random.seed(111) with open('data/ECG200-50.pkl', 'rb') as f: ts_train, ts_test, l_train, l_test = pickle.load(f) # E...
mlds-lab/egk
demo.py
Python
mit
1,643
0
from remoteobjects import RemoteObject as RemoteObject_, fields from .fields import StringBoolean, Datetime # The datetime format is inconsistent. DATETIME_FORMAT_WITH_SECONDS = '%Y-%m-%d %H:%M:%S %z' DATETIME_FORMAT = '%Y-%m-%d %H:%M %Z' class RemoteObject(RemoteObject_): def post_to(self, url): self...
LegNeato/bztools
bugzilla/models.py
Python
bsd-3-clause
6,168
0.000811
import numpy import chainer from chainer import backend from chainer import configuration import chainer.functions as F from chainer import link_hook import chainer.links as L from chainer import variable import chainerx from chainerx import _fallback_workarounds as fallback def l2normalize(xp, v, eps): """Norma...
keisuke-umezawa/chainer
chainer/link_hooks/spectral_normalization.py
Python
mit
11,583
0
"""Loading unittests.""" import os import re import sys import traceback import types from functools import cmp_to_key as _CmpToKey from fnmatch import fnmatch from . import case, suite __unittest = True # what about .pyc or .pyo (etc) # we would need to avoid loading the same tests multiple times # from '.py', '....
ruibarreira/linuxtrail
usr/lib/python2.7/unittest/loader.py
Python
gpl-3.0
13,465
0.002005
# Generated by Django 1.11.7 on 2017-12-13 09:18 import django.db.models.deletion from django.db import migrations, models import waldur_core.core.fields import waldur_core.core.models import waldur_core.core.validators class Migration(migrations.Migration): dependencies = [ ('waldur_jira', '0002_resour...
opennode/nodeconductor-assembly-waldur
src/waldur_jira/migrations/0003_project_template.py
Python
mit
1,946
0.001028
from ..base import ShopifyResource class GiftCardAdjustment(ShopifyResource): _prefix_source = "/admin/gift_cards/$gift_card_id/" _plural = "adjustments" _singular = "adjustment"
Shopify/shopify_python_api
shopify/resources/gift_card_adjustment.py
Python
mit
193
0
# Copyright (C) 2012 Google Inc. All rights reserved. # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. 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 ...
danakj/chromium
third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py
Python
bsd-3-clause
12,942
0.002859
# Copyright (c) 2012 Midokura Japan K.K. # # 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 l...
sacharya/nova
nova/tests/api/openstack/compute/contrib/test_server_start_stop.py
Python
apache-2.0
4,710
0.001274
# Copyright 2017 Battelle Energy Alliance, LLC # # 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 t...
idaholab/raven
framework/SupervisedLearning/ScikitLearn/LinearModel/LassoLarsIC.py
Python
apache-2.0
6,386
0.008926
# -*- coding: utf-8 -*- # Copyright (C) 1998-2015 by the Free Software Foundation, Inc. # # This file is part of Postorius. # # Postorius 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...
khushboo9293/postorius
src/postorius/views/settings.py
Python
gpl-3.0
4,486
0
#!env/bin/python from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import app, db migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager.run()
iniweb/deployCD
manage.py
Python
mit
266
0.003759
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/global_/lsp_bit/overload_bit/__init__.py
Python
apache-2.0
25,678
0.001675
# -*- coding: utf-8 -*- from odoo.tests.common import HttpCase from odoo.exceptions import ValidationError class AccountingTestCase(HttpCase): """ This class extends the base TransactionCase, in order to test the accounting with localization setups. It is configured to run the tests after the installation ...
Aravinthu/odoo
addons/account/tests/account_test_classes.py
Python
agpl-3.0
2,749
0.003638
import datetime import json import os import psycopg2 as dbapi2 import re from werkzeug.exceptions import NotFound, Forbidden from flask import Flask, app, render_template from common import * from config import * import jinja app = Flask(__name__) # jinja-python functions @app.context_processor def processor(): ...
torshid/foodnow
server.py
Python
gpl-3.0
2,035
0.009337
#!/usr/bin/python # python script to generate an overview of the staes based on the input lex file. # # Copyright (C) 1997-2019 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby # granted. No repre...
ellert/doxygen
src/scan_states.py
Python
gpl-2.0
1,591
0.0044
# Copyright 2016 Matthias Gazzari # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
qtux/instmatcher
tests/test_parser.py
Python
apache-2.0
21,291
0.039547
""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test file and execute the test functions, that's it * port...
gnulinooks/sympy
sympy/utilities/runtests.py
Python
bsd-3-clause
21,885
0.002467
''' Created on Apr 7, 2016 @author: Alex Ip, Geoscience Australia ''' import sys import netCDF4 import subprocess import re from geophys2netcdf import ERS2NetCDF def main(): assert len( sys.argv) == 5, 'Usage: %s <root_dir> <file_template> <attribute_name> <attribute_value>' % sys.argv[0] root_dir = ...
alex-ip/geophys2netcdf
utils/set_attribute.py
Python
apache-2.0
1,500
0.003333
# -*- coding: utf-8 -*- from . import stock_return_picking
rfhk/awo-custom
sale_line_quant_extended/wizard/__init__.py
Python
lgpl-3.0
60
0
#significant input and copied functions from T. Morton's VESPA code (all mistakes are my own) #coords -- RA and DEC of target in degrees. Needed for GAIA querying. # Degrees, 0-360 and -90 to +90. List format [RA,DEC]. import numpy as np import pandas as pd from scipy.integrate import quad from scipy import...
DJArmstrong/autovet
FPPcalc/priorutils.py
Python
gpl-3.0
16,928
0.021148
class Alarm(object): id = '' uid = 0 note_id = '' date = 0 update_date = 0 is_deleted = 0 #note = None()
ThinkmanWang/NotesServer
models/Alarm.py
Python
apache-2.0
151
0.02649
# Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
kfwang/Glance-OVA-OVF
glance/async/taskflow_executor.py
Python
apache-2.0
5,199
0.000385
#!/usr/bin/env python #-*- coding: utf-8 -*- import time __author__ = 'mah' __email__ = 'andrew.makhotin@gmail.com' import MySQLdb as mdb import sys import ConfigParser import logging import logging.handlers import re import os from ffprobe import FFProbe #### LOG ### logger = logging.getLogger('Logging for check_s...
mahandra/recipes_video_conv
rec_hls_server/check_rec_stream.py
Python
gpl-2.0
4,889
0.004909
import logging import networkx from .. import Analysis, register_analysis from ...codenode import BlockNode from ..calling_convention import CallingConventionAnalysis import ailment import ailment.analyses l = logging.getLogger('angr.analyses.clinic') class Clinic(Analysis): """ A Clinic deals with AILm...
tyb0807/angr
angr/analyses/decompiler/clinic.py
Python
bsd-2-clause
5,861
0.002901
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-01 01:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api_v2', '0006_remove_event_is_valid'), ] operations = [ migrations.AlterFi...
AstroMatt/esa-time-perception
backend/api_v2/migrations/0007_auto_20170101_0101.py
Python
mit
3,986
0.003512
from piliko import * print print 'example 5' v1,v2 = vector(3,0),vector(0,4) print 'vectors v1, v2:', v1, v2 print ' v1 + v2, v1 - v2: ', v1 + v2, v1 - v2 print ' v1 * 5/4:', v1 * Fraction(5,4) print ' v1 perpendicular v1? ', v1.perpendicular( v1 ) print ' v1 perpendicular v2? ', v1.perpendicular( v2 ) print ' v2 perp...
donbright/piliko
examples/example05.py
Python
bsd-3-clause
1,688
0.034953
from ...plugin import hookimpl from ..custom import CustomBuilder from ..sdist import SdistBuilder from ..wheel import WheelBuilder @hookimpl def hatch_register_builder(): return [CustomBuilder, SdistBuilder, WheelBuilder]
ofek/hatch
backend/src/hatchling/builders/plugin/hooks.py
Python
mit
229
0
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
miyucy/oppia
core/domain/dependency_registry_test.py
Python
apache-2.0
4,450
0
import os import re import sys import warnings from ast import literal_eval as eval from filecmp import clear_cache, dircmp from glob import glob from importlib.machinery import SourceFileLoader from inspect import getmembers, getsourcelines, isfunction from os import remove from os.path import basename, exists, join f...
EducationalTestingService/rsmtool
rsmtool/test_utils.py
Python
apache-2.0
66,934
0.001404
# Copyright 2014, Rackspace, US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
dan1/horizon-proto
openstack_dashboard/api/rest/keystone.py
Python
apache-2.0
18,340
0
# -*- coding: utf-8 -*- # Copyright(C) 2013 Bezleputh # # This file is part of weboob. # # weboob 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 # (at your opt...
blckshrk/Weboob
modules/grooveshark/test.py
Python
agpl-3.0
1,879
0.001597
""" PynamoDB exceptions """ from typing import Any, Optional import botocore.exceptions class PynamoDBException(Exception): """ A common exception class """ def __init__(self, msg: Optional[str] = None, cause: Optional[Exception] = None) -> None: self.msg = msg self.cause = cause ...
pynamodb/PynamoDB
pynamodb/exceptions.py
Python
mit
4,009
0.001746
from django.contrib import messages from django.db.models import Q from django.http import Http404 from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.shortcuts import render, get_object_or_404, redirect from django.utils import timezone # Create your views he...
insta-code1/ecommerce
src/products/views.py
Python
mit
3,661
0.029227
#!/usr/bin/env python2 import sys try: import os import glob import gettext import json import collections import XletSettingsWidgets import dbus from SettingsWidgets import SectionBg from gi.repository import Gio, Gtk, GObject, GdkPixbuf except Exception, detail: print detail ...
lovelylinus35/Cinnamon
files/usr/lib/cinnamon-settings/bin/XletSettings.py
Python
gpl-2.0
14,098
0.003263
# Copyright 2016 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
google/ctfscoreboard
scoreboard/config_defaults.py
Python
apache-2.0
1,499
0
from __future__ import unicode_literals import re from .amp import AMPIE from .common import InfoExtractor class FoxNewsIE(AMPIE): IE_NAME = 'foxnews' IE_DESC = 'Fox News and Fox Business Video' _VALID_URL = r'https?://(?P<host>video\.(?:insider\.)?fox(?:news|business)\.com)/v/(?:video-embed\.html\?vide...
vinegret/youtube-dl
youtube_dl/extractor/foxnews.py
Python
unlicense
5,156
0.002715
import asyncio import engineio import six from . import asyncio_manager from . import exceptions from . import packet from . import server class AsyncServer(server.Server): """A Socket.IO server for asyncio. This class implements a fully compliant Socket.IO web server with support for websocket and lon...
max00xam/service.maxxam.teamwatch
lib/socketio/asyncio_server.py
Python
gpl-3.0
24,559
0
from itertools import product import numpy as np from concert.quantities import q from concert.tests import assert_almost_equal, TestCase from concert.devices.motors.dummy import LinearMotor from concert.processes.common import scan, ascan, dscan def compare_sequences(first_sequence, second_sequence, assertion): ...
ufo-kit/concert
concert/tests/integration/test_scan.py
Python
lgpl-3.0
4,356
0.002296
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
sandeva/appspot
astro/birth/urls.py
Python
apache-2.0
1,038
0.003854
import uuid import json import requests import argparse parser = argparse.ArgumentParser( description="Upload a series of test submissions with randomized ids") parser.add_argument('host', nargs='?', default="http://localhost:5000", help="URL of server to upload to") args = parser.parse_args() ...
ga4gh/CGT
tests/populate.py
Python
apache-2.0
1,290
0.00155
# -*- coding: utf-8 -*- # # Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2012 roger # Copyright (c) 2012, 2014 Tycho Andersen # Copyright (c) 2012 Maximilian Köhl # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # # Permission is ...
xplv/qtile
libqtile/widget/currentlayout.py
Python
mit
2,371
0
import sys import os import pygame class Config(object): def __init__(self, config_file): self.config_file = config_file self.params = {} def parse(self): with open(self.config_file) as f: for line in f: if line[0] == ";": continue; ...
alex-dow/psistatsrd
psistatsrd/config.py
Python
mit
920
0.004348
"""Parent class and utility class for producing a scansion pattern for a line of Latin verse. Some useful methods * Perform a conservative i to j transformation * Performs elisions * Accents vowels by position * Breaks the line into a list of syllables by calling a Syllabifier class which may be injected into this cl...
D-K-E/cltk
src/cltk/prosody/lat/verse_scanner.py
Python
mit
18,030
0.002609
import subprocess import shutil import os import time from .interface import IsolateInterface class IsolateSimple(IsolateInterface): def isolate(self, files, command, parameters, envvariables, directories, allowmultiprocess, stdinfile, stdoutfile): if os.path.isdir("/tmp/gradertools/isolation/"): ...
david58/gradertools
gradertools/isolation/isolate_simple.py
Python
mit
1,622
0.006165
# Copyright 2016 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 # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
openstack/horizon
openstack_dashboard/contrib/developer/profiler/api.py
Python
apache-2.0
3,772
0
# encoding: utf-8 """ update/__init__.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2012 Exa Networks. All rights reserved. Modified by Orange - 2014 """ from copy import deepcopy from bagpipe.exabgp.structure.address import AFI,SAFI from bagpipe.exabgp.message import Message,prefix from bagpipe.exa...
murat1985/bagpipe-bgp
bagpipe/exabgp/message/update/__init__.py
Python
apache-2.0
2,921
0.030127
from __future__ import absolute_import import json import logging from pip._vendor import six from pip._vendor.six.moves import zip_longest from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import Command from pip._internal.exceptions import CommandError from pip._internal.index import Pac...
Karosuo/Linux_tools
xls_handlers/xls_sum_venv/lib/python3.6/site-packages/pip/_internal/commands/list.py
Python
gpl-3.0
10,150
0
#!/usr/bin/python -OO # -*- coding: utf-8 -*- # vim: set et sts=4 sw=4 encoding=utf-8: # ############################################################################### # # This file is part of socketrpc. # # Copyright (C) 2011 Rene Jochum <rene@jrit.at> # ##############################################################...
pcdummy/socketrpc
examples/gevent_srpc.py
Python
bsd-3-clause
5,981
0.00535
from django.db import models class PlaceType(models.Model): name = models.CharField( max_length=100, unique=True, ) class Place(models.Model): type = models.ForeignField( PlaceType, related_name='places', ) name = models.CharField( max_length=100, ) ...
dogukantufekci/workplace_saas
workplace_saas/_apps/places/models.py
Python
mit
1,622
0.000617
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error, software_manager sm = software_manager.SoftwareManager() class sblim_sfcb(test.test): """ Autotest module for testing basic functionality of sblim_sfcb @author Wang Tao <wang...
rajashreer7/autotest-client-tests
linux-tools/sblim_sfcb/sblim_sfcb.py
Python
gpl-2.0
1,610
0.004969
#!/usr/bin/env python """ NAME irm_magic.py DESCRIPTION Creates MagIC file from an IRM excel file. If you have multiple Excel files you will have to run the program for each Excel file and combine each type of file (locations.txt, sites.txt, etc.) manually using "combine_magic.py" The program cre...
lfairchild/PmagPy
programs/conversion_scripts/irm_magic.py
Python
bsd-3-clause
3,055
0.008838
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models from odoo.exceptions import UserError class IrModel(models.Model): _inherit = 'ir.model' _order = 'is_mail_thread DESC, name ASC' is_mail_thread = fields.Boolean( ...
jeremiahyan/odoo
addons/mail/models/ir_model.py
Python
gpl-3.0
4,660
0.003219
# -*- coding: utf-8 -*- from __future__ import unicode_literals import warnings from django import forms from django.core.cache import cache from django.core.exceptions import ImproperlyConfigured from django.contrib import admin from django.contrib.sites.models import Site from django.utils.translation import ugette...
divio/django-shop
shop/admin/product.py
Python
bsd-3-clause
6,026
0.004315
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
rogerthat-platform/rogerthat-backend
src-test/rogerthat_tests/mobicage/capi/test_feature_version.py
Python
apache-2.0
1,999
0.001501
# # 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...
spektom/incubator-airflow
airflow/ti_deps/deps/exec_date_after_start_date_dep.py
Python
apache-2.0
1,807
0.001107
import logging from threading import RLock from struct import unpack class ReadBuffer(object): """This class receives incoming data, and stores it in a list of extents (also referred to as buffers). It allows us to leisurely pop off sequences of bytes, which we build from the unconsumed extents. As the...
dsoprea/protobufp
protobufp/read_buffer.py
Python
gpl-2.0
4,934
0.004459
# # 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 us...
rangadi/beam
sdks/python/apache_beam/runners/direct/direct_runner_test.py
Python
apache-2.0
4,539
0.003084
from typing import Dict class Parent: def overridable_method(self, param: str) -> Dict[str, str]: pass class Child(Parent): def overridable_method(self, param: str) -> Dict[str, str]:
smmribeiro/intellij-community
python/testData/completion/superMethodWithAnnotation.after.py
Python
apache-2.0
202
0.009901
"""Setup Script for DBUtils""" __version__ = '1.1' __revision__ = "$Rev: 8220 $" __date__ = "$Date: 2011-08-14 14:01:04 +0200 (So, 14. Aug 2011) $" from sys import version_info py_version = version_info[:2] if not (2, 3) <= py_version < (3, 0): raise ImportError('Python %d.%d is not supported by DBUtils.' % py_v...
ThinkmanWang/NotesServer
3rd-lib/DBUtils-1.1/setup.py
Python
apache-2.0
2,421
0.003717
""" """ import logging import unittest import bolt._btoptions as btoptions class TestOptions(unittest.TestCase): def setUp(self): # If we don't initialize it from an empty options list, it parses # the arguments to nosetests and the test fail. The actual code using # it doesn't need t...
abantos/bolt
test/test_btoptions.py
Python
mit
3,939
0.007616
# -*- coding: utf-8 -*- # # Copyright 2014-2015 BigML # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
brokendata/bigmler
bigmler/command.py
Python
apache-2.0
6,139
0
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 30, transform = "Quantization", sigma = 0.0, exog_count = 0, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_PolyTrend/cycle_30/ar_/test_artificial_1024_Quantization_PolyTrend_30__0.py
Python
bsd-3-clause
268
0.085821
""" WSGI config for monews project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "monews.settings") from django.core.wsg...
Osmose/monews
monews/wsgi.py
Python
mit
387
0.002584
import h5py from scipy.spatial import distance import scipy.misc import numpy as np from joblib import Parallel, delayed # installation by 'conda install joblib' #path = '/home/sungkyun/Dropbox/kakao coversong git/sim/data/training/CP_1000ms_training_s2113_d2113_170106223452.h5' path = '/home/sungkyun/Dropbox/kakao ...
thkim107/sim
KAKAO_DATA_PREPARE_eval_multithread.py
Python
mit
1,759
0.030131
# 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 ...
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/effective_network_security_group_list_result.py
Python
mit
1,400
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin.widgets import AdminFileWidget from django.forms import ( HiddenInput, FileInput, CheckboxSelectMultiple, Textarea, TextInput, PasswordInput ) from django.forms.widgets import CheckboxInput from .zui import ( get_zui...
yuanxu/django-scaffold
scaffold_toolkit/zui/forms.py
Python
gpl-2.0
5,477
0.000183
#!/usr/bin/env python def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tract_querier', parent_package, top_path) config.add_subpackage('tractography') config.add_subpackage('tract_math') config.add_subpackage('code_uti...
oesteban/tract_querier
tract_querier/setup.py
Python
bsd-3-clause
766
0.001305
# This file is part of the Minecraft Overviewer. # # Minecraft Overviewer 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...
maruohon/Minecraft-Overviewer
overviewer_core/files.py
Python
gpl-3.0
6,437
0.005127
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'combotest.ui' # # Created: Wed Feb 29 11:35:04 2012 # by: PyQt4 UI code generator 4.7.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Form(object): def setupUi(self, Form): ...
tbttfox/TwistyTools
ttUI/QtFiles/combo.py
Python
gpl-3.0
899
0.002225
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
petewarden/tensorflow
tensorflow/python/lib/core/bfloat16_test.py
Python
apache-2.0
17,940
0.005128
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class UserProfile(models.Model): user = models.OneToOneField(User, related_name='profile') display_name = models.CharField( max_length=200, verbo...
agfor/chipy.org
chipy_org/apps/profiles/models.py
Python
mit
772
0
"""Generated client library for fusiontables version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from samples.fusiontables_sample.fusiontables_v1 import fusiontables_v1_messages as messages class FusiontablesV1(base_api.BaseApiClient): """Generat...
endlessm/chromium-browser
third_party/catapult/third_party/gsutil/third_party/apitools/samples/fusiontables_sample/fusiontables_v1/fusiontables_v1_client.py
Python
bsd-3-clause
34,754
0.004892
## ## $Release: 1.1.1 $ ## $Copyright: copyright(c) 2007-2012 kuwata-lab.com all rights reserved. $ ## $License: MIT License $ ## ## Permission is hereby granted, free of charge, to any person obtaining ## a copy of this software and associated documentation files (the ## "Software"), to deal in the Software wit...
z411/weabot
tenjin.py
Python
agpl-3.0
81,524
0.006526
from django.conf import settings INTERCOM_APPID = getattr(settings, 'INTERCOM_APPID', None) INTERCOM_SECURE_KEY = getattr(settings, 'INTERCOM_SECURE_KEY', None) INTERCOM_ENABLE_INBOX = getattr(settings, 'INTERCOM_ENABLE_INBOX', True) INTERCOM_ENABLE_INBOX_COUNTER = getattr(settings, 'INTERCOM_ENABLE_INBOX_COUNTER', Tr...
kencochrane/django-intercom
django_intercom/settings.py
Python
bsd-3-clause
925
0.005405
# proxy module from kiva.pdfmetrics import *
enthought/etsproxy
enthought/kiva/pdfmetrics.py
Python
bsd-3-clause
45
0
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QFileDialog, QToolBar, QToolButton, QMenu, QAction, QLabel, QApplication from PyQt5.QtGui import QIcon from PyQt5.QtCore import Qt, QStandardPaths, QTimer import os class QtCommons: def nestWidget(parent, child): l = QVBoxLayout() l.setContentsMargi...
GuLinux/PySpectrum
qtcommons.py
Python
gpl-3.0
3,204
0.009363
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
Astutech/Pushwoosh-Python-library
setup.py
Python
mit
2,681
0
from toee import * def OnBeginSpellCast( spell ): print "Frog Tongue OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level def OnSpellEffect( spell ): print "Frog Tongue OnSpellEffect" # it takes 1 round to pull the target to t...
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/scr/Spell600 - Frog Tongue.py
Python
mit
1,771
0.040655
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 30, transform = "Fisher", sigma = 0.0, exog_count = 20, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Fisher/trend_ConstantTrend/cycle_30/ar_12/test_artificial_128_Fisher_ConstantTrend_30_12_20.py
Python
bsd-3-clause
267
0.086142
from django.test.utils import override_settings from hc.api.models import Channel from hc.test import BaseTestCase class AddMsTeamsTestCase(BaseTestCase): def setUp(self): super().setUp() self.url = "/projects/%s/add_msteams/" % self.project.code def test_instructions_work(self): self...
healthchecks/healthchecks
hc/front/tests/test_add_msteams.py
Python
bsd-3-clause
1,478
0
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
jvdm/AutobahnPython
examples/asyncio/wamp/session/series/backend.py
Python
mit
1,661
0
from django.conf.urls import url app_name = "notification" urlpatterns = []
savoirfairelinux/sous-chef
src/notification/urls.py
Python
agpl-3.0
77
0
"""Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to both as 'h'. """ from webhelpers import * from webhelpers.html import tags from routes import url_for from pylons import request def javascript_link( *urls, **attrs ): retu...
DIRACGrid/DIRACWeb
dirac/lib/helpers.py
Python
gpl-3.0
1,413
0.035386
""" WSGI config for voodoo project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
Smiter/voodoo
voodoo/wsgi.py
Python
gpl-2.0
1,522
0.000657
from PartyProblemSimulator.BooleanEquation.Equation import Equation from threading import Thread class Experiment(Thread): """ An experiment to be run on the Party Problem Simulator. """ def run(self): """ Should be implemented to execute the experiment and save results. """ results = self._do...
Sciprios/EvolutionaryPartyProblemSimulator
PartyProblemSimulator/Experiments/Experiment.py
Python
mit
3,577
0.00615
from collections import namedtuple, Counter from datetime import timedelta from analysis import sentiment from analysis import qa_analysis ChatData = namedtuple('ChatData', ['interval', 'avg_chats', 'sentiments', 'qa_ratio']) c...
indiofish/lov-o-meter
src/analysis/analyser.py
Python
gpl-3.0
2,602
0
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi from pyramid.view import view_config from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS from pontus.view import BasicView from lac.content.processes....
ecreall/lagendacommun
lac/views/user_management/deactivate.py
Python
agpl-3.0
857
0.003501
# -*- coding: utf-8 -*- # Copyright(C) 2011 Laurent Bachelier # # This file is part of weboob. # # weboob 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 # (at your ...
blckshrk/Weboob
weboob/tools/capabilities/paste.py
Python
agpl-3.0
2,825
0.004248
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
StackStorm/st2
contrib/examples/actions/pythonactions/yaml_string_to_object.py
Python
apache-2.0
795
0
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
alfasin/st2
st2common/tests/unit/test_rbac_resolvers.py
Python
apache-2.0
7,834
0.002553
import sure import tempfile from contents import contents def test_file_with_long_levels(): content = '''/** * Project X * Author: Jean Pimentel * Date: August, 2013 */ /* > Intro */ Toc toc! Penny! Toc toc! Penny! Toc toc! Penny! /* >> The Big Bang Theory << */ The Big Bang Theory is an American sitcom cr...
jeanpimentel/contents
tests/functional/test_file_with_long_levels.py
Python
gpl-3.0
3,294
0.003947
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
mindriot101/bokeh
bokeh/io/tests/test_showing.py
Python
bsd-3-clause
7,140
0.004762