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
from django.core.exceptions import ImproperlyConfigured from django.conf import settings from rest_framework.settings import APISettings USER_SETTINGS = getattr(settings, 'JWT_GRAPHENE', None) DEFAULTS = { 'JWT_GRAPHENE_USER_ONLY_FIELDS': None, 'JWT_GRAPHENE_USER_EXCLUDE_FIELDS': None, } IMPORT_STRINGS = ( ...
SillyFreak/django-graphene-jwt
graphene_jwt/settings.py
Python
agpl-3.0
629
0.00318
"""Shared OS X support functions.""" import os import re import sys __all__ = [ 'compiler_fixup', 'customize_config_vars', 'customize_compiler', 'get_platform_osx', ] # configuration variables that may contain universal build flags, # like "-arch" or "-isdkroot", that may need customization for # the...
lfcnassif/MultiContentViewer
release/modules/ext/libreoffice/program/python-core-3.3.0/lib/_osx_support.py
Python
lgpl-3.0
18,472
0.001462
# Dummy calls for representing openings def pgmtoppm(atlas_slice): result = atlas_slice[:-3] + "ppm" with open(atlas_slice, "rb") as aslice, \ open(result, "w") as gif: gif.write(atlas_slice + ".ppm") return result def pnmtojpeg(ppm_slice): result = ppm_slice[:-3] + "jpg" with ...
gems-uff/noworkflow
capture/noworkflow/resources/demo/2016_ipaw_paper/step4/convert.py
Python
mit
449
0.002227
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
pavelchristof/gomoku-ai
tensorflow/python/debug/lib/grpc_debug_server.py
Python
apache-2.0
16,574
0.004827
"""ShutIt module. See http://shutit.tk """ from shutit_module import ShutItModule class less(ShutItModule): def build(self, shutit): shutit.send('mkdir -p /tmp/build/less') shutit.send('cd /tmp/build/less') shutit.send('wget -qO- http://www.greenwoodsoftware.com/less/less-458.tar.gz | tar -zxf -') shutit.s...
ianmiell/shutit-distro
less/less.py
Python
gpl-2.0
877
0.039909
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.opus_package import OpusPackage class package(OpusPackage): name = 'psrc_parcel' required_opus_packages = ["opus_core", "opus_emme2", "urbansim", "urbansim_parcel"]
christianurich/VIBe2UrbanSim
3rdparty/opus/src/psrc_parcel/opus_package_info.py
Python
gpl-2.0
318
0.009434
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from setuptools import setup, find_packages import codecs import os import re import sys def read(*parts): path = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(path, e...
metocean/tugboat-py
setup.py
Python
apache-2.0
1,239
0.003228
import re import socket import threading import time from chat.message import Message from chat.user import User from interfaces.chat import Chat class TwitchChat(Chat): host = 'irc.twitch.tv' port = 6667 rate = 1.5 def __init__(self, username, passwd, channel): ''' Creates IRC clien...
jk977/twitch-plays
bot/chat/twitchchat.py
Python
gpl-3.0
4,289
0.002098
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/markdown/odict.py
Python
mit
7,934
0.001008
a = "hello" a += " " a += "world" print a
jplevyak/pyc
tests/t39.py
Python
bsd-3-clause
42
0
from django.forms import ModelForm, ModelChoiceField from django.utils.translation import ugettext_lazy as _ from apps.task.models import Task class FormChoiceField(ModelChoiceField): def label_from_instance(self, obj): return obj.name class TaskForm(ModelForm): """ Task form used to add or update a task in t...
hgpestana/chronos
apps/task/forms.py
Python
mit
630
0.025397
"""Tests for functions and classes in data/processing.py.""" import glob import os from absl.testing import absltest import heatnet.data.processing as hdp import heatnet.file_util as file_util import heatnet.test.test_util as test_util import numpy as np import xarray as xr class CDSPreprocessorTest(absltest.TestCas...
google-research/heatnet
test/test_processing.py
Python
gpl-3.0
9,568
0.010033
import base64 import httplib import logging import unittest import testsetup import transferclient import moreasserts def clean_up(): hostname = testsetup.HOST testsetup.clean_host(hostname) class GetRecordTest(unittest.TestCase): def assertRecordFields(self, record, fields): for field in field...
xenserver/transfervm
transfertests/getrecord_test.py
Python
gpl-2.0
6,109
0.00442
from __future__ import unicode_literals from .request import Request from .response import Response from .stat import Stat from .primitives import Bool, UString, Vector class GetChildrenRequest(Request): """ """ opcode = 8 parts = ( ("path", UString), ("watch", Bool), ) class G...
wglass/zoonado
zoonado/protocol/children.py
Python
apache-2.0
746
0
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-06 17:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependen...
muhummadPatel/raspied
students/migrations/0002_add_Booking_model.py
Python
mit
923
0.002167
import sys def render(node, strict=False): """Recipe to render a given FST node. The FST is composed of branch nodes which are either lists or dicts and of leaf nodes which are strings. Branch nodes can have other list, dict or leaf nodes as childs. To render a string, simply output it. To rende...
cbonoz/codehealth
dependencies/baron/render.py
Python
mit
34,151
0.000439
#### 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 = Intangible() result.template = "object/draft_schematic/vehicle/component/shared_structural_reinforcement_heavy.iff...
anhstudios/swganh
data/scripts/templates/object/draft_schematic/vehicle/component/shared_structural_reinforcement_heavy.py
Python
mit
477
0.046122
#!/usr/bin/python # -*- coding: utf-8 -*- import sqlite3 as lite import sys con = lite.connect('Database.db') with con: cur = con.cursor() #Create data for the user table cur.execute("CREATE TABLE users(UserId INT, UserName TEXT, Password TEXT)") cur.execute("INSERT INTO users VALUES(1,'Adm...
blabla1337/defdev
demos/input-validation/SQLI/config/initializer.py
Python
gpl-3.0
1,100
0.012727
# engine/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL connections, SQL execution and high-level DB-API interface. The engine pa...
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/sqlalchemy/engine/__init__.py
Python
mit
18,857
0.000159
import re from versions.software.utils import get_command_stdout, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return '7-Zip' def installed_version(): """Return the installed version of 7-Zip, or None if not installed.""" try: version_string =...
mchung94/latest-versions
versions/software/sevenzip.py
Python
mit
718
0
# -*- coding: UTF-8 -*- HMAP = { ' ': u'\u00A0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F', '!': u'\uFF01\u01C3\u2D51\uFE15\uFE57', '"': u'\uFF02', '#': u'\uFF03\uFE5F', '$': u'\uFF04\uFE69', '%': u'\uFF05\u066A\u2052\uFE6A', '&': u'\uFF06\uFE60', "'":...
JoshuaRLi/notquite
notquite/constants.py
Python
mit
2,903
0.000344
# Copyright 2013-2021 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) class PyThreadpoolctl(PythonPackage): """Python helpers to limit the number of threads used in the threadpool-bac...
LLNL/spack
var/spack/repos/builtin/packages/py-threadpoolctl/package.py
Python
lgpl-2.1
857
0.002334
import json import numpy as np import os import requests from datetime import datetime from flask_security import UserMixin, RoleMixin from .app import db DOWNLOAD_BASE_URL = 'https://archive.org/download/' class Instance(db.EmbeddedDocument): text = db.StringField(required=True) source_id = db.ObjectIdFi...
mtpain/metacorps
app/models.py
Python
bsd-3-clause
6,238
0
# -*- coding: utf8 -*- """ This is part of shot detector. Produced by w495 at 2017.05.04 04:18:27 """ from __future__ import absolute_import, division, print_function import datetime from collections import Iterable from enum import Enum from types import BuiltinFunctionType, FunctionType from uuid import UUI...
w495/python-video-shot-detector
shot_detector/utils/repr_hash.py
Python
bsd-3-clause
2,296
0.00784
#class SVNRepo: # @classmethod # def isBadVersion(cls, id) # # Run unit tests to check whether verison `id` is a bad version # # return true if unit tests passed else false. # You can use SVNRepo.isBadVersion(10) to check whether version 10 is a # bad version. class Solution: """ @param n:...
Rhadow/leetcode
lintcode/Medium/074_First_Bad_Version.py
Python
mit
742
0.001348
# # Copyright 2019 The FATE 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...
FederatedAI/FATE
examples/pipeline/hetero_feature_binning/pipeline-hetero-binning-sparse-optimal-chi-square.py
Python
apache-2.0
2,362
0.00127
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 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...
rbreitenmoser/snapcraft
snapcraft/wiki.py
Python
gpl-3.0
2,447
0
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from default_config import config db = SQLAlchemy() def create_app(config_name): # Define the WSGI application object app = Flask(__name__) # Configurations app.config.from_object(config[config_name]) config[config_name].ini...
nbbl/ger-trek
app/__init__.py
Python
gpl-2.0
1,012
0.008893
"""Let's Encrypt client crypto utility functions. .. todo:: Make the transition to use PSS rather than PKCS1_v1_5 when the server is capable of handling the signatures. """ import logging import os import OpenSSL import zope.component from acme import crypto_util as acme_crypto_util from acme import jose from ...
g1franc/lets-encrypt-preview
letsencrypt/crypto_util.py
Python
apache-2.0
8,163
0.000123
from django.test import TestCase from django.test.utils import override_settings from util.testing import UrlResetMixin class FaviconTestCase(UrlResetMixin, TestCase): """ Tests of the courseware favicon. """ shard = 1 def test_favicon_redirect(self): resp = self.client.get("/favicon.ico...
teltek/edx-platform
lms/djangoapps/courseware/tests/test_favicon.py
Python
agpl-3.0
961
0
# -*- encoding: utf-8 -*- # Pilas engine - A video game framework. # # Copyright 2010 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar from pilas.actores import Actor import pilas DEMORA = 14 class Menu(Actor): """Un actor que puede mostra...
fsalamero/pilas
pilas/actores/menu.py
Python
lgpl-3.0
7,370
0.004755
#!/usr/bin/python # # Copyright 2013 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...
caioserra/apiAdwords
examples/adspygoogle/dfp/v201306/get_team.py
Python
apache-2.0
1,511
0.001985
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
our-city-app/oca-backend
src/rogerthat/dal/activation.py
Python
apache-2.0
1,112
0.000899
from riotwatcher import * from time import sleep import logging log = logging.getLogger('log') def getTeamOfSummoner( summonerId, game ): for p in game['participants']: if p['summonerId'] == summonerId: return p['teamId'] def getSummonerIdsOfOpponentTeam( summonerId, game ): teamId = getTeamOfS...
DenBaum/lolm8guesser
friendship.py
Python
mit
3,046
0.043664
try: from . import i18n from . import connect_core from . import screens from . import exceptions from . import command except ModuleNotFoundError: import i18n import connect_core import screens import exceptions import command def fast_post_step0( api: object, ...
Truth0906/PTTCrawlerLibrary
PyPtt/_api_post.py
Python
lgpl-3.0
6,653
0
import libtcodpy as libtcod import math import shelve import textwrap ############################################# # Constants and Big Vars ############################################# # Testing State TESTING = True # Size of the window SCREEN_WIDTH = 100 SCREEN_HEIGHT = 70 # Size of the Map MAP_WIDTH = SCREEN_WI...
emersonp/roguelike
rl.py
Python
mit
45,673
0.021085
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import logging import click import socket from mkdocs import __version__ from mkdocs import utils from mkdocs import exceptions from mkdocs import config from mkdocs.commands import build, gh_deploy, new, serve log = logging.getLogger(__na...
lukfor/mkdocs
mkdocs/__main__.py
Python
bsd-2-clause
8,721
0.00172
# Copyright 2021 The TensorFlow Probability 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 law o...
tensorflow/probability
tensorflow_probability/python/experimental/linalg/no_pivot_ldl_test.py
Python
apache-2.0
4,358
0.00413
# -*- Mode: Python; test-case-name: flumotion.test.test_ui_fgtk -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public ...
ylatuya/Flumotion
flumotion/ui/fgtk.py
Python
gpl-2.0
2,667
0.000375
import sys from .space_delimited import SpaceDelimited try: from nltk.stem.snowball import SnowballStemmer stemmer = SnowballStemmer("french") except ValueError: raise ImportError("Could not load stemmer for {0}. ".format(__name__)) try: from nltk.corpus import stopwords as nltk_stopwords stopwor...
ToAruShiroiNeko/revscoring
revscoring/languages/french.py
Python
mit
1,905
0
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip imp...
rahushen/ansible
test/units/modules/network/f5/test_bigip_monitor_tcp_echo.py
Python
gpl-3.0
10,010
0.001199
# Required environmental variables: # * DATABASE_URL # * MINICASH_LOCAL_DIR # * MINICASH_SECRET_KEY from .base import * DEBUG = False # Allow all host headers ALLOWED_HOSTS = ['*'] # Simplified static file serving. # https://warehouse.python.org/project/whitenoise/ STATICFILES_STORAGE = 'whitenoise.django.GzipMan...
BasicWolf/minicash
src/minicash/app/settings/heroku.py
Python
apache-2.0
472
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...
ksrajkumar/openerp-6.1
openerp/addons/itara_customer_commission/__openerp__.py
Python
agpl-3.0
1,639
0.005491
import time from datetime import timedelta from typing import List from treeherder.config import settings from treeherder.perf.sheriffing_criteria import ( EngineerTractionFormula, FixRatioFormula, CriteriaTracker, TotalAlertsFormula, ) from treeherder.perf.sheriffing_criteria import criteria_tracking...
jmaher/treeherder
treeherder/perf/management/commands/compute_criteria_formulas.py
Python
mpl-2.0
5,956
0.002183
default_app_config = 'comet.apps.CometIndicatorConfig'
LegoStormtroopr/comet-indicator-registry
comet/__init__.py
Python
bsd-2-clause
54
0.018519
import abc class Container(abc.ABC): """ A container for exposed methods and/or event handlers for a better modularization of the application. Example usage :: # in users.py class UsersModule(gemstone.Container): @gemstone.exposed_method("users.register") ...
vladcalin/gemstone
gemstone/core/container.py
Python
mit
1,639
0
from numpy import * from stft import * from pvoc import * stft = STFT(16384, 2, 4) pvoc = PhaseVocoder(stft) time = 0 def process(i, o): global time for x in stft.forward(i): x = pvoc.forward(x) x = pvoc.to_bin_offset(x) x = pvoc.shift(x, lambda y: sin(y + time*0.01)*mean(y)) x...
nwoeanhinnogaehr/live-python-jacker
examples/pvoc5.py
Python
gpl-3.0
431
0.00232
#!/usr/bin/env python import telnetlib, argparse parser = argparse.ArgumentParser(description='Firefox bookmarks backup tool') parser.add_argument('output', metavar='FILE', type=str) parser.add_argument('--host', metavar='host', type=str, default="localhost", help="mozrep host") parser.add_argument('--port', metavar=...
hugoArregui/ff-bookmarks-backup
ff-bookmarks-backup.py
Python
bsd-3-clause
867
0.005767
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: dr-prodigy <maurizio....
ryanss/holidays.py
holidays/countries/australia.py
Python
mit
9,872
0
############################################################################## # Copyright (c) 2013-2017, 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...
TheTimmy/spack
var/spack/repos/builtin/packages/r-limma/package.py
Python
lgpl-2.1
1,617
0.001237
import Utils from Utils import printe class CommandBuilder(object): def __init__(self, *command_args): self.command_args = list(command_args) def append(self, *args): for arg in args: if isinstance(arg, str): self.command_args += [arg] elif isinstance(...
bytejive/lazy-docker
CommandBuilder.py
Python
apache-2.0
828
0
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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 the rights # to use, copy, modify...
sumara/ansible-lint-deb
deb_dist/ansible-lint-2.1.3/lib/ansiblelint/utils.py
Python
gpl-2.0
9,195
0.000218
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-04 21:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("peering", "0003_auto_20170903_1235")] operations = [ migrations.AlterField( model_name="autonomoussystem", ...
respawner/peering-manager
peering/migrations/0004_auto_20171004_2323.py
Python
apache-2.0
1,014
0
#!/usr/bin/python3 #from __future__ import print_function from setuptools import setup, Extension import sys import os import psutil # monkey-patch for parallel compilation def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=No...
peter-ch/MultiNEAT
setup.py
Python
lgpl-3.0
5,190
0.005202
#!/usr/bin/env python import unittest from sqlbuilder import smartsql from ascetic import exceptions, validators from ascetic.databases import databases from ascetic.mappers import Mapper, mapper_registry from ascetic.relations import ForeignKey Author = Book = None class TestMapper(unittest.TestCase): maxDif...
emacsway/ascetic
ascetic/tests/test_mappers.py
Python
mit
11,813
0.00254
# cs.???? = currentstate, any variable on the status tab in the planner can be used. # Script = options are # Script.Sleep(ms) # Script.ChangeParam(name,value) # Script.GetParam(name) # Script.ChangeMode(mode) - same as displayed in mode setup screen 'AUTO' # Script.WaitFor(string,timeout) # Script.SendRC(chan...
vizual54/MissionPlanner
Scripts/example1.py
Python
gpl-3.0
1,491
0.031565
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Automatic config nagios configurations. Copyright (C) 2015 Canux CHENG All rights reserved Name: __init__.py Author: Canux canuxcheng@gmail.com Version: V1.0 Time: Wed 09 Sep 2015 09:20:51 PM EDT Exaple: ./nagios -h """ __version__ = "3.1.0.0" __description__ = "...
crazy-canux/xnagios
nagios/__init__.py
Python
apache-2.0
451
0.002217
# -*- coding: utf-8 -*- from __future__ import division, print_function import fnmatch import logging import numpy as np from ._transit import CythonSolver __all__ = ["Central", "Body", "System"] try: from itertools import izip, imap except ImportError: izip, imap = zip, map # Newton's constant in $R_\odo...
dfm/transit
transit/transit.py
Python
mit
20,191
0.00005
#!/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 distribut...
ColOfAbRiX/ansible
lib/ansible/modules/network/nxos/nxos_pim.py
Python
gpl-3.0
9,817
0.001834
import numpy as np from datetime import datetime import pytz from zipline.algorithm import TradingAlgorithm #from zipline.utils.factory import load_from_yahoo from pulley.zp.data.loader import load_bars_from_yahoo from zipline.finance import commission #STOCKS = ['AMD', 'CERN', 'COST', 'DELL', 'GPS', 'INTC', 'MMM'] S...
jimgoo/zipline-fork
zipline/examples/olmar.py
Python
apache-2.0
5,460
0.002198
#coding: utf-8 import os import sys PWD = os.path.dirname(os.path.realpath(__file__)) WORKDIR = os.path.join(PWD, '../') BINARYS = { 'REDIS_SERVER_BINS' : os.path.join(WORKDIR, '_binaries/redis-*'), 'REDIS_CLI' : os.path.join(WORKDIR, '_binaries/redis-cli'), 'MEMCACHED_BINS' : os.path.j...
vipshop/twemproxies
tests/conf/conf.py
Python
apache-2.0
436
0.013761
# Copyright 2012 Nebula, Inc. # Copyright 2014 IBM Corp. # # 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...
watonyweng/horizon
horizon/test/tests/tables.py
Python
apache-2.0
64,222
0
# -*- coding: utf-8 -*- # # Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of fiware-cygnus (FI-WARE project). # # fiware-cygnus 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 Foun...
jmcanterafonseca/fiware-cygnus
test/acceptance/integration/notifications/mysql/steps.py
Python
agpl-3.0
5,768
0.009193
from scipy.io.wavfile import read import matplotlib.pyplot as plt from pylab import * import PIL from PIL import Image, ImageOps import wave, struct, sys import glob, os for file in os.listdir("./"): if file.endswith(".wav"): print(file) outputfile = file[:-4] + '.png' input_data = read(fi...
sinneb/pyo-patcher
webroot/transformer.py
Python
mit
791
0.012642
from roetsjbaan.migrator import * from roetsjbaan.versioner import *
mivdnber/roetsjbaan
roetsjbaan/__init__.py
Python
mit
69
0
#-*- coding: utf-8 -*- #!/usr/bin/env python """ Flask-Mysqlpool ----------- Adds support to flask to connect to a MySQL server using mysqldb extension and a connection pool. """ from setuptools import setup setup( name='Flask-Mysqlpool', version='0.1', url='', license='BSD', author='Giorgos Komni...
gosom/flask-mysqlpool
setup.py
Python
bsd-3-clause
1,227
0.002445
# -*- coding:utf-8 -*- """ Definition of physical dimensions. Unit systems will be constructed on top of these dimensions. Most of the examples in the doc use MKS system and are presented from the computer point of view: from a human point, adding length to time is not legal in MKS but it is in natural system; for a...
wxgeo/geophar
wxgeometrie/sympy/physics/unitsystems/dimensions.py
Python
gpl-2.0
17,933
0.000725
from __future__ import unicode_literals import cgi import codecs import logging import re import sys from io import BytesIO from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.urls import set_script_prefix from django.utils import ...
filias/django
django/core/handlers/wsgi.py
Python
bsd-3-clause
9,048
0.000553
SEQUENCE = [ 'localsite_public', 'localsite_extra_data', ]
reviewboard/reviewboard
reviewboard/site/evolutions/__init__.py
Python
mit
67
0
# import sys # sys.path.append('/home/openflow/frenetic/updates/examples') from nxtopo import NetworkXTopo from mininet.topo import Node import networkx as nx class MyTopo( NetworkXTopo ): def __init__( self, enable_all = True ): comp_graph = nx.complete_graph(32) graph = nx.Graph() ...
XianliangJ/collections
CNUpdates/updates/examples/hypercube.py
Python
gpl-3.0
753
0.027888
#!/usr/bin/env python from pkg_resources import require from . import defer __version__ = '1.1.3'
SentimensRG/txCelery
txcelery/__init__.py
Python
mit
100
0
"""General client side utilities. This module contains utility functions, used primarily by advanced COM programmers, or other COM modules. """ import pythoncom from win32com.client import Dispatch, _get_good_object_ PyIDispatchType = pythoncom.TypeIIDs[pythoncom.IID_IDispatch] def WrapEnum(ob, resultCLSID = None): ...
JulienMcJay/eclock
windows/Python27/Lib/site-packages/pywin32-218-py2.7-win32.egg/win32com/client/util.py
Python
gpl-2.0
2,965
0.03339
#!/usr/bin/env python import argparse import re from sys import argv #Globals NT= ('A','C','G','T','U','R','Y','K','M','S','W','B','D','H','V','N', '-', '?') AA =('A','B','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','U','V','W','Y','Z','X', '-', '*', '?') #dictionary of ambiguity: Ambigs = { ...
ballesterus/UPhO
Consensus.py
Python
gpl-3.0
5,860
0.025256
# Copyright (c) 2014 Alexander Bredo # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above # copyright notice, this list of conditions ...
alexbredo/ipfix-receiver
base/cache.py
Python
bsd-2-clause
4,389
0.030987
# -*- coding: utf-8 -*- from subprocess import check_call def test_shellstreaming_help(): check_call(["shellstreaming", "--help"])
laysakura/shellstreaming
test/master/test_master_functional.py
Python
apache-2.0
139
0
#!/usr/bin/python3 """ Analyze the word frequencies on the main articles of a website """ import argparse import requests from bs4 import BeautifulSoup import re import itertools import string from collections import defaultdict import time import json import os import operator def load_ignored_words(words_file): ...
dmpalyvos/web-scripts
spider.py
Python
gpl-2.0
5,655
0.001945
############################ Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> ...
PyGithub/PyGithub
github/StatsContributor.py
Python
lgpl-3.0
4,872
0.005542
from openpyxl.styles.colors import Color import pytest @pytest.mark.parametrize("value", ['00FFFFFF', 'efefef']) def test_argb(value): from ..colors import aRGB_REGEX assert aRGB_REGEX.match(value) is not None class TestColor: def test_ctor(self): c = Color() assert c.value == "00000000...
Darthkpo/xtt
openpyxl/styles/tests/test_colors.py
Python
mit
1,719
0.000582
# Parser from util import sTu, getSFChar, sTr, sTup, checkAware import world as w import settings as s from commands import movement from commands import inform from commands import admin from commands import objects command_list = { 'look':"1", 'score':"1", 'move':"1", 'sit':"1", 'stand':"1", 'sleep':"1", 'wak...
tellian/muddpy
muddpy/Commands.py
Python
gpl-3.0
1,696
0.055425
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
jonparrott/google-cloud-python
ndb/src/google/cloud/ndb/model.py
Python
apache-2.0
97,630
0
#!/usr/bin/env python '''coffeehandlers.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jul 2014 This contains the URL handlers for the astroph-coffee web-server. ''' import os.path import logging import base64 import re LOGGER = logging.getLogger(__name__) from datetime import datetime, timedelta from pytz imp...
waqasbhatti/astroph-coffee
src/coffeehandlers.py
Python
mit
91,422
0.002439
from . import error from . import protocol from . import transport from urllib import parse as urlparse def command(func): def inner(self, *args, **kwargs): if hasattr(self, "session"): session = self.session else: session = self if session.session_id is None: ...
KiChjang/servo
tests/wpt/web-platform-tests/tools/webdriver/webdriver/client.py
Python
mpl-2.0
26,422
0.000719
# -*- coding: utf-8 -*- from datetime import timedelta from itertools import product import nose import re import warnings from pandas import (date_range, MultiIndex, Index, CategoricalIndex, compat) from pandas.core.common import PerformanceWarning from pandas.indexes.base import InvalidIndexErro...
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tests/indexes/test_multi.py
Python
gpl-2.0
78,143
0.000013
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 17/2/2015 @author: Antonio Hermosilla Rodrigo. @contact: anherro285@gmail.com @organization: Antonio Hermosilla Rodrigo. @copyright: (C) 2015 by Antonio Hermosilla Rodrigo @version: 1.0.0 ''' import sys from PyQt4 import QtCore from PyQt4 import QtGui from ...
tonihr/pyGeo
Controladores/UTM2Geo.py
Python
gpl-2.0
7,615
0.016419
# -*- coding: utf-8 -*- def social_poke(entity, argument): return True #- Fine Funzione -
Onirik79/aaritmud
src/socials/social_poke.py
Python
gpl-2.0
95
0.010526
# This file is part of VoltDB. # Copyright (C) 2008-2013 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
vtorshyn/voltdb-shardit-src
voltdb-3.7/lib/python/voltcli/voltadmin.d/restore.py
Python
apache-2.0
1,943
0.006691
# -*- coding: utf-8 -*- # © 2015 iDT LABS (http://www.@idtlabs.sl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_holidays_compute_days
VitalPet/hr
hr_holidays_compute_days/tests/__init__.py
Python
agpl-3.0
180
0
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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...
bac/horizon
openstack_dashboard/dashboards/identity/roles/views.py
Python
apache-2.0
3,528
0
"""This file is useful only if 'salesforce' is a duplicit name in Django registry then put a string 'salesforce.apps.SalesforceDb' instead of simple 'salesforce' """ from django.apps import AppConfig class SalesforceDb(AppConfig): name = 'salesforce' label = 'salesforce_db'
django-salesforce/django-salesforce
salesforce/apps.py
Python
mit
286
0.003497
# -*- encoding:utf-8 -*- """期货度量模块""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import seaborn as sns from ..CoreBu import ABuEnv from ..ExtBu.empyrical import stats from ..MetricsBu.ABuMetricsBase im...
bbfamily/abu
abupy/MetricsBu/ABuMetricsFutures.py
Python
gpl-3.0
4,134
0.002949
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register from sentry.models import ReleaseFile @register(ReleaseFile) class ReleaseFileSerializer(Serializer): def serialize(self, obj, attrs, user): return { 'id': six.text_type(obj.id), ...
alexm92/sentry
src/sentry/api/serializers/models/release_file.py
Python
bsd-3-clause
515
0
from pyui.stack_images import Ui_StackImages from PyQt5.QtWidgets import QDialog, QAction, QLineEdit, QProgressDialog, QApplication, QToolBar from PyQt5.QtGui import QIcon, QStandardItemModel, QStandardItem from PyQt5.QtCore import Qt, QObject, pyqtSignal, QStandardPaths, QByteArray from pyspectrum_commons import * fro...
GuLinux/PySpectrum
stack_images.py
Python
gpl-3.0
9,262
0.009177
#!/usr/bin/python # service_proxy_server.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (service_proxy_server.py) is part of BitDust Software. # # BitDust is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by...
vesellov/bitdust.devel
services/service_proxy_server.py
Python
agpl-3.0
2,236
0.001789
from django import forms from django.db.models.fields import CharField, DecimalField from django.utils.translation import ugettext_lazy as _ from tendenci.apps.invoices.models import Invoice from tendenci.apps.events.models import Event class AdminNotesForm(forms.ModelForm): class Meta: model = Invoice ...
alirizakeles/tendenci
tendenci/apps/invoices/forms.py
Python
gpl-3.0
4,200
0.001905
''' Created on Dec 11, 2015 @author: cmelton ''' from DDServerApp.ORM import orm,Column,relationship,String,Integer, PickleType, Float,ForeignKey,backref,TextReader, joinedload_all from DDServerApp.ORM import BASE_DIR, Boolean from User import User import os, copy class Credentials(orm.Base): ''' classdocs ...
collinmelton/DDCloudServer
DDServerApp/ORM/Mappers/WorkflowTemplates.py
Python
gpl-2.0
22,461
0.012466
from .validator import Validator from ..util import register_as_validator class ExactLength(Validator): __validator_name__ = 'exact_length' def __init__(self, exact_length): super(ExactLength, self).__init__() self.exact_length = exact_length def validate(self, data, request=None, sessio...
Performante/pyFormante
pyFormante/validation/exact_length.py
Python
gpl-2.0
411
0.002433
import pygame def timer(): event = pygame.USEREVENT pygame.init() screen = pygame.display.set_mode((800, 600)) clock = pygame.time.Clock() counter, text = 50, '50' pygame.time.set_timer(event, 1000) font = pygame.font.SysFont('comicsansms', 20) while True: f...
QuinDiesel/CommitSudoku-Project-Game
Definitief/timer.py
Python
mit
1,135
0.013216
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import os def strip_comments(l): return l.split('#', 1)[0].strip() def reqs(*f): return list(filter(None, [strip_comments(l) for l in open( os.path.join(os.getcwd(), *f)).readlines()])) def get_version(version_tuple): if not i...
20tab/python-gmaps
setup.py
Python
bsd-2-clause
1,557
0.001285
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
lefnire/tensorforce
tensorforce/core/preprocessors/normalize.py
Python
apache-2.0
1,635
0.001835
# # Retrieved from: https://svn.code.sf.net/p/p2tk/code/python/syllabify/syllabifier.py # on 2014-09-05. # # According to https://www.ling.upenn.edu/phonetics/p2tk/, this is licensed # under MIT. # # This is the P2TK automated syllabifier. Given a string of phonemes, # it automatically divides the phonemes into syllab...
dfm/twitterick
twitterick/syllabifier.py
Python
mit
6,769
0.027921