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
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/deed/pet_deed/shared_kimogila_deed.iff" result.attribute_template_i...
obi-two/Rebelion
data/scripts/templates/object/tangible/deed/pet_deed/shared_kimogila_deed.py
Python
mit
691
0.037627
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf8 -*- # # Copyright 2014 Michael Terry <mike@mterry.name> # # This file is part of duplicity. # # Duplicity 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...
alanfranz/duplicity
testing/overrides/gettext.py
Python
gpl-2.0
1,496
0.004016
''' A simple module for Sopel (http://sopel.chat) to get horoscope information from a JSON API and put it back into chat All orignal code written by: BluDragyn. (www.bludragyn.net) This module is released under the terms of the GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html) If you use and like this module, pl...
KaoticEvil/Sopel-Modules
horoscope.py
Python
gpl-3.0
1,835
0.002725
"""Generate pass.""" from scoff.ast.visits.syntax import ( SyntaxChecker, SyntaxCheckerError, SyntaxErrorDescriptor, ) class VecgenPass(SyntaxChecker): """Visit AST and generate intermediate code.""" _CONFIG_DIRECTIVES = ("register_size",) _SYNTAX_ERR_INVALID_VAL = SyntaxCheckerError("invali...
brunosmmm/hdltools
hdltools/vecgen/generate.py
Python
mit
4,978
0.000201
# -*- coding: utf-8 -*- # 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 class ModuleDocFragment(object): # Standard F5 documentation fragment DOCUMENTATION = r''' options: pro...
F5Networks/f5-ansible
ansible_collections/f5networks/f5_modules/plugins/doc_fragments/f5ssh.py
Python
gpl-3.0
3,698
0.004327
# 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 (t...
apache/allura
Allura/allura/tests/functional/test_feeds.py
Python
apache-2.0
3,296
0.000303
# (c) 2015 J Miguel Farto, jmfarto@gmail.com r''' Aditional static paths ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os from flask import Blueprint from flask import current_app as app from flask.helper...
damahou/sagewui
sagewui/blueprints/static_paths.py
Python
gpl-3.0
1,622
0
# -*- coding: utf-8 -*- # # Copyright 2010-2019 University of Oslo, Norway # # This file is part of pybofh. # # pybofh 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 ...
unioslo/pybofh
bofh/formatting.py
Python
gpl-3.0
11,183
0
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-dialogflow-cx
google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py
Python
apache-2.0
32,025
0.001624
import os import sys import random import pygame from Engine import * from Montag import * from Character import Character from pygame.locals import * class AICharacter(Character): def __init__(self, screen, **kwargs): super().__init__(screen, **kwargs) self.enemy = kwargs.get("enemy", None) ...
lumidify/fahrenheit451
AICharacter.py
Python
gpl-2.0
3,797
0.003687
from setuptools import setup, find_packages CLASSIFIERS = ( ('Development Status :: 4 - Beta'), ('Environment :: Console'), ('Environment :: Web Environment'), ('Framework :: Django'), ('Intended Audience :: Developers'), ('Intended Audience :: Science/Research'), ('Intended Audience :: Sys...
justquick/google-chartwrapper
setup.py
Python
bsd-3-clause
1,680
0.002976
import re import abc import asyncio import contextlib import urllib.parse as urlparse import aiohttp import pyquery from pycrawl.utils import Queue from pycrawl.http import Request from pycrawl.http import Response from pycrawl.middleware import CrawlerMiddlewareManager class Spider(metaclass=abc.ABCMeta): de...
jmcarp/pycrawl
pycrawl/crawl.py
Python
bsd-3-clause
3,966
0.000504
# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import stock
houssine78/addons
stock_picking_back2draft/models/__init__.py
Python
agpl-3.0
161
0
import os import sys import stat from ._compat import open_stream, text_type, filename_to_ui, get_streerror from .exceptions import BadParameter from .utils import safecall, LazyFile class ParamType(object): """Helper for converting values through types. The following is necessary for a valid type: * ...
patrickwind/My_Blog
venv/lib/python2.7/site-packages/click/types.py
Python
gpl-2.0
15,176
0
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import os.path import createTasks import csv import json SERVER = "http://crowdcrafting.org" URL_ROOT = "https://s3-us-west-2.amazonaws.com/drillpadcat/" def dictreader(rows): rows = iter(rows) header = rows.next() for row in rows: ...
SkyTruth/pybossa_tools
drillpadcatimgtaskload.py
Python
agpl-3.0
1,281
0.003123
""" Updates start offsets, stop offsets and indicators everywhere in score. .. note:: This is probably the most important part of Abjad to optimize. Use the profiler to figure out how many unnecessary updates are happening. Then reimplement. As a hint, the update manager implements a weird version of the "obs...
Abjad/abjad
abjad/_update.py
Python
gpl-3.0
15,897
0.000944
# -*- coding: utf-8 -*- """ Created on Wed Sep 09 13:04:53 2015 * If TimerTool.exe is running, kill the process. * If input parameter is given, start TimerTool and set clock resolution Starts TimerTool.exe and sets the clock resolution to argv[0] ms Ex: python set_clock_resolution 0.5 @author: marcus """ ...
marcus-nystrom/share-gaze
sync_clocks/test_clock_resolution.py
Python
mit
1,930
0.020207
import _plotly_utils.basevalidators class SurfacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="surfacecolor", parent_name="surface", **kwargs): super(SurfacecolorValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
plotly/python-api
packages/python/plotly/plotly/validators/surface/_surfacecolor.py
Python
mit
459
0.002179
"""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...
rosalindfdt/huzzahbadge
huzzah/register/setup.py
Python
artistic-2.0
1,740
0.000575
#! /usr/bin/env python """Convert a LaTeX .toc file to some PDFTeX magic to create that neat outline. The output file has an extension of '.bkm' instead of '.out', since hyperref already uses that extension. """ import getopt import os import re import string import sys # Ench item in an entry is a tuple of: # # ...
TathagataChakraborti/resource-conflicts
PLANROB-2015/seq-sat-lama/Python-2.5.2/Doc/tools/toc2bkm.py
Python
mit
4,520
0.000442
# proxy module from __future__ import absolute_import from mayavi.core.api import *
enthought/etsproxy
enthought/mayavi/core/api.py
Python
bsd-3-clause
84
0
#!/usr/bin/env python """ @package mi.core.test.test_persistent_store @file <git-workspace>/ooi/edex/com.raytheon.uf.ooi.plugin.instrumentagent/utility/edex_static/base/ooi/instruments/mi-instrument/mi/core/test/test_persistent_store.py @author Johnathon Rusk @brief Unit tests for PersistentStoreDict module """ # Not...
janeen666/mi-instrument
mi/core/test/test_persistent_store.py
Python
bsd-2-clause
11,196
0.003483
from insights.parsers.hostname import Hostname from insights.tests import context_wrap HOSTNAME = "rhel7.example.com" HOSTNAME_SHORT = "rhel7" def test_hostname(): data = Hostname(context_wrap(HOSTNAME)) assert data.fqdn == "rhel7.example.com" assert data.hostname == "rhel7" assert data.domain == "ex...
wcmitchell/insights-core
insights/parsers/tests/test_hostname.py
Python
apache-2.0
685
0
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández ...
xdevelsistemas/taiga-back-community
tests/integration/resources_permissions/test_application_tokens_resources.py
Python
agpl-3.0
4,691
0.000853
# Copyright 2012 Lee Verberne <lee@blarg.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 # (at your option) any later version. # # This program is dis...
kafana/ubik
lib/ubik/fab/tgz.py
Python
gpl-3.0
1,827
0.004926
from citrination_client.search.pif.query.chemical.chemical_field_operation import ChemicalFieldOperation from citrination_client.search.pif.query.core.base_object_query import BaseObjectQuery from citrination_client.search.pif.query.core.field_operation import FieldOperation class CompositionQuery(BaseObjectQuery): ...
calfonso/python-citrination-client
citrination_client/search/pif/query/chemical/composition_query.py
Python
apache-2.0
4,113
0.004619
# -*- coding: utf-8 -*- """ Django settings for ad-manage project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_l...
dilosung/ad-manage
config/settings/common.py
Python
mit
13,364
0.002469
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 without restriction, including without limitation ...
gencer/mwparserfromhell
mwparserfromhell/nodes/html_entity.py
Python
mit
6,771
0.000148
#!/usr/bin/python # encoding: utf-8 # license: MIT # Raspberry Pi-powered cat feeder # Ryan Matthews # mhaddy@gmail.com #import schedule import time import datetime import logging import RPi.GPIO as GPIO from twython import Twython import configvars as cv from random import randint import pygame import pygame.camera...
mhaddy/FeedGoo
man_feedgoo.py
Python
gpl-3.0
2,896
0.020718
# @MUNTJAC_COPYRIGHT@ # @MUNTJAC_LICENSE@ from unittest import TestCase from muntjac.ui.label import Label from muntjac.ui.tab_sheet import TabSheet class TestTabSheet(TestCase): def testAddExistingComponent(self): c = Label('abc') tabSheet = TabSheet() tabSheet.addComponent(c) t...
rwl/muntjac
muntjac/test/server/component/test_tab_sheet.py
Python
apache-2.0
3,921
0.001275
import logging import requests HUE_IP = '192.168.86.32' HUE_USERNAME = '7KcxItfntdF0DuWV9t0GPMeToEBlvHTgqWNZqxu6' logger = logging.getLogger('hue') def getLights(): url = 'http://{0}/api/{1}/lights'.format(HUE_IP, HUE_USERNAME) try: r = requests.get(url) except: logger.error('Failed getting stat...
twotymz/lucy
hue/lights.py
Python
mit
705
0.025532
#!/usr/bin/python2.5 # # Copyright 2009 the Melange 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...
jamslevy/gsoc
app/soc/logic/models/timeline.py
Python
apache-2.0
1,237
0.003234
""" Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend :class:`RendererBase` An abstract base class to handle drawing/rendering operations. :class:`FigureCanvasBase` The abstraction layer that separates the :class:`matplotlib.fi...
tkaitchuck/nupic
external/linux64/lib/python2.6/site-packages/matplotlib/backend_bases.py
Python
gpl-3.0
69,740
0.003656
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.contrib.auth.models import User from odf.odf2xhtml import ODF2XHTML, load from tcms.core.contrib.xml2dict.xml2dict import XML2Dict from tcms.core.forms.fields import UserField, StripURLField from tinymce.widgets import TinyM...
ShaolongHu/Nitrate
tcms/testplans/forms.py
Python
gpl-2.0
20,537
0
import logging import requests import tarfile from lxml import etree from . import discover from . import template log = logging.getLogger(__name__) URLPREFIX = 'https://cloud-images.ubuntu.com/precise/current/' PREFIXES = dict( server='{release}-server-cloudimg-amd64.', desktop='{release}-desktop-cloudi...
tv42/downburst
downburst/image.py
Python
mit
5,246
0.000191
# encoding: utf-8 from yast import import_module import_module('UI') from yast import * class TableSortingClient: def main(self): UI.OpenDialog( VBox( Label("Library"), MinSize( 30, 10, Table( Header("Book Title", "Shelf"), ...
yast/yast-python-bindings
examples/Table-sorting.py
Python
gpl-2.0
1,203
0.004988
r"""Fixer for unicode. * Changes unicode to str and unichr to chr. * If "...\u..." is not unicode literal change it into "...\\u...". * Change u"..." into "...". """ from ..pgen2 import token from .. import fixer_base _mapping = {"unichr" : "chr", "unicode" : "str"} class FixUnicode(fixer_base.BaseFix): BM_c...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/lib2to3/fixes/fix_unicode.py
Python
gpl-3.0
1,256
0.002389
from __future__ import unicode_literals from django.apps import AppConfig class ProvVoConfig(AppConfig): name = 'prov_vo'
kristinriebe/django-prov_vo
prov_vo/apps.py
Python
apache-2.0
129
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import markdown from django.template.loader import render_to_string from wiki.plugins.images import models, settings IMAGE_RE = re.compile( r'.*(\[image\:(?P<id>[0-9]+)(\s+align\:(?P<align>right|left))?(\s+size\:(?P<size>default|small|medi...
cXhristian/django-wiki
src/wiki/plugins/images/markdown_extensions.py
Python
gpl-3.0
4,717
0.000424
#!/usr/bin/python # # Copyright 2014 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...
coxmediagroup/googleads-python-lib
examples/dfa/v1_20/get_advertisers.py
Python
apache-2.0
2,314
0.005618
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines 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 ap...
google/uncertainty-baselines
baselines/mnist/utils.py
Python
apache-2.0
5,866
0.008012
""" rewrite of lambdify - This stuff is not stable at all. It is for internal use in the new plotting module. It may (will! see the Q'n'A in the source) be rewritten. It's completely self contained. Especially it does not use lambdarepr. It does not aim to replace the current lambdify. Most importantly it will never...
wxgeo/geophar
wxgeometrie/sympy/plotting/experimental_lambdify.py
Python
gpl-2.0
26,133
0.001378
#-*- coding: utf- -*- import os import sys import random import time import json import wikiquote import tuitear from threading import Thread CONGIG_JSON = 'bots.json' # Variable local, para modificar el intervalo real cambiar la configuración INTERVALO = 1 stop = False def start_bot(bot): """ Hilo que inicia ...
sh4r3m4n/twitter-wikiquote-bot
bot.py
Python
gpl-3.0
1,879
0.009052
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Hans-Peter Jansen <hpj@urpla.net>. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_...
Khilo84/PyQt4
examples/draganddrop/delayedencoding/delayedencoding.py
Python
gpl-2.0
4,777
0.007327
from amqpstorm.management import ManagementApi from amqpstorm.message import Message from amqpstorm.tests import HTTP_URL from amqpstorm.tests import PASSWORD from amqpstorm.tests import USERNAME from amqpstorm.tests.utility import TestFunctionalFramework from amqpstorm.tests.utility import setup class ApiBasicFuncti...
eandersson/amqp-storm
amqpstorm/tests/functional/management/basic_tests.py
Python
mit
2,492
0
# Copyright 2018 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...
tensorflow/tensorflow
tensorflow/python/data/experimental/kernel_tests/optimization/shuffle_and_repeat_fusion_test.py
Python
apache-2.0
2,195
0.003645
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
tensorflow/datasets
tensorflow_datasets/summarization/gigaword.py
Python
apache-2.0
4,196
0.003337
#!/usr/bin/env python from ciscoconfparse import CiscoConfParse print "We will use this program to parse a cisco config file" filename = raw_input("Please enter the name of the file that needs to be parsed: ") #print filename input_file = CiscoConfParse(filename) crypto_find = input_file.find_objects_w_child(parentsp...
networkpadwan/appliedpython
week1/parse2.py
Python
apache-2.0
435
0.009195
# Copyright 2017 Huawei Technologies Co.,LTD. # 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 # # Unl...
openstack/nomad
cyborg/common/exception.py
Python
apache-2.0
10,839
0
# 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...
karllessard/tensorflow
tensorflow/python/platform/resource_loader.py
Python
apache-2.0
4,522
0.00774
from mock import Mock, patch, MagicMock from lxc4u.meta import * def test_initialize_lxc_meta(): meta1 = LXCMeta() meta1['hello'] = 'hello' meta2 = LXCMeta(initial=dict(hello=123)) assert meta1['hello'] == 'hello' assert meta2['hello'] == 123 @patch('__builtin__.open') @patch('json.loads') @pa...
ravenac95/lxc4u
tests/test_meta.py
Python
mit
2,809
0.001068
import xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,sys import shutil import urllib2,urllib import re import extract import time import downloader import plugintools import weblogin import zipfile import ntpath ARTPATH = 'http://totalxbmc.tv/totalrevolution/art/' + os.sep FANART = 'http://totalxbmc.tv/totalrev...
rlazojr/totalinstaller
plugin.program.totalinstaller/default.py
Python
gpl-2.0
104,757
0.029945
#!/usr/bin/python3 #################################### BY MIKICAT ############################################### ###############################A WORLDEV AFFILIATE############################################# ###IF YOU DETECT BUGS, PLEASE OPEN AN ISSUE OR REPORT THEM TO http://mikicatantivirus.weebly.com/contact.htm...
Worldev/Mikicat-Antivirus
antivirus.py
Python
gpl-3.0
20,145
0.0076
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
nuagenetworks/nuage-openstack-neutron
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
Python
apache-2.0
838
0
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
sysadminmatmoz/odoo-clearcorp
purchase_prediction/__init__.py
Python
agpl-3.0
1,003
0.000997
# -*- coding: utf-8 -*- from django.apps import AppConfig class AuthorizationConfig(AppConfig): label = 'userspace_library_authorizations' name = 'apps.userspace.library.authorization'
erudit/zenon
eruditorg/apps/userspace/library/authorization/apps.py
Python
gpl-3.0
196
0
# coding: utf-8 from __future__ import absolute_import import flask import auth import config import model import util from main import app twitter_config = dict( access_token_url='https://api.twitter.com/oauth/access_token', api_base_url='https://api.twitter.com/1.1/', authorize_url='https://api.twitter.co...
mdxs/gae-init
main/auth/twitter.py
Python
mit
1,532
0.00718
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 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 the h...
jonathon-love/snapcraft
snapcraft/tests/test_plugin_maven.py
Python
gpl-3.0
19,419
0.000412
""" Used as entry point for mayatest from commandline """ if __name__ == "__main__": from mayatest.cli import main main()
arubertoson/mayatest
mayatest/__main__.py
Python
mit
131
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('ISS', '0021_poster_auto_subscribe'), ] operations = [ migrations.AddField( model_name='poster', name...
RyanJenkins/ISS
ISS/migrations/0022_poster_posts_per_page.py
Python
gpl-3.0
420
0
# plot_profile_data.py --- # # Filename: plot_profile_data.py # Description: # Author: Subhasis Ray # Maintainer: # Created: Sat Sep 6 11:19:21 2014 (+0530) # Version: # Last-Updated: # By: # Update #: 0 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change log: # # ...
nsdf/nsdf
benchmark/plot_profile_data.py
Python
gpl-3.0
6,981
0.008308
""" WSGI config for tele_giphy 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.10/howto/deployment/wsgi/ """ # Standard Library import os # Django from django.core.wsgi import get_wsgi_application os....
JessicaNgo/TeleGiphy
tele_giphy/tele_giphy/wsgi.py
Python
mit
426
0
import boto import os import re import urlparse from boto import s3 from boto.s3 import connection from wal_e import log_help from wal_e.exception import UserException logger = log_help.WalELogger(__name__) _S3_REGIONS = { # A map like this is actually defined in boto.s3 in newer versions of boto # but we re...
x86Labs/wal-e
wal_e/blobstore/s3/calling_format.py
Python
bsd-3-clause
10,819
0
#!/usr/bin/env python import os.path from os import path from datetime import date import sys import com import release import dev import proj upstream_org_url = "https://github.com/lvgl/" workdir = "./release_tmp" proj_list = [ "lv_sim_eclipse_sdl", "lv_sim_emscripten"] def upstream(repo): return upstream_org_u...
littlevgl/lvgl
scripts/release/main.py
Python
mit
1,494
0.005355
# # Copyright 2020 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...
google/fhir
py/google/fhir/utils/fhir_types_test.py
Python
apache-2.0
6,987
0.00458
from argparse import ArgumentParser from typing import Any, List from zerver.lib.actions import do_create_multiuse_invite_link, ensure_stream from zerver.lib.management import ZulipBaseCommand from zerver.models import PreregistrationUser, Stream class Command(ZulipBaseCommand): help = "Generates invite link tha...
brainwane/zulip
zerver/management/commands/generate_multiuse_invite_link.py
Python
apache-2.0
1,624
0.001847
#!/usr/bin/env python ### # ### # -*- coding: utf-8 -*- import os,socket import threading import time from datetime import date import xmlrpclib as xmlrpc class SchedulerClient(): def __init__(self): self.cron_dir='/etc/cron.d' self.task_prefix='remote-' #Temp workaround->Must be declared on a n4d var self.cr...
juanma1980/lliurex-scheduler
client-scheduler.install/usr/share/n4d/python-plugins/SchedulerClient.py
Python
gpl-3.0
4,262
0.056546
from base64 import b64encode from suds.wsse import UsernameToken, Token try: from hashlib import sha1, md5 except: from sha import new as sha1 class UsernameDigestToken(UsernameToken): """ Represents a basic I{UsernameToken} WS-Security token with password digest @ivar username: A username. ...
ricardosiri68/patchcap
cam/wsse.py
Python
gpl-2.0
2,243
0.001783
import os, logging from xmlrpc.server import SimpleXMLRPCServer from xmlrpc.server import SimpleXMLRPCRequestHandler from master.server_handler import ServerHandler from xmlrpc.client import Binary HOST = "0.0.0.0" PORT = int(os.getenv('PORT', 5555)) ENDPOINT = 'RPC2' logging.basicConfig(level=logging.INFO) class Re...
medo/Pandas-Farm
master/server.py
Python
mit
761
0.00657
import urllib import lxml.html connection = urllib.urlopen('http://www.amazon.in/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=iphone') dom = lxml.html.fromstring(connection.read()) for link in dom.xpath('//li[@id="result_0"]/@data-asin'): # select the url in href for all a tags(links) print link
smartyrad/Python-scripts-for-web-scraping
beauty.py
Python
gpl-3.0
314
0.012739
# How long should we wait on EACH commit() checkpoint: for ipaddr, # ports etc. That's not total commit() timeout. SYNC_TIMEOUT = 5 class DeprecationException(Exception): pass class CommitException(Exception): pass class CreateException(Exception): pass
tomislacker/python-iproute2
pyroute2/ipdb/common.py
Python
apache-2.0
272
0
###################################### # Example: ftDigiCam.py # Digital Camera with live # video stream to TXT display # and autofocus functionality # (c) 2016 by Torsten Stuehn # version 0.8 from 2016-02-12 ###################################### # Python2/3 'print' compat...
rkunze/ft-robo-snap
ftrobopy/examples/ftDigiCam.py
Python
agpl-3.0
6,070
0.020428
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2004 Martin Hawlisch # Copyright (C) 2005-2008 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Michiel D. Nauta # # This program is free software; you can redistribut...
beernarrd/gramps
gramps/plugins/export/exportvcard.py
Python
gpl-2.0
12,904
0.00279
# Copyright 2012 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...
priya-pp/Tacker
tacker/tests/unit/test_auth.py
Python
apache-2.0
4,418
0
#!/usr/bin/env python # -*- coding: ascii -*- from __future__ import absolute_import from __future__ import print_function import sys import base64 # use a base64 image as default/test image TEST_IMAGE = """iVBORw0KGgoAAAANSUhEUgAAA8AAAALQCAYAAABfdxm0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz AAASdAAAEnQB3mYfeAAAIABJREFUeJzs3...
sonofeft/DigiPlot
digiplot/sample_img.py
Python
gpl-3.0
72,038
0.000028
from __future__ import print_function from __future__ import unicode_literals import time from netmiko.ssh_connection import BaseSSHConnection from netmiko.netmiko_globals import MAX_BUFFER from netmiko.ssh_exception import NetMikoTimeoutException, NetMikoAuthenticationException import paramiko import socket class Ci...
enzzzy/netmiko
netmiko/cisco/cisco_wlc_ssh.py
Python
mit
3,082
0.004218
# -*- coding: UTF-8 -*- from .model_wrapper import ModelWrapper class TagWrapper(ModelWrapper): @property def spu(self): return self.sku.spu @property def vendor(self): return self.spu.vendor
PuZheng/lejian-backend
lejian/apis/tag.py
Python
mit
229
0
import csv import decimal import os import datetime from stocker.common.events import EventStreamNew, EventStockOpen, EventStockClose from stocker.common.orders import OrderBuy, OrderSell from stocker.common.utils import Stream class CompanyProcessor(object): def __init__(self, dirname, company_id): self....
donpiekarz/Stocker
stocker/SEP/processor.py
Python
gpl-3.0
3,868
0.002844
#!/usr/bin/python import serial import time import random import sys s = None num_leds = 93 ticks = 96 sleep_time = 0.0 def flush_input(): s.flushInput() def wait_for_ack(): while s.inWaiting() <= 0: pass...
jhogsett/linkit
python/gaydar4.py
Python
mit
3,902
0.027166
"""Implementation of JSONEncoder """ import re # try: # from _json import encode_basestring_ascii as c_encode_basestring_ascii # except ImportError: # c_encode_basestring_ascii = None c_encode_basestring_ascii = None # try: # from _json import make_encoder as c_make_encoder # except ImportError: # c_m...
google/grumpy
third_party/stdlib/json/encoder.py
Python
apache-2.0
16,692
0.001737
import pytest from mpmath import * def ae(a, b): return abs(a-b) < 10**(-mp.dps+5) def test_basic_integrals(): for prec in [15, 30, 100]: mp.dps = prec assert ae(quadts(lambda x: x**3 - 3*x**2, [-2, 4]), -12) assert ae(quadgl(lambda x: x**3 - 3*x**2, [-2, 4]), -12) assert ae(qu...
fredrik-johansson/mpmath
mpmath/tests/test_quad.py
Python
bsd-3-clause
3,893
0.008477
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
mfherbst/spack
var/spack/repos/builtin/packages/slepc/package.py
Python
lgpl-2.1
4,929
0.002435
"""Test backend $Id$""" import os import Image from imagescanner.backends import base class ScannerManager(base.ScannerManager): def _refresh(self): self._devices = [] scanner = Scanner('test-0', "Pyscan", "Test Device") self._devices.append(scanner) class Scanner(base.Scanner): ...
Eveler/libs
__Python__/edv/edv/imagescanner/backends/test/__init__.py
Python
gpl-3.0
751
0.007989
import numpy as np def plane_error(results, target): """ Computes angle between target orbital plane and actually achieved plane. :param results: Results struct as output by flight_manager (NOT flight_sim_3d). :param target: Target struct as output by launch_targeting. :return: Angle...
ubik2/PEGAS-kRPC
kRPC/plane_error.py
Python
mit
987
0.00304
import ujson from mock import patch, MagicMock from typing import Dict, Optional, Text from zerver.models import Message from zerver.lib.webhooks.git import COMMITS_LIMIT from zerver.lib.test_classes import WebhookTestCase class GithubWebhookTest(WebhookTestCase): STREAM_NAME = 'github' URL_TEMPLATE = "/api/v...
verma-varsha/zulip
zerver/webhooks/github_webhook/tests.py
Python
apache-2.0
22,570
0.004386
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created by heyu on 17/3/1 """ try: from setuptools import setup except: from distutils.core import setup setup( name="pyutils", version="0.0.1", author="heyu", author_email="gannicus_yu@163.com", description="easy and convenient tools...
gannicus-yu/pyutils
setup.py
Python
apache-2.0
546
0.001832
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse from common_processing import * import tarfile import sys import glob def untar(ftp_link, out_folder): tar = tarfile.open(out_folder + ftp_link.split("/")[-1]) tar.extractall(path=out_folder) tar.close() def process_nodes_dmp(out_fo...
TurkuNLP/CAFA3
sequence_features/process_NCBI_Taxonomy.py
Python
lgpl-3.0
3,092
0.005498
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tableofcontents.py __version__=''' $Id: tableofcontents.py 3627 2010-01-06 14:06:36Z rgbecker $ ''' __doc__="""Experimental class to generate...
fergalmoran/Chrome2Kindle
server/reportlab/platypus/tableofcontents.py
Python
mit
19,645
0.006058
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import random from PyQt5.QtWidgets import QMainWindow, QFrame, QDesktopWidget, QApplication from PyQt5.QtCore import Qt, QBasicTimer, pyqtSignal from PyQt5.QtGui import QPainter, QColor class Tetris(QMainWindow): def __init__(self): super().__init__()...
quchunguang/test
testpy3/pyqt5_tetris.py
Python
mit
10,805
0.000278
import sys if sys.path[0] != "../..": sys.path.insert(0, "../..") import unittest import io from pyx.graph import data class DataTestCase(unittest.TestCase): def testPoints(self): mydata = data.points([[1, 2, 3], [4, 5, 6]], a=1, b=2) self.assertEqual(mydata.columndata[0], [1, 2]) se...
mjg/PyX
test/unit/test_data.py
Python
gpl-2.0
3,991
0.002255
from zipline.api import sid, symbol, order, record, get_datetime import logbook import pandas as pd log = logbook.Logger("ZiplineLog") def initialize(context): context.set_benchmark(symbol('TOPIX')) context.assets = [ symbol(sym_str) for sym_str in [ '2121', '4689', ...
magne-max/zipline-ja
zipline/examples/buy_test.py
Python
apache-2.0
888
0
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
tzpBingo/github-trending
codespace/python/tencentcloud/iottid/v20190411/models.py
Python
mit
15,254
0.002742
from datetime import time from django.test import TestCase from django.core.files.uploadedfile import SimpleUploadedFile from .models import Transcript, TranscriptPhrase class TranscriptTestCase(TestCase): def setUp(self): fake_file = SimpleUploadedFile( 'not-really-a-file.txt', ...
WGBH/FixIt
mla_game/apps/transcript/tests.py
Python
mit
2,490
0
"""Tests for the retire_order command""" from tempfile import NamedTemporaryFile from django.core.management import call_command from course_modes.models import CourseMode from shoppingcart.models import CertificateItem, Order from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_util...
miptliot/edx-platform
lms/djangoapps/shoppingcart/management/tests/test_retire_order.py
Python
agpl-3.0
2,853
0
# flake8: noqa from .base import Settings, Configuration from .decorators import pristinemethod __version__ = '0.5' __all__ = ['Configuration', 'pristinemethod', 'Settings']
paltman/django-configurations
configurations/__init__.py
Python
bsd-3-clause
175
0
# -*- coding: utf-8 -*- # # 2016-05-07 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add realm dropdown # 2016-04-06 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add time dependency in policy # 2016-02-22 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add RADI...
jalr/privacyidea
privacyidea/lib/policy.py
Python
agpl-3.0
57,193
0.000385
from . import about from . import gs from . import gsq from . import mg9 from . import nineo from . import vu import os import pprint import sublime def gs_init(_={}): g = globals() p = 'bi_' l = len(p) for nm in list(g.keys()): if nm.startswith(p): k = nm[l:].replace('__', '.').replace('_', '-') nineo.bui...
DisposaBoy/GoSublime-next
gosubl/nineo_builtins.py
Python
mit
3,455
0.041389
from django.db.models import CharField from django.utils.translation import ugettext_lazy as _ from localflavor.deprecation import DeprecatedPhoneNumberField from . import forms from .au_states import STATE_CHOICES from .validators import AUBusinessNumberFieldValidator, AUCompanyNumberFieldValidator, AUTaxFileNumberF...
thor/django-localflavor
localflavor/au/models.py
Python
bsd-3-clause
5,128
0.001755
''' A Mini-implementation of the Storlet middleware filter. @author: josep sampe ''' from swift.common.utils import get_logger from swift.common.utils import register_swift_info from swift.common.swob import Request from swift.common.utils import config_true_value from storlets.swift_middleware.handlers.base import Sw...
Crystal-SDS/filter-middleware
crystal_filter_middleware/filters/storlet.py
Python
gpl-3.0
6,161
0.000812
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import UserList import logging logger = logging.getLogger(__name__) class CycleList(UserList): """ 一个无限循环输出元素的可迭代对象,如果是on-fly模式 (主要指for循环中的删除动作)推荐使用 `remove_item` 方法 """ def __init__(self, data): super().__init...
a358003542/expython
expython/pattern/__init__.py
Python
mit
1,439
0.002429