code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
from django.db.models.lookups import ( Exact, GreaterThan, GreaterThanOrEqual, In, IsNull, LessThan, LessThanOrEqual, ) class MultiColSource: contains_aggregate = False def __init__(self, alias, targets, sources, field): self.targets, self.sources, self.field, self.alias = targets, sources, f...
alexallah/django
django/db/models/fields/related_lookups.py
Python
bsd-3-clause
6,846
# 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...
kobejean/tensorflow
tensorflow/contrib/data/python/kernel_tests/range_dataset_op_test.py
Python
apache-2.0
3,072
class B: def __init__(self, auno=True): pass class C(B): def __init__(self, **kwargs): pass c = C(au<caret>)
akosyakov/intellij-community
python/testData/completion/superInitKwParams.py
Python
apache-2.0
119
from django.core.management import call_command from nose.tools import eq_ from mkt.feed.models import FeedApp, FeedCollection from mkt.site.tests import app_factory, TestCase class TestMigrateCollectionColor(TestCase): def setUp(self): self.color_hex = '#CE001C' self.color_name = 'ruby' d...
ingenioustechie/zamboni
mkt/feed/tests/test_commands.py
Python
bsd-3-clause
1,374
class Class(object): pass def func(): return 3.14 CONSTANT = 42
retoo/pystructure
tests/python/typeinference/import_star_definitions.py
Python
lgpl-2.1
74
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
Athrun29/horizon
openstack_dashboard/dashboards/admin/images/views.py
Python
apache-2.0
5,320
from typing import Any, Dict from ..utils.projector import register_projector_element # Important: All functions have to be prune. This means, that thay can only # access the data, that they get as argument and do not have any # side effects. They are called from an async context. So they have ...
boehlke/OpenSlides
openslides/users/projector.py
Python
mit
611
# -*- coding: utf-8 -*- # Copyright 2014 Foxdog Studios # # 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...
foxdog-studios/pyddp
ddp/messages/server/result_message.py
Python
apache-2.0
3,305
# -*- mode: python; fill-column: 100; comment-column: 100; -*- import unittest import sys import os sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) import base_test class RefreshPageTest(base_test.WebDriverBaseTest): # Get a static page that must be the same upon ...
chunywang/crosswalk-test-suite
misc/webdriver-w3c-tests/navigation/refresh-page.py
Python
bsd-3-clause
1,126
""" Table for storing information about whether or not Studio users have course creation privileges. """ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.db import models from django.db.models.signals import post_init, post_save from django.dispatch import Sig...
edx/edx-platform
cms/djangoapps/course_creators/models.py
Python
agpl-3.0
5,188
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'web.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^', include('ufakisler.urls', namespace=...
bgunebakan/ufakisler.net
web/web/urls.py
Python
gpl-2.0
487
#!/usr/bin/python ''' print generic info about device ''' from onepk_helper import NetworkDevice import yaml import sys def main(args): ''' main ''' rtrs = yaml.load(file(args[0]).read()) for rtr in rtrs: ndev = NetworkDevice(**rtr) ndev.connect() print "Connection established to...
sfromm/pyn
6-1.py
Python
mit
680
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201211/custom_field_service/get_all_line_item_custom_fields.py
Python
apache-2.0
2,149
#!/usr/bin/env python """Builds a python package sdist release for upload to pypi. Usage: python tools/release.py """ import subprocess as sp import os import tempfile import shutil def run(cmd, capture=False, **kwargs): print(" ".join(cmd)) if capture: proc = sp.Popen(cmd, stdout=sp.PIPE, **kw...
ellisonbg/nbgrader
tools/release.py
Python
bsd-3-clause
1,690
# Copyright 2018 Google 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 to in writing, s...
jonparrott/google-cloud-python
firestore/synth.py
Python
apache-2.0
1,615
## # Copyright (C) 2014 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen 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 #...
Inboxen/Inboxen
inboxen/blog/urls.py
Python
agpl-3.0
1,251
""" Support for loading data into an HP Vertica database. """ import json import logging import luigi import luigi.configuration from edx.analytics.tasks.url import ExternalURL from edx.analytics.tasks.util.overwrite import OverwriteOutputMixin from edx.analytics.tasks.util.vertica_target import VerticaTarget log = ...
open-craft/edx-analytics-pipeline
edx/analytics/tasks/vertica_load.py
Python
agpl-3.0
15,908
from __future__ import absolute_import from djaxelrod.celery import app as celery_app
Axelrod-Python/DjAxelrod
djaxelrod/__init__.py
Python
mit
86
# coding=utf-8 # Copyright 2022 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
Python
apache-2.0
15,682
# -*- coding: utf-8 -*- from uuid import uuid4 from time import sleep import json import os from pyoko.conf import settings from pyoko.manage import FlushDB, LoadData from pyoko.lib.utils import pprnt from pprint import pprint from zengine.lib.cache import ClearCache from zengine.lib.exceptions import HTTPError from...
zetaops/zengine
zengine/lib/test_utils.py
Python
gpl-3.0
8,364
#!python # -*- coding: utf-8 -*- # # Copyright (C) 2009 John Hampton <pacopablo@pacopablo.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # Author: John Hampton <pacopablo@pacopablo.com> import os import loggin...
pacopablo/elderberrypy
elderberrypy/process.py
Python
bsd-2-clause
1,810
import json import time import datetime import os import uuid import re import campaign.utils as utils from . import StorageBase, StorageException, Base from campaign.logger import LOG from campaign.views import api_version from sqlalchemy import (Column, Integer, String, Text, text) from sqlalc...
jrconlin/campaign_manager
campaign/storage/sql.py
Python
mpl-2.0
16,721
from setuptools import setup, find_packages install_requirements = ['pytz', 'tzlocal'] version = '2.2.0' try: import importlib except ImportError: install_requirements.append('importlib') setup( name='tasklib', version=version, description='Python Task Warrior library', long_description=open...
tbabej/tasklib
setup.py
Python
bsd-3-clause
1,203
#!/usr/bin/env python # -*- coding: utf-8 -*- # Answered by Billy Wilson Arante # Last updated on 2016/12/03 EST # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-clas...
arantebillywilson/python-snippets
py2/google-python-exercises/copyspecial/copyspecial.py
Python
mit
2,566
from v3 import * def test1(): X = [random_vector(100,0,1) for i in range(100)] X = list(map(rsm.sparsify,X)) nn = rsm(50,7,13) s=nn.score(X[0]) print(sum(s.values())) for i in range(2): for x in X: nn.learn(x,1) s=nn.score(X[0]) print(sum(s.values())) from pprint import pprint pprint(nn.stats()) pprint...
mobarski/sandbox
rsm/v9le/test_v3.py
Python
mit
1,482
# -*- coding: utf-8 -*- """ Created on Fri Jun 12 13:40:24 2015 @author: Paco """ from api import API class Eventful(API): _class_name = 'Eventful' _category = 'Event' _help_url = 'http://api.eventful.com/docs/' _api_url = 'http://api.eventful.com/json/' def __init__(self,apikey): self....
franblas/pyAPI
src/pyapi/eventful.py
Python
mit
4,417
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 jmesteve All Rights Reserved # https://github.com/jmesteve # <jmesteve@me.com> # # This program is...
syci/ingadhoc-odoo-addons
warning_box/__openerp__.py
Python
agpl-3.0
1,526
# 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 Lndir(AutotoolsPackage, XorgPackage): """lndir - create a shadow directory of symbolic lin...
iulian787/spack
var/spack/repos/builtin/packages/lndir/package.py
Python
lgpl-2.1
655
# Copyright (c) 2018 PaddlePaddle 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 applic...
kuke/models
fluid/PaddleCV/HiNAS_models/build/resnet_base.py
Python
apache-2.0
3,232
# -*- coding: utf-8 -*- """File parsing functions """ import numpy as np import csv import ast import json def read_tab_raw(fname): """Read .tab file from expyfun output without segmenting into trials. Parameters ---------- fname : str Input filename. Returns ------- data : list...
rkmaddox/expyfun
expyfun/io/_parse.py
Python
bsd-3-clause
8,093
from binary.continuous.continuous_binary import CNF_Net CNF_Net.backward()
Fuchai/Philosophy-Machine
binary/continuous/debugger.py
Python
apache-2.0
75
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. ...
citrix-openstack-build/heat
heat/common/exception.py
Python
apache-2.0
9,969
from copy import deepcopy import time from libAnt.message import BroadcastMessage class ProfileMessage: def __init__(self, msg, previous): self.previous = previous self.msg = deepcopy(msg) self.count = previous.count + 1 if previous is not None else 1 self.timestamp = time.time()...
half2me/libant
libAnt/profiles/profile.py
Python
mit
627
# -*-coding:Utf-8 -* # Copyright (c) 2013 LE GOFF Vincent # 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 # lis...
stormi/tsunami
src/secondaires/navigation/equipage/volontes/relacher_rames.py
Python
bsd-3-clause
3,392
"""Python API for the lab streaming layer. The lab streaming layer provides a set of functions to make instrument data accessible in real time within a lab network. From there, streams can be picked up by recording programs, viewing programs or custom experiment applications that access data streams in real time. The...
jditz/mugs
calibration/pylsl/pylsl.py
Python
gpl-3.0
51,539
class TestMiddleware(): def __init__(self, request): print "TestMiddleware loaded" def request_hook(self): print "TestMiddleware.request_hook called" def response_hook(self): print "TestMiddleware.response_hook called" def view_hook(self, view): print "TestMiddleware....
trendrr/whirlwind
whirlwind/middleware/test.py
Python
mit
338
# Copyright (c) 2018 Arista Networks, Inc. # Use of this source code is governed by the Apache License 2.0 # that can be found in the LICENSE file. from __future__ import absolute_import, division, print_function SWI_SIG_FILE_NAME = 'swi-signature' SWIX_SIG_FILE_NAME = 'swix-signature' def getSigFileName( swiFile ):...
aristanetworks/swi-tools
switools/signaturelib.py
Python
apache-2.0
426
import datetime import random import csv import json import StringIO from app import ton from chart import Chart from timeframe import Timeframe from frequency import Frequency from tweets import Tweets # TODO: Fix * imports from django.shortcuts import * from django.contrib.auth.decorators import login_required, us...
twitterdev/data-ads-sample
home/views.py
Python
mit
5,930
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from astropy import units as u from astropy.utils.decorators import format_doc from astropy.coordinates.baseframe import frame_transform_graph, base_doc from astropy.coordinates.attributes import TimeAttribute f...
pllim/astropy
astropy/coordinates/builtin_frames/fk4.py
Python
bsd-3-clause
7,249
# 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 ...
v-iam/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/stateful_service_info.py
Python
mit
2,711
## This file is part of Rabbit Hole. ## Rabbit Hole 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. ## Rabbit ...
EduardoLeggiero/rabbithole
SearchPanel.py
Python
gpl-2.0
2,225
### # Copyright (c) 2005, Jeremiah Fincher # 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 of conditi...
octete/octete-supybot-plugins
MyChannelLogger/test.py
Python
bsd-3-clause
1,757
# coding=utf-8 # Copyright 2022 The Meta-Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
google-research/meta-dataset
meta_dataset/data/tfds/example_generators.py
Python
apache-2.0
16,724
#!/usr/bin/env python import sys import os import argparse import requests sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import messagebird parser = argparse.ArgumentParser() parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True) args = vars(parser.parse_...
messagebird/python-rest-api
examples/number_available_list.py
Python
bsd-2-clause
2,266
''' All modules to test the input listeners in game utility. '''
michaelbradley91/GameUtility
GameUtility/mjb/test/game_utility/input_listeners/__init__.py
Python
mit
64
__author__ = 'dhkarimi' import cPickle from datetime import datetime from pprint import pprint import json testdict = { 'd': datetime.now(), 'f': 1.2, 'i': 1, 's': "ads"} def test_pickle(): global testdict pstring = cPickle.dumps(testdict) pdict = cPickle.loads(pstring) print("Pic...
AlwaysTraining/bbot
bin/prototypes/serializetest.py
Python
mit
1,452
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-05-11 18:30 from __future__ import unicode_literals from django.db import migrations from temba.utils import chunk_list def populate_attachments(Msg): msg_ids = list(Msg.objects.exclude(media=None).values_list('id', flat=True)) if not msg_ids: ...
onaio/rapidpro
temba/msgs/migrations/0096_populate_attachments.py
Python
agpl-3.0
1,146
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser 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 So...
The-Compiler/qutebrowser
scripts/utils.py
Python
gpl-3.0
2,776
# -*- 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): # Deleting field 'Response.missing' db.delete_column('responses', 'missing') # Adding field 'TextRe...
shh-dlce/pulotu
website/apps/survey/migrations/0053_auto__del_field_response_missing__add_field_textresponse_missing.py
Python
apache-2.0
14,377
""" Django settings for popsicle project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import o...
ECastleton/Popstop
popsicle/popsicle/settings.py
Python
gpl-3.0
3,280
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blogapp', '0004_auto_20151118_1518'), ] operations = [ migrations.CreateModel( name='Sponsors', fiel...
jgsjv/treinamento_django
blog/blogapp/migrations/0005_sponsors.py
Python
mit
802
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation. # All rights reserved. """Tokenization help for Python programs. generate_tokens(readline) is a generator that breaks a stream of text into Python tokens. It accepts a readline-like method which is called repeatedly to get the next line o...
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/lib2to3/pgen2/tokenize.py
Python
apache-2.0
21,048
from base import DataSourceCollection, DataSourceBase # we have to import these modules for them to register as valid data sources import cfn_datasource import yaml_datasource import file_datasource __all__ = ['DataSourceBase', 'DataSourceCollection']
EverythingMe/rainbow
rainbow/datasources/__init__.py
Python
bsd-2-clause
253
from django.conf.urls import patterns, include, url urlpatterns = patterns('', # Examples: # url(r'^$', 'PhotoPortfolio.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^[/]{0,1}$', 'photos.views.browse'), url(r'^/gallery/([\w]*)', 'photos.views.gallery'), )
tsitra/PhotoPortfolio
photos/urls.py
Python
mit
304
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2017 Andrew Ziem # https://www.bleachbit.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 License, or # ...
brahmastra2016/bleachbit
bleachbit/GuiBasic.py
Python
gpl-3.0
6,459
"""HTTP views to interact with the entity registry.""" import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.components.websocket_api.const import ERR_NOT_FOUND from homeassistant.components.websocket_api.decorators import ( async_response, require_admin, ) from homeass...
tchellomello/home-assistant
homeassistant/components/config/entity_registry.py
Python
apache-2.0
5,192
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( st...
realzzt/BitCoin2013
qa/rpc-tests/wallet-hd.py
Python
mit
3,292
""" Settings for notifications: if a new game is hosted. """ from PyQt5 import QtCore import config import notifications as ns import util from config import Settings from notifications.ns_hook import NsHook class NsHookNewGame(NsHook): def __init__(self): NsHook.__init__(self, ns.Notifications.NEW_GAME)...
FAForever/client
src/notifications/hook_newgame.py
Python
gpl-3.0
1,713
import argparse import Video def run(path,keep,write,view,vidpath=""): #create instance video_instance=Video.Video(path=path,vidpath=vidpath,keep=keep,write=write,view=view) #send to google for labels video_instance.label() #download file to play locally video_instance.download() ...
bw4sz/GoogleVideo
PreviousVersion/main.py
Python
apache-2.0
1,211
from StringIO import StringIO from datetime import datetime as dt, timedelta as dtd from dateutil.rrule import rrule, DAILY from pandas import DataFrame, Series, DatetimeIndex, MultiIndex, read_csv, Panel, date_range, concat from pandas.util.testing import assert_frame_equal, assert_series_equal import numpy as np impo...
einarhuseby/arctic
tests/integration/store/test_pandas_store.py
Python
lgpl-2.1
67,391
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Da...
Tong-Chen/scikit-learn
sklearn/tree/tree.py
Python
bsd-3-clause
29,287
#!/usr/bin/python import sys from Options import Options from JiraProcessor import JiraProcessor def main(argv): opts = Options('agileProgress.ini', argv) processor = JiraProcessor(opts) processor.processCompleted() if __name__ == "__main__": main(sys.argv[1:])
ksagon/productivity
agileProgress.py
Python
apache-2.0
287
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Android-specific implementation of the core backend interfaces. See core/backends.py for more docs. """ import datetime import glob import hashlib impor...
TeamEOS/external_chromium_org
tools/memory_inspector/memory_inspector/backends/android/android_backend.py
Python
bsd-3-clause
15,383
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Contacts', 'category': 'Sales/CRM', 'sequence': 150, 'summary': 'Centralize your address book', 'description': """ This module gives you a quick view of your contacts directory, accessible...
jeremiahyan/odoo
addons/contacts/__manifest__.py
Python
gpl-3.0
546
#!/usr/bin/env python # -*- coding: utf-8 -*- # http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
pygloo/emencia-django-layout-designer
emencia/django/layout/designer/__init__.py
Python
mit
287
# -*- coding: utf-8 -*- # # Savu documentation build configuration file, created by # sphinx-quickstart on Tue Sep 16 10:25:51 2014. # # 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 co...
rcatwood/Savu
doc/source/conf.py
Python
gpl-3.0
9,449
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # <yamahata at valinux co jp> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with...
savi-dev/quantum
quantum/plugins/ryu/nova/linux_net.py
Python
apache-2.0
2,805
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # 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 file. # # All configurati...
rupak0577/ginga
doc/conf.py
Python
bsd-3-clause
6,363
import wx import wx.lib.masked.numctrl from vistas.core.timeline import Timeline from vistas.ui.controls.float_ctrl import FloatCtrl, EVT_FLOAT class ExportOptionsDialog(wx.Dialog): """ A Dialog for configuring parameters for an export encoder. """ VIDEO = 0 IMAGE = 1 def __init__(self, parent, id,...
VISTAS-IVES/pyvistas
source/vistas/ui/windows/export_options_dialog.py
Python
bsd-3-clause
3,508
from django import template from ..models import Media register = template.Library() @register.inclusion_tag('tmdb_tags/_recent_media.html') def tmdb_recent_media(): recent_media = Media.objects.recently_rated(max_media=5) return {'recent_media': recent_media}
rbeagrie/django-tmdb
lib/django_tmdb/templatetags/tmdb_tags.py
Python
mit
289
""" Copyright 2015 Ricky LeDew This file is part of Death 87. Death 87 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 versi...
meltedchocolate/Death87
Groups.py
Python
gpl-3.0
1,110
#! /usr/bin/env python3 def zeropad_right(base, digits, index): pass def digits_of_index(index): pass if __name__ == '__main__': sys.exit(f"This file [{__file__}] is meant to be imported, " "not executed directly.") ## #
zerosyntax/zerotools
timetree/timetree/__init__.py
Python
mit
253
# -*- coding: utf-8 -*- from flask import Blueprint, render_template, session, url_for, flash, request, jsonify from werkzeug.utils import redirect from fpage.utils import login_required import fpage.user.models import fpage.comment.models import fpage.submission.models blueprint = Blueprint("admin", __name__, url_p...
Nikola-K/fpage
fpage/admin/views.py
Python
apache-2.0
2,128
#!/usr/bin/env python """ Sandbox management script """ import os from django.core import management if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.demo") management.execute_from_command_line()
sveetch/django-icomoon
sandbox/manage.py
Python
mit
243
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the history manager. """ from __future__ import unicode_literals import os from PyQt5.QtCore import pyqtSignal, pyqtSlot, QFileInfo, QDateTime, QDate, \ QTime, QUrl, QTimer, QFile, QIODevic...
davy39/eric
Helpviewer/History/HistoryManager.py
Python
gpl-3.0
17,735
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Auth class Copyright (c) 2014, OneLogin, Inc. All rights reserved. Main class of OneLogin's Python Toolkit. Initializes the SP SAML instance """ from base64 import b64encode from urllib import quote_plus import dm.xmlsec.binding as xmlsec from onelogin.saml2.settings i...
sandeep048/python-saml
src/onelogin/saml2/auth.py
Python
bsd-3-clause
16,929
# -*- coding: utf-8 -*- # Copyright (C) 2010 Eduardo Robles Elvira <edulix AT gmail DOT 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 Free Software Foundation, either version 3 of the License, or # (at yo...
wadobo/timebank
user/forms.py
Python
agpl-3.0
5,777
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-10 10:32 from __future__ import unicode_literals import _socket from django.db import migrations, models import edc_base.model_fields.userfield class Migration(migrations.Migration): dependencies = [ ('edc_metadata', '0006_auto_20170209_0924'...
botswana-harvard/edc-entry
edc_metadata/migrations/0007_auto_20170810_1032.py
Python
gpl-2.0
2,713
#!/usr/bin/env python3 # Forked from https://gist.github.com/zPrototype/b211ae91e2b082420c350c28b6674170 import re import argparse parser = argparse.ArgumentParser() parser.add_argument("--target", "-t", action="store", help="Enter the target address", required=True) parser.add_argument("--dest", "-d", action="store"...
bl4de/security-tools
redir_gen/redirgen.py
Python
mit
1,060
#!/usr/bin/env python3 # # Copyright 2017 WebAssembly Community Group participants # # 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...
WebAssembly/binaryen
scripts/test/generate_lld_tests.py
Python
apache-2.0
3,651
# tableizer-query.py # Copyright (C) 2009-2013 PalominoDB, Inc. # # You may contact the maintainers at eng@palominodb.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 2 of...
palominodb/tableizer
tableizer/ttt/management/commands/tableizer-query.py
Python
gpl-2.0
7,571
# -*- coding: utf-8 -*- """ werkzeug.contrib.lint ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module provides a middleware that performs sanity checks of the WSGI application. It checks that :pep:`333` is properly implemented and warns on some common HTTP errors such as non-empty respons...
sauloal/PiCastPy
werkzeug/contrib/lint.py
Python
mit
12,238
#!/usr/bin/env python """ Description Define simple difference operator and convolve simple input with it.""" from vsip import vector from vsip.signal import * from vsip.signal.conv import convolution from matplotlib.pyplot import * import numpy # define differentiation operator K = vector(numpy.array([-1., 0....
maxywb/vsipl
sourceryvsipl++-x86-3.1/src/vsipl++/examples/python/conv.py
Python
gpl-2.0
794
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
ubuntu-core/snapcraft
tests/unit/sources/test_bazaar.py
Python
gpl-3.0
7,406
# # 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 # ...
dragorosson/heat
heat/engine/event.py
Python
apache-2.0
4,537
#!/usr/bin/python3 import os import subprocess import sys env1 = dict( SMS_MESSAGES="1", DECODED_PARTS="0", SMS_1_NUMBER="0124", SMS_1_CLASS="-1", SMS_1_TEXT="ghgg", ) env2 = dict( SMS_2_CLASS="-1", SMS_MESSAGES="3", DECODED_PARTS="1", SMS_3_NUMBER="0124", SMS_3_TEXT="ernvgigf...
Turgon37/SMSShell
tests/parser.py
Python
gpl-3.0
1,418
__all__ = ["Util", 'etsi']
superfluidity/RDCL3D
code/lib/__init__.py
Python
apache-2.0
27
#!/usr/bin/python # # Copyright (c) 2017 Sertac Ozercan, <seozerca@microsoft.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
bregman-arie/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py
Python
gpl-3.0
7,164
__author__ = 'Icarus' # Solves in the form ax = b (mod mod) def solve_linear_congruence(a, b, mod): gcd, x, y = extended_euclidean(a, mod) if gcd == 1: return x*b % mod elif b % gcd == 0: newa = a / gcd newb = b / gcd newmod = mod / gcd ans = solve_linear_congruence...
timaeudg/CSSE479-Cryptography
RSAHomework.py
Python
gpl-2.0
2,554
import sys import django from django.conf import settings from django.test.runner import DiscoverRunner settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS=('tests',) ) django.setup() test_runn...
mixxorz/django-service-objects
runtests.py
Python
mit
427
from os import chdir from grslra.visualization import phaseplot import numpy as np from scipy.io import loadmat # This function can be used to visualize the phaseplot experiments of the MATLAB algorithms algoname = 'rmc' folder='phasetransitions/' + algoname algoname = 'rmc_fast' resultfile= 'result_' + algoname ch...
clemenshage/grslra
experiments/4_grpca/phaseplot_from_mat.py
Python
mit
561
# -*- coding: utf-8 -*- import openerp from openerp.addons.web import http from openerp.addons.web.http import request from datetime import datetime class google_map(http.Controller): @http.route(['/google_map'], type='http', auth="public", website=True) def google_map(self, *arg, **post): values = {...
poiesisconsulting/openerp-restaurant
website_google_map/controllers/main.py
Python
agpl-3.0
2,060
#!/usr/bin/env python # Copyright (C) 2007--2016 the X-ray Polarimetry Explorer (XPE) team. # # For the license terms see the file LICENSE, distributed along with this # software. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published...
lucabaldini/pyxpe
pyxpe/recon/clustering.py
Python
gpl-3.0
10,575
#!/usr/local/bin/python3 from bs4 import BeautifulSoup from random import randint from time import sleep from datetime import datetime import re import requests import xlsxwriter # Yelp Scraper v0.0.1 # DESCRIPTION: This program allows to browse Yelp France results to extract # (scrap) desired informations. # AUTHOR:...
ddahan/yelp-scraper
scrapper.py
Python
mit
8,743
from mudpyl.library.colourtells import TellColourer from mudpyl.metaline import RunLengthList, Metaline, simpleml from mudpyl.net.telnet import TelnetClientFactory, TelnetClient from mudpyl.colours import WHITE, BLACK, fg_code, bg_code from mock import Mock class Test_TellColourer: def setUp(self): self.f...
Nik0las1984/mudpyl
mudpyl/library/tests/test_colourtells.py
Python
gpl-2.0
2,485
class Solution: # @param {string} beginWord # @param {string} endWord # @param {set<string>} wordDict # @return {integer} def ladderLength(self, beginWord, endWord, wordDict): front, back=set([beginWord]), set([endWord]) length=2 width=len(beginWord) charSet='abcdefg...
dramaticlly/Python4Interview
wordladder.py
Python
mit
1,185
import os import re import gzip import shutil import gzip import subprocess import nibabel as nib import ntpath import pandas as pd import numpy as np import tempfile import nibabel as nib from nipype.interfaces.base import (TraitedSpec, File, traits, InputMultiPath, CommandLine, CommandLineInputSpec, BaseInt...
APPIAN-PET/APPIAN
src/utils.py
Python
mit
8,440
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import unicode_literals import logging from django.contrib import admin from models import * # Get an instance of a logger logger = logging.getLogger(__name__) class AccessAdmin(admin.ModelAdmin): list_display = ('id', 'created', 'updated', ...
rangertaha/salt-manager
salt-manager/webapp/apps/fabric/fabhistory/admin.py
Python
mit
1,074
#* dslib - Python library for Datove schranky #* Copyright (C) 2009-2012 CZ.NIC, z.s.p.o. (http://www.nic.cz) #* #* This library is free software; you can redistribute it and/or #* modify it under the terms of the GNU Library General Public #* License as published by the Free Software Foundation; eithe...
yarda/dslib
pkcs7/asn1_models/X509_certificate.py
Python
lgpl-2.1
3,946
import numpy as np from ._layout import Layout from ._multivector import MultiVector class ConformalLayout(Layout): r""" A layout for a conformal algebra, which adds extra constants and helpers. Typically these should be constructed via :func:`clifford.conformalize`. .. versionadded:: 1.2.0 At...
arsenovic/clifford
clifford/_conformal_layout.py
Python
bsd-3-clause
2,999