text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "shows.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
browning/shows
shows/manage.py
Python
mit
254
0
# https://projecteuler.net/problem=81 from projecteuler.FileReader import file_to_2D_array_of_ints # this problem uses a similar solution to problem 18, "Maximum Path Sum 1." # this problem uses a diamond instead of a pyramid matrix = file_to_2D_array_of_ints("p081.txt", ",") y_max = len(matrix) - 1 x_max = len(matri...
Peter-Lavigne/Project-Euler
p081.py
Python
mit
699
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('userhome', '0002_auto_20161014_2208'), ] operations = [ migrations.AddField( model_name='notice', na...
shubham0d/SmartClass
SmartClass/userhome/migrations/0003_auto_20161015_0037.py
Python
gpl-3.0
584
0
# -*- coding: utf-8 -*- """ Test the "backup" function, which saves sheet data to file. """ import sheetsync import time, os CLIENT_ID = os.environ['SHEETSYNC_CLIENT_ID'] CLIENT_SECRET = os.environ['SHEETSYNC_CLIENT_SECRET'] TESTS_FOLDER_KEY = os.environ.get("SHEETSYNC_FOLDER_KEY") SHEET_TO_BE_BACKED_UP = "1-HpLBDv...
blakehawkins/SheetSync
tests/test_backup.py
Python
mit
1,701
0.014109
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
shakamunyi/neutron-vrrp
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
Python
apache-2.0
71,665
0.000251
from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() import views urlpatterns = patterns('', url(r'^pis', views.pis), url(r'^words', views.words, { 'titles': False }), url(r'^p...
ctames/conference-host
webApp/urls.py
Python
mit
1,850
0.007027
import sys def setup(core, object): object.setStfFilename('static_item_n') object.setStfName('item_entertainer_boots_02_01') object.setDetailFilename('static_item_d') object.setDetailName('item_entertainer_boots_02_01') object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 3) object.setStringAttr...
ProjectSWGCore/NGECore2
scripts/object/tangible/wearables/boots/item_entertainer_boots_02_01.py
Python
lgpl-3.0
366
0.02459
#!/usr/bin/env python3 ''' bpkm.py - Calculate BPKM. author: Xiao-Ou Zhang version: 0.2.0 ''' import sys sys.path.insert(0, '/picb/rnomics1/xiaoou/program/usefullib/python') from map import mapto from subprocess import Popen, PIPE import os def calculatebpkm(chrom, sta, end, bam, total=0, length=0, getsegment=False)...
kepbod/usefullib
test/bpkm.py
Python
mit
2,744
0.001822
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
ganeshgore/myremolab
server/src/test/unit/voodoo/gen/loader/test_SchemaChecker.py
Python
bsd-2-clause
2,998
0.004004
#!/usr/bin/python __VERSION__ = '0.1' __AUTHOR__ = 'Galkan' __DATE__ = '06.08.2014' """ it is derived from https://github.com/argp/nmapdb/blob/master/nmapdb.py """ try: import sys import xml.dom.minidom from xml.etree import ElementTree except ImportError,e: import sys sys.stdout.write("%s\n" %e)...
tdr130/sec
lib/xml_parser.py
Python
mit
4,735
0.045829
from setuptools import setup, find_packages setup(name='MODEL1302010006', version=20140916, description='MODEL1302010006 from BioModels', url='http://www.ebi.ac.uk/biomodels-main/MODEL1302010006', maintainer='Stanley Gu', maintainer_url='stanleygu@gmail.com', packages=find_packages(...
biomodels/MODEL1302010006
setup.py
Python
cc0-1.0
377
0.005305
''' Load options from the command line Sam Geen, July 2013 ''' import sys def Arg1(default=None): ''' Read the first argument default: Default value to return if no argument is found Return: First argument in sys.argv (minus program name) or default if none ''' if len(sys.argv) < 2: re...
samgeen/Hamu
Utils/CommandLine.py
Python
mit
464
0.006466
""" Wviews: Worldview Solver for Epistemic Logic Programs Build 1.0 - Port from C++ -> Python. Copyright (C) 2014 Michael Kelly 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 Founda...
galactose/wviews
wview.py
Python
gpl-3.0
6,822
0.00044
#!/usr/bin/env python import os import codecs def open_textdecoder(file=None, codec=None, chunkSize=1024): fp = open(file, 'rb') return TextFileDecoder(fp, codec, chunkSize) # TODO look into inheriting from a stream for this class class TextFileDecoder(object): """Class that wraps a file object and handl...
kbase/transform
lib/biokbase/Transform/TextFileDecoder.py
Python
mit
9,547
0.003771
""" Tests for the MDK public API that are easier to do in Python. """ from time import time from builtins import range from past.builtins import unicode from unittest import TestCase from tempfile import mkdtemp from collections import Counter import configparser import hypothesis.strategies as st from hypothesis imp...
datawire/mdk
unittests/test_mdk.py
Python
apache-2.0
27,210
0.000919
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PySphinxcontribDevhelp(PythonPackage): """sphinxcontrib-devhelp is a sphinx extension whic...
rspavel/spack
var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py
Python
lgpl-2.1
793
0.003783
# -*- coding: utf-8 -*- import os import sys import shutil import optparse import unittest TESTDIR = os.path.dirname(os.path.abspath(__file__)) SRCDIR = os.path.abspath(os.path.join(TESTDIR, os.path.pardir)) sys.path.insert(0, SRCDIR) from arachne.error import EmptyQueue from arachne.result import CrawlResult, Resul...
yasserglez/arachne
tests/testresultqueue.py
Python
gpl-3.0
6,369
0.000628
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index), url(r'unhandled-crash/', views.unhandled_crash, name='crash'), url(r'unhandled-crash-chain/', views.unhandled_crash_chain), url(r'unhandled-template-crash/', views.unhandled_crash_in_template), url...
bugsnag/bugsnag-python
tests/fixtures/django1/notes/urls.py
Python
mit
503
0
""" A symbol table object to hold types for the parser. """ from __future__ import absolute_import, division, print_function __all__ = ['TypeSymbolTable', 'sym'] import ctypes from . import coretypes as ct _is_64bit = (ctypes.sizeof(ctypes.c_void_p) == 8) def _complex(tp): """Simple temporary type constructor...
talumbau/datashape
datashape/type_symbol_table.py
Python
bsd-2-clause
4,644
0.001938
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import yaml import logging import threading from ybk.lighttrade.sysframe import Client as SysframeClient log = logging.getLogger('trader') configfile = open(os.path.join(os.path.dirname(__file__), 'trading.yaml'), encoding='utf-8') config = yaml.loa...
yxdong/ybk
ybk/lighttrade/trader.py
Python
mit
2,160
0.00141
# painttheworld/game.py # # Represent and track the current game state. import numpy as np import datetime import math from painttheworld import constants from painttheworld.constants import m1, m2, m3, m4, p1, p2, p3 ''' Note that Latitude is North/South and Longitude is West/East''' class GameState: """Keeps tr...
richardmin97/PaintTheWorld
Server/painttheworld/game.py
Python
gpl-3.0
8,968
0.005352
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """ DEV SCRIPT This is a hacky script meant to be run mostly automatically with the option of interactions. dev.py is supposed to be a developer non-gui interface into the IBEIS software. dev.py runs experiments and serves as a scratchpad for new code and quick scripts...
SU-ECE-17-7/ibeis
ibeis/dev.py
Python
apache-2.0
32,707
0.003333
#!/env/python3 import sys import argparse import os import csv import tabix import gzip import io from collections import Counter def chromosom_sizes(hg19_size_file): ''' Return chromosom size range ex: size["chr13"] = 234324 ''' results = {} with open(hg19_size_file) as file: reader = csv.reader(file, d...
gustaveroussy/98drivers
scripts/kart_racer.py
Python
mit
1,836
0.052288
#============================================================================== # purpose: bivariate normal distribution simulation using PyMC # author: tirthankar chakravarty # created: 1/7/15 # revised: # comments: # 1. install PyMC # 2. not clear on why we are helping the sampler along. We want to sample from the #...
tchakravarty/PythonExamples
Code/kirk2015/chapter3/bivariate_normal.py
Python
apache-2.0
582
0.008591
#!/usr/bin/env python3 # testHaskellComments.py """ Test line counter for the Haskell programmig language. """ import unittest from argparse import Namespace from pysloc import count_lines_double_dash, MapHolder class TestHaskellComments(unittest.TestCase): """ Test line counter for the Haskell programmig langu...
jddixon/pysloc
tests/test_haskell_comments.py
Python
mit
1,084
0
# -*- coding: utf-8 -*- """ equip.analysis.dataflow.lattice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The base lattice implementation (mostly used as semi-lattice). :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ class Lattice(object): """ Interface for...
neuroo/equip
equip/analysis/dataflow/lattice.py
Python
apache-2.0
1,624
0.011084
../../../../../share/pyshared/google/protobuf/descriptor_pb2.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/google/protobuf/descriptor_pb2.py
Python
gpl-3.0
63
0.015873
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
jondelmil/brainiac
config/settings/local.py
Python
bsd-3-clause
1,961
0.00051
def foo(bar): """ @param """
asedunov/intellij-community
python/testData/completion/epydocTagsMiddle.after.py
Python
apache-2.0
32
0.03125
import _plotly_utils.basevalidators class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="surface.hoverlabel.font", **kwargs ): super(SizesrcValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotly/plotly.py
packages/python/plotly/plotly/validators/surface/hoverlabel/font/_sizesrc.py
Python
mit
423
0.002364
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE:BSD$ ## You may use this file ...
DevinDewitt/pyqt5
examples/quick/models/objectlistmodel/objectlistmodel.py
Python
gpl-3.0
3,424
0.00847
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
sean-/ansible
lib/ansible/utils/display.py
Python
gpl-3.0
6,949
0.003022
#!/usr/bin/env python from skimage._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('graph', parent_package, top_...
emmanuelle/scikits.image
skimage/graph/setup.py
Python
bsd-3-clause
1,429
0.0007
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
electrumalt/electrum-doge
scripts/merchant/merchant.py
Python
gpl-3.0
9,336
0.008462
from drivers.servo_driver import Servo import submodules.stepper_axis as stepper_axis from math import atan, degrees import time class RoboticArm: # Dimensions of the Arm vertical_offset_mm = 50 vertical_arm_mm = 100 horizontal_arm_mm = 100 level_arm_len= 20 claw_offset_to_center = 10 small_cup_positio...
srikary/sous-chef
modules/robotic_arm.py
Python
gpl-2.0
7,751
0.011869
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # 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. Redistrib...
sippy/b2bua
sippy/SipURL.py
Python
bsd-2-clause
12,172
0.011009
# -*- coding: UTF-8 -*- # Authors: Thomas Hartmann <thomas.hartmann@th-ht.de> # Dirk Gütlin <dirk.guetlin@stud.sbg.ac.at> # # License: BSD (3-clause) import numpy as np from .utils import _create_info, _set_tmin, _create_events, \ _create_event_metadata, _validate_ft_struct from .. import RawArray from ....
Teekuningas/mne-python
mne/io/fieldtrip/fieldtrip.py
Python
bsd-3-clause
6,508
0
__author__ = 'abirafdi'
abirafdirp/inventory
inventory/__init__.py
Python
bsd-3-clause
24
0
import os import sys import pytest from .conftest import Process, AphorismsToXMLException file_path = os.path.realpath(__file__) path = os.path.dirname(file_path) sys.path.append(path) path_testdata = os.path.join(path, 'test_files') + os.sep # examples = os.path.join(path, '..', 'Examples', 'TextFiles') + os.sep te...
gruel/AphorismToTEI
tests/test_aphorism_to_xml.py
Python
bsd-3-clause
5,663
0.000883
from contrib import * import re def tokenize(text): tokens = re.findall('(?u)[\w.-]+',text) tokens = [t for t in tokens if not re.match('[\d.-]+$',t)] #tokens = [t for t in tokens if len(t)>2] # TODO remove stopwords return u' '.join(tokens) ## text = KV('data/text.db',5) ## tokens = KV('data/tokens.db',5) text...
mobarski/sandbox
topic/tokens.py
Python
mit
455
0.035165
from aiohttp import web from aiohttp_session import get_session, SESSION_KEY as SESSION_COOKIE_NAME from aioweb.middleware.csrf.templatetags import CsrfTag, CsrfRawTag from aioweb.util import awaitable from aioweb.modules.template.backends.jinja2 import APP_KEY as JINJA_APP_KEY import random, string from aiohttp_sessi...
kreopt/aioweb
aioweb/middleware/csrf/__init__.py
Python
mit
3,212
0.001868
from decimal import Decimal from livesettings import config_value from tax.modules.base.processor import BaseProcessor class Processor(BaseProcessor): method="percent" #def __init__(self, order=None, user=None): # """ # Any preprocessing steps should go here # For instance, copyi...
ringemup/satchmo
satchmo/apps/tax/modules/percent/processor.py
Python
bsd-3-clause
2,581
0.008911
bl_info = { 'name': 'KRI common routines', 'author': 'Dzmitry Malyshau', 'version': (0, 1, 0), 'blender': (2, 6, 2), 'warning': '', 'category': 'Import-Export' }
kvark/claymore
etc/blender/io_kri/__init__.py
Python
apache-2.0
186
0
# -*- coding: utf-8 -*- ## This file is part of Gertrude. ## ## Gertrude 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 vers...
studio1247/gertrude
paques.py
Python
gpl-3.0
1,082
0.012015
from django.conf.urls import url, include from django.conf import settings from django.contrib import admin from django.conf.urls.static import static urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'', include('blog.urls')), url(r'^ckeditor/', include('ckeditor_uploader.urls')), ]+ static(settings....
gabrielloliveira/omc
omc/omc/urls.py
Python
mit
366
0.002732
class Actions: @staticmethod def Teleport(map, tileX, tileY): def teleport(trigger, entity): entity.TileX = tileX entity.TileY = tileY TeleportEntity(entity, map) return teleport
ericrrichards/rpgEngine
RpgEngine/RpgEngine/Scripts/Actions.py
Python
mit
242
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): # Adding model 'Update' db.create_table('eggnog_update', ( ('id', self.gf('django.db.models.fiel...
mridang/django-eggnog
eggnog/migrations/0001_initial.py
Python
bsd-3-clause
1,561
0.007687
# -*- coding: utf-8 -*- ''' /************************************************************************************************************************** SemiAutomaticClassificationPlugin The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images, providing to...
semiautomaticgit/SemiAutomaticClassificationPlugin
core/utils.py
Python
gpl-3.0
380,258
0.03463
""" Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab", Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut. DFSearch solution """ class Solution(obj...
urashima9616/Leetcode_Python
Leet132_PalindromePartition3.py
Python
gpl-3.0
1,337
0.006731
""" Utility functions and classes. """ from functools import wraps def synchronized(method): """ Decorator that wraps a method with an acquire/release of self._lock. """ @wraps(method) def synced(self, *args, **kwargs): with self._lock: return method(self, *args, **kwargs) ...
rolando/crochet
crochet/_util.py
Python
mit
366
0
# Copyright 2009 Paul J. Davis <paul.joseph.davis@gmail.com> # # This file is part of the python-spidermonkey package released # under the MIT license. import t touched = 0 class Foo(object): def __init__(self): self.bar = 2 def __del__(self): global touched touched = 1 @t.glbl("Foo", ...
davisp/python-spidermonkey
tests/test-python-ctor.py
Python
mit
736
0.006793
#!/usr/bin/python # -*- coding: utf-8 -*- import os import urllib import zlib import zipfile import math import sys from subprocess import * import subprocess # This script will: # 1. Download the public database from the broad institute # 2. Generate random vcf files thanks to the previous file thanks...
jpoullet2000/cgs-benchmarks
highlander-benchmarks/vcf_import.py
Python
apache-2.0
7,545
0.009145
from gppylib.gparray import FAULT_STRATEGY_FILE_REPLICATION, get_gparray_from_config class MirrorMatchingCheck: def run_check(self, db_connection, logger): logger.info('-----------------------------------') logger.info('Checking mirroring_matching') is_config_mirror_enabled = get_gparray...
cjcjameson/gpdb
gpMgmt/bin/gpcheckcat_modules/mirror_matching_check.py
Python
apache-2.0
1,789
0.003354
"""Core connection objects""" import ast import sys import collections import copy import logging import math import numbers import platform import warnings if sys.version_info > (3,): import urllib.parse as urlparse # pylint: disable=E0611,F0401 else: import urlparse from pika import __version__ from pika i...
zixiliuyue/pika
pika/connection.py
Python
bsd-3-clause
82,517
0.000594
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
talnoah/android_kernel_htc_dlx
virt/tools/perf/scripts/python/syscall-counts-by-pid.py
Python
gpl-2.0
1,927
0.033212
from __future__ import unicode_literals """ product initialization stuff """ import os import featuremonkey from .composer import get_composer from django_productline import compare_version _product_selected = False def select_product(): """ binds the frozen context the selected features should be cal...
henzk/django-productline
django_productline/startup.py
Python
mit
2,282
0.001753
c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False
logston/ipy.io
docker/jupyter_notebook_config.py
Python
bsd-3-clause
77
0.012987
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py
Python
gpl-3.0
4,168
0.013196
## INFO ## ## INFO ## # TODO: %o is not available in output, nor input strings, only in command # TODO: !-macro and ^-flags should only be available # at the beginning of a command #-- CHEATSHEET ----------------------------------------------------------------# # HOWTO: http://sublimetext.info/docs/en/referenc...
petervaro/tup
src/tup.py
Python
gpl-3.0
23,015
0.004519
# Copyright (C) 2009-2010 Mathias Brodala # # 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, or (at your option) # any later version. # # This program is distributed in the hope...
exaile/exaile
plugins/minimode/__init__.py
Python
gpl-2.0
9,528
0.00063
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup setup( name='saved_searches', version='2.0.0-alpha', description='Saves user searches for integration with Haystack.', author='Daniel Lindsley', author_email='daniel@toastdriven.com', url='http://github.com/toastdriv...
dablak/saved_searches
setup.py
Python
bsd-3-clause
792
0
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ---------------------------------------------------------------- # tests/test_filename.py # # Test thumbnail file name generation. # ---------------------------------------------------------------- # copyright (c) 2015 - Domen Ipavec # Distributed under The MIT License,...
matematik7/STM
tests/test_filename.py
Python
mit
4,121
0.005156
from click.testing import CliRunner from twelve_tone.cli import main def test_main(): runner = CliRunner() result = runner.invoke(main, []) assert result.exit_code == 0
accraze/python-twelve-tone
tests/test_twelve_tone.py
Python
bsd-2-clause
186
0
# -*- coding: utf-8 -*- """The initialization file for the Pywikibot framework.""" # # (C) Pywikibot team, 2008-2015 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __release__ = '2.0b3' __version__ = '$Id$' __url__ = 'https://www.mediawiki.org/wiki/Speci...
icyflame/batman
pywikibot/__init__.py
Python
mit
26,823
0.000336
############################################################################## # 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...
lgarren/spack
var/spack/repos/builtin/packages/r-affyio/package.py
Python
lgpl-2.1
1,756
0.001139
# Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) """ This TinyMCE widget was copied and extended from this code by John D'Agostino: http://code.djangoproject.com/wiki/CustomWidgetsTinyMCE """ from __future__ import unicode_literals #import tinymce.settings import demo....
riverbird/djangoweblog
tinymce/widgets.py
Python
gpl-2.0
6,397
0.00297
import audio def from_file(file, frame): ln = -1 while ln: ln = file.readinto(frame) yield frame def reverb_gen(src, buckets, reflect, fadeout): bucket_count = len(buckets) bucket = 0 for frame in src: echo = buckets[bucket] echo *= reflect echo += frame ...
JoeGlancy/micropython
examples/reverb.py
Python
mit
1,345
0.006691
from Naked.toolshed.shell import muterun from pynode.exceptions import NodeExecutionFailedException from pynode.runners.Runner import Runner class BabelRunner(Runner): def __init__(self, ignore=None, extensions=None, presets=None, plugins=None): babel_arguments = '' if ignore is not None: ...
ptMuta/python-node
pynode/runners/BabelRunner.py
Python
mit
2,294
0.003487
from django.conf import settings """ Your GSE API key """ GOOGLE_SEARCH_API_KEY = getattr(settings, 'GOOGLE_SEARCH_API_KEY', None) """ The ID of the Google Custom Search Engine """ GOOGLE_SEARCH_ENGINE_ID = getattr(settings, 'GOOGLE_SEARCH_ENGINE_ID', None) """ The API version. Defaults to 'v1' """ GOOGLE_SEARCH_AP...
hzdg/django-google-search
googlesearch/__init__.py
Python
mit
662
0
#!/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 by...
h2so5/Twemoji4Android
nototools/opentype_data.py
Python
mit
2,449
0.000817
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os import re import csv import sys from collections import defaultdict try: import vim except ImportError: vim = object() from powerline.bindings.vim import (vim_get_func, getbufvar, vim_getbu...
zeroc0d3/docker-lab
vim/rootfs/usr/lib/python2.7/dist-packages/powerline/segments/vim/__init__.py
Python
mit
24,099
0.024775
########################################################################## # Copyright (C) 2009 - 2014 Huygens ING & Gerbrandy S.R.L. # # This file is part of bioport. # # bioport 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 ...
HuygensING/bioport-repository
bioport_repository/tests/test_common.py
Python
gpl-3.0
2,361
0.008895
import datetime import mock from django.utils import timezone from nose.tools import * # noqa from tests.base import fake, OsfTestCase from osf_tests.factories import ( EmbargoFactory, NodeFactory, ProjectFactory, RegistrationFactory, UserFactory, UnconfirmedUserFactory ) from framework.exceptions import Per...
mattclark/osf.io
tests/test_registrations/test_registration_approvals.py
Python
apache-2.0
12,424
0.003139
from django.shortcuts import render_to_response from django.template.loader import render_to_string from lis.specimen.lab_result_item.classes import ResultItemFlag from lis.exim.lab_import_lis.classes import LisDataImporter from lis.exim.lab_import_dmis.classes import Dmis from ..models import Result, Order, ResultIt...
botswana-harvard/edc-lab
old/lab_clinic_api/classes/edc_lab_results.py
Python
gpl-2.0
4,109
0.003651
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 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....
zhhf/charging
charging/tests/unit/test_db_plugin.py
Python
apache-2.0
180,785
0.000111
# episoder, https://code.ott.net/episoder # -*- coding: utf8 -*- # # Copyright (C) 2004-2020 Stefan Ott. All rights reserved. # # 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...
jethrogb/episoder
test/episode.py
Python
gpl-3.0
2,607
0.018028
import requests import time import string import os.path import urllib2 import sys import getopt from time import gmtime, strftime #variables class Downloader: extension = "pdf" signature = [0x25, 0x50, 0x44, 0x46] searchChars = ['a', 'a'] outputDir = "downloaded_" downloaded = [] successCou...
riusksk/riufuzz
tools/coverage/Utilities/Download.py
Python
apache-2.0
8,118
0.011333
# -*- coding: utf-8 -*- """ Created on Sat Jun 4 09:07:22 2016 Vectors and Qvectors use the same metric i.e. the xyz vector and corresponding ivm vector always have the same length. In contrast, the tetravolume.py modules in some cases assumes that volume and area use R-edge cubes and triangles for XYZ units resp...
4dsolutions/Python5
qrays.py
Python
mit
11,110
0.016022
import math import random def test(): tmp1 = [] tmp2 = [] print('build') for i in xrange(1024): tmp1.append(chr(int(math.floor(random.random() * 256)))) tmp1 = ''.join(tmp1) for i in xrange(1024): tmp2.append(tmp1) tmp2 = ''.join(tmp2) print(len(tmp2)) print('run') for i in xrange(5000): res = tmp2.e...
tassmjau/duktape
tests/perf/test-hex-encode.py
Python
mit
341
0.043988
DO_TOKEN = '' SSH_KEY_PUB_PATH = '/home/user/.ssh/id_rsa.pub' # deploy all containers to one droplet ONE_DROPLET_NAME = 'qproject-all' ONE_DROPLET_IMAGE = 'docker-16-04' ONE_DROPLET_SIZE = '512mb' # deploy all containers to multiple virtual machines SWARM_WORKER_NUMBER = 1
KirovVerst/qproject
deploy_config_example.py
Python
mit
276
0
# -*- coding: utf-8 -*- from __future__ import print_function from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt import hashlib import xml.etree.ElementTree as ET import time from config import TOKEN # Create your views here. TOKEN = TOKEN @csrf_exempt def index(r...
bucketzxm/wechat_template
movie/views.py
Python
gpl-3.0
2,018
0.000991
from .commandtype import CommandType from .commandlineerror import CommandLineError class CommandLine(): """アセンブラコマンドラインオブジェクト """ def __init__(self, line_no: int, raw_data: str): """コンストラクタ Parameters ---------- line_no : int 行番号 raw_data : str ...
koba-z33/nand2tetris
projects/python/assembler/n2tassembler/commandline.py
Python
gpl-3.0
3,587
0
"""The Intent integration.""" import voluptuous as vol from homeassistant.components import http from homeassistant.components.http.data_validator import RequestDataValidator from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON from homeassistant.core import DOMAIN as HA_DOMAIN, HomeAssist...
w1ll1am23/home-assistant
homeassistant/components/intent/__init__.py
Python
apache-2.0
2,573
0.001555
# coding=utf-8 # Author: raver2046 <raver2046@gmail.com> # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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 ...
pedro2d10/SickRage-FR
sickbeard/providers/bluetigers.py
Python
gpl-3.0
5,574
0.003409
MAX_SCORE = 10 class ParsedValue(): """ Possible run-time value. The value data might either be definite or guessed. """ def __init__(self, data, description, score=0, raw=None, type_=None): """ Ctor @param data: The data`s human-readable representation. @param d...
xujun10110/DIE
DIE/Lib/ParsedValue.py
Python
mit
1,350
0.002222
############################################################################### import numpy import time ############################################################################### def matrixFactorization(R, P, Q, K, epochMax=1000, alpha=0.0002, beta=0.02): Q = Q.T for step in xrange(epochMax): f...
mgodek/music_recommendation_system
matrixFactor.py
Python
gpl-3.0
3,252
0.009533
import numpy as np from numpy import linalg from scipy.sparse import dok_matrix, csr_matrix, issparse from scipy.spatial.distance import cosine, cityblock, minkowski, wminkowski from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing impo...
kashif/scikit-learn
sklearn/metrics/tests/test_pairwise.py
Python
bsd-3-clause
25,509
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...
inovtec-solutions/OpenERP
openerp/addons/lunch/report/report_lunch_order.py
Python
agpl-3.0
2,799
0.009289
from __future__ import division import datetime as dt missing = object() try: import numpy as np except ImportError: np = None def int_to_rgb(number): """Given an integer, return the rgb""" number = int(number) r = number % 256 g = (number // 256) % 256 b = (number // (256 * 256)) % 25...
Juanlu001/xlwings
xlwings/utils.py
Python
apache-2.0
2,171
0.000921
import pymongo from bson.objectid import ObjectId from eve.utils import date_to_str from html5lib.html5parser import ParseError from lxml.html.html5parser import fragments_fromstring, HTMLParser from superdesk.utc import utcnow from superdesk import get_resource_service from liveblog.posts.mixins import AuthorsMixin...
liveblog/liveblog
server/liveblog/blogs/blog.py
Python
agpl-3.0
4,946
0.002022
# coding=utf-8 # Copyright 2017 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
waterblue13/tensor2tensor
tensor2tensor/models/cycle_gan.py
Python
apache-2.0
4,931
0.005678
x = raw_input(" Take your wand out:") y = raw_input(" You're a wizard youngone: ") z = raw_input(" Please come with me and become a wizard: ") p = raw_input(" No, I am not a liar: " ) print str(x) + " and repeat " + str(y) + "I have never seen such potential in such a young boy" + str(z) + "Young one, you will be taken...
bruno1951/bruno1951-cmis-cs2
play.py
Python
cc0-1.0
414
0.007246
# -*- coding: utf-8 -*- ''' *GSASIIstrMain: main structure routine* --------------------------------------- ''' ########### SVN repository information ################### # $Date: 2018-07-13 22:44:01 +0300 (Fri, 13 Jul 2018) $ # $Author: toby $ # $Revision: 3471 $ # $URL: https://subversion.xray.aps.anl.gov/...
AntonGagin/GSAS_USE
patchSystErrors/modifiedOld/GSASIIstrMain.py
Python
gpl-3.0
85,029
0.01797
from . import families from .glm import glm, linear_component, plot_posterior_predictive
wanderer2/pymc3
pymc3/glm/__init__.py
Python
apache-2.0
89
0
#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals from pprint import pformat from marrow.server.http import HTTPServer from marrow.wsgi.objects.decorator import wsgify @wsgify def hello(request): resp = request.response resp.mime = "text/plain" resp.body = "%r\n\n%s\n\n%s"...
marrow/wsgi.objects
examples/wsgify.py
Python
mit
521
0.003839
# coding: utf-8 """ An API to insert and retrieve metadata on cloud artifacts. No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ ...
grafeas/client-python
grafeas/models/api_project_repo_id.py
Python
apache-2.0
4,162
0.00024
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2017_03_30/models/virtual_machine_agent_instance_view.py
Python
mit
1,705
0.001173
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division from qsrlib.qsrlib import QSRlib, QSRlib_Request_Message, QSRlib_Response_Message from qsrlib_io.world_trace import Object_State, World_Trace def print_world_trace(world_trace): for t in world_trace.get_sorted_timestamps...
pet1330/strands_qsr_lib
qsr_lib/dbg/dbg_world_qsr_trace_slicing_methods.py
Python
mit
4,049
0.004199
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 6/9/13 ###Function: #### 1) create scatter of OR by zipcode vs. urban metro RUCC avg 2013 ###Import data: zipcode_bysseas_cl.csv ###Command Line: python ############################################...
eclee25/flu-SDI-exploratory-age
scripts/OR_urbanmetro_v6-7-13.py
Python
mit
11,462
0.02661
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os import shutil import sys import dirtyjson as json from ..decorators import linter from ..parsers.base import ParserBase @linter( name="coala", install=[ ["pipx", "install", "--spec", "coala-bears", "coala"], ...
guykisel/inline-plz
inlineplz/linters/coala.py
Python
isc
1,918
0.000521