code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
########################################################################## # # Copyright (c) 2008, Image Engine Design 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: # # * Redistribu...
code-google-com/cortex-vfx
test/IECore/PrimitiveImplicitSurfaceFunction.py
Python
bsd-3-clause
2,275
from datetime import datetime, timedelta from pokemongo_bot import inventory from pokemongo_bot.human_behaviour import sleep from pokemongo_bot.base_task import BaseTask from pokemongo_bot.worker_result import WorkerResult class IncubateEggs(BaseTask): SUPPORTED_TASK_API_VERSION = 1 last_km_walked = 0 ...
pengzhangdev/PokemonGo-Bot
pokemongo_bot/cell_workers/incubate_eggs.py
Python
mit
11,384
# ImageD11_v0.4 Software for beamline ID11 # Copyright (C) 2005 Jon Wright # # 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 ver...
jonwright/ImageD11
test/test_transform.py
Python
gpl-2.0
4,663
import hashlib import random import json import locale import re from collections import defaultdict import math from dateutil.parser import parse from django.db import models from django.contrib.auth.models import User from django.conf import settings from pandas import read_csv from pandas import notnull from panda...
unicef/rhizome
rhizome/models/document_models.py
Python
agpl-3.0
23,896
import smtpd, os, time, asyncore class mailserver(smtpd.SMTPServer): def __init__(self): smtpd.SMTPServer.__init__(self, ('',25), None) print 'Mailsink listening on port 25' def process_message(self, peer, mailfrom, rcpttos, data): basepath='/tmp/maildump' print 'mail from: %...
fretscha/pfa
scripts/smtpd.py
Python
bsd-3-clause
859
#!/usr/bin/env python3 """ gb.py: Module that handles gameboy and gameboy color versions and misc functions """ import pktools.lib.rom as rom from pktools.lib.language import Language from pktools.lib.version import VersionId, GameVersion from pktools.lib.messages import PKTMessage as Messages class GbRom(rom.Rom): ...
MegaMetapod/pypktools
pktools/lib/gb.py
Python
mit
3,451
import platform """ Linux Command Emulator: hostname Class used to emulate the 'hostname' command on Windows machines running the CloudScape SSH server. """ class ModHostname: def __init__(self, chan): # Connection channel and shell environment self.chan = chan sel...
djtaylor/cloudscape
python/cloudscape/agent/win/sshd/modules/cmd_hostname.py
Python
gpl-3.0
828
#!/usr/bin/env python # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests for the client_replay.py script. To run tests, just call this script with the intended chrome, chromedriver binaries and an o...
ric2b/Vivaldi-browser
chromium/chrome/test/chromedriver/log_replay/client_replay_test.py
Python
bsd-3-clause
9,620
from typing import Optional, List import pandas as pd import numpy as np import numpy.linalg as la from econtools.util.gentools import force_list, force_df def add_cons(df): df = df.copy() # Protect original df if df.ndim == 1: df = pd.DataFrame(df) df['_cons'] = np.ones(df.shape[0]) retu...
dmsul/econtools
econtools/metrics/regutil.py
Python
bsd-3-clause
3,035
from copy import deepcopy from itertools import permutations import pytest from pytest_mock import mocker from sokoenginepy import (DEFAULT_PIECE_ID, AtomicMove, Direction, IllegalMoveError, Mover, NonPlayableBoardError, SokobanBoard, SolvingMode) from sokoenginepy....
tadamic/sokoenginepy
tests/game/mover_spec.py
Python
gpl-3.0
42,000
from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {} with open(path.join(HERE, 'datadog_checks', 'jfrog_platform', '__about__.py')) as f: exec(f.read(), ABOUT) # Get the long description...
DataDog/integrations-extras
jfrog_platform/setup.py
Python
bsd-3-clause
1,867
import json from db import KEY_TIMERS_MAX, KEY_TIMERS, KEY_TIMER def allocate(db, count=1): new_max = db.incr(KEY_TIMERS_MAX, count) new_timers = range(new_max - count + 1, new_max + 1) return new_timers def add(pipe, timer_id, cron_entry, intent_json, description=''): d = {'intent': intent_json, ...
boivie/sci
jobserver/timers.py
Python
apache-2.0
594
# Copyright (C) 2013-2018 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Tris Wilson # # 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 v...
tjcsl/cslbot
cslbot/commands/zipcode.py
Python
gpl-2.0
1,778
""" Nmcli parsers ============= This file will parse the output of command line tools used to manage NetworkManager. Parsers provided by this module include: NmcliDevShow - command ``/usr/bin/nmcli dev show`` -------------------------------------------------- NmcliConnShow - command ``/usr/bin/nmcli conn show`` ----...
RedHatInsights/insights-core
insights/parsers/nmcli.py
Python
apache-2.0
7,496
#!/usr/bin/python import serviceSkeleton import json import threading import sys from Tree import * PORT = 5000 HOST = "127.0.0.1" USERSONLINE = set([]) USERSONLINELOCK = threading.Lock() treeLock = threading.Lock() # if integer argument passed, use that as port if len(sys.argv) > 1: try: PORT=int(sys.a...
Cynary/tree_of_knowledge
wsService.py
Python
mit
1,790
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
Lekensteyn/buildbot
master/buildbot/test/unit/test_util_misc.py
Python
gpl-2.0
4,160
# -*- coding: utf-8 -*- # * Copyright (C) 2012-2013 Croissance Commune # * Authors: # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; # * Pettier Gabriel; # * TJEBBES Gaston <g.t@majerti.fr> # # This file is part of Autonomie : Progiciel de gestion de CAE. # # Autonomie is...
CroissanceCommune/autonomie
autonomie/exception.py
Python
gpl-3.0
1,757
import os import json import threading import boto3 from boto3.s3.transfer import S3Transfer from elrond.crypto import get_file_digest DEFAULT_CHUNK_SIZE = 64 * 1024 * 1024 ELROND_S3_SINGLETON_CLIENT = None ELROND_S3_SUPPORTED_REGIONS = [ 'EU', 'eu-west-1', 'us-west-1', 'us-west-2', 'ap-south-1'...
au9ustine/elrond
elrond/aws/s3.py
Python
mit
3,432
#!/usr/bin/env python2.7 # -*- coding: UTF-8 -*- # © Copyright 2013 axujen, <axujen at gmail.com>. 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 of the Li...
axujen/gentoo-bot
src/gentoobot/core.py
Python
gpl-3.0
5,386
# -*- coding: utf-8 -*- import sys import os import logging import random import PyQt4 from PyQt4.QtCore import * #from PyQt4.QtCore import QAbstractTableModel import constants class Model(QAbstractTableModel): keys = list() modelType = None def __init__(self, parent = None): ''' ''' ...
CaesarTjalbo/musictagger
mp3names/model_classes.py
Python
gpl-3.0
3,029
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This pro...
Micronaet/micronaet-fashion
fashion_xls_photo/agent/export_pdf.py
Python
agpl-3.0
3,293
# -*- coding: latin-1 -*- import config from datetime import datetime, date from calendar import Calendar from kivy.app import App from kivy.lang import Builder from kivy.properties import ObjectProperty, NumericProperty, StringProperty, ListProperty from kivy.uix.screenmanager import ScreenManager, Screen from kivy....
collurio229/atraman
atraman/atramanApp.py
Python
mit
8,822
#!/usr/bin/python import nltk.data import os import sys import codecs import time import regex def trecacize(subdir): count = 0 start = time.time() trec_dir = "../data/plaintext-trec/" for sdir in ["../data/plaintext/" + d for d in [subdir]]: trec_sdir = os.path.join(trec_dir, os.path.basename(sdir)) os.mkdir...
fmance/deep-medical-ir
utils/trecacize.py
Python
gpl-3.0
1,127
# -*- coding: utf-8 -*- # # Subscription manager command line utility. # # Copyright (c) 2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or...
vritant/subscription-manager
src/subscription_manager/managercli.py
Python
gpl-2.0
113,827
# -*- coding: utf-8 -*- # Copyright(C) 2010-2014 Roger Philibert # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the...
vicnet/weboob
modules/youjizz/pages/video.py
Python
lgpl-3.0
1,843
# python # This file is generated by a program (mib2py). import CISCO_VOICE_ANALOG_IF_MIB OIDMAP = { '1.3.6.1.4.1.9.9.62': CISCO_VOICE_ANALOG_IF_MIB.ciscoVoiceAnalogIfMIB, '1.3.6.1.4.1.9.9.62.1': CISCO_VOICE_ANALOG_IF_MIB.cvaIfObjects, '1.3.6.1.4.1.9.9.62.1.1': CISCO_VOICE_ANALOG_IF_MIB.cvaIfGeneralObjects, '1.3.6.1...
xiangke/pycopia
mibs/pycopia/mibs/CISCO_VOICE_ANALOG_IF_MIB_OID.py
Python
lgpl-2.1
4,424
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_salesman.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ********************...
stevenmizuno/QGIS
python/plugins/processing/algs/grass7/ext/v_net_salesman.py
Python
gpl-2.0
1,496
# -*- coding: utf-8 -*- from __future__ import absolute_import import six class Event(object): def __init__(self, **kwargs): for k, v in six.iteritems(kwargs): setattr(self, k, v) class Trigger(object): def __init__(self): self.callbacks = set() def subscribe(self, callback...
timlegrand/giterm
src/giterm/observer.py
Python
bsd-2-clause
943
import cv2 import numpy as np try: from IEEE2014Functions import backgroundEliminator as be except: print "Background Elimination Import Failed in blockSpotter" def nothing(x): pass def spotBlocks(image): #Notable parameters cameraHeight = 8.5 #inches focal = 2.54 #in/in #Camera specs claim 5mm or 28mm ## ...
ufieeehw/IEEE2014
python/vision/blockSpotter.py
Python
gpl-2.0
4,385
""" Testing for mean shift clustering methods """ import numpy as np from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_equal from sklearn.cluster import MeanShift from sklearn.clu...
chaluemwut/fbserver
venv/lib/python2.7/site-packages/sklearn/cluster/tests/test_mean_shift.py
Python
apache-2.0
2,844
from __future__ import absolute_import __all__ = ['general','plot','stats','text'] from . import general, plot, stats, text
michaelpacer/pybasicbayes
pybasicbayes/util/__init__.py
Python
mit
124
from src.identification import ml __all__ = [ml]
banacer/lab221
biometric_identification/src/identification/__init__.py
Python
mit
50
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2006-2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
sebastienhupin/qxrad
qooxdoo/tool/pylib/generator/output/Package.py
Python
lgpl-3.0
7,494
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2019 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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...
robocomp/robocomp-robolab
components/hardware/external_control/joystickSimulatorController/build/src/joystickSimulatorController.py
Python
gpl-3.0
3,566
"""Kaggle competition: Predicting a Biological Response. Blending {RandomForests, ExtraTrees, GradientBoosting} + stretching to [0,1]. The blending scheme is related to the idea Jose H. Solorzano presented here: http://www.kaggle.com/c/bioresponse/forums/t/1889/question-about-the-process-of-ensemble-learning/10950#pos...
thushear/MLInAction
kaggle/blending.py
Python
apache-2.0
3,727
#<This file is part of NDN.p4,i.e., an NDN implementation written in P4.> #Copyright (C) 2016, the University of Luxembourg #Salvatore Signorello <salvatore.signorello@uni.lu> # #NDN.p4 is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Fre...
signorello/NDN.p4
mini-ndn/my_experiment.py
Python
gpl-3.0
3,301
#!/usr/bin/python #给定一个只包含大小写字母,数字的字符串,对其进行排序,保证: #所有的小写字母在大写字母前面 #所有的字母在数字前面 #所有的奇数在偶数前面 #key parameter to specify a function to be called on each list element prior to making comparisons. The value of the key parameter should be a function that takes a single argument and returns a key to use for sorting purposes....
karouu/my_python_practice
sort.py
Python
mit
1,358
# Copyright 2017 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...
nburn42/tensorflow
tensorflow/contrib/tpu/python/tpu/bfloat16_test.py
Python
apache-2.0
1,817
# Copyright 2011 VMware, 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 ...
openstack/tacker
tacker/common/config.py
Python
apache-2.0
4,808
#----------------------------------------------------------------------------- # ply: yacc.py # # Author(s): David M. Beazley (dave@dabeaz.com) # # Copyright (C) 2001-2007, David M. Beazley # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # L...
GarethS/Motor
yacc.py
Python
gpl-3.0
82,586
#!/usr/bin/env python3 import sys import numpy as np from PyQt4.QtGui import * from .util import project_functions as pfs from .util.plugin import PluginDefault from .util.plugin import WidgetDefault class Widget(QWidget, WidgetDefault): class Labels(WidgetDefault.Labels): pass class Defaults(WidgetDefaul...
Frikster/Mesoscale-Brain-Explorer
src/plugins/average.py
Python
mit
2,786
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists ...
rbaumg/trac
trac/upgrades/db17.py
Python
bsd-3-clause
1,475
import unittest from robot.utils.asserts import (assert_equal, assert_true, assert_raises, assert_raises_with_msg) from robot.model.itemlist import ItemList class Object(object): attr = 1 def __init__(self, id=None): self.id = id class OldStyle: pass class Custo...
xiaokeng/robotframework
utest/model/test_itemlist.py
Python
apache-2.0
5,911
#!/usr/bin/python3 """sonar_access.py gets the data from a SonarQube analysis and converts the information into Grip measurements formatted as JSON. This script assumes that the project analysis has already been completed and that SonarQube has had time to store the results of the analysis in its database. Copyright ...
GripQA/client-tools
sonar-access/sonar_access.py
Python
apache-2.0
6,944
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-22 23:19:11 from webui.app import app from fetcher import tornado_fetcher from database.sqlite.projectdb import ProjectDB def fetch(task): t, ...
1900/pyspider
webui.py
Python
apache-2.0
629
""" Data structures for sparse float data. Life is made simpler by dealing only with float64 data """ from collections import abc import warnings import numpy as np import pandas._libs.index as libindex import pandas._libs.sparse as splib from pandas._libs.sparse import BlockIndex, IntIndex from pandas.compat.numpy i...
cbertinato/pandas
pandas/core/sparse/series.py
Python
bsd-3-clause
20,037
from __future__ import ( unicode_literals, print_function, absolute_import, division, ) from threading import Lock from itertools import repeat, cycle, chain from .exc import OutputDeviceBadValue, GPIOPinMissing from .devices import GPIODevice, Device, CompositeDevice from .mixins import SourceMixin f...
MrHarcombe/python-gpiozero
gpiozero/output_devices.py
Python
bsd-3-clause
48,763
# 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 may ...
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_virtual_network_gateways_operations.py
Python
mit
124,274
from sage import prompt, ansi, player class CustomPromptRenderer(prompt.PromptRenderer): """ Override prompt.PromptRenderer """ def colorize_vital(self, value): """ Give us green, yellow, and red colored numbers for vitals depending on our percentage. """ if value >= 66: ...
spicerack/sage
examples/custom_prompt/custom_prompt.py
Python
gpl-3.0
1,863
from django.conf import settings from rest_framework import viewsets from rest_framework.response import Response import snotes20.models as models class EditorViewSet(viewsets.ViewSet): def list(self, request): return Response([ { 'short': short, 'long': long, ...
shownotes/snotes20-restapi
snotes20/views/EditorViewSet.py
Python
agpl-3.0
444
def player_input(prompt, choice_1, choice_2): "this prompts the player with the choices for the game" print "Prompt: ", prompt; print "Choice 1: ", choice_1; print "Choice 2: ", choice_2; def program_answer_response(choice_dict_name, user_input_name): "prompts users incorrect answer when user inputs wrong thing" ...
odorsey/pythonGame
functions.py
Python
bsd-3-clause
550
# -*- coding: utf-8 -*- # # Copyright 2011-2012 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, bu...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/utils/webclient/__init__.py
Python
mit
2,532
# Copyright (c) 2014 Hitachi Data Systems, 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 # # U...
JioCloud/cinder
cinder/volume/drivers/hitachi/hnas_iscsi.py
Python
apache-2.0
28,556
# Copyright (c) 2012-2016 Seafile Ltd. import os import logging from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import IsAdminUser from rest_framework.authentication import SessionAuthentication from seahub.base.a...
miurahr/seahub
seahub/api2/endpoints/admin/user_activities.py
Python
apache-2.0
4,684
# # Copyright 2017 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 applicable law or ...
hm-distro/netblocks
netblocks/netblocks.py
Python
apache-2.0
5,527
""" This script produces summary plots and tables of the Platypus SNP and indel calls, and comparison plots of Platypus calls with the validated 1000 genomes calls. """ from __future__ import division from math import sqrt,pow,log,exp,pi,log10 import sys import gzip ##################################################...
andyrimmer/Platypus
scripts/computeTsTv.py
Python
gpl-3.0
1,888
import sys """ If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count spaces or hyphens. For exam...
gragas/projecteuler
0017/python3/solution.py
Python
mit
2,155
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpat...
papapep/Django
projects/everycheese/config/urls.py
Python
gpl-3.0
1,515
#!/usr/bin/env python # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2006,2007 Frank Scholz <coherence@beebits.net> import getopt import sys import string import xmlrpclib command = "status" device = '' volume = 50 uri = '' id = 1000 arguments = {} try: optlist, ...
furbrain/Coherence
tests/rpc_client.py
Python
mit
2,232
from django.shortcuts import render, redirect import commonware.log from ffclub.person.models import Person log = commonware.log.getLogger('ffclub') def index(request): """Main view.""" data = {} # You'd add data here that you're sending to the template. return render(request, 'intro/index.html', data) ...
elin-moco/ffclub
ffclub/intro/views.py
Python
bsd-3-clause
699
# -*- coding: utf-8 -*- __author__ = 'Ammar Akhtar' """ simple logging for betfair.py heavily inspired by https://docs.python.org/2/howto/logging-cookbook.html, http://pymotw.com/2/logging/ """ import logging import logging.handlers LOG_FILENAME = 'logs/logs.out' formatter = logging.Formatter('%(levelname)s [%(a...
aa403/betfair.py
betfair/bf_logging.py
Python
mit
884
"""SQLite3 backend. Versions: 1) Added 3 more columns. 2) Changed "user" to "username". 3) Now adding keys to keyword table and added an "information" table containing a version number. 4) Got rid of keywords. 5) Add fmax, smax, mass, volume, charge """ from __future__ import absolute_import, print_function impor...
suttond/MODOI
ase/db/sqlite.py
Python
lgpl-3.0
20,937
# -*- coding: utf-8 -*- # Copyright 2009-2016 Noviat. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models class AccountReportPartnersLedgerWizard(models.TransientModel): _inherit = 'partners.ledger.webkit' # pylint: disable=old-api7-method-defined def xls_export(sel...
open-synergy/account-financial-reporting
account_financial_report_webkit_xls/wizard/partners_ledger_wizard.py
Python
agpl-3.0
1,072
# use - precedes and unkown object and awaits response to clarify or create one # in early years an infant would simply want to know what to 'call' something # this can be the brains first phase of categorisation which last many years. # asking 'whats that' to build a world with which it can then interpret class what(...
byteface/sing
bin/pypal/brain/comprehension/questions/what/what.py
Python
gpl-2.0
795
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation ...
arseneyr/essentia
test/src/unittest/standard/test_noiseadder.py
Python
agpl-3.0
2,166
# # General: # This file is part of .NET Bridge # # Copyright: # 2010 Jonathan Shore # 2017 Jonathan Shore and Contributors # # License: # 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 c...
tr8dr/.Net-Bridge
src/Python/pyDotNet/src/pydotnet/core/utils/SystemUtils.py
Python
apache-2.0
1,030
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
pferreir/indico-backup
indico/ext/livesync/__init__.py
Python
gpl-3.0
1,370
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe import unittest from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_c...
gangadharkadam/v5_erp
erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py
Python
agpl-3.0
2,959
""" Context processors for codehunkit.rootplugin.com """ import datetime from codehunkit.app.models import Language, FlashMessage def bootstrip(request): """ Setting basic context variables """ default_langs = Language.get_defaults() return { 'app_user': request.user, 'hun...
mysteryjeans/codehunkit
codehunkit/app/context_processors.py
Python
gpl-2.0
725
#!/usr/bin/env python # -*- coding: utf-8 -*- ## # python standard library # import unittest from functools import partial ## # test helpers # from testutils import mock ## # pycomber modules # from pycomber.manager import Manager class ManagerTestCase(unittest.TestCase): def setUp(self): self.manager...
michalbachowski/pycomber
test/manager_test.py
Python
mit
7,232
from Products.ZenRRD.ComponentCommandParser import ComponentCommandParser class diskstats(ComponentCommandParser): componentSplit = '\n' componentScanValue = 'id' componentScanner = '^\s*(\d+\s+){2}(?P<component>[^ ]+) ' scanners = [ r' (?P<rTotal>\d+) (?P<rMerged>\d+) (?P<rSectors>\d+) (?P<rT...
vholer/ZenPacks.CERIT_SC.LinuxMonitorAdvanced
ZenPacks/CERIT_SC/LinuxMonitorAdvanced/parsers/linux/diskstats.py
Python
mit
480
# -*- coding: utf-8 -*- # Copyright 2015 LasLabs Inc. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). { 'name': 'Password Security', "summary": "Allow admin to set password security requirements.", 'version': '10.0.1.1.4', 'author': "LasLabs, Odoo Community Association (OCA)", ...
ovnicraft/server-tools
password_security/__manifest__.py
Python
agpl-3.0
696
import datetime import os import django.utils.copycompat as copy from django.conf import settings from django.db.models.fields import Field from django.core.files.base import File, ContentFile from django.core.files.storage import default_storage from django.core.files.images import ImageFile, get_image_dimensions fr...
tjsavage/sfcsdatabase
sfcs/django/db/models/fields/files.py
Python
bsd-3-clause
16,847
""" Print RAPyDo configurations """ import os from enum import Enum from typing import Dict, List import typer from tabulate import tabulate from controller import COMPOSE_ENVIRONMENT_FILE, TABLE_FORMAT, log from controller.app import Application, Configuration from controller.deploy.docker import Docker from contro...
rapydo/do
controller/commands/list.py
Python
mit
2,753
# -*- coding: utf-8 -*- '''appspace utilities''' from keyword import iskeyword from importlib import import_module from stuf.six import strings __all__ = ('checkname', 'lazyimport') def lazyimport(path, attribute=None): ''' deferred module loader @param path: something to load @param attribute: a...
lcrees/appspace
appspace/utils.py
Python
mit
1,427
#!/usr/bin/python # coding=utf-8 # region License # Findeco is dually licensed under GPLv3 or later and MPLv2. # ################################################################################ # Copyright (c) 2012 Klaus Greff <klaus.greff@gmx.net> # This file is part of Findeco. # # Findeco is free software; you can r...
Qwlouse/Findeco
node_storage/tools.py
Python
gpl-3.0
2,919
""" Unit tests for the `single_bubble_model` module of ``TAMOC`` Provides testing of the objects, methods and functions defined in the `single_bubble_model` module of ``TAMOC``. This module uses the `ambient` module to control ambient data and the `dbm` module to predict particle behavior. These tests check the beha...
socolofs/tamoc
tamoc/test/test_sbm.py
Python
mit
15,177
# -*- coding: utf-8 -*- """Module for handling suggestions in resources.""" from django.conf import settings from suggestions.models import Suggestion from transifex.txcommon.log import logger from transifex.resources.models import Translation, SourceEntity from transifex.resources.formats.utils.string_utils import pe...
rvanlaar/easy-transifex
src/transifex/transifex/addons/suggestions/formats.py
Python
bsd-2-clause
4,209
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hp.com> # # 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/lice...
kiall/designate-py3
functionaltests/api/v2/test_pool.py
Python
apache-2.0
3,426
# vim: tabstop=4 shiftwidth=4 softtabstop=4 """ :mod:`nova.console` -- Console Proxy to set up VM console access (i.e. with xvp) ===================================================== .. automodule:: nova.console :platform: Unix :synopsis: Wrapper around console proxies such as xvp to set up ...
tylertian/Openstack
openstack F/nova/nova/console/__init__.py
Python
apache-2.0
411
import nanosim from analysis import characterise, plot_circuit import numpy as np from scipy import interpolate from analysis import dynamic_analysis, characterise nanosim.initialise(temp = 0.025) runtime = 1.0 * 10**-7 C = 1.0 * nanosim.aF # attofarads R = 20 * nanosim.Rk mV = 0.001 # millivolts Vs = 2 * mV Vg = 9...
djrodgerspryor/MCSE-Simulator
reference circuit 2 - SET.py
Python
bsd-3-clause
1,155
import collections from zope import component from zope import interface from zope.component.factory import Factory from sparc.configuration import container from .interfaces import IByteMellonFile, IUnicodeMellonFile DEFAULT_snippet_lines_increment = 1 DEFAULT_snippet_lines_coverage = 5 DEFAULT_read_size = 512000 DEF...
CrowdStrike/mellon
mellon/file.py
Python
mit
5,565
from django.conf.urls import include, url from django.views.generic import TemplateView from kuma.attachments.feeds import AttachmentsFeed from kuma.attachments.views import edit_attachment from . import feeds, views from .constants import DOCUMENT_PATH_RE # These patterns inherit (?P<document_path>[^\$]+). documen...
jgmize/kuma
kuma/wiki/urls.py
Python
mpl-2.0
5,894
from twisted.spread import pb class QuoteReader(pb.Root): def __init__(self, quoter): self.quoter = quoter def remote_nextQuote(self): return self.quoter.getQuote()
mzdaniel/oh-mainline
vendor/packages/twisted/doc/core/howto/listings/TwistedQuotes/pbquote.py
Python
agpl-3.0
193
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib import os from django.core import urlresolvers from django.conf import settings from django.core.files.base import ContentFile from django.db import models from django.utils.translation import ugettext_lazy as _ from polymorphic import P...
mkoistinen/django-filer
filer/models/filemodels.py
Python
bsd-3-clause
10,266
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Receiver # Generated: Fri Jun 5 17:18:32 2015 ################################################## from gnuradio import blocks from gnuradio import eng_notation from gnuradio import fft from gnuradio import gr...
varenius/salsa
USRP/usrp_gnuradio_dev/Receiver.py
Python
mit
4,129
import sys import time from redeal import * Hand.set_str_style('long') def main(): dealer = Deal.prepare({}) t_start = time.time() n_correct = 0 while True: deal = dealer() print('\n') print(' '.join([ str(deal.south.spades), ...
lorserker/bridgesim
traincount/hcp.py
Python
mit
918
# -*- coding: utf-8 -*- # Copyright (C) 2015. Tšili Lauri Johannes # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later vers...
tsili/datpy
datpy/record/iterators.py
Python
agpl-3.0
1,323
from demo import DemoHandler
fuwenqing0988/hanfeng
py_web/__init__.py
Python
gpl-2.0
28
class parent(object): """This is parent class""" def __init__(self,a,b): self.name = a self.addr = b def set(self): self.name = input() self.addr = input() def disp(self): print("Name = ",self.name) print("Addr = ",sel...
sachinyadav3496/Python-Workshop-17-08-2017
class2.py
Python
gpl-3.0
803
""" Test the enterprise support APIs. """ import ddt import httpretty import mock from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django.urls import reverse from django.http import HttpResponseRedirect from django.test.utils import override_settings...
philanthropy-u/edx-platform
openedx/features/enterprise_support/tests/test_api.py
Python
agpl-3.0
22,880
from tests.support.asserts import assert_error, assert_dialog_handled, assert_success from tests.support.fixtures import create_dialog from tests.support.inline import inline def delete_cookie(session, name): return session.transport.send("DELETE", "/session/%s/cookie/%s" % (session.session_id, name)) # 16.4 De...
anthgur/servo
tests/wpt/web-platform-tests/webdriver/tests/cookies/delete_cookie.py
Python
mpl-2.0
3,548
""" FreeBSD support... """ import os import ctypes import ctypes.util as cutil import envi.memory as e_mem import envi.cli as e_cli import vtrace import vtrace.archs.i386 as v_i386 import vtrace.archs.amd64 as v_amd64 import vtrace.platforms.base as v_base import vtrace.platforms.posix as v_posix import vtrace.util ...
foreni-administrator/pyew
vtrace/platforms/freebsd.py
Python
gpl-2.0
22,064
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eith...
lem9/weblate
weblate/trans/machine/apertium.py
Python
gpl-3.0
3,606
# -*- coding: cp936 -*- import random dice_list = ["4","6","8","10","12","20","100"] while True: n = raw_input("ÄãÐèÒª¼¸Ãæ÷»£º") if n == "end": break if n not in dice_list: if n == "2" : print "¸øÄãһö¹ýÈ¥µÄÓ²±Ò£¬ÌýÌýÄÇʱÎÒÃǵÄÕý·´Ãæ" else : print "Äã¼û¹ý"+n...
zhaoyao0919/CharacterCreator
dice.py
Python
gpl-2.0
635
from __future__ import unicode_literals import base64 import json from django.test import TestCase, RequestFactory from django.core.urlresolvers import reverse from django.utils import timezone from ..compat import urlparse, parse_qs, urlencode, get_user_model from ..models import get_application_model, Grant from ....
Natgeoed/django-oauth-toolkit
oauth2_provider/tests/test_authorization_code.py
Python
bsd-2-clause
22,745
""" Compare WebGL markers with canvas markers. This covers all markers supported by scatter. The plots are put in tabs, so that you can easily switch to compare positioning and appearance. """ import numpy as np from bokeh.plotting import show, output_file, Figure from bokeh.models.widgets import Tabs, Panel from bok...
clairetang6/bokeh
examples/webgl/marker_compare.py
Python
bsd-3-clause
1,052
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
tgrochow/avango
avango-utils/python/_converter.py
Python
lgpl-3.0
7,635
""" Package-defined build command """ from pipes import quote import functools import os.path import sys import os from rez.build_system import BuildSystem from rez.build_process_ import BuildType from rez.packages_ import get_developer_package from rez.resolved_context import ResolvedContext from rez.exceptions impor...
cwmartin/rez
src/rezplugins/build_system/custom.py
Python
lgpl-3.0
8,070
# -*- coding: utf-8 -*- # Copyright (c) 2013, First Party Software # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, # t...
filipp/Servo
servo/models/shipments.py
Python
bsd-2-clause
6,187