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) 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cloudbase/nova-virtualbox
nova/console/api.py
Python
apache-2.0
2,962
# Rekall Memory Forensics # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # Copyright 2013 Google Inc. 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...
rainaashutosh/MyTestRekall
rekall-core/rekall/plugins/windows/malware/timers.py
Python
gpl-2.0
5,781
import hmac import uuid import urllib import hashlib import httplib as http from github3.repos.branch import Branch from framework.exceptions import HTTPError from website.addons.base.exceptions import HookError from website.addons.github.api import GitHubClient MESSAGE_BASE = 'via the Open Science Framework' MESSAG...
zachjanicki/osf.io
website/addons/github/utils.py
Python
apache-2.0
4,131
def main(): a = int(raw_input()) b = int(raw_input()) soma = a + b print 'SOMA = {}'.format(soma) if __name__ == '__main__': main()
OrianaCadavid/uri-oj
1003-SimpleSum.py
Python
mit
154
from twisted.internet import reactor from twisted.internet.protocol import ClientCreator from twisted.conch.telnet import Telnet from twisted.internet.defer import Deferred import datetime import time import calendar import random import logging logger = logging.getLogger("main") timeservers=["time.nist.gov", "time-...
hiidef/hiispider
legacy/timeoffset.py
Python
mit
2,547
from collections import defaultdict, Counter from itertools import groupby class Solution(object): def removeBoxes(self, boxes): """ :type boxes: List[int] :rtype: int """ table = defaultdict(Counter) table_max = Counter() B = [] for k, l in groupby(bo...
ckclark/leetcode
py/remove-boxes.py
Python
apache-2.0
2,106
# -*- coding: utf-8 -*- # """ This file is used by this package to configure both the master and the slave processes """ with open("master_node", 'r') as stream: MASTER_NODE = stream.read().strip() # Broker BROKER_URL = "amqp://" + MASTER_NODE # Backend CELERY_RESULT_BACKEND = "redis://" + MASTER_NODE + "/1"
salmanebah/distributed-make
src/celeryconfig.py
Python
gpl-2.0
318
# Authors: Eberhard Eich <e.eich@fz-juelich.de> # # License: Simplified BSD from jumeg_mft_funcs import (apply_mft, calc_cdm_w_cut, compare_est_exp, fit_cdm_w_cut, scan_cdm_w_cut) from jumeg_mft_plot import (plot_cdm_data, plot_cdv_distribution, ...
fboers/jumegX
mft/__init__.py
Python
bsd-3-clause
549
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
r-mibu/ceilometer
ceilometer/tests/key_value_storage/test_notifications.py
Python
apache-2.0
4,566
# -*- coding:utf-8 -*- def proxy_method(member, method): """ call method on self.member or member() instead of self member: a callable which has a member named method or a string indicate the name of a member on self method: proxied method usa...
semonalbertyeah/pyutils
pyutils/func.py
Python
mit
856
''' Touch: Base for all touch objects Every touch in PyMT derives from the abstract Touch class. A touch can have more or less attributes, depending on the provider. For example, the TUIO provider can give you a lot of information about the touch, like position, acceleration, width/height of the shape and so on. Anot...
nuigroup/pymt-widgets
pymt/input/touch.py
Python
lgpl-3.0
9,232
#!/usr/bin/python """ Script that allow to turn on/off the My_Homessistant app by stopping flask and set state in myh.json used in the manager """ import getopt import json import logging import os import subprocess import sys from logging.handlers import RotatingFileHandler import psutil def helper(): msg = "...
vchatela/My-Homessistant
etc/init.d/myh.py
Python
mit
7,826
from django.core.urlresolvers import reverse from sentry.app import tsdb from sentry.testutils import APITestCase class TeamStatsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) team = self.create_team(name='foo') project_1 = self.create_project(team=team, name='a'...
Kryz/sentry
tests/sentry/api/endpoints/test_team_stats.py
Python
bsd-3-clause
1,130
from unittest import TestCase, main from socketio.namespace import BaseNamespace from socketio.virtsocket import Socket from mock import MagicMock class MockSocketIOServer(object): """Mock a SocketIO server""" def __init__(self, *args, **kwargs): self.sockets = {} def get_socket(self, socket_id='...
grokcore/dev.lexycross
wordsmithed/src/gevent-socketio/tests/test_namespace.py
Python
mit
11,026
# Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from base64 import decodestring import os import re from warnings import warn from qtconsole.qt import QtCore, QtGui from ipython_genutils.path import ensure_dir_exists from traitlets import Bool from qtconsole.svg i...
nitin-cherian/LifeLongLearning
Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/qtconsole/rich_jupyter_widget.py
Python
mit
17,100
############################################################################### ## ## Copyright 2013 Tavendo GmbH ## ## 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...
msmolens/VTK
ThirdParty/AutobahnPython/autobahn/websocket/compress.py
Python
bsd-3-clause
3,077
""" Project: django-use_x_forwarded_for Author: Kellen Green Date: 04/14/14 Version: 1.0.2 """
kellengreen/django-use_x_forwarded_for
use_x_forwarded_for/__init__.py
Python
mit
110
class _fake_sys: def __init__(self): self.stdin = process.stdin self.stdout = process.stdout self.stderr = process.stderr self.argv = process.argv def exit(self): process.exit() sys = _fake_sys()
pombredanne/PythonJS
pythonjs/fakelibs/sys.py
Python
bsd-3-clause
211
# 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 applicable ...
jwlawson/tensorflow
tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py
Python
apache-2.0
4,680
from uchan.lib.cache import cache, cache_key, LocalCache from uchan.lib.database import session from uchan.lib.model import SiteConfigModel from uchan.lib.ormmodel import ConfigOrmModel MESSAGE_SITE_CONFIG_EXISTS = 'Site config already exists' # def create_site(site_config: SiteConfigModel): # with session() as s...
Floens/uchan
uchan/lib/repository/configs.py
Python
mit
1,570
#!/usr/bin/python # Terminator by Chris Jones <cmsj@tenshu.net> # GPL v2 only """titlebar.py - classes necessary to provide a terminal title bar""" from gi.repository import Gtk, Gdk from gi.repository import GObject from gi.repository import Pango import random import itertools from version import APP_NAME from util...
guoxiao/terminator-gtk3
terminatorlib/titlebar.py
Python
gpl-2.0
12,493
#!/usr/bin/python from k5test import * for realm in multipass_realms(create_user=False): # Test kinit with a keytab. realm.kinit(realm.host_princ, flags=['-k']) realm = K5Realm(get_creds=False) # Test kinit with a partial keytab. pkeytab = realm.keytab + '.partial' realm.run([ktutil], input=('rkt %s\ndelent ...
drankye/kerb-token
krb5/src/tests/t_keytab.py
Python
apache-2.0
2,663
"""SCons.Tool.sunc++ Tool-specific initialization for C++ on SunOS / Solaris. 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 - 2016 The SCons Foundation # # Permission is hereby grant...
EmanueleCannizzaro/scons
src/engine/SCons/Tool/sunc++.py
Python
mit
4,729
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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: # # * Redistributions of source code mu...
mvpcom/CyberHandsFaraz
ROS/chugv_ws/devel/_setup_util.py
Python
gpl-3.0
12,302
import unittest from django_toolkit.pagination import RangeBasedPaginator class RangeBasedPaginatorTestCase(unittest.TestCase): def test_num_pages(self): self.assertEqual(RangeBasedPaginator(10, 5).num_pages, 2) self.assertEqual(RangeBasedPaginator(10, 1).num_pages, 10) self.assertEqua...
alexhayes/django-toolkit
django_toolkit/tests/pagination.py
Python
mit
1,100
from Generic_BPMDevice import * #import sys, os #sys.path.insert(0, os.path.abspath('..')) from pkg_resources import require require("numpy") import numpy as np class Simulated_BPMDevice(Generic_BPMDevice): """Simulated BPM device used for testing without the hardware. All of the abstract methods in the par...
dharryman/BPM_Test_Framework
BPMDevice/Simulated_BPMDevice.py
Python
apache-2.0
6,549
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import warnings from PIL import Image from padpt import padptdb, pt, sheet class TestSheet(unittest.TestCase): def setUp(self): self.monsters = padptdb.read_monsters( 'tests/data/db/monsters.csv', 'tests/data/db/ico...
wotsushi/padpt
tests/testsheet.py
Python
mit
4,591
"""Translation helper functions.""" import locale import os import re import sys import warnings import gettext as gettext_module from cStringIO import StringIO from google.appengine._internal.django.utils.importlib import import_module from google.appengine._internal.django.utils.safestring import mark_safe, SafeDat...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/_internal/django/utils/translation/trans_real.py
Python
bsd-3-clause
20,698
# This file is part of GooCalendar. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from ._calendar import Calendar from ._event import Event, EventStore __all__ = ['Calendar', 'EventStore', 'Event'] __version__ = '0.3'
ajeebkp23/goocalendar
goocalendar/__init__.py
Python
gpl-2.0
286
""" ========================================== Statistical functions (:mod:`scipy.stats`) ========================================== .. module:: scipy.stats This module contains a large number of probability distributions as well as a growing library of statistical functions. Each univariate distribution is an insta...
vhaasteren/scipy
scipy/stats/__init__.py
Python
bsd-3-clause
8,414
# Copyright (C) 2013 Instituto Nokia de Tecnologia - INdT # # 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. # # T...
lizardo/blueish
bt_lib/construct_helpers.py
Python
gpl-3.0
4,289
#!/usr/bin/env python """ Extract genome annotation from a GFF (a tab delimited format for storing sequence features and annotations) file. Requirements: Numpy :- http://numpy.org/ Scipy :- http://scipy.org/ Copyright (C) 2009-2012 Friedrich Miescher Laboratory of the Max Planck Society, Tubingen, German...
vipints/oqtans
oqtans_tools/rQuant/2.2/tools/GFFParser.py
Python
bsd-3-clause
14,456
# -*- coding: utf-8 -*- """ SQLpie License (MIT License) Copyright (c) 2011-2016 André Lessa, http://sqlpie.com See LICENSE file. """ from flask import g import sqlpie import math, json class Classifier(object): USE_NUMBERS_AS_WEIGHTS_PARAM = "use_numbers_as_weights" def __init__(self, model, subject_buck...
lessaworld/SQLpie
sqlpie/services/classifier.py
Python
mit
6,933
import json import logging from django.contrib.auth import get_user_model from django.test import TestCase from rest_framework.test import APIClient from apis.betterself.v1.urls import API_V1_LIST_CREATE_URL from betterself.users.fixtures.factories import UserFactory from betterself.users.tests.mixins.test_mixins imp...
jeffshek/betterself
apis/betterself/v1/tests/test_base.py
Python
mit
3,612
""" Package configuration file """ from setuptools import setup setup( name='pylint-mccabe', version='0.1.3', author='Infoxchange Australia dev team', author_email='devs@infoxchange.net.au', py_modules=['pylint_mccabe'], url='http://pypi.python.org/pypi/pylint-mccabe/', license='MIT', d...
infoxchange/pylint-mccabe
setup.py
Python
mit
537
import itchat itchat.login() friends = itchat.get_friends(update = True)[0:] info = {} for i in friends: info[i['NickName']] = i.Signature print(info)
XiangYz/webscraper
itchat_test.py
Python
lgpl-2.1
157
import logging from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponse, HttpResponseForbidden, HttpResponseNotFound from django.views.generic import TemplateView, View from zentral.utils.api_views import APIAuthError from zentral.utils.http import user_agent_and_ip_address_from_re...
zentralopensource/zentral
zentral/contrib/puppet/views.py
Python
apache-2.0
1,763
import time from flask import request from funcy import project from redash import models from redash.wsgi import api from redash.permissions import require_access, require_admin_or_owner, view_only from redash.handlers.base import BaseResource, require_fields, get_object_or_404 class AlertResource(BaseResource): ...
olivetree123/redash-x
redash/handlers/alerts.py
Python
bsd-2-clause
3,932
from multiprocessing import Pool def run_in_parallel(inputs, worker, no_of_processes=4): """Run given worker function in parallel with nunmber of processes given.""" # TODO multiprocessing does not work in PlanetLab nodes. OS Error 38! # Fall back to another parallelization method if there's an error. ...
fpdetective/fpdetective
src/crawler/parallelize.py
Python
gpl-3.0
373
import flask import flask_buzz app = flask.app.Flask(__name__) def log_error(err): flask.current_app.logger.error(str(err)) app.register_error_handler( flask_buzz.FlaskBuzz, flask_buzz.FlaskBuzz.build_error_handler(log_error), ) @app.route('/') def index(): raise flask_buzz.FlaskBuzz("There's a ...
dusktreader/flask-buzz
examples/tasks.py
Python
mit
395
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys import unittest from unittest.test.testmock import support from unittest.test.testmock.support import SomeClass, is_instance from unittest....
utluiz/utluiz.github.io
pyscript/Lib/unittest/test/testmock/testpatch.py
Python
mit
54,911
class Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ width,height = len(matrix[0]),len(matrix) for i in xrange(height): foundzero = False ...
hufeiya/leetcode
python/73_Set_Matrix_Zeroes.py
Python
gpl-2.0
1,004
import datetime import pywikibot from pywikibot.data.api import CachedRequest import unittest class DryAPITests(unittest.TestCase): def setUp(self): self.parms = {'site': pywikibot.Site('en'), 'action': 'query', 'meta': 'userinfo'} self.req ...
legoktm/pywikipedia-rewrite
tests/dry_api_tests.py
Python
mit
1,850
#!/usr/bin/env python import sys import compileall from os import walk, unlink from os.path import join, splitext, exists assert sys.argv[1], "usage: makepyc /path/to/lib" for root, dirs, files in walk(sys.argv[1]): for name in files: if name.endswith('.pyc'): pyc = join(root, name) ...
AAFC-MBB/galaxy-cloudman-playbook
roles/galaxyprojectdotorg.galaxy/files/makepyc.py
Python
mit
506
"""Support for Ecobee Thermostats.""" import collections from typing import Optional import voluptuous as vol from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_DRY...
Teagan42/home-assistant
homeassistant/components/ecobee/climate.py
Python
apache-2.0
23,976
from utils import * def make_plots(bar_plots_name, plots_name, file_names): """ Uses the JSON data in the given 'file_names' to write aggregate bar plots to 'bar_plots_name' and aggregate plots to 'plots_name'. """ data = [read_json_data(file) for file in file_names] output_bar_multiple(bar_pl...
Dudro/317_AI
make_plots.py
Python
gpl-2.0
710
#!/usr/bin/env python #-*- coding:utf-8 -*- """ Trains Generic String and Spectrum kernel Support Vector Regressions for peptide protein binding affinity prediction """ import h5py as h import matplotlib.pyplot as plt import numpy as np import os import seaborn as sns; sns.set_palette("hls", 4) from gs_kernel.gs_kern...
aldro61/microbiome-summer-school-2017
exercises/code/applications.peptide.binding.py
Python
mit
9,808
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/KERBEROS/package/scripts/kerberos_server.py
Python
apache-2.0
3,944
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
google-research/language
language/capwap/utils/io_utils.py
Python
apache-2.0
9,702
import hashlib import datetime class Block: def __init__(self, index, timestamp, data, previous_hash): self.index = index self.timestamp = timestamp self.data = data self.previous_hash = previous_hash self.hash = self.hash_block() def hash_block(self): hash = hashlib.sha256() hash.update(str(self.i...
shuttlesworthNEO/HashHacks2.0-methOD
Future_Prospects/blockchain.py
Python
mit
1,336
#!/usr/bin/env python # Copyright 2015 HM Revenue & Customs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
hmrc/release
src/universal/bin/release.py
Python
apache-2.0
2,453
class BaseSeekSet(object): def __init__(self, sets): self._sets = list(sets) def __contains__(self, item): raise NotImplementedError() def __getitem__(self, seek): """Use `seek` to index into `self` and return set of available letters.""" if isinstance(seek, slice): start, stop, step = see...
PhilHarnish/forge
src/data/seek_sets/base_seek_set.py
Python
mit
851
""" Core eval alignment algorithms. """ from functools import partial, wraps from typing import Dict, Optional, Sequence, Tuple, Type, Union import warnings import numpy as np from pandas._typing import FrameOrSeries from pandas.errors import PerformanceWarning from pandas.core.dtypes.generic import ABCDataFrame, A...
TomAugspurger/pandas
pandas/core/computation/align.py
Python
bsd-3-clause
5,860
''' payforward object ''' from sqlalchemy.orm import relationship from sqlalchemy import Column, Date, Integer, ForeignKey from base import __base__ class Payforward(__base__): # pylint: disable=R0903 """table of regular payments which was payed before described date. to manage payments also used as ind...
obezpalko/4k
e4/payforward.py
Python
mit
858
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # 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 Lice...
jonathonwalz/ansible
lib/ansible/modules/cloud/cloudstack/cs_host.py
Python
gpl-3.0
17,672
""" Remote package support using ``pkg_add(1)`` .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. .. warning:: ...
saltstack/salt
salt/modules/freebsdpkg.py
Python
apache-2.0
17,447
#!/usr/bin/env python # # Copyright 2016 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 requir...
googleads/googleads-python-lib
examples/ad_manager/v202111/creative_template_service/get_system_defined_creative_templates.py
Python
apache-2.0
2,006
# Copyright (C) 2015-2021 Regents of the University of California # # 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...
BD2KGenomics/slugflow
src/toil/test/wdl/conftest.py
Python
apache-2.0
846
from __future__ import division, print_function, absolute_import import sys if sys.version_info[0] >= 3: DEFINE_MACROS = [("SCIPY_PY3K", None)] else: DEFINE_MACROS = [] def configuration(parent_package='', top_path=None): from scipy._build_utils.system_info import get_info from numpy.distutils.misc_...
lhilt/scipy
scipy/cluster/setup.py
Python
bsd-3-clause
1,061
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
wbsavage/shinken
shinken/modules/webui_broker/perfdata_guess.py
Python
agpl-3.0
7,533
from setuptools import find_packages, setup from ats_sms_operator.version import get_version setup( name='django-ats-sms-operator', version=get_version(), description="ATS SMS operator library.", keywords='django, sms receiver', author='Lubos Matl, Oskar Hollmann', author_email='matllubos@gma...
matllubos/django-ats-sms-operator
setup.py
Python
lgpl-3.0
1,302
# -*- coding: utf-8 -*- from apis.models.test import Test from . import Resource class TestsBanner(Resource): async def get(self, request): tests = (Test.objects(status=Test.STATUS_PUBLISHED, is_sticky=True) .order_by('-participate_number') .skip(0).limit(10)) ...
gusibi/Metis
apis/v1/api/tests_banner.py
Python
apache-2.0
344
import datetime import itertools import re import urllib2 import mimetypes import operator import logging import sys import traceback import warnings import tagging import tagging.models import vidscraper from bs4 import BeautifulSoup from django.conf import settings from django.contrib.auth.models import User from dj...
pculture/mirocommunity
localtv/models.py
Python
agpl-3.0
55,425
import sys def exitApp(): print "Thank you for using the scorer app" sys.exit()
amangupta53/scorer.py
scorer/system.py
Python
gpl-2.0
90
import hashlib import urllib2 from test_services import GET from akara import pipeline def test_pipeline_missing_stages(): for stages in (None, [], ()): try: pipeline.register_pipeline("blah", stages=stages) except TypeError: pass else: raise AssertErro...
uogbuji/akara
test/test_pipeline.py
Python
apache-2.0
3,268
from django.contrib.auth import views as auth_views from django.urls import path from django.views.generic import RedirectView from . import views urlpatterns = [ path('upload_view/', views.upload_view, name='upload_view'), path('get_view/', views.get_view, name='get_view'), path('post_view/', views.post_...
atul-bhouraskar/django
tests/test_client/urls.py
Python
bsd-3-clause
3,134
import pygame, sys from entityclasses import * from compositeclasses import * ''' Tamed Monster masterlist format: 'Name': [HP, atk, def, mus, foc, cla, rhy, <- base (1-9999, combined max 50000?) HP, atk, def, mus, foc, cla, rhy] <- gain modifiers (1-10) ''' masterlist_tm = { 'Kobold': [1500, 1550, 1350, 1100, ...
2Guys1Python/Project-Cacophonum
data/init.py
Python
mit
9,463
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.template import TemplateSyntaxError, RequestContext from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, force_unicode fro...
indexofire/gravoicy
gravoicy/apps/content_ext/markup/models.py
Python
bsd-3-clause
4,746
import sys import csv from gene_positions import chrom import argparse import numpy as np import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description='Scatter plot of weights in edgelist.') parser.add_argument('A', type=argparse.FileType('r')) parser.add_argument('B', type=argparse.FileType('r')) #p...
CSB-IG/circos_rnaseq_tcga_brca
MI_differential/scatter.py
Python
gpl-3.0
1,199
from django import forms from edc_consent.forms import BaseSubjectConsentForm from ..models import MaternalConsent class MaternalConsentForm (BaseSubjectConsentForm): def clean(self): cleaned_data = self.cleaned_data consent = MaternalConsent.objects.filter(identity=cleaned_data.get('identity'...
botswana-harvard/edc-bhp074
bhp074/apps/eit_maternal/forms/maternal_consent_form.py
Python
gpl-2.0
500
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Quantization'] , ['MovingMedian'] , ['BestCycle'] , ['SVR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_MovingMedian_BestCycle_SVR.py
Python
bsd-3-clause
158
""" observersimple.py An implementation of the Observer Design Patterns http://www.codeskulptor.org/#user41_SDGV3w1Qcj_1.py """ class Publisher: # Observable """registers subscribers to notify""" def __init__(self): self._subscribers = dict() def register(self, subscriber, callback = None...
ReblochonMasque/codeskulptor_projects
observer_pattern/observersimple.py
Python
mit
668
""" WSGI config for uptee project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
upTee/upTee
uptee/wsgi.py
Python
bsd-3-clause
1,132
# Copyright (c) 2015, Forschungszentrum Jülich GmbH # All rights reserved. # Contributors: Jonas Bühler, Daniel Pflugfelder, Siegfried Jahnke # Address: Institute of Bio- and Geosciences, Plant Sciences (IBG-2), Forschungszentrum Jülich GmbH, 52428 Jülich, Germany # # Redistribution and use in source and binary forms,...
ForschungszentrumJuelich/phenoVein
General/Modules/Macros/FZJSkeletonTotalLength/SkeletonTotalLength.py
Python
bsd-3-clause
3,535
# -*- coding: utf-8 -*- { 'name': "BestJa: Volunteer (UCW)", 'summary': "Volunteer Profile (UCW)", 'description': """ Volunteer Profile modification for UCW ========================= Hides a couple of fields, and adds a new "UW status" field. """, 'author': "Laboratorium EE", 'website': "http://www....
EE/bestja
addons/bestja_volunteer_ucw/__openerp__.py
Python
agpl-3.0
650
# -*- coding: utf-8 -*- """ """ # Author: Dean Serenevy <deans@apcisystems.com> # This software is Copyright (c) 2014 APCI, LLC. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, versio...
duelafn/python-galil-apci
galil_apci/parameters.py
Python
lgpl-3.0
6,619
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
amitsela/incubator-beam
sdks/python/test_config.py
Python
apache-2.0
1,649
# coding=utf-8 import os import tempfile import shutil from django.core.files.uploadedfile import UploadedFile from django.test import TransactionTestCase from django.contrib.auth.models import Group from hs_core.testing import MockIRODSTestCaseMixin from hs_core import hydroshare from hs_core.models import BaseResou...
FescueFungiShare/hydroshare
hs_composite_resource/tests/test_composite_resource.py
Python
bsd-3-clause
49,698
from setuptools import setup setup(name='joinmarket_core', version='0.1', description='Joinmarket library for Bitcoin coinjoins', url='http://github.com/Joinmarket-Org/joinmarket', #author='Flying Circus', #author_email='flyingcircus@example.com', license='GPL', packages=['joi...
AdamISZ/joinmarket_core
setup.py
Python
gpl-3.0
394
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017-2018, Antony Alekseyev <antony.alekseyev@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: z...
Lujeni/ansible
lib/ansible/modules/monitoring/zabbix/zabbix_map.py
Python
gpl-3.0
32,525
#from gluon.contrib.populate import populate #if not db(db.auth_user).count(): # populate(db.auth_user,10)
szimszon/Temporary-storage
models/db_wizard_populate.py
Python
gpl-3.0
111
#!/usr/bin/env python ## \file ## \ingroup tutorial_tmva_pytorch ## \notebook -nodraw ## This tutorial shows how to do multiclass classification in TMVA with neural ## networks trained with PyTorch. ## ## \macro_code ## ## \date 2020 ## \author Anirudh Dagar <anirudhdagar6@gmail.com> - IIT, Roorkee from ROOT import T...
root-mirror/root
tutorials/tmva/pytorch/MulticlassPyTorch.py
Python
lgpl-2.1
5,018
import os import argparse import traceback import logging import urlparse from oxdpython import Client def test_openid_commands(config_file): """function that runs the commands in a interactive manner :param config_file: config file location """ c = Client(config_file) print "\n=> Registering c...
GluuFederation/oxd-python
examples/e2e_tests/openid_socket.py
Python
mit
3,274
from textwrap import dedent def dedent_and_trim(string: str) -> str: return dedent(string.lstrip('\r\n').rstrip(' '))
garcia/simfile
simfile/_private/dedent.py
Python
mit
123
# # gPrime - a web-based genealogy program # # Copyright (c) 2017 gPrime Development Team # # 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)...
sam-m888/gprime
gprime/app/handlers/urlhandler.py
Python
gpl-2.0
2,945
from state import called def setup(): called.append('test_pak1.test_mod.setup') def teardown(): called.append('test_pak1.test_mod.teardown') def test_one_mod_one(): called.append('test_pak1.test_mod.test_one_mod_one') pass
davidyezsetz/kuma
vendor/packages/nose/functional_tests/support/ltfn/test_pak1/test_mod.py
Python
mpl-2.0
243
from .gen.project_statuses import _ProjectStatuses class ProjectStatuses(_ProjectStatuses): """Project Statuses resource""" def create(self, project, params={}, **options): self.create_in_project(project, params, **options) def create_in_project(self, project, params={}, **options): """Cr...
Asana/python-asana
asana/resources/project_statuses.py
Python
mit
2,184
#!/usr/bin/env python import Command import recalboxFiles from generators.Generator import Generator import os.path import glob class ViceGenerator(Generator): # Main entry of the module # Return command def generate(self, system, rom, playersControllers): # Settings recalbox default config file i...
recalbox/recalbox-configgen
configgen/generators/vice/viceGenerator.py
Python
mit
1,079
#!/usr/bin/env python # -*- coding: utf-8 -*- import gevent.monkey; gevent.monkey.patch_all() import gevent import csv import requests import sys def post_species(scientific, common, labels): resp = requests.post('https://birdseye.space/v1/species', json={ 'names': { 'scientific': scientific.l...
MihaiBalint/birdseye-server
test-data/species-import.py
Python
mit
2,428
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, models class Users(models.Model): _inherit = 'res.users' def action_open_my_account_settings(self): action = { "name": _("Account Security"), "type": "ir.act...
jeremiahyan/odoo
addons/auth_totp_mail/models/res_users.py
Python
gpl-3.0
1,668
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.has_static_page' db.add_column(u'projects_project...
tochev/obshtestvo.bg
projects/migrations/0017_auto__add_field_project_has_static_page.py
Python
unlicense
19,837
"""Common utilities for local and remote clients.""" import re import os import stat class BaseClient(object): @staticmethod def set_path_readonly(path): current = os.stat(path).st_mode if os.path.isdir(path): # Need to add right = (stat.S_IXUSR | stat.S_IRGRP | stat.S...
arameshkumar/base-nuxeo-drive
nuxeo-drive-client/nxdrive/client/common.py
Python
lgpl-2.1
2,976
#!/usr/bin/env python2 import sys, time, datetime from Nonin import * finished = False while not finished: try: device = sys.argv[1] nonin = Nonin3150(device) time.sleep(2) print 'Attempting to read session data on the device...' sessions = nonin.read_sessions() ...
Hammit/wais-pop
bin/Nonin/get-data.py
Python
mit
852
# -*- encoding: utf-8 -*- """Implements Packages UI""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Package(Base): """Manipulates Packages from UI""" is_katello = True def navigat...
ares/robottelo
robottelo/ui/packages.py
Python
gpl-3.0
2,451
import cv2 import time cap=cv2.VideoCapture('max2.mp4') def detect(frame): cascade = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml") rects = cascade.detectMultiScale(frame, 1.3, 4, cv2.cv.CV_HAAR_SCALE_IMAGE, (200,200)) if len(rects) == 0: return [], frame rects[:, 2:] += rects[:, :...
mwaruwa/jkuat-projects
Final-Project/FaceEngine/Trainer/Trainer.py
Python
apache-2.0
1,044
""" Test lldb process launch flags. """ from __future__ import print_function import copy import os import time import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil import six class ProcessLaunchTestCase(TestBase): mydir = TestBase.comp...
youtube/cobalt
third_party/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
Python
bsd-3-clause
7,171
#!/usr/bin/env python # Copyright(c)2012-2013 Internet Archive. Software license AGPL version 3. # # This file is part of the `surt` python package. # # surt 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 Soft...
pombredanne/surt
surt/DefaultIAURLCanonicalizer.py
Python
agpl-3.0
2,949
# Copyright 2019 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
tensorflow/probability
tensorflow_probability/python/math/ode/runge_kutta_util.py
Python
apache-2.0
11,551
################################################################################ # # Copyright 2015-2020 Félix Brezo and Yaiza Rubio # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwa...
i3visio/osrframework
osrframework/wrappers/gravatar.py
Python
agpl-3.0
3,920
from .sloealbum import SloeAlbum from .sloebaseplugin import SloeBasePlugIn from .sloeconfig import SloeConfig from .sloeconfigspec import SloeConfigSpec from .sloeerror import SloeError from .sloeexecutil import SloeExecUtil from .sloegenspec import SloeGenSpec from .sloeitem import SloeItem from .sloelocalexec impor...
sloe/chan
sloelib/__init__.py
Python
apache-2.0
1,562