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 python3 import asyncio import contextlib import datetime import functools import importlib import itertools import logging import os import sys import traceback import click import discord import config from cogs.utils import db from core import Chiaki, migration # use faster event loop, but fall bac...
Ikusaba-san/Chiaki-Nanami
chiaki.py
Python
mit
4,858
0.004529
# -*- coding: utf-8 -*- """ pipya main cli file Copyright (c) 2015 Brunston Poon This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Full license in LICENCE.txt """ #IMPORT IMPORT IMPORT IMPO...
brupoon/pipya
pipya.py
Python
gpl-3.0
3,093
0.005496
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Octofiles documentation build configuration file, created by # sphinx-quickstart on Thu Mar 10 14:51:08 2016. # # 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 # ...
hackultura/octofiles
docs/source/conf.py
Python
gpl-3.0
11,319
0.006538
#!/usr/bin/env python # -*- coding:utf-8 -*- from flask import Flask from config import * # create the app app = Flask(__name__) # Load default config and override config from config file app.config.from_object('config')
n8foo/cigarbox
app.py
Python
apache-2.0
223
0.004484
# -*- coding: utf-8 -*- ############################################################################### # # GetLoginProfile # Retrieves the user name and password create date for the specified user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (th...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/IAM/GetLoginProfile.py
Python
apache-2.0
3,876
0.005418
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Craig J. Anderson # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
Forage/Gramps
gramps/plugins/lib/libsubstkeyword.py
Python
gpl-2.0
48,355
0.007424
""" InaSAFE Disaster risk assessment tool developed by AusAid - **GUI Dialog.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 vers...
takmid/inasafe
safe_qgis/dock.py
Python
gpl-3.0
73,919
0.00188
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('data_storage', '0002_auto_20150727_2312'), ] operations = [ migrations.RenameField( model_name='readonly', ...
nmccrory/job-visualization
jobvisualization/apps/data_storage/migrations/0003_auto_20150728_2302.py
Python
apache-2.0
953
0
#!/usr/bin/python # find_unicode.py # # Author: Jonathan Hosmer # Date: Sun Feb 15 14:06:15 2015 # import os import sys def help(): print 'Usage: {} [file, [dir, [file, ..]]]'.format(__file__) print 'Displays line:character position of all non-ascii Unicode character(s) in a file' def main(): args = sys....
jhosmer/find_unicode
find_unicode.py
Python
gpl-2.0
1,875
0.005867
import json import re import unittest from datetime import datetime from coalib.output.JSONEncoder import create_json_encoder class TestClass1(object): def __init__(self): self.a = 0 class TestClass2(object): def __init__(self): self.a = 0 self.b = TestClass1() class TestClass3(...
Nosferatul/coala
tests/output/JSONEncoderTest.py
Python
agpl-3.0
2,948
0
# Copyright 2012, Nachi Ueno, NTT MCL, Inc. # Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses...
sandvine/horizon
openstack_dashboard/dashboards/project/routers/views.py
Python
apache-2.0
9,121
0
#!/usr/bin/python AGO_TELLSTICK_VERSION = '0.0.9' """ ############################################ # # Tellstick Duo class # # Date of origin: 2014-01-25 # __author__ = "Joakim Lindbom" __copyright__ = "Copyright 2014, Joakim Lindbom" __credits__ = ["Joakim Lindbom", "The ago control team"] __license__ = "GP...
JoakimLindbom/ago
tellstick/tellstickduo.py
Python
gpl-3.0
7,092
0.005781
# 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 use ...
pquentin/libcloud
libcloud/test/storage/test_azure_blobs.py
Python
apache-2.0
38,350
0.000078
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; import re import copy import os from trac.resource import Resource, ResourceNotFound from trac.util.translation import _ from trac.util.datefmt import from_utimestamp, to_utimestamp, utc, utcmax from...
aroth-arsoft/arsoft-web-crashupload
app/crashdump/model.py
Python
gpl-3.0
24,814
0.00129
from __future__ import absolute_import from .notedown import * from .main import convert, markdown_template, __version__ # avoid having to require the notebook to install notedown try: from .contentsmanager import NotedownContentsManager except ImportError: NotedownContentsManager = 'You need to install the j...
michhar/notedown
notedown/__init__.py
Python
bsd-2-clause
338
0
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
andrei4ka/fuel-web-redhat
nailgun/nailgun/test/integration/test_db_refresh.py
Python
apache-2.0
1,879
0
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Project_Dependencies.is_public' db.delete_column('project_project_dependencies', 'is_publi...
alexykot/bitfund
bitfund/project/migrations/0006_auto__del_field_project_dependencies_is_public.py
Python
gpl-3.0
11,471
0.008195
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.plant_heating_and_cooling_equipment import ChillerElectricReformulatedEir log = logging.getLogger(__name__) class TestChillerElectricReformulatedEir(unittest.TestCase): def...
rbuffat/pyidf
tests/test_chillerelectricreformulatedeir.py
Python
apache-2.0
10,596
0.005379
import bpy from .... base_types.node import AnimationNode class LineMeshNode(bpy.types.Node, AnimationNode): bl_idname = "an_LineMeshNode" bl_label = "Line Mesh" def create(self): self.newInput("Vector", "Start", "start") self.newInput("Vector", "End", "end", value = [0, 0, 10]) se...
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/mesh/generation/line.py
Python
gpl-3.0
799
0.010013
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "travis-ci.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
uw-it-aca/mdot-developers
travis-ci/manage.py
Python
apache-2.0
252
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0014_survey'), ] operations = [ migrations.AddField( model_name='survey', name='question2', ...
Saruus/drPencilcode
app/migrations/0015_survey_question2.py
Python
agpl-3.0
435
0
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to manage history. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSignal, Qt, QUrl from PyQt5.QtGui import QFontMetrics, QCursor from PyQt5.QtWidgets import QD...
davy39/eric
Helpviewer/History/HistoryDialog.py
Python
gpl-3.0
5,112
0.003912
# -*- coding: utf-8 -*- # Copyright (C) 2016-2018 Cordell Bloor # Published under the MIT License from nose.tools import * import guardonce.util as go def test_ok(): contents = ''' #ifndef MATCH_H #define MATCH_H ''' g,s,e = go.guess_guard(contents) assert_equals(g, 'MATCH_H') assert_equals(s, 1) ...
cgmb/guardonce
tests/test_guess_guard.py
Python
mit
4,227
0.012302
from django.core.management.base import BaseCommand from django.conf import settings from utils.amazon import default_s3_store from videos.models import Video, VIDEO_TYPE_FLV, VIDEO_TYPE_HTML5 import urllib import os import commands import sys from django.core.exceptions import ImproperlyConfigured from django.core.fil...
wevoice/wesub
apps/videos/management/commands/load_thumbnails.py
Python
agpl-3.0
4,320
0.00787
#! /usr/bin/python import bottle import settings from controller import admin as admin_controller from controller import email as email_controller app = application = bottle.Bottle() # Base url for regular users app.route(settings.BASEPATH, 'GET', admin_controller.index) app.route(settings.BASEPATH + '/', 'GET', adm...
TeachBoost/ansible
ansible.py
Python
mit
1,499
0
# https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons class Solution: def numOfArrays(self, n: int, m: int, k: int) -> int: M = 1000000007 ret = 0 for i in range(k, m+1): ret += ((i-1)**(k-1)) * (i**(n-k)) return ret % M # n =...
heyf/cloaked-octo-adventure
leetcode/1420_build-array-where-you-can-find-the-maximum-exactly-k-comparisons.py
Python
mit
550
0.003636
import json import os import unittest from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine from pymatgen.util.testing import PymatgenTest class PhononBandStructureSymmLineTest(PymatgenTest): def setUp(self): with open( os.path.join(PymatgenTest.TEST_FILES_DIR, "NaCl_phonon_ba...
materialsproject/pymatgen
pymatgen/phonon/tests/test_bandstructure.py
Python
mit
3,536
0.00198
"""Manage Treadmill app manifest.""" from __future__ import absolute_import import logging import urllib import click from .. import cli from treadmill import restclient from treadmill import context _LOGGER = logging.getLogger(__name__) _STATE_FORMATTER = cli.make_formatter(cli.InstanceStatePrettyFormatter) _EN...
toenuff/treadmill
lib/python/treadmill/cli/show.py
Python
apache-2.0
4,580
0
#!/usr/bin/env python # $Id: pythiaExample.py 545 2012-01-18 06:10:03Z cvermilion $ #---------------------------------------------------------------------- # Copyright (c) 2010-12, Pierre-Antoine Delsart, Kurtis Geerlings, Joey Huston, # Brian Martin, and Christopher Vermilion # #-----------------------...
mickypaganini/SSI2016-jet-clustering
spartyjet-4.0.2_mac/examples_py/pythiaExample.py
Python
mit
3,668
0.008179
from django.conf.urls import patterns, include, url from django.contrib import admin import views from django.contrib.auth.decorators import login_required urlpatterns = patterns('', url(r'^library$', views.library, name='profile-library'), url(r'^stream$', views.stream, name='profile-stream'), url(r'^add_...
joelstanner/django-imager
imager/imager_images/urls.py
Python
mit
1,528
0.003927
""" Generic relations Generic relations let an object have a foreign key to any object through a content-type/object-id field. A ``GenericForeignKey`` field can point to any object, be it animal, vegetable, or mineral. The canonical example is tags (although this example implementation is *far* from complete). """ f...
megaumi/django
tests/generic_relations/models.py
Python
bsd-3-clause
4,327
0.001156
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'BIOMD0000000462.xml') with open(sbmlFilePath,'r') as f: sbmlString = f.read() def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: ret...
biomodels/BIOMD0000000462
BIOMD0000000462/model.py
Python
cc0-1.0
427
0.009368
# # Gordon McMillan (as inspired and influenced by Greg Stein) # # subclasses may not need marshal or struct, but since they're # builtin, importing is safe. # # While an Archive is really an abstraction for any "filesystem # within a file", it is tuned for use with imputil.FuncImporter. # This assumes it contains pyt...
toontownfunserver/Panda3D-1.9.0
direct/pyinst/archive_rt.py
Python
bsd-3-clause
7,405
0.017016
class Point: Empty = " " Full = "XX" def __init__(self, x, y): if not type(x) == int \ or not type(y) == int: raise Exception('Can only assign int type to x or y value') self.X = x self.Y = y self.Value = self.Empty def __eq__(self, other): if isinstance(other, self.__class__):...
acbilson/py-lex-lib
point.py
Python
gpl-3.0
593
0.016863
#!/usr/bin/env python """Download data files needed by SLURP.""" # Copyright (C) 2012-2013 Constantine Lignos # # 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, ...
PennNLP/SLURP
download.py
Python
gpl-3.0
1,488
0.001344
##################################################################################### # # # Script to update Hostname # # ...
davidcurrie/ci.docker.websphere-traditional
network-deployment/appserver/updateHostName.py
Python
apache-2.0
1,804
0.033259
from setuptools import find_packages from setuptools import setup with open('README.md') as f: setup( name = 'swarm', version = '0.5.0', author = 'arvin.x', author_email = 'arvin.x@icloud.com', description = 'A modular distributed penetration testing too...
Arvin-X/swarm
setup.py
Python
gpl-3.0
1,370
0.024818
import config def debug(*args): if config.DEBUG: print(*args)
BobWhitelock/termtris
termtris/debug.py
Python
mit
74
0.027027
#!/usr/bin/env python from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('compat', parent_package, top_path) return config if __name__ == '__main__': from numpy.distutils.core i...
LumPenPacK/NetworkExtractionFromImages
win_build/nefi2_win_amd64_msvc_2015/site-packages/numpy/compat/setup.py
Python
bsd-2-clause
371
0.005391
from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.models import Group def group_required(names, login_url=None): """ Checks if the user is a member of a particular group (or at least one group from the list) """ if not hasattr(names,'__iter__'): names = [n...
solex/django-odesk
django_odesk/auth/decorators.py
Python
bsd-3-clause
446
0.004484
# LogicalFile Management Providers # # Copyright (C) 2013-2014 Red Hat, Inc. 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 not...
openlmi/openlmi-doc
doc/python/lmi/scripts/logicalfile/lf_cmd.py
Python
gpl-2.0
3,427
0.003502
# @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime import sublime_plugin st_version = 2 if sublime.version() == '...
crlang/sublime-text---front-end-config
Data/Packages/CodeFormatter/CodeFormatter.py
Python
mit
6,068
0.000989
# Xandikos # Copyright (C) 2017 Jelmer Vernooij <jelmer@jelmer.uk>, et al. # # 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; version 3 # of the License or (at your option) any later version of # ...
jelmer/xandikos
xandikos/vcard.py
Python
gpl-3.0
2,165
0.000924
# 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 # distributed under t...
CiscoSystems/avos
openstack_dashboard/dashboards/project/data_processing/job_executions/tests.py
Python
apache-2.0
2,517
0
from Gaudi.Configuration import * from Configurables import GaudiSequencer from Configurables import DaVinci simulation=False from Configurables import EventNodeKiller eventNodeKiller = EventNodeKiller('DAQkiller') eventNodeKiller.Nodes = ['DAQ','pRec'] #MySequencer.Members+=[eventNodeKiller] from Configurables impo...
Williams224/davinci-scripts
kstetappipieta/DNTupleMaker.py
Python
mit
3,046
0.017072
import logging from django import template from django.conf import settings from django.core.urlresolvers import reverse from django.http import Http404 from apps.dasforms.forms import ContactForm from apps.dasforms.utils import get_form register = template.Library() logger = logging.getLogger(__name__) @register.i...
vinder/django-instaforms
templatetags/instaforms_tags.py
Python
mit
1,416
0.003531
#-*- coding:utf8 -*- def crawl_folder(folder): import os os_objects = [] seen = set([folder]) for os_object_name in os.listdir(folder): full_path = os.path.normpath(os.path.join(folder, os_object_name)) if not full_path in seen: os_objects.append((full_path, os_object_name...
mavlyutovrus/light_search
lib/utils.py
Python
mit
1,167
0.010283
#!/usr/bin/python # Example using an RGB character LCD wired directly to Raspberry Pi or BeagleBone Black. import time import Adafruit_CharLCD as LCD # Raspberry Pi configuration: lcd_rs = 27 # Change this to pin 21 on older revision Raspberry Pi's lcd_en = 22 lcd_d4 = 25 lcd_d5 = 24 lcd_d6 = 23 lcd_d7...
qkzk/sncf_lcd
adafruit_lcd/examples/red.py
Python
gpl-3.0
1,310
0.003817
# -*- coding: utf-8 -*- import logging from unittest import mock import olympia.core.logger from olympia.amo.tests import TestCase from olympia.users.models import UserProfile class LoggerTests(TestCase): @mock.patch('olympia.core.get_remote_addr', lambda: '127.0.0.1') @mock.patch('olympia.core.get_user', ...
kumar303/addons-server
src/olympia/core/tests/test_logger.py
Python
bsd-3-clause
2,279
0
import json import datetime from django.core.files.base import ContentFile from django.core.exceptions import ValidationError from django.utils.timezone import utc from ..models import AgentProfile from ..exceptions import IDNotFoundError, ParamError from ..utils import etag class AgentProfileManager(): def __...
adlnet/ADL_LRS
lrs/managers/AgentProfileManager.py
Python
apache-2.0
5,034
0.001589
# -*- coding: utf-8 -*- # © 2016 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_hr_expense
acsone/hr
hr_expense_product_policy/tests/__init__.py
Python
agpl-3.0
156
0
# -*- coding: utf-8 -*- # © 2016 ClearCorp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_invoice_incoterm
sysadminmatmoz/odoo-clearcorp
account_invoice_incoterm/models/__init__.py
Python
agpl-3.0
153
0
import datetime class Store: def parse(self,line): fields=line.split('\t') self.id = fields[0] self.name = fields[1] return self def __repr__(self): return "Store: id=%s \t name=%s"%(self.id,self.name) class Product: def parse(self,line): fields=line.split('\t') self.id = fields[0] self.name = fi...
sk-rai/Intro-to-SPARK-with-Python
code/sales/sales_schema.py
Python
unlicense
899
0.053393
# -*- 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-artifact-registry
google/cloud/artifactregistry_v1beta2/services/artifact_registry/pagers.py
Python
apache-2.0
25,894
0.00197
from mock import MagicMock, patch import pytest from adbpy.adb import Adb from adbpy import Target, AdbError @pytest.fixture def adb(): adb = Adb(()) adb.socket = MagicMock() return adb def test_get_transport(): assert Adb._get_transport(Target.ANY) == "host:transport-any" assert Adb._get_transp...
noahgoldman/adbpy
tests/test_adb.py
Python
mit
2,479
0.006858
from netools import nextIpInPool, ping, aliveHost, hostsUnDone def main(): aliveHosts = [] # pool IP ipStart = "192.168.56.1" ipEnd = "192.168.56.5" print"Pools: ", ipStart + " -> " + ipEnd print"Scanning online Router on network..." aliveHosts = aliveHost(ipStart, ipEnd) print "onl...
gravufo/commotion-router-testbench
ping/mainTest.py
Python
gpl-2.0
479
0.004175
# This document is part of Acronym # https://github.com/geowurster/Acronym # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
geowurster/Acronym
acronym/cmdl/_portable_algorithms/__init__.py
Python
bsd-3-clause
1,916
0.004175
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@ecdsa.org # # 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 witho...
imrehg/electrum
lib/blockchain.py
Python
mit
8,852
0.00113
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_website.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
shawnfuryan/django_website_core
django_website/manage.py
Python
mit
257
0
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed ...
SCSSoftware/BlenderTools
addon/io_scs_tools/ui/mesh.py
Python
gpl-2.0
2,693
0.001114
from .engine import BloggingEngine from .processor import PostProcessor from .sqlastorage import SQLAStorage from .storage import Storage """ Flask-Blogging is a Flask extension to add blog support to your web application. This extension uses Markdown to store and then render the webpage. Author: Gouthaman Balaraman...
wdm0006/Flask-Blogging
flask_blogging/__init__.py
Python
mit
403
0
# 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 # distributed under the Li...
mahak/keystone
keystone/common/validation/__init__.py
Python
apache-2.0
2,344
0
#!/usr/bin/python3 import argparse import os import sys import configuration import shouter from gitFunctions import Commiter from gitFunctions import Initializer, Differ from rtcFunctions import ImportHandler from rtcFunctions import RTCInitializer from rtcFunctions import RTCLogin from rtcFunctions import Workspace...
rtcTo/rtc2git
migration.py
Python
mit
6,494
0.003388
""" Lua pattern matcher based on a NFA inspired by http://swtch.com/~rsc/regexp/regexp1.html """ from rpyre.interface.lua import compile_re from rpyre.matching import find def main(args): n = 20 s = args[1] #s = "(a|b)*a%sa(a|b)*$" % ("(a|b)" * n, ) print s evilregex = compile_re(s) import os...
fhahn/rpyre
tools/cli.py
Python
mit
904
0.001106
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apac...
ntt-sic/neutron
neutron/plugins/common/constants.py
Python
apache-2.0
1,913
0.000523
# author: Milan Kubik
apophys/ipaqe-provision-hosts
ipaqe_provision_hosts/backend/__init__.py
Python
mit
22
0
##################################################### # # A library for getting match information for a given team at a given event # out of the Blue Alliance API # # Authors: Andrew Merrill and Jacob Bendicksen (Fall 2014) # # Requires the blueapi.py library ###################################################### #thi...
jacobbendicksen/BlueAPI
matchinfo.py
Python
mit
4,831
0.012834
# Copyright 2013 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...
roopali8/tempest
tempest/api/network/test_extra_dhcp_options.py
Python
apache-2.0
4,062
0.000246
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
skuda/client-python
kubernetes/test/test_v2alpha1_horizontal_pod_autoscaler_spec.py
Python
apache-2.0
1,023
0.00391
from django import forms from django.utils.html import escape from django.forms.utils import ErrorList from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from booktype.utils.misc import booktype_slugify from booki.editor.models import BookiGroup from booktype.ut...
MiczFlor/Booktype
lib/booktype/apps/portal/forms.py
Python
agpl-3.0
2,755
0.002178
# coding=utf-8 from __future__ import absolute_import import gevent from gevent.pywsgi import WSGIHandler import sys from webob import Request from .response import Response from .socket import Socket from ..event_emitter import EventEmitter from .transports import WebsocketTransport import logging logger = logging.g...
shuoli84/gevent_socketio2
socketio/engine/handler.py
Python
mit
5,977
0.002175
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
yosshy/nova
nova/tests/unit/virt/libvirt/test_driver.py
Python
apache-2.0
667,651
0.000443
import copy from threading import Lock from .metrics_core import Metric class CollectorRegistry(object): """Metric collector registry. Collectors must have a no-argument method 'collect' that returns a list of Metric objects. The returned metrics should be consistent with the Prometheus exposition f...
cloudera/hue
desktop/core/ext-py/prometheus_client-0.7.1/prometheus_client/registry.py
Python
apache-2.0
4,226
0.000237
#!/usr/bin/env python # # Generated Sat Jul 18 17:11:29 2015 by generateDS.py version 2.16a. # # Command line options: # ('-o', 'meetCI.py') # ('-s', 'meetCI_sub.py') # # Command line arguments: # meetCI.xsd # # Command line: # generateDS.py -o "meetCI.py" -s "meetCI_sub.py" meetCI.xsd # # Current working dire...
RathinakumarVisweswaran/MeetCI
python/meetCI_sub.py
Python
mit
14,507
0.004067
"""Generate reports no holdings. """ __author__ = "Martin Blais <blais@furius.ca>" import csv from beancount.core.number import D from beancount.core.number import ZERO from beancount.core import account from beancount.core import data from beancount.core import flags from beancount.parser import options from beancou...
iocoop/beancount
src/python/beancount/reports/holdings_reports.py
Python
gpl-2.0
13,561
0.00118
# -*- coding: utf-8 -*- from . import app, db from flask import request, g, session, redirect from Lotus.model.user import User from hashlib import md5 from Lotus.lib.msg_code import Msg import json @app.route('/user/login', methods=['POST']) def user_login(): email = request.form.get('email', None) psw = req...
Jayin/Lotus
Lotus/controller/user.py
Python
apache-2.0
2,550
0.001994
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # 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 # not...
Zolertia/openthread
tests/scripts/thread-cert/test_coap.py
Python
bsd-3-clause
16,471
0.002064
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_qc.configuration import Configuration class...
Telestream/telestream-cloud-python-sdk
telestream_cloud_qc_sdk/telestream_cloud_qc/models/partition_status_test.py
Python
mit
8,207
0
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'nosedjango' DATABASE_USER = 'root' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = '' TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-us' SITE_ID ...
nosedjango/nosedjango
nosedjangotests/settings_legacy.py
Python
lgpl-3.0
1,056
0
"""Leetcode 100. Same Tree Easy URL: https://leetcode.com/problems/same-tree/ Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value. Example 1: Input: 1 1 / \ ...
bowen0701/algorithms_data_structures
lc0100_same_tree.py
Python
bsd-2-clause
4,044
0.001731
# -*- coding: utf-8 -*- """ Created on Mon Jan 11 17:55:48 2016 用欧拉法计算自行车从静止起步后的速度 @author: nightwing """ import matplotlib.pyplot as plt DENSITY = 1.29 #空气密度(kg/m3) C = 1.0 #阻力系数 A = 0.33 #截面积(m2) M = 70.0 #人车质量(kg) v = 7.0 #转折速度(m/s) v1 = 0.0 #(无阻力)速度(m/s) v2 = 0.0 #(有阻力)速度(m/s...
WuShichao/computational-physics
2/2_5/2_5.py
Python
gpl-3.0
1,353
0.026667
# 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...
jbedorf/tensorflow
tensorflow/python/ops/distributions/util.py
Python
apache-2.0
54,998
0.005364
#!/usr/bin/env python import os import sys ## A name of directory containing 'path:...' file ## You can download them using 'make-wget_pathway.sh' script dir_name = sys.argv[1] f_summary = open('%s.summary'%dir_name,'w') f_genes = open('%s.genes'%dir_name,'w') f_compounds = open('%s.compounds'%dir_name,'w') gene_to...
taejoonlab/taejoonlab-toolbox
KEGG/make-pathway2list.py
Python
gpl-3.0
2,013
0.027322
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2022 F4PGA 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 # # Unl...
SymbiFlow/prjuray
fuzzers/007-timing/bel/tim2json.py
Python
isc
10,507
0
from SamplingAccuracyEvaluation import SamplingAlgorithm as SA from SamplingAccuracyEvaluation import AccuracyEvaluation as AE from SamplingAccuracyEvaluation import PrintGraph as PG from SamplingAccuracyEvaluation import StatisticalCalculation as SC import operator def populationListGenerate(filePath, target): pr...
dke-knu/i2am
i2am-app/AlgorithmSelectionEngine/SamplingAccuracyEvaluation/SamplingAccuracyEvaluation.py
Python
apache-2.0
3,665
0.006276
# OpenShot Video Editor is a program that creates, modifies, and edits video files. # Copyright (C) 2009 Jonathan Thomas # # This file is part of OpenShot Video Editor (http://launchpad.net/openshot/). # # OpenShot Video Editor is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
XXLRay/libreshot
libreshot/blender/scripts/blinds.py
Python
gpl-3.0
5,718
0.019237
""" Django settings for pyanalysis 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/ """ import sys import os from path import path import dj_database_url # No...
nanchenchen/script-analysis
pyanalysis/settings/common.py
Python
mit
12,572
0.00517
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2013 Martijn Kaijser # # 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 ...
SMALLplayer/smallplayer-image-creator
storage/.xbmc/addons/script.artwork.downloader/lib/common.py
Python
gpl-2.0
1,305
0.008429
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import note
ddico/odoo
addons/note/controllers/__init__.py
Python
agpl-3.0
118
0.008475
import unittest from mopidy_tunein import Extension class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn("[tunein]", config) self.assertIn("enabled = true", config) def test_get_config_s...
kingosticks/mopidy-tunein
tests/test_extension.py
Python
apache-2.0
483
0
#!/usr/bin/python # -*- coding: utf-8 -*- import re COST_AUTO = 5 class Appartment(object): """Appartment class consists of features that have all appartments""" def __init__(self, address, metro, transportation, rooms, space, price, floor, addInfo): super(Appartment, self).__init__() self.address = self.setAd...
leanton/cianParser
appartment.py
Python
mit
5,447
0.035596
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from projects.models import Project User = get_user_model() class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('user') parser.add_argument('nam...
XeryusTC/projman
functional_tests/management/commands/create_project.py
Python
mit
728
0.001374
# -*- coding: utf-8 -*- import traceback from datetime import timedelta from django.core import mail from django.core.mail import EmailMultiAlternatives, mail_admins from django.core.management.base import BaseCommand from django.template.loader import render_to_string from django.utils.translation import ugettext_laz...
pugpe/pugpe
apps/cert/management/commands/send_certificates.py
Python
mit
2,215
0.000904
import sys import glob def read_fileb(filename, mode='rb'): f = open(filename, mode) try: return f.read() finally: f.close() def write_fileb(filename, value, mode='wb'): f = open(filename, mode) try: f.write(value) finally: f.close() for filename in glob.glob...
pouyana/teireader
webui/scripts/fixws.py
Python
mit
646
0.001548
from hypothesis.utils.conventions import not_set def accept(f): def complex_numbers(): return f() return complex_numbers
keybar/keybar
.hypothesis/eval_source/hypothesis_temporary_module_f921b2988402df61d5f91622b67a9e50eddd05fc.py
Python
bsd-3-clause
138
0.007246
# # Created by DraX on 2005.08.08 # # Updated by ElgarL on 28.09.2005 # print "importing village master data: Talking Island Village ...done" import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jy...
Barrog/C4-Datapack
data/jscript/village_master/7026_bitz_occupation_change/__init__.py
Python
gpl-2.0
2,377
0.03618
#!/usr/bin/env python """ Backup all your organization's repositories, private or otherwise. """ import argparse import base64 import contextlib import json import os import sys import urllib2 from collections import namedtuple from urllib import urlencode from urllib import quote API_BASE = 'https://api.github.com/...
sproutsocial/botanist
packages/github_backup.py
Python
mit
8,574
0.003032
# dev/py/upax3/upax3/ftlog.py """ Fault-tolerant log for a Upax node. """ import os import re # import sys from collections import Container, Sized from xlattice import (HashTypes, check_hashtype, # u, SHA1_HEX_NONE, SHA2_HEX_NONE, SHA3_HEX_NONE, BLAKE2B_HEX_NONE) from ...
jddixon/upax_py
src/upax/ftlog.py
Python
mit
16,036
0
#!/usr/bin/env python import sys import re from helpers import * PROGRAM_USAGE = """ SeqAn invalid identifiers detection script. USAGE: invalid_identifiers.py BASE_PATH BASE_PATH is the root path of all the folders to be searched. This script generates a list of invalid identifiers found in the code base, paired wi...
bkahlert/seqan-research
raw/workshop13/workshop2013-data-20130926/trunk/misc/renaming/invalid_identifiers.py
Python
mit
5,253
0.002094
# Foris - web administration interface for OpenWrt based on NETCONF # Copyright (C) 2017 CZ.NIC, z.s.p.o. <http://www.nic.cz> # # 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 o...
CZ-NIC/foris
foris/config_handlers/__init__.py
Python
gpl-3.0
833
0