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
#!/usr/bin/env python """Simple PNG Canvas for Python""" __version__ = "0.8" __author__ = "Rui Carmo (http://the.taoofmac.com)" __copyright__ = "CC Attribution-NonCommercial-NoDerivs 2.0 Rui Carmo" __contributors__ = ["http://collaboa.weed.rbse.com/repository/file/branches/pgsql/lib/spark_pr.rb"], ["Eli Bendersk...
ybak/myblog
app/pngcanvas.py
Python
mit
9,000
0.037889
#!/usr/bin/env python from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import import os import subprocess import sys import os.path as p import glob PY_MAJOR, PY_MINOR = sys.version_info[ 0 : 2 ] if not ( ( PY_MAJOR == 2 and...
sunchuanleihit/vimrc
sources_non_forked/YouCompleteMe/install.py
Python
mit
1,500
0.040667
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( float_or_none, int_or_none, unified_timestamp, url_or_none, ) class DctpTvIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dctp\.tv/(?:#/)?filme/(?P<id>[^/?#&]+)' ...
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/dctp.py
Python
gpl-3.0
3,148
0.02987
"""Config flow for Network UPS Tools (NUT) integration.""" import logging import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import ( CONF_ALIAS, CONF_BASE, CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_RESOURCES, CONF_SCAN_INTERVAL, ...
aronsky/home-assistant
homeassistant/components/nut/config_flow.py
Python
apache-2.0
7,989
0.000876
""" Tests of role and membership calculations. """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from django.test import TestCase from ..constants import role_kinds from ..models import Classroom from ..models import Facility from ..models import ...
lyw07/kolibri
kolibri/core/auth/test/test_roles_and_membership.py
Python
mit
10,992
0.001638
#!/usr/bin/env python import socket # Set admin server settings UDP_IP = '' # Leave empty for Broadcast support ADMIN_PORT = 48899 # Local settings of your Raspberry Pi, used for app discovery INT_IP = '10.0.1.61' INT_MAC = '111a02bf232b' # Code Starts Here # # Create UDP socket, bind to it adminsock = socket.sock...
ep1cman/RFLED-Server
source/admin.py
Python
gpl-3.0
1,061
0.01131
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20150428_2142'), ] operations = [ migrations.AddField( model_name='parentrelation', ...
oskarm91/sis
apps/users/migrations/0005_parentrelation_signature.py
Python
bsd-3-clause
488
0.002049
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
xrg/openerp-server
bin/addons/base/res/res_config.py
Python
agpl-3.0
18,280
0.002899
import os import tempfile from datetime import datetime from listenbrainz_spark.tests import SparkTestCase from listenbrainz_spark import utils, path, config from pyspark.sql import Row class UtilsTestCase(SparkTestCase): # use path_ as prefix for all paths in this class. path_ = "/test" temp_path_ = "/...
Freso/listenbrainz-server
listenbrainz_spark/utils/tests/test_init.py
Python
gpl-2.0
5,143
0.001556
# Created By: Virgil Dupras # Created On: 2009-09-19 # Copyright 2010 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licens...
hsoft/musicguru
qt/fs_model.py
Python
bsd-3-clause
7,759
0.006702
#!/Users/tiradoe/Projects/Giflocker/bin/python3 # # The Python Imaging Library. # $Id$ # # a utility to identify image files # # this script identifies image files, extracting size and # pixel mode information for known file formats. Note that # you don't need the PIL C extension to use this module. # # History: # 0.0...
tiradoe/Giflocker
bin/pilfile.py
Python
lgpl-3.0
2,695
0.001113
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
larsbutler/swift
test/unit/account/test_server.py
Python
apache-2.0
99,400
0.00001
"""Проверки модуля system_wrappers.""" from logging import INFO from unittest import TestCase from unittest.mock import Mock, call, patch from codestyle import system_wrappers from codestyle.system_wrappers import ( ExitCodes, check_output, interrupt_program_flow, ) class Test(TestCase): """Проверка ...
webpp-studio/codestyle
tests/test_system_wrappers.py
Python
gpl-3.0
4,814
0
from pathlib import Path import logging logger = logging.getLogger('ipyvolume') HERE = Path(__file__).parent _figures = [] _watching = set() def _update_shaders(path=None, file_changed=None): names = ['volr-fragment', 'volr-vertex', 'mesh-vertex', 'mesh-fragment', 'scatter-vertex', 'scatter-fragment', 'shadow-v...
maartenbreddels/ipyvolume
ipyvolume/hotreload.py
Python
mit
1,466
0.000682
# project.py import signac def classify(job): yield 'init' if 'V' in job.document: yield 'volume-computed' def next_operation(job): if 'volume-computed' not in classify(job): return 'compute_volume' if __name__ == '__main__': project = signac.get_project() print(project) for ...
csadorf/signac
examples/ideal_gas_project/project.py
Python
bsd-3-clause
472
0.006356
# Copyright 2017 The 'Scalable Private Learning with PATE' 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 # # ...
tensorflow/privacy
research/pate_2018/ICLR2018/rdp_cumulative.py
Python
apache-2.0
12,995
0.011081
import copy from django import forms from django.db import models from django.core.exceptions import ValidationError, ImproperlyConfigured from django.db.models.fields.subclassing import Creator from djangae.forms.fields import ListFormField from django.utils.text import capfirst class _FakeModel(object): """ ...
nealedj/djangae
djangae/fields/iterable.py
Python
bsd-3-clause
10,309
0.003104
#!/usr/bin/python2.4 # # Copyright 2010 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...
wonderful4228/qualitybots
src/appengine/handlers/base.py
Python
apache-2.0
5,928
0.003036
# Generated by Django 2.2.11 on 2020-03-12 11:17 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("documents", "0003_auto_20200122_1624"), ] operations = [ migrations.RemoveField( model_name="document", name="flattr_disabl...
studentenportal/web
apps/documents/migrations/0004_remove_document_flattr_disabled.py
Python
agpl-3.0
342
0
from flask import Response from flask.views import View from urllib2 import urlopen from gpv import utils class ProcurementType(View): def dispatch_request(self, komuna=None, year=None, company_slug=None): api_base_url = utils.get_api_url() url = "%s/procurement-type" % api_base_url resu...
opendatakosovo/municipality-procurement-visualizer
gpv/views/json/procurementtype.py
Python
gpl-2.0
764
0.005236
# -*- coding: utf-8 -*- # # DiracDocs documentation build configuration file, created by # sphinx-quickstart on Sun Apr 25 17:34:37 2010. # # 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. # # A...
arrabito/DIRAC
docs/source/conf.py
Python
gpl-3.0
9,724
0.015014
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Module contains Indexed mixin class""" import itertools from collections import namedtuple from sqlalchemy import inspect, orm from ggrc import db from ggrc import fulltext ReindexRule = namedtuple("...
AleksNeStu/ggrc-core
src/ggrc/fulltext/mixin.py
Python
apache-2.0
2,559
0.007816
import glob import os import shutil import sys import unittest import warnings from test.test_support import run_unittest, TESTFN def fsdecode(s): return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.te...
alvin319/CarnotKE
jyhton/Lib/test/test_glob.py
Python
apache-2.0
7,373
0
# -*- coding: utf-8 -*- def before_related(adminform): adminform.fieldsets_before = adminform.fieldsets adminform.fieldsets_after = [] try: adminform.fieldsets_before = adminform.fieldsets[:adminform.fieldsets.index(('related_go_here', {'fields': []}))] adminform.fieldsets_after = adminform....
Depado/starmato-admin
starmato/admin/templatetags/_fieldset_related.py
Python
mit
976
0.008197
#!/usr/bin/python """ title : testtermopi.py description : This program runs the termopi.py : Displays the status of the resources (cpu load and memory usage) consumed by a Raspberry Pi computer and the resources consumed by one or more containers instantiated in the Pi...
AdL1398/PiCasso
source/modules/tester/testtermopi.py
Python
mit
1,603
0.009981
from setuptools import setup reqs = [ 'myhdl>=0.9.0', 'click', 'wrapt' ] test_reqs = ['pytest', 'hypothesis'] requires = { 'setup_requires': ['setuptools_scm'], 'install_requires': reqs, 'tests_require': test_reqs, 'extras_require': { 'testing': test_reqs, } } setup( name...
jck/uhdl
setup.py
Python
bsd-3-clause
1,201
0
# Copyright (c) 2019 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 appli...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_base_gpu.py
Python
apache-2.0
1,457
0
"""SCons.Variables.PathVariable This file defines an option type for SCons implementing path settings. To be used whenever a a user-specified path override should be allowed. Arguments to PathVariable are: option-name = name of this option on the command line (e.g. "prefix") option-help = help string for optio...
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Variables/PathVariable.py
Python
lgpl-2.1
5,646
0.000886
# List of modules to import when celery starts. # CELERY_IMPORTS = ('libcloud_sandbox.tasks.code_execute', ) # Result store settings. CELERY_RESULT_BACKEND = 'database' CELERY_RESULT_DBURI = 'sqlite:///mydatabase.db' # Broker settings. BROKER_TRANSPORT = 'sqlalchemy' BROKER_HOST = 'sqlite:///tasks.db' BROKER_PORT = 5...
texib/bitcoin-zoo
test/celeryconfig.py
Python
mit
525
0.00381
#!/adsc/DDEA_PROTO/bin/python from df_data_analysis_ddea import ddea_analysis from datetime import datetime import traceback import sys if __name__ == '__main__': try: if 3 <= len(sys.argv): ###urls = open(sys.argv[1]).readlines() start_time = sys.argv[1] end_time = ...
TinyOS-Camp/DDEA-DEV
Archive/[14_10_11] Dr_Jung_Update/ddea_cli.py
Python
gpl-2.0
688
0.002907
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
MSusik/invenio
invenio/ext/template/extensions.py
Python
gpl-2.0
1,614
0.008055
#!/usr/bin/env python from .HTMLElement import HTMLElement class HTMLFieldSetElement(HTMLElement): def __init__(self, doc, tag): HTMLElement.__init__(self, doc, tag) @property def form(self): pass
tweemeterjop/thug
thug/DOM/W3C/HTML/HTMLFieldSetElement.py
Python
gpl-2.0
229
0
#!/usr/bin/env python # # Copyright 2012 Communications Engineering Lab (CEL) / KIT (Karlsruhe Institute of Technology) # Author: Felix Wunsch # # This 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...
fewu/gnuradio_drm
gr-drm/python/qa_drm_add_tailbits_vbvb.py
Python
gpl-3.0
1,583
0.025268
from cmdtest import Program, assert_hook echo = Program('echo') @echo.test def echo_string_should_output_string(): assert echo('foo').out == 'foo\n' if __name__ == '__main__': echo.run()
chromy/cmdtest
examples/echo.py
Python
mit
198
0.010101
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio 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 (a...
chokribr/invenio
invenio/modules/collections/models.py
Python
gpl-2.0
28,007
0.000036
""" Django settings for sample_project project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...
ebertti/django-admin-easy
test_project/settings.py
Python
mit
2,792
0
# # 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...
brad-kaiser/spark
python/pyspark/sql/catalog.py
Python
apache-2.0
11,982
0.00192
# Copyright 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_report_py3o_fusion_server
OCA/reporting-engine
report_py3o_fusion_server/tests/__init__.py
Python
agpl-3.0
158
0
# # Copyright 2013 Nicolas Lamirault <nicolas.lamirault@gmail.com>. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
nlamirault/python-freeboxclient
freeboxclient/client.py
Python
apache-2.0
3,447
0.00029
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import Group from django.db import migrations def initial_data(apps, schema_editor): staff = Group.objects.create(name="Staff") staff.save() def delete_staff_group(apps, schema_editor): staff = Group.objects...
Bartzi/LabShare
labshare/migrations/0013_initial_groups.py
Python
gpl-2.0
566
0.001767
""" This page is in the table of contents. Raft is a plugin to create a raft, elevate the nozzle and set the temperature. A raft is a flat base structure on top of which your object is being build and has a few different purposes. It fills irregularities like scratches and pits in your printbed and gives you a nice ba...
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
Python
agpl-3.0
56,776
0.02251
import time import pytest import logging from cassandra import Unauthorized from ccmlib.common import is_win from ccmlib.node import Node from dtest_setup_overrides import DTestSetupOverrides from dtest import Tester from tools.assertions import assert_all, assert_invalid from tools.misc import ImmutableMapping sin...
beobal/cassandra-dtest
upgrade_internal_auth_test.py
Python
apache-2.0
9,980
0.002405
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mediawiki-utilities documentation build configuration file, created by # sphinx-quickstart on Thu Apr 10 17:31:47 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present ...
mediawiki-utilities/python-mediawiki-utilities
doc/conf.py
Python
mit
8,467
0.006023
# Lint as: python3 # Copyright 2020 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 requir...
twitter-forks/bazel
tools/ctexplain/types_test.py
Python
apache-2.0
2,530
0.001581
# -*- coding: utf-8 -*- import sae.const DEBUG = False SITE_TITLE = u"博客标题" SITE_SUB_TITLE = u"博客副标题" SITE_KEYWORDS = u"博客关键字" SITE_DECRIPTION = u"博客描述" AUTHOR_NAME = u"博客作者" #显示在RSS订阅里面 #CONACT_MAIL = "xxx@gmail.com" #暂未用到 THEMES = ['octopress','admin'] LINK_BROLL = [ {'text': u"爱简单吧", 'url': "http://www....
ego008/ijd8
sae/setting.py
Python
mit
1,814
0.024441
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
camradal/ansible
lib/ansible/modules/cloud/amazon/lambda_alias.py
Python
gpl-3.0
12,318
0.002598
import socket def is_valid_ipv4(ip_str): """ Check the validity of an IPv4 address """ try: socket.inet_pton(socket.AF_INET, ip_str) except AttributeError: try: # Fall-back on legacy API or False socket.inet_aton(ip_str) except (AttributeError, socket.error): ...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/ipware/utils.py
Python
agpl-3.0
794
0
from bluebottle.bb_projects.serializers import ProjectPreviewSerializer from bluebottle.quotes.serializers import QuoteSerializer from bluebottle.slides.serializers import SlideSerializer from apps.campaigns.serializers import CampaignSerializer from bluebottle.bb_fundraisers.serializers import BaseFundRaiserSerialize...
onepercentclub/onepercentclub-site
apps/homepage/serializers.py
Python
bsd-3-clause
794
0.001259
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 # # ...
ntt-sic/taskflow
taskflow/tests/unit/test_unordered_flow.py
Python
apache-2.0
2,294
0
from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from ..core.app import SatchlessApp from . import models class ...
fusionbox/satchless
satchless/order/app.py
Python
bsd-3-clause
2,122
0.001414
# Authors: Simo Sorce <ssorce@redhat.com> # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # # 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...
tbabej/freeipa
ipaserver/install/installutils.py
Python
gpl-3.0
48,113
0.00158
''' Test cases for pyclbr.py Nick Mathewson ''' from test.test_support import run_unittest, import_module import sys from types import ClassType, FunctionType, MethodType, BuiltinFunctionType import pyclbr from unittest import TestCase StaticMethodType = type(staticmethod(lambda: None)) ClassMethodTyp...
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/test/test_pyclbr.py
Python
mit
7,874
0.002159
from givabit.backend.charity import Charity from givabit.backend.errors import MissingValueException, MultipleValueException from givabit.test_common import test_data from givabit.test_common import test_utils class CharityRepositoryTest(test_utils.TestCase): def setUp(self): super(CharityRepositoryTest, ...
illicitonion/givabit
src/givabit/backend/charity_repository_test.py
Python
apache-2.0
1,597
0.004383
"""CPStats, a package for collecting and reporting on program statistics. Overview ======== Statistics about program operation are an invaluable monitoring and debugging tool. Unfortunately, the gathering and reporting of these critical values is usually ad-hoc. This package aims to add a centralized place for gather...
VeNoMouS/Sick-Beard
lib/cherrypy/lib/cpstats.py
Python
gpl-3.0
22,932
0.000218
import proxybase import xmlrpclib import mimetypes import os import data ################################################################################ """ getInst returns an instance of a wpproxy object """ def getInst(url, user, password): wp = WordpressProxy(url, user, password) return wp ##########...
lama7/blogtool
blogtool/xmlproxy/wp_proxy.py
Python
mit
17,754
0.005633
#! /usr/bin/python # -*- coding: utf-8 -*- # import funkcí z jiného adresáře import sys import os.path from loguru import logger path_to_script = os.path.dirname(os.path.abspath(__file__)) # sys.path.append(os.path.join(path_to_script, "../experiments/")) # sys.path.append(os.path.join(path_to_script, "../extern/sed3...
mjirik/lisa
tests/texture_features_experiments_test.py
Python
bsd-3-clause
3,114
0.003215
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2006-2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
Seldaiendil/meyeOS
devtools/qooxdoo-1.5-sdk/tool/pylib/ecmascript/frontend/Scanner.py
Python
agpl-3.0
8,958
0.008038
""" A simple example script to get all posts on a user's timeline. Originally created by Mitchell Stewart. <https://gist.github.com/mylsb/10294040> """ import facebook import requests def some_action(post): """Here you might want to do something with each post. E.g. grab the post's message (post['message']) o...
mobolic/facebook-sdk
examples/get_posts.py
Python
apache-2.0
1,391
0
"""Tests for the input_boolean component."""
fbradyirl/home-assistant
tests/components/input_boolean/__init__.py
Python
apache-2.0
45
0
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
aperigault/ansible
lib/ansible/module_utils/postgres.py
Python
gpl-3.0
7,961
0.004271
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
karrtikr/ete
ete3/clustering/stats.py
Python
gpl-3.0
159,124
0.014555
#----------------------------------------------------------------------------- # Copyright (c) 2008-2012, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------------------------------------- """Routines for IPv4 a...
ecolitan/fatics
venv/lib/python2.7/site-packages/netaddr/ip/__init__.py
Python
agpl-3.0
66,411
0.001837
import datetime from django.conf import settings from django.utils import timezone from account.models import SignupCode from waitinglist.models import WaitingListEntry User = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') def stats(): waiting_list = WaitingListEntry.objects return { "waiting...
pinax/django-waitinglist
waitinglist/stats.py
Python
mit
842
0.002375
#!/usr/bin/env python """Filter LightDock final swarm results depending on the compatibility with the membrane""" from __future__ import print_function import sys import os import argparse import shutil import re from prody.measure.contacts import Contacts from prody import parsePDB, confProDy from lightdock.util.log...
brianjimenez/lightdock
bin/post/lgd_filter_membrane.py
Python
gpl-3.0
5,399
0.00463
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from elasticsearch_dsl import Q def ExistsMatch(field...
gdestuynder/MozDef
mozdef_util/mozdef_util/query_models/exists_match.py
Python
mpl-2.0
369
0
# coding=utf-8 from pages.models import Page def nav_pages(request): return {'nav_pages': Page.objects.filter(public=True, in_navigation=True),}
wonderbeyond/ezlog
pages/context_processors.py
Python
bsd-2-clause
150
0.013333
# Copyright (C) 2009, 2010, 2011 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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...
linostar/timeline-clone
test/specs/db/DbOpen.py
Python
gpl-3.0
5,595
0.000357
# -*- coding: utf-8 -*- # Resource object code # # Created: Sun Feb 8 12:30:31 2015 # by: The Resource Compiler for PyQt (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x0f\x0a\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x4...
c0deforfun/LLL
ui/resources_rc.py
Python
mit
138,528
0.000036
#Aqui resolveremos los puntos de la tarea import time import matplotlib.pyplot as plt import numpy as np from astropy import constants as const from astropy import units as un from scipy import integrate #PRIMERA PARTE #Cargamos los datos y definimos arreglos para la Longitud y el Flujo Datos = np.loadtxt("s...
faridborbar/01Tarea
Codigo.py
Python
mit
4,518
0.016383
# -*- coding: utf-8 -*- """ *************************************************************************** lassplit.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************************...
slarosa/QGIS
python/plugins/sextante/lidar/lastools/lassplit.py
Python
gpl-2.0
2,455
0.001222
from staffjoy.resource import Resource class Manager(Resource): """Location managers""" PATH = "organizations/{organization_id}/locations/{location_id}/managers/{user_id}" ID_NAME = "user_id"
Staffjoy/client_python
staffjoy/resources/manager.py
Python
mit
206
0.004854
# 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 may ...
Azure/azure-sdk-for-python
sdk/healthbot/azure-mgmt-healthbot/azure/mgmt/healthbot/__init__.py
Python
mit
680
0.002941
#-*- coding: utf-8 -*- """\ ====== Grades ====== For managing student grades, most teachers use spreadsheet tools. With these tools, it is hard to maintain grades in plain text files that are easily readable by humans. The goal of **Grades** is to let teachers manage their students's grade in plain text file while pro...
loicseguin/grades
grades/__init__.py
Python
bsd-3-clause
878
0.001142
from django.core.management.base import BaseCommand from radioco.apps.radioco.utils import create_example_data class Command(BaseCommand): def handle(self, *args, **options): create_example_data()
txenoo/django-radio
radioco/apps/radioco/management/commands/create_example_data.py
Python
gpl-3.0
212
0
import unittest from rtruffle.node import Node class NodeTest(unittest.TestCase): def test_adopt_child(self): child = ChildNode() parent = RootNode() self.assertIsNone(child.parent) parent.adopt_child(child) self.assertIs(parent, child.parent) def test_adopt_children...
SOM-st/PySOM
tests/rtruffle_tests/test_node.py
Python
mit
2,292
0
from django.http import HttpRequest import mock import pytest from nose.tools import assert_false from olympia import amo from olympia.amo.tests import TestCase, req_factory_factory from olympia.amo.urlresolvers import reverse from olympia.addons.models import Addon, AddonUser from olympia.users.models import UserPro...
jpetto/olympia
src/olympia/access/tests.py
Python
bsd-3-clause
9,223
0
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008-2013,2015-2016,2019 Contributor # # 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 t...
quattor/aquilon
lib/aquilon/worker/commands/compile_hostname.py
Python
apache-2.0
3,029
0.00033
from numpy import NaN from pandas import DataFrame from asteroid_scraper.math.qfunction import Qfunction from asteroid_scraper.math.tisserand import tisserand from asteroid_scraper.utils.progress_bar import ProgressBarThread class AsteroidFinder(object): __shared_state = {} client = None def _borg_init(s...
spacecoalmen/asteroid_scraper
asteroid_scraper/finder.py
Python
mit
4,400
0.002273
#!/bin/env python # -*- coding: utf-8 -*- """ @package XBee Zigbee API Test Programme Funtions include: 1) AT command; 2) Remote AT command 3) Send single TX request with response in const frequency 4) Send continuous TX requests with/without response in const frequency 5) Flow rate predict/measurement in Pps(Packet p...
matthewzhenggong/fiwt
XbeeZBS2Test/CommandWiFi.py
Python
lgpl-3.0
60,244
0.005577
""" External serialization for testing remote module loading. """ from tiddlyweb.serializations import SerializationInterface class Serialization(SerializationInterface): def list_recipes(self, recipes): print recipes def list_bags(self, bags): print bags def recipe_as(self, recipe): ...
funkyeah/tiddlyweb
test/other/tiddlyweb/serializations/debug.py
Python
bsd-3-clause
701
0.001427
# Copyright 2012 Cloudscaling Group, 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 ...
magic0704/oslo.db
oslo_db/tests/sqlalchemy/test_models.py
Python
apache-2.0
5,509
0
#!/usr/bin/env python3 # Copyright (c) 2014-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. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send...
navcoindev/navcoin-core
qa/rpc-tests/walletbackup.py
Python
mit
7,262
0.001515
import tensorflow as tf import numpy as np import baselines.common.tf_util as U from tensorflow.python.ops import math_ops class Pd(object): """ A particular probability distribution """ def flatparam(self): raise NotImplementedError def mode(self): raise NotImplementedError def...
brain-research/mirage-rl-bpttv
baselines/common/distributions.py
Python
mit
10,920
0.009707
#!/usr/bin/env python3 # This file is part of CFDNSUpdater. # # CFDNSUpdater 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...
aacebedo/cloudflarednsupdater
environments/build/build.py
Python
lgpl-3.0
9,511
0.013984
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 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 # pub...
acsone/account-invoicing
account_invoice_rounding/__init__.py
Python
agpl-3.0
1,027
0
"""Model configuration for pascal dataset""" import numpy as np from config import base_model_config def voc_squeezeDet_config(): """Specify the parameters to tune below.""" mc = base_model_config('PASCAL_VOC') mc.IMAGE_WIDTH = 320 mc.IMAGE_HEIGHT = 240 mc.BATCH_SI...
fyhtea/squeezeDet-hand
src/config/voc_squeezeDet_config.py
Python
bsd-2-clause
1,990
0.037186
import sys sys.path.append('../..') import web from web.contrib.template import render_jinja from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from social.utils import setting_name from social.apps.webpy_app.utils import psa, backends from social.apps.webpy_app import app ...
fearlessspider/python-social-auth
examples/webpy_example/app.py
Python
bsd-3-clause
3,421
0.002631
import os import pkgutil import re import six import yaml as ser from collections import defaultdict import insights from insights.core import dr # TODO: consider case insensitive and regex FILTERS = defaultdict(set) def add_filter(name, patterns): if isinstance(patterns, six.string_types): FILTERS[nam...
wcmitchell/insights-core
insights/core/filters.py
Python
apache-2.0
2,205
0.000454
from django.utils import simplejson from django import template from django.conf import settings from ..models import DataLayer, TileLayer from ..views import _urls_for_js register = template.Library() @register.inclusion_tag('leaflet_storage/css2.html') def leaflet_storage_css(): return { "STATIC_URL":...
daumann/chronas-application
umap/templates/leaflet_storage/leaflet_storage_tags.py
Python
mit
2,204
0.000907
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.conn.sql("""drop table if exists `tabDocType Mapper`""") webnotes.conn.sql("""drop table if exists `tabTable Mapper Detail`""") webnotes.conn.sql("""drop table if ...
gangadhar-kadam/sapphire_app
patches/july_2013/p01_remove_doctype_mappers.py
Python
agpl-3.0
516
0.017442
#!/usr/bin/python import subprocess import os import time import sys import threading import signal from upload import ftp_open, upload import gpio from gpio import setup,mode,read,set,cleanup led_red=91 led_amber=90 led_green=65 button_switch=95 def updateIndicators(stop_event): blinker=0 while not stop_event....
sobi-wan/helmet
recipes-example/helmet-rootfs/helmet-rootfs-1.0.0/home/root/josh.py
Python
mit
4,911
0.038689
"""Remove rule_description from RuleSql table Revision ID: d10d998b796b Revises: 5f1470603fa0 Create Date: 2018-03-20 13:46:14.180715 """ # revision identifiers, used by Alembic. revision = 'd10d998b796b' down_revision = '5f1470603fa0' branch_labels = None depends_on = None from alembic import op import sqlalchemy ...
fedspendingtransparency/data-act-broker-backend
dataactcore/migrations/versions/d10d998b796b_remove_rule_description_from_rulesql_.py
Python
cc0-1.0
914
0.009847
# -*- coding: UTF-8 -*- import urwid from urwid.util import (move_prev_char, move_next_char, calc_width, calc_text_pos, is_wide_char) from urwid.text_layout import CanNotDisplayText, TextLayout from urwid.compat import bytes, PYTHON3, B ONECHAR_NEWLINES = (u'\n', b'\n', u'\r', b'\r') TWOCHAR_N...
regebro/doctrine.urwid
doctrine/urwid/layout.py
Python
mit
10,162
0.001181
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-09-23 21:51 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('layers', '0006_auto_20180811_1412'), ] ...
pcecconi/mapground
layers/migrations/0007_auto_20180923_2151.py
Python
mit
1,658
0.001206
# proxy module from __future__ import absolute_import from chaco.overlays.simple_inspector_overlay import *
enthought/etsproxy
enthought/chaco/overlays/simple_inspector_overlay.py
Python
bsd-3-clause
108
0
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
hfinucane/ansible
lib/ansible/plugins/action/__init__.py
Python
gpl-3.0
32,910
0.003981
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class FrontendConfig(AppConfig): """Configuration for frontend app.""" name = 'ariane.apps.frontend' verbose_name = _("Frontend")
DebVortex/ariane-old-
ariane/apps/frontend/apps.py
Python
bsd-3-clause
235
0
# -*- coding:utf-8 -*- """ Verion: 1.0 Author: zhangjian Site: http://iliangqunru.com File: __init__.py.py Time: 2017/7/22 2:19 """
Xarrow/pySimulatedDNS
dnsCat/__init__.py
Python
apache-2.0
139
0
#!/usr/bin/env python3 from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtGui import QPixmap, QMouseEvent from PyQt5.QtWidgets import QToolButton from PyQt5.QtCore import Qt, pyqtSignal from models.components import * class DraggableComponentButton(QToolButton): mousePress = pyqtSignal(ComponentType, QMouseEven...
bandienkhamgalan/flappyeagle
views/DraggableComponentButton.py
Python
gpl-3.0
549
0.018215
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
google-research/google-research
coltran/models/layers.py
Python
apache-2.0
24,446
0.006054