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
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013 Red Hat, 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 r...
phoenixsbk/kvmmgr
packaging/setup/plugins/ovirt-engine-rename/ovirt-engine/tools.py
Python
apache-2.0
3,586
0.002231
#!/usr/bin/env python # # email.py # TurboHvZ # # Copyright (C) 2008 Ross Light # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
zombiezen/turbohvz
hvz/email.py
Python
gpl-3.0
6,348
0.002205
import unittest from unittest import mock from betfairlightweight import APIClient from betfairlightweight import resources from betfairlightweight.endpoints.scores import Scores from betfairlightweight.exceptions import APIError from tests.tools import create_mock_json class ScoresInit(unittest.TestCase): def t...
liampauling/betfairlightweight
tests/test_scores.py
Python
mit
3,269
0.00153
from sys import platform as sys_plat import platform import os from ctypes import * if sys_plat == "win32": def find_win_dll(arch): """ Finds the highest versioned windows dll for the specified architecture. """ dlls = [] filename = 'VimbaC.dll' # look in local working directory...
morefigs/pymba
pymba/vimba_c.py
Python
mit
17,849
0.001345
"""Contains tests for oweb.views.updates.item_update""" # Python imports from unittest import skip # Django imports from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.contrib.auth.models import User # app imports from oweb.tests import OWebViewTests from oweb.models...
Mischback/django-oweb
oweb/tests/views/item_update.py
Python
mit
10,246
0.001952
"""Emoji config functions""" import json import os import re from logging import getLogger from card_py_bot import BASEDIR __log__ = getLogger(__name__) # Path where the emoji_config.json will be stored EMOJI_CONFIG_PATH = os.path.join(BASEDIR, "emoji_config.json") # Dictionary that is keyed by the Discord short em...
nklapste/card-py-bot
card_py_bot/config.py
Python
mit
4,162
0.00024
from __future__ import unicode_literals import json import requests import six from datetime import datetime from six.moves.urllib.parse import parse_qs from xml.etree.ElementTree import Element, SubElement, tostring from xml.parsers.expat import ExpatError from .auth import OAuth2Credentials from .exceptions import ...
freakboy3742/pyxero
xero/basemanager.py
Python
bsd-3-clause
16,413
0.001036
def pbj_while(slices): output = '' while (slices > 0): slices = slices - 2 if slices >= 2: output += 'I am making a sandwich! I have bread for {0} more sandwiches.\n'.format(slices / 2) elif slices < 2: output += 'I am making a sandwich! But, this is my last sandw...
hannahkwarren/CLaG-Sp2016
code-exercises-etc/section_xx_-misc/4-2.py
Python
mit
419
0.004773
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Troy Melhase # Distributed under the terms of the GNU General Public License v2 # Author: Troy Melhase <troy@gci.net> import sys from PyQt4.QtCore import QVariant from PyQt4.QtGui import (QApplication, QFrame, QIcon, QStandardIte...
InfiniteAlpha/profitpy
profit/neuralnetdesigner/train_test.py
Python
gpl-2.0
3,757
0.003194
""" Tests of neo.io.igorproio """ import unittest try: import igor HAVE_IGOR = True except ImportError: HAVE_IGOR = False from neo.io.igorproio import IgorIO from neo.test.iotest.common_io_test import BaseTestIO @unittest.skipUnless(HAVE_IGOR, "requires igor") class TestIgorIO(BaseTestIO, unittest.Test...
samuelgarcia/python-neo
neo/test/iotest/test_igorio.py
Python
bsd-3-clause
543
0
# "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written agreement # is hereby granted, provided that the above copyright notice, the follow...
ekiwi/tinyos-1.x
contrib/ucb/tools/python/pytos/tools/Straw.py
Python
bsd-3-clause
3,841
0.012757
from webhelpers import * from datetime import datetime def time_ago( x ): return date.distance_of_time_in_words( x, datetime.utcnow() ) def iff( a, b, c ): if a: return b else: return c
dbcls/dbcls-galaxy
lib/galaxy/web/framework/helpers/__init__.py
Python
mit
220
0.045455
# coding: utf8 Paises=( (4, 'AF', 'AFG', 93, 'Afganistán', 'Asia', '', 'AFN', 'Afgani afgano'), (8, 'AL', 'ALB', 355, 'Albania', 'Europa', '', 'ALL', 'Lek albanés'), (10, 'AQ', 'ATA', 672, 'Antártida', 'Antártida', '', '', ''), (12, 'DZ', 'DZA', 213, 'Argelia', 'África', '', 'DZD', 'Dinar algerino'), (16, 'AS', 'ASM', ...
jredrejo/bancal
web2py/applications/bancal/modules/paises.py
Python
gpl-3.0
18,468
0.016688
"""Resolwe collection model.""" from django.contrib.postgres.fields import ArrayField from django.contrib.postgres.indexes import GinIndex from django.contrib.postgres.search import SearchVectorField from django.db import models, transaction from resolwe.permissions.models import PermissionObject, PermissionQuerySet ...
genialis/resolwe
resolwe/flow/models/collection.py
Python
apache-2.0
3,575
0.000559
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2016 Alex Forencich 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...
Diti24/python-ivi
ivi/lecroy/lecroyWR204MXIA.py
Python
mit
1,653
0.001815
#!/usr/bin/env python3 #This program calculates the entropy for a file, files in a folder or disk image #The user sets a reporting threshold #########################COPYRIGHT INFORMATION############################ #Copyright (C) 2011 dougkoster@hotmail.com # #This program is free software: you can r...
mantarayforensics/mantaray
Tools/Python/entropy_mr.py
Python
gpl-3.0
10,303
0.028827
#!/usr/bin/python3 import os import sys from merge_utils import * xml_out = etree.Element("packages") funtoo_staging_w = GitTree("funtoo-staging", "master", "repos@localhost:ports/funtoo-staging.git", root="/var/git/dest-trees/funtoo-staging", pull=False, xml_out=xml_out) #funtoo_staging_w = GitTree("funtoo-staging-u...
apinsard/funtoo-overlay
funtoo/scripts/merge-funtoo-staging.py
Python
gpl-2.0
14,296
0.020425
#exponent #find 2^n n = input("Enter n: ") print 2**n
yusufshakeel/Python-Project
example/expo.py
Python
mit
55
0.036364
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2015 Percy Li # See LICENSE for details. import struct import threading import copy class FrameBuffer(object): def __init__(self,decoder = None): self.data_buffer = bytes([]) self.decoder = decoder def s...
lzjever/pullot
pullot/framebuffer.py
Python
mit
2,966
0.020566
import re def pythonize_camelcase_name(name): """ GetProperty -> get_property """ def repl(match): return '_' + match.group(0).lower() s = re.sub(r'([A-Z])', repl, name) if s.startswith('_'): return s[1:] else: return s
fredreichbier/babbisch-ooc
babbisch_ooc/wraplib/utils.py
Python
mit
279
0.007168
''' Given: A protein string PP of length at most 1000 aa. Return: The total weight of PP. Consult the monoisotopic mass table. ''' def weight(protein): # Build mass table from mass_table.txt mass = {} with open("mass_table.txt", "r") as m: for line in m: lst = line.split(" ") mass[lst[0]] = f...
jr55662003/My_Rosalind_solution
ProteinMass/PRTM.py
Python
gpl-3.0
450
0.026667
# coding: utf-8 # license: GPLv3 from enemies import * from hero import * def annoying_input_int(message =''): answer = None while answer == None: try: answer = int(input(message)) except ValueError: print('Вы ввели недопустимые символы') return answer def game_tou...
mipt-cs-on-python3/arithmetic_dragons
tournament.py
Python
gpl-3.0
1,950
0.004271
from django.core.urlresolvers import reverse import django.http import django.utils.simplejson as json import functools def make_url(request, reversible): return request.build_absolute_uri(reverse(reversible)) def json_output(func): @functools.wraps(func) def wrapper(*args, **kwargs): output = ...
ukch/online_sabacc
src/sabacc/api/viewhelpers.py
Python
gpl-3.0
494
0
import time from netCDF4 import Dataset from oceansar.ocs_io import NETCDFHandler class ProcFile(NETCDFHandler): """ Processed raw data file generated by the OASIS Simulator :param file_name: File name :param mode: Access mode (w = write, r = read, r+ = read + append) :param proc_dim: Pr...
pakodekker/oceansar
oceansar/ocs_io/processed.py
Python
gpl-3.0
3,344
0.000299
"""Regularizations. Each regularization method is implemented as a subclass of :class:`Regularizer`, where the constructor takes the hyperparameters, and the `__call__` method constructs the symbolic loss expression given a parameter. These are made for use with :meth:`Model.regularize`, but can also be used directly...
robertostling/bnas
bnas/regularize.py
Python
gpl-3.0
1,950
0.002564
# Print the version splitted in three components import sys verfile = sys.argv[1] f = open(verfile) version = f.read() l = [a[0] for a in version.split('.') if a[0] in '0123456789'] # If no revision, '0' is added if len(l) == 2: l.append('0') for i in l: print i, f.close()
cpcloud/PyTables
mswindows/get_pytables_version.py
Python
bsd-3-clause
300
0.003333
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
Karel-van-de-Plassche/bokeh
bokeh/io/notebook.py
Python
bsd-3-clause
18,064
0.005314
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Lyndor runs from here - contains the main functions ''' import sys, time, os import module.message as message import module.save as save import module.cookies as cookies import module.read as read import install import module.move as move import module.draw as draw im...
ankitsejwal/Lyndor
run.py
Python
mit
6,128
0.006538
{ 'name': "Sale only available products on Website", 'summary': """Sale only available products on Website""", 'version': '1.0.0', 'author': 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category': 'Custom', 'website': 'https://yelizariev.github.io', 'images': ['images/availab...
ufaks/website-addons
website_sale_available/__openerp__.py
Python
lgpl-3.0
501
0
""" JobRunningWaitingRatioPolicy Policy that calculates the efficiency following the formula: ( running ) / ( running + waiting + staging ) if the denominator is smaller than 10, it does not take any decision. """ from DIRAC import S_OK from DIRAC.ResourceStat...
Sbalbp/DIRAC
ResourceStatusSystem/Policy/JobRunningWaitingRatioPolicy.py
Python
gpl-3.0
2,447
0.042092
complexe = importeur.salle.creer_etendue("complexe") complexe.origine = (20, 20) obstacle = importeur.salle.obstacles["falaise"] coords = [ (20, 20), (21, 20), (22, 20), (23, 20), (24, 20), (25, 20), (20, 21), (20, 22), (20, 23), (20, 24), (20, 25), (19, 25), (19, 26...
vlegoff/tsunami
src/test/boostrap/salle/etendue/complexe.py
Python
bsd-3-clause
772
0
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from framework import api_select def create_jobs(api_type): api = api_select.api(__file__, api_type) api.flow_job() api.job('passwd_args', exec_time=0.5, max_fails=0, e...
lhupfeldt/jenkinsflow
demo/jobs/hide_password_jobs.py
Python
bsd-3-clause
545
0.00367
#### 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 = Installation() result.template = "object/installation/faction_perk/turret/shared_block_sm.iff" result.attribute_t...
anhstudios/swganh
data/scripts/templates/object/installation/faction_perk/turret/shared_block_sm.py
Python
mit
460
0.047826
# -*- coding: utf-8 -*- try: f1 = open("input.txt","r",encoding="utf-8") except IOError: print("Не удалось найти входной файл input.txt") try: f2 = open("output.txt","w",encoding="utf-8") except IOError: print("Не удалось открыть выходной файл output.txt") import re # импортируем модуль работы с регу...
dimitrius-brest/katalog-poseleniy-RP
converter-vkwiki2md/convert2md.py
Python
cc0-1.0
3,623
0.019257
from django.shortcuts import render from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse import datetime, time, requests, re, os import bs4 from django.contrib.admin.views.decorators import staff_member_required from decimal import * # Create your views here. from .models import Ga...
inspectorbean/gasbuddy
home/views.py
Python
mit
14,960
0.008757
from quanthistling.tests import * class TestBookController(TestController): def test_index(self): response = self.app.get(url(controller='book', action='index')) # Test response...
FrankNagel/qlc
src/webapp/quanthistling/quanthistling/tests/functional/test_book.py
Python
gpl-3.0
203
0.004926
"""The WaveBlocks Project Compute some observables like norm, kinetic and potential energy of Hagedorn wavepackets. This class implements the mixed case where the bra does not equal the ket. @author: R. Bourquin @copyright: Copyright (C) 2014, 2016 R. Bourquin @license: Modified BSD License """ from functools import...
WaveBlocks/WaveBlocksND
WaveBlocksND/ObservablesMixedHAWP.py
Python
bsd-3-clause
13,370
0.006806
#!/usr/bin/env python3 # # hyperv_wmi_generator.py: generates most of the WMI type mapping code # # Copyright (C) 2011 Matthias Bolte <matthias.bolte@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by ...
crobinso/libvirt
scripts/hyperv_wmi_generator.py
Python
lgpl-2.1
10,347
0.001546
#!/usr/bin/python from PyQt4 import QtCore, QtGui class Bubble(QtGui.QLabel): def __init__(self,text): super(Bubble,self).__init__(text) self.setContentsMargins(5,5,5,5) def paintEvent(self, e): p = QtGui.QPainter(self) p.setRenderHint(QtGui.QPainter.Antialiasing,True) ...
shrinidhi666/rbhus
tests/conversationBox.py
Python
gpl-3.0
1,444
0.025623
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
mfherbst/spack
var/spack/repos/builtin/packages/r-sva/package.py
Python
lgpl-2.1
1,827
0.000547
import logging import sys import traceback from django.conf import settings from django.core.cache import cache try: from django.utils.module_loading import import_string except ImportError: # compatibility with django < 1.7 from django.utils.module_loading import import_by_path import_string = import...
kumar303/hawkrest
hawkrest/__init__.py
Python
bsd-3-clause
7,011
0.000428
# -*- coding: UTF-8 -*- # translation.py # # Copyright (C) 2013 Cleany # # Author(s): Cédric Gaspoz <cga@cleany.ch> # # This file is part of cleany. # # Cleany 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, e...
Degustare/cleany
cleany/maps/translation.py
Python
gpl-3.0
1,115
0.001795
""" Misago-native rehash of Django's createsuperuser command that works with double authentication fields on user model """ import sys from getpass import getpass from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from d...
1905410/Misago
misago/users/management/commands/createsuperuser.py
Python
gpl-2.0
6,267
0.001277
###ExonArray #Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California #Author Nathan Salomonis - nsalomonis@gmail.com #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software...
kdaily/altanalyze
methylation.py
Python
apache-2.0
11,047
0.023264
#!/usr/bin/env python2.7 # encoding: utf-8 # 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, Vers...
dongnizh/tika-python
tika/tests/tests_params.py
Python
apache-2.0
2,555
0.007828
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_exponential_op.py
Python
apache-2.0
7,870
0.000381
from OpenGL import GL import numpy as np import math def drawLine(start, end, color, width=1): GL.glLineWidth(width) GL.glColor3f(*color) GL.glBegin(GL.GL_LINES) GL.glVertex3f(*start) GL.glVertex3f(*end) GL.glEnd() def drawCircle(center, radius, color, rotation=np.array([0,0,0]), axis=np.arra...
g-rauhoeft/scrap-cap
motioncapture/gui/GL/Shapes.py
Python
mit
1,040
0.025
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import numpy as np import argparse from google.protobuf import text_format #https://github.com/BVLC/caffe/issues/861#issuecomment-70124809 import matplotlib matplotlib.use('Agg') BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.p...
ShapeNet/JointEmbedding
src/image_embedding_testing/extract_image_embedding.py
Python
bsd-3-clause
1,866
0.010718
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-26 01:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('pttrack', '0006_referral_additional_fiel...
SaturdayNeighborhoodHealthClinic/osler
referral/migrations/0001_initial.py
Python
gpl-3.0
5,790
0.004836
import os from .base import * # NOQA import dj_database_url DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( ) DATABASES = {'default': dj_database_url.config()} LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'filters': { 'require_debug_false': { '()': 'django.utils.log.R...
kencochrane/scorinator
scorinator/scorinator/settings/prod.py
Python
apache-2.0
2,973
0.001345
""" This code was Ported from CPython's sha512module.c """ import _struct as struct SHA_BLOCKSIZE = 128 SHA_DIGESTSIZE = 64 def new_shaobject(): return { 'digest': [0]*8, 'count_lo': 0, 'count_hi': 0, 'data': [0]* SHA_BLOCKSIZE, 'local': 0, 'digestsize': 0 } ...
aisk/grumpy
third_party/pypy/_sha512.py
Python
apache-2.0
14,181
0.062125
<<<<<<< HEAD <<<<<<< HEAD """Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictio...
ArcherSys/ArcherSys
Lib/configparser.py
Python
mit
148,451
0.000626
""" pystrix.ami.dahdi ================= Provides classes meant to be fed to a `Manager` instance's `send_action()` function. Specifically, this module provides implementations for features specific to the DAHDI technology. Legal ----- This file is part of pystrix. pystrix is free software; you can redistribute it ...
nhtdata/pystrix
pystrix/ami/dahdi.py
Python
gpl-3.0
3,238
0.004941
import RPi.GPIO as GPIO import time from array import * #configuracoin de pines del stepper bipolar out1 = 11 out2 = 13 out3 = 15 out4 = 16 #delay value timeValue = 0.005 #matriz de pines del stepper outs = [out1,out2,out3,out4] #secuencia para mover el stepper matriz = [ [1,0,0,1], [1,1,0,0], [0,1,1,0...
Locottus/Python
machines/python/stepperLeft.py
Python
mit
1,515
0.031023
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import dateutil.parser from models import F1ImportError, \ LectPool, \ codigoOrigen_to_O, \ O_to_codigoOrigen IMP_ERRORS = {} def register(cls_error): name = cls_error.__name__ if name in IMP_ERRORS.keys(): return True else: ...
Som-Energia/invoice-janitor
invoicing/f1fixing/import_error/errors.py
Python
agpl-3.0
15,081
0.006366
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Andreas Büsching <crunchy@bitkipper.net> # # a generic dispatcher implementation # # Copyright (C) 2006, 2007, 2009, 2010 # Andreas Büsching <crunchy@bitkipper.net> # # This library is free software; you can redistribute it and/or modify # it under the terms of...
crunchy-github/python-notifier
notifier/dispatch.py
Python
lgpl-2.1
2,535
0.015792
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-20 19:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('subjects', '0012_auto_20170112_1408'), ] operations = [ migrations.AlterField...
amadeusproject/amadeuslms
subjects/migrations/0013_auto_20170120_1610.py
Python
gpl-2.0
503
0.001988
# -*- encoding: utf-8 -*- """Test class for Template CLI :Requirement: Template :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_string from robottelo.cli.base import CLIReturnCodeError from robottelo....
ares/robottelo
tests/foreman/cli/test_template.py
Python
gpl-3.0
8,063
0
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
nagyistoce/netzob
src/netzob/Common/MMSTD/Dictionary/Memory.py
Python
gpl-3.0
8,119
0.006285
"""Welcome cog Sends welcome DMs to users that join the server. """ import os import logging import discord from discord.ext import commands from __main__ import send_cmd_help # pylint: disable=no-name-in-module from cogs.utils.dataIO import dataIO # Requires checks utility from: # https://github.com/Rapp...
Injabie3/lui-cogs
welcome/welcome.py
Python
gpl-3.0
20,055
0.005335
import pytest from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf.models import AbstractNode, NodeLog from osf.utils import permissions from osf.utils.sanitize import strip_html from osf_tests.factories import ( NodeFactory, ProjectFactory, OSFGroupFactory, Reg...
Johnetordoff/osf.io
api_tests/nodes/views/test_node_children_list.py
Python
apache-2.0
30,028
0.001599
"""FunctionInterval module: contains the FunctionInterval class""" __all__ = ['FunctionInterval', 'EventInterval', 'AcceptInterval', 'IgnoreInterval', 'ParentInterval', 'WrtParentInterval', 'PosInterval', 'HprInterval', 'ScaleInterval', 'PosHprInterval', 'HprScaleInterval', 'PosHprScaleInterval', 'Func', 'Wait'] from...
hj3938/panda3d
direct/src/interval/FunctionInterval.py
Python
bsd-3-clause
15,597
0.011092
from kivy.config import Config from kivy.config import ConfigParser import pentai.base.logger as log import os def config_instance(): return _config def create_config_instance(ini_file, user_path): global _config ini_path = os.path.join(user_path, ini_file) if not ini_file in os.listdir(user_path):...
cropleyb/pentai
pentai/gui/config.py
Python
mit
737
0.004071
#!/usr/bin/env python3 # # Copyright (C) 2013 - Tony Chyi <tonychee1989@gmail.com> # # 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, or (at your option) # any later version. # ...
tonychee7000/BtcChinaRT
btc.py
Python
gpl-3.0
7,964
0.002392
from json import dumps # pragma: no cover from sqlalchemy.orm import class_mapper # pragma: no cover from app.models import User, Group # pragma: no cover def serialize(obj, columns): # then we return their values in a dict return dict((c, getattr(obj, c)) for c in columns) def queryAllToJson(model,conditions): # ...
omarayad1/cantkeepup
app/core/helpers.py
Python
mit
1,103
0.029918
class ocho: def __init__(self): self.cadena='' def getString(self): self.cadena = raw_input("Your desires are orders to me: ") def printString(self): print "Here's your sentence: {cadena}".format(cadena=self.cadena) oct = ocho() oct.getString() oct.printString()
dcabalas/UNI
SN/Python/ocho.py
Python
gpl-3.0
301
0.013289
from django.urls import reverse from oppia.test import OppiaTestCase class CompletionRatesViewTest(OppiaTestCase): fixtures = ['tests/test_user.json', 'tests/test_oppia.json', 'tests/test_quiz.json', 'tests/test_permissions.json', 'tests/test_cohort....
DigitalCampus/django-oppia
tests/reports/views/test_completion_rates.py
Python
gpl-3.0
1,385
0
import logging log = logging.getLogger(__name__) try: from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.layers.normalization import BatchNormalization from keras.layers.advanced_activations import PReLU, LeakyReLU from keras.optimizers import A...
pierre-chaville/automlk
automlk/utils/keras_wrapper.py
Python
mit
2,073
0.00193
# Copyright 2014 Netflix, 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 required by applicable law...
Dklotz-Circle/security_monkey
security_monkey/common/route53.py
Python
apache-2.0
3,538
0.001696
from __future__ import absolute_import, unicode_literals import json from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailadmin.widgets import AdminChooser class AdminSnippetChooser(AdminChooser): target_content_type = None def __i...
chimeno/wagtail
wagtail/wagtailsnippets/widgets.py
Python
bsd-3-clause
1,643
0.001826
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #-------------------------------------------------------------------------------------------------- # Program Name: holy_orders # Program Description: Update program for the Abbot Cantus API server. # # Filename: holy_orders/current.py # Purpose:...
CANTUS-Project/abbot
holy_orders/current.py
Python
gpl-3.0
6,147
0.003579
from __future__ import print_function, division, absolute_import import difflib import locale import os import pprint import six import sys import tempfile try: import unittest2 as unittest except ImportError: import unittest # just log py.warnings (and pygtk warnings in particular) import logging try: ...
Lorquas/subscription-manager
test/fixture.py
Python
gpl-2.0
18,129
0.001655
# Copyright 2020 Tensorforce Team. 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 la...
reinforceio/tensorforce
tensorforce/core/parameters/random.py
Python
apache-2.0
4,125
0.002182
from distutils.core import setup setup( name = 'ml_easy_peer_grade', packages = ['ml_easy_peer_grade'], version = '0.18', scripts=['bin/ml_easy_peer_grade'], description = 'Ez peer grade your project members, exclusive to privileged Bilkent students', author = 'Cuklahan Dorum', author_email = 'badass@alu...
cagdass/ml-easy-peer-grade
setup.py
Python
gpl-3.0
525
0.04381
import logging from ...util import none_or from ..errors import MalformedResponse from .collection import Collection logger = logging.getLogger("mw.api.collections.revisions") class Revisions(Collection): """ A collection of revisions indexes by title, page_id and user_text. Note that revisions of delet...
makoshark/Mediawiki-Utilities
mw/api/collections/revisions.py
Python
mit
8,519
0.006926
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/Imaging/Core/Testing/Python/TestAllMaskBits.py
Python
gpl-3.0
3,568
0.002522
from __future__ import print_function dictData = [ {'forename':'Marc','surname':'Mine','age':35, 'tags':('family','work'), 'job':{'name':'Baker','category':'Business'}, 'hobbies':[{'name':'swimming','period':7}, {'name':'reading','period':1}]}, ...
mtils/sqliter
examples/testdata.py
Python
mit
9,753
0.022147
# Copyright (C) 2009, Hyves (Startphone Ltd.) # # This module is part of the Concurrence Framework and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php from concurrence.timer import Timeout from concurrence.database.mysql import ProxyProtocol, PacketReader, PACKET_READ_RESULT...
concurrence/concurrence
lib/concurrence/database/mysql/proxy.py
Python
bsd-3-clause
3,790
0.007916
""" Setup/build script for MasterChess For usage info, see readme.md """ import os, sys, subprocess from distutils.dir_util import copy_tree from setuptools import setup from MasterChessGUI import __description__, __copyright__, __version__ def get_folder(path): if isinstance(path, list): return [get_fo...
jhartz/masterchess
setup.py
Python
gpl-3.0
5,318
0.003197
# -*- coding: utf-8 -*- # © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models, fields class ExceptionRule(models.Model): _inherit = 'exception.rule' rule_group = fields.Selection( selection_add...
kittiu/sale-workflow
sale_exception/models/sale.py
Python
agpl-3.0
2,008
0
# -*- coding: utf-8 -*- # Copyright 2013 Christoph Reiter # # 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. """Everythi...
elbeardmorez/quodlibet
quodlibet/quodlibet/qltk/unity.py
Python
gpl-2.0
2,257
0
#Problem J4: Wait Time inputarray = [] for i in range(input()): inputarray.append(raw_input().split(" ")) #Number, total, lastwait, response friendarray = [] ctime = 0 for i in range(len(inputarray)): if inputarray[i][0].lower() == "c": ctime += inputarray[i][1] if inputarray[i][0].lower() == "r": friendlist =...
jacksarick/My-Code
Events/CCC/2015/J4.py
Python
mit
601
0.021631
# pytgasu - Automating creation of Telegram sticker packs # Copyright (C) 2017 Lemon Lam <almk@rmntn.net> # # 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 # ...
alemonmk/pytgasu
pytgasu/upload/defparse.py
Python
gpl-3.0
2,873
0.001044
import pandas as pd from pandas import DataFrame df = pd.read_csv('sp500_ohlc.csv', index_col = 'Date', parse_dates=True) #notice what i did, since it is an object df['H-L'] = df.High - df.Low print df.head() df['100MA'] = pd.rolling_mean(df['Close'], 100) # must do a slice, since there will be no value for 100...
PythonProgramming/Pandas-Basics-with-2.7
pandas 5 - Column Operations (Basic mathematics, moving averages).py
Python
mit
416
0.009615
import weakref from sys import getrefcount import string import talkshowConfig style = talkshowConfig.config().parser.style from talkshowLogger import logger debug = logger.debug info = logger.info warn = logger.warn #?? pyglet.options['audio'] = ('directsound', 'openal', 'silent') from pyglet.gl import * from pygl...
regular/talkshow
wrappers.py
Python
gpl-3.0
20,806
0.01341
from __future__ import division import json import urllib from flask import request from flask import render_template from flask import abort import jinja2 import rigor.config import rigorwebapp.plugin import rigorwebapp.utils from rigorwebapp.utils import debug_detail, debug_main, debug_error import rigorwebapp.aut...
blindsightcorp/rigor-webapp
plugins/percept_search_page/__init__.py
Python
bsd-2-clause
9,018
0.028055
#!/usr/bin/env python from os import path from collections import defaultdict import math root = path.dirname(path.dirname(path.dirname(__file__))) result_dir = path.join(root, 'results') def get_file_name(test): test = '%s_result' % test return path.join(result_dir, test) def mean(l): return float(sum(l...
sheimi/os-benchmark
script/analysis/analysis.py
Python
gpl-3.0
3,736
0.005621
"""Support for the Airly air_quality service.""" from homeassistant.components.air_quality import ( ATTR_AQI, ATTR_PM_2_5, ATTR_PM_10, AirQualityEntity, ) from homeassistant.const import CONF_NAME from .const import ( ATTR_API_ADVICE, ATTR_API_CAQI, ATTR_API_CAQI_DESCRIPTION, ATTR_API_C...
pschmitt/home-assistant
homeassistant/components/airly/air_quality.py
Python
apache-2.0
3,907
0.000768
# -*- coding: utf-8 -*- from openerp import models, fields, api class CalendarEvent(models.Model): _inherit = 'calendar.event' meeting_reason_id = fields.Many2one( 'calendar.event.meeting.reason', string="Meeting reason", ondelete="restrict") class CalendarEventMeetingReason(models.M...
sandrafig/addons
calendar_event_meeting_reason/models/calendar_event.py
Python
agpl-3.0
488
0.004098
"""SCons.Tool.mwcc Tool-specific initialization for the Metrowerks CodeWarrior compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is he...
engineer0x47/SCONS
engine/SCons/Tool/mwcc.py
Python
mit
6,841
0.003947
# Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTW...
basp/neko
spikes/main.py
Python
mit
2,241
0.002231
from django.contrib import admin from treebeard.admin import TreeAdmin from treebeard.forms import movenodeform_factory from oscar.core.loading import get_model AttributeOption = get_model('catalogue', 'AttributeOption') AttributeOptionGroup = get_model('catalogue', 'AttributeOptionGroup') Category = get_model('catal...
itbabu/django-oscar
src/oscar/apps/catalogue/admin.py
Python
bsd-3-clause
3,190
0
# regression tree # input is a dataframe of features # the corresponding y value(called labels here) is the scores for each document import pandas as pd import numpy as np from multiprocessing import Pool from itertools import repeat import scipy import scipy.optimize node_id = 0 def get_splitting_points(args): #...
lezzago/LambdaMart
RegressionTree.py
Python
mit
6,591
0.038082
# -*- coding: utf-8 -*- # # Monary documentation build configuration file, created by # sphinx-quickstart on Wed Jul 9 13:39:38 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
aherlihy/Monary
doc/conf.py
Python
apache-2.0
8,410
0.006183
import logging from flask_babel import lazy_gettext from .jsontools import dict_to_json from .widgets import ChartWidget, DirectChartWidget from ..baseviews import BaseModelView, expose from ..models.group import DirectProcessData, GroupByProcessData from ..security.decorators import has_access from ..urltools import...
dpgaspar/Flask-AppBuilder
flask_appbuilder/charts/views.py
Python
bsd-3-clause
17,665
0.000566
#!/usr/bin/env python ''' Pymodbus Asynchronous Client Examples -------------------------------------------------------------------------- The following is an example of how to use the asynchronous modbus client implementation from pymodbus. ''' #------------------------------------------------------------------------...
mjfarmer/scada_py
pymodbus/examples/common/asynchronous-client.py
Python
gpl-3.0
5,916
0.011663
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/": { "get": { "responses": { "200": { ...
tiangolo/fastapi
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_py310.py
Python
mit
3,293
0.000607
from __future__ import division """ instek_pst.py part of the CsPyController package for AQuA experiment control by Martin Lichtman Handles sending commands to Instek PST power supplies over RS232. created = 2015.07.09 modified >= 2015.07.09 """ __author__ = 'Martin Lichtman' import logging logger =...
QuantumQuadrate/CsPyController
python/vaunix.py
Python
lgpl-3.0
9,955
0.012858
# -*- coding: utf-8 -*- import os import re import select import socket import struct import time from module.plugins.internal.Hoster import Hoster from module.plugins.internal.misc import exists, fsjoin class XDCC(Hoster): __name__ = "XDCC" __type__ = "hoster" __version__ = "0.42" __status__ ...
kaarl/pyload
module/plugins/hoster/XDCC.py
Python
gpl-3.0
7,856
0.006237
import os import argparse import tensorflow as tf import numpy as np import sys sys.path.append('../') from reader import flickr8k_raw_data def make_example(image_feature, caption_feature, id): # The object we return ex = tf.train.SequenceExample() # A non-sequential feature of our example sequence_le...
chintak/image-captioning
scripts/tfrecord_writer.py
Python
mit
5,331
0.002626