code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from setuptools import setup, find_packages import os DESCRIPTION = "A Python Document-Object Mapper for working with MongoDB" LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass def get_version(version_tuple): version = '%s.%s' % (version_tuple[0], version_tuple[1]) ...
aszwemin/mongoengine
setup.py
Python
mit
1,887
import re from django.conf import settings MASK_IN_EXCEPTION_EMAIL= ['password', 'mail', 'protected', 'private'] mask_re = re.compile('(' + '|'.join(MASK_IN_EXCEPTION_EMAIL) + ')', re.I) class HideSensistiveFieldsMiddleware(object): """ A middleware that masks sensitive fields when an exception occurs, e...
alex/pinax
pinax/middleware/security.py
Python
mit
918
# Generated by Django 3.0.7 on 2020-08-21 14:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stock', '0049_auto_20200820_0454'), ] operations = [ migrations.AlterField( model_name='stockitem', name='serial', ...
inventree/InvenTree
InvenTree/stock/migrations/0050_auto_20200821_1403.py
Python
mit
482
"""Report test results in JUnit-XML format, for use with Jenkins and build integration servers. Based on initial code from Ross Lawley. Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd """ import functools import os im...
pexip/os-pytest
src/_pytest/junitxml.py
Python
mit
25,628
# copy_to.py -- example about copy_to # # Copyright (C) 2002 Tom Jenkins <tjenkins@devis.com> # Copyright (C) 2005 Federico Di Gregorio <fog@initd.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 Fou...
kylelwm/ponus
venv/build/psycopg2/examples/copy_to.py
Python
mit
2,869
#Description: This "class Vna" contains all the GPIB commands in order to interact with #the Agilent VNA from SocketExecutor import SocketExecutor from lib.util.VnaEnums import SweepType from lib.util.VnaEnums import SParameters from lib.util.VnaEnums import CalType from lib.util.VnaEnums import DataFormat class V...
benalcazardiego/RFCV
v_2.0/lib/Vna.py
Python
mit
15,450
import Queue import threading import time class ObjectProcessorQueue(Queue.Queue): maxSize = 32000000 def __init__(self): Queue.Queue.__init__(self) self.sizeLock = threading.Lock() self.curSize = 0 # in Bytes. We maintain this to prevent nodes from flooing us with objects which take u...
bmng-dev/PyBitmessage
src/class_objectProcessorQueue.py
Python
mit
928
''' Created on Feb 1, 2013 @author: mheilman ''' import os, psutil, json, time, requests, threading, re, shutil, sys, io from Queue import Queue, Empty from threading import Thread from psutil import Popen # the pit in which to throw normal process output DEVNULL = open(os.devnull, 'wb') class Region: """A wrapp...
M-O-S-E-S/mgm-node-defunct
Node/Region.py
Python
mit
9,267
# # this file autogenerated, do not touch # vers = "asa822" my_ret_addr_len = 4 my_ret_addr_byte = "\x96\x36\x1c\x09" my_ret_addr_snmp = "150.54.28.9" finder_len = 9 finder_byte = "\x8b\x7c\x24\x14\x8b\x07\xff\xe0\x90" finder_snmp = "139.124.36.20.139.7.255.224.144" preamble_len = 41 preamble_byte = "\xb8\x...
RiskSense-Ops/CVE-2016-6366
extrabacon-2.0/versions/shellcode_asa822.py
Python
mit
4,528
# -*- coding: utf-8-*- import logging from notifier import Notifier from brain import Brain class Conversation(object): def __init__(self, persona, mic, profile): self._logger = logging.getLogger(__name__) self.persona = persona self.mic = mic self.profile = profile self.b...
brad999/nikita
client/conversation.py
Python
mit
2,068
from requests import Response, Session from ServiceNow_IAM import Client, get_user_command, create_user_command, update_user_command, \ disable_user_command, get_mapping_fields_command from IAMApiModule import * import pytest SERVICENOW_USER_OUTPUT = { "sys_id": "mock_id", "user_name": "mock_user_name", ...
VirusTotal/content
Packs/ServiceNow/Integrations/ServiceNow_IAM/ServiceNow_IAM_test.py
Python
mit
13,915
import tensorflow as tf from baselines.common.models import get_network_builder class Model(object): def __init__(self, name, network='mlp', **network_kwargs): self.name = name self.network_builder = get_network_builder(network)(**network_kwargs) @property def vars(self): return t...
dsbrown1331/CoRL2019-DREX
drex-mujoco/learner/baselines/baselines/ddpg/models.py
Python
mit
1,926
#!/usr/bin/env python # # __COPYRIGHT__ # # 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 rights to use, copy, modify, merge, pu...
Distrotech/scons
test/MSVC/batch-longlines.py
Python
mit
1,997
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.db import models from django.test import TestCase from protocols.utils import MANUAL_VERBS, MACHINE_VERBS, COMPONENT_VERBS, T...
Bionetbook/bionetbook
bnbapp/compare/tests.py
Python
mit
843
# -*- coding: utf-8 -*- """ apk自动打包命令行工具 Author: liyan File: apk_builder.py Features: 1. merge_plugin_and_build_apk(): merge my plugin to project and build to apk 2. build_agent_demos(): build my multiple module project use AgentBuilder class """ from util import Command, AgentBuilder import argparse import logging...
twotwo/apk-builder
apk_builder.py
Python
mit
8,234
from __future__ import division from __future__ import absolute_import import numpy as np from numpy.random import random na = np.newaxis import scipy.stats as stats import scipy.special as special import scipy.linalg from scipy.misc import logsumexp from numpy.core.umath_tests import inner1d from . import general fro...
michaelpacer/pybasicbayes
pybasicbayes/util/stats.py
Python
mit
10,647
import asposepdfcloud from asposepdfcloud.PdfApi import PdfApi from asposepdfcloud.PdfApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage apiKey = "XXXXX" #sepcify App Key appSid = "XXXXX" #sepcify App SID api...
asposepdf/Aspose_Pdf_Cloud
Examples/Python/Examples/GetAllAnnotations.py
Python
mit
1,328
#!/usr/bin/env python """ Copyright (c) 2014-2018 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 rights to use, copy, modify,...
alexforencich/verilog-ethernet
tb/test_ip_eth_tx.py
Python
mit
29,541
from django.conf.urls import patterns, url from premises.views import (ContentionDetailView, HomeView, ArgumentCreationView, PremiseCreationView, PremiseDeleteView, ContentionJsonView, PremiseEditView, ArgumentUpdateView, ...
donkawechico/arguman.org
web/premises/urls.py
Python
mit
3,186
import argparse import os from os.path import isdir, isfile BASE_DIR = './tempcontent/pages/' BASE_FSP = "https://www.fullstackpython.com/" links = { "(/table-of-contents.html)": "(#table-of-contents)", # chapter 1 "(/introduction.html)": "(#introduction)", "(/l...
mattmakai/fullstackpython.com
transform_book.py
Python
mit
12,804
from swgpy.sui import * attributeTemplates = ResultList() attributeTemplates.extend ([ 'ArmorAttributeTemplate', #0 'CraftingToolAttributeTemplate', #1 'DeedAttributeTemplate', #2 'DroidAttributeTemplate', #3 'FactoryCrateAttributeTemplate', #4 'FoodAttributeTemplate', #5 'FurnitureAttributeTemplate', #6 'MedsAttribute...
obi-two/Rebelion
data/scripts/attributes/AttributeTemplateInit.py
Python
mit
493
# # fastqReporter.py # Author: Philip Braunstein # # Date Created: May 13, 2014 # Last Modified: May 18, 2014 # # The FastqReporter class inherits from FastqKeeper. It adds functinoality # to print descriptions of features stored in FastqKeeper in a nicer format. # This modularity allows a program to call FastqReporter...
BioSeq/FastqKnowledge
fastqReporter.py
Python
mit
5,105
# -*- coding: utf-8 -*- """ Copyright (c) 2012 University of Oxford 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 rights to use, copy, modif...
benosteen/RDFDatabank
rdfdatabank/controllers/home.py
Python
mit
1,267
from collections import defaultdict class Capture(object): instances = set() def __init__(self): self.state = defaultdict(lambda: []) @classmethod def add(cls, name, value): for instance in cls.instances: instance.state[name].append(value) def __enter__(self): ...
dali-ml/dali-cython
dali/utils/capture.py
Python
mit
430
""" <Author> Evan Meagher <Start Date> January 15, 2010 <Description> This script runs an all-pairs ping on a set of allocated nodes and generates a Google Maps mashup displaying node locations and latencies. Built on run_program.py example script provided by Justin Samuel Command-line switches: --o...
sburnett/seattle
repy/apps/appmap/appmap.py
Python
mit
18,684
import os, pprint import paramiko from fabric.api import * import time import argparse import ConfigParser #only for ec2 # Script based on this tutorial http://www.linuxjournal.com/content/fabric-system-administrators-best-friend def install_basic_utils(user_name, hostname, path_to_key=None): env.user = user_name ...
GHrama/ameowsmeowl-2015
SystemsLabFinal_old/DeployScriptsAndOtherRelevantFiles/dryad.py
Python
mit
28,641
import numpy as np import deepchem as dc import pytest try: import tensorflow as tf has_tensorflow = True except: has_tensorflow = False @pytest.mark.tensorflow def test_singletask_robust_multitask_classification(): """Test robust multitask singletask classification.""" n_tasks = 1 n_samples = 10 n_feat...
peastman/deepchem
deepchem/models/tests/test_robust.py
Python
mit
1,894
from robot.api.deco import keyword class LibraryNameWhichIsLongerThan100CharactersButItSeemsThatItRequiresQuiteAlotLettersInTheFileNameAndIsNotGoodRealLifeExample(object): ROBOT_LIBRARY_SCOPE = 'TEST SUITE' @keyword(name='Keyword Which Also Has Really Long Name But Not As Long The Class Name By ${argument} ...
andriyko/sublime-robot-framework-assistant
test/resource/test_data/suite_tree/LibraryNameWhichIsLongerThan100CharactersButItSeemsThatItRequiresQuiteAlotLettersInTheFileNameAndIsNotGoodRealLifeExample.py
Python
mit
426
import os import hashlib import inspect import zlib from lib import BaseTest def strip_processor(output): return "\n".join([l for l in output.split("\n") if not l.startswith(' ') and not l.startswith('Date:')]) def sorted_processor(output): return "\n".join(sorted(output.split("\n"))) def ungzip_if_requir...
sobczyk/aptly
system/t06_publish/snapshot.py
Python
mit
44,638
#### 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 = Tangible() result.template = "object/tangible/lair/horned_krevol/shared_lair_horned_krevol_desert.iff" result.att...
anhstudios/swganh
data/scripts/templates/object/tangible/lair/horned_krevol/shared_lair_horned_krevol_desert.py
Python
mit
475
# Copyright (c) 2015-2017 Cisco Systems, Inc. # # 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 # rights to use, copy, modify, merge...
retr0h/maquina
test/unit/command/test_list.py
Python
mit
1,794
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from itertools import chain from werkzeug.exceptions import NotF...
mvidalgarcia/indico
indico/modules/events/features/util.py
Python
mit
4,231
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-09 02:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventario', '0019_auto_20161004_2051'), ] operations = [ migrations.Create...
exildev/Piscix
inventario/migrations/0020_movimientos.py
Python
mit
1,177
# Author: Christian Careaga (christian.careaga7@gmail.com) # A* Pathfinding in Python (2.7) # Please give credit if used import numpy from heapq import * def heuristic(a, b): return (b[0] - a[0]) ** 2 + (b[1] - a[1]) ** 2 def astar(array, start, goal): neighbors = [(0,1),(0,-1),(1,0),(-1,0),(1,1),(1,-1),(-...
awwong1/2016-pason-coding-contest
test_astar.py
Python
mit
2,483
from celery import Celery import time from redis import Redis import redis_collections as redisC import evaluation from datetime import datetime import pickle redisURL = "redis://localhost:6379/0" redisInstance = Redis(host='localhost', port=6379, db=0) app = Celery('tasks', broker=redisURL, backend=redisURL) app.c...
chen0031/distributed-deep-q
param-server/tasks.py
Python
mit
1,198
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import date from itertools import groupby from operator import attrgetter from dateutil.rel...
pferreir/indico
indico/modules/categories/controllers/util.py
Python
mit
6,308
# ***************************************************************************** # Copyright (c) 2019 IBM Corporation and other Contributors. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution,...
ibm-watson-iot/iot-python
test/test_api_registry_devices_diag_ec.py
Python
epl-1.0
3,222
# -*- coding: utf-8 -*- from textwrap import dedent from typing import Dict, List, Optional, Tuple, Union import pytest from _pytest.python_api import RaisesContext from django import test from django.contrib.auth.models import User from django.core import mail from django.db.models import QuerySet from django.db.util...
Nitrate/Nitrate
src/tests/testplans/test_models.py
Python
gpl-2.0
30,894
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013-2014 University of Dundee & Open Microscopy Environment # 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 Foundat...
sbesson/yaclifw
test/unit/test_version.py
Python
gpl-2.0
5,025
'''varscan.py Usage: varscan.py <sampledata> <indir> <outdir> <reference> <paths> ''' # Import modules import os from general_python import moab, docopt, toolbox from ngs_python.variant import varscan from ngs_python.bam import samtools # Extract arguments args = docopt.docopt(__doc__, version = ...
adam-rabinowitz/ngs_python
scripts/Variants/varscan.py
Python
gpl-2.0
6,126
import unittest import warnings from tests.baseclass import ParserTest from pykickstart import sections from pykickstart.errors import KickstartParseError, KickstartParseWarning class RawSection(sections.Section): def __init__(self, handler, **kwargs): sections.Section.__init__(self, handler, **kwargs) ...
bcl/pykickstart
tests/newsection.py
Python
gpl-2.0
2,337
# -*- coding: utf-8 -*- ## begin license ## # # "Digitale Collectie ErfGeo Enrichment" is a service that attempts to automatically create # geographical enrichments for records in "Digitale Collectie" (http://digitalecollectie.nl) # by querying the ErfGeo search API (https://erfgeo.nl/search). # "Digitale Collectie Erf...
seecr/dc-erfgeo-enrich
test/_integration/testutils/__init__.py
Python
gpl-2.0
1,669
""" Code that helps to deal with content from git repositories """ import os import logging import error from autotest.client import utils, os_dep __all__ = ["GitRepoHelper", "get_repo"] class GitRepoHelper(object): ''' Helps to deal with git repos, mostly fetching content from a repo ''' def __...
uni-peter-zheng/autotest
client/shared/git.py
Python
gpl-2.0
6,125
################################################################################# # Dionaea # - catches bugs - # # # # Copyright (c) 2010 Tobias Wulff (twu200 at gmail) # Copyright (c) 2011- PhiBo # # This program is free software; you can redistribute it a...
CZ-NIC/dionaea
modules/python/dionaea/sip/__init__.py
Python
gpl-2.0
28,143
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2017-03-05 09:30 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0003_groupexten...
sfcl/severcart
accounts/migrations/0004_auto_20170305_1430.py
Python
gpl-2.0
1,049
import os, apport.packaging, re from apport.hookutils import * def add_info(report): # the issue is not in the gnome-control-center code so reassign if report.has_key("Stacktrace") and "/usr/lib/control-center-1" in report["Stacktrace"]: for words in report["Stacktrace"].split(): if words.startswith("/usr/lib/c...
wrouesnel/gnome-control-center
debian/source_gnome-control-center.py
Python
gpl-2.0
1,284
(S'c3d3d96ea9ff90e4f4df7d62c2c46aba' p1 (ihappydoclib.parseinfo.moduleinfo ModuleInfo p2 (dp3 S'_namespaces' p4 ((dp5 S'GnuplotOpts' p6 (ihappydoclib.parseinfo.classinfo ClassInfo p7 (dp8 g4 ((dp9 (dp10 tp11 sS'_filename' p12 S'Gnuplot/gp_cygwin.py' p13 sS'_docstring' p14 S'' sS'_class_member_info' p15 (lp16 sS'_name' ...
mads-bertelsen/McCode
meta-pkgs/windows/Support/gnuplot-py-1.8/.happydoc.gp_cygwin.py
Python
gpl-2.0
2,545
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
pawkoz/dyplom
blender/release/scripts/modules/bpy_extras/anim_utils.py
Python
gpl-2.0
8,994
import os, sys, glob testdir = 'Scripts' outputdir = 'Outputs' pypatt = os.path.join(testdir, '*.py') print pypatt for pyfile in glob.glob(pypatt): outname = os.path.join(outputdir, os.path.basename(pyfile) + '.out') output = os.popen('%s %s' % (sys.executable, pyfile)).read() if not os.path.ex...
simontakite/sysadmin
pythonscripts/programmingpython/System/Tester/xxold/regrtest1.py
Python
gpl-2.0
599
#!/usr/bin/env python ## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish ...
wpoely86/easybuild-framework
easybuild/scripts/repo_setup.py
Python
gpl-2.0
3,206
""" The builder class for GRP (Gentoo Reference Platform) builds. """ import os, glob from generic_stage import * import catalyst from catalyst.error import * from catalyst.spawn import cmd from catalyst.output import * class grp_target(generic_stage_target): depends = ('system', 'stage3') def __init__(self): ...
wolf31o2-dot-org/catalyst
modules/catalyst/target/grp.py
Python
gpl-2.0
4,233
#-*- encoding: utf-8 -*- import os import sys from subprocess import call # import tily argc = len(sys.argv) def main(): print ("") def setRepo(key,path): p def newRepo(key,path): p def confRepo(key): p def delRepo(key): p def saveKey(key,path): p def openKey(key): p def delKey(key): p ...
Garcil-Tools/pc-home-kit-1.0
git-sync/git-sync.py
Python
gpl-2.0
456
from enigma import loadPNG, loadJPG def LoadPixmap(path, desktop = None, cached = False): if path[-4:] == '.png': ptr = loadPNG(path) elif path[-4:] == '.jpg': ptr = loadJPG(path) elif path[-1:] == '.': alpha = loadPNG(path + 'a.png') ptr = loadJPG(path + 'rgb.jpg',...
kingvuplus/boom2
lib/python/Tools/LoadPixmap.py
Python
gpl-2.0
501
""" Copyright (C) 2009 Aleksandar Krsteski <alekrsteski@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 2 of the License, or (at your option) any later version. This progra...
jenrik/guake
src/guake/simpleglade3app.py
Python
gpl-2.0
3,175
# # Copyright 2020-2021 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
oVirt/vdsm
tests/network/unit/nmstate/ovs_bridge_test.py
Python
gpl-2.0
27,967
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
pmghalvorsen/gramps_branch
gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py
Python
gpl-2.0
6,129
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 17 12:35:54 2019 @author: jpmellado """ import numpy as np from scipy.linalg import solve_banded import matplotlib.pyplot as plt def find_nearest(array,value): idx = (np.abs(array-value)).argmin() return idx def find_nearest_bisection(arr...
zrick/tlab
scripts/python/tlab.py
Python
gpl-3.0
5,758
from django.test import TestCase, Client from django.core.urlresolvers import reverse from django.contrib.auth.models import User from ganeti.models import Cluster class LoginTestCase(TestCase): # inject these two functions def login_user(self): return self.client.login(username=self.user_username, pa...
irregulator/ganetimgr
ganeti/tests.py
Python
gpl-3.0
15,569
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2005-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt,...
etherkit/OpenBeacon2
client/win/venv/Lib/site-packages/PyInstaller/depend/utils.py
Python
gpl-3.0
16,486
""" Copyright 2017 Robin Verschueren 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, softw...
SteveDiamond/cvxpy
cvxpy/reductions/qp2quad_form/qp2symbolic_qp.py
Python
gpl-3.0
2,367
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Source.limit' db.add_column(u'data_drivers_source', 'limit', self.gf('...
rogeriofalcone/libre
libre/apps/data_drivers/migrations/0022_auto__add_field_source_limit__del_field_sourcecsv_limit__del_field_sou.py
Python
gpl-3.0
19,054
import sys import time from twisted.internet import defer import p2pool from p2pool.dash import data as dash_data from p2pool.util import deferral, jsonrpc @deferral.retry('Error while checking dash connection:', 1) @defer.inlineCallbacks def check(dashd, net): if not (yield net.PARENT.RPC_CHECK(dashd)): ...
kundan92/p2pool-dash
p2pool/dash/helper.py
Python
gpl-3.0
5,069
''' This file is part of TvTumbler. Created on Sep 20, 2013 @author: Dermot Buckley @copyright: Copyright (c) 2013, Dermot Buckley @license: GPL @contact: info@tvtumbler.com ''' import time from . import logger, db def _get_db(row_type=None): _db = db.Connection(row_type=row_type) try: dummy = _get_...
maliciamrg/xbmc-addon-tvtumbler
tvtumbler/log.py
Python
gpl-3.0
6,111
'''I/O functions for GenX. These include loading of initilazation files. Also included is the config object. File started by: Matts Bjorck $Rev:: $: Revision of last commit $Author:: $: Author of last commit $Date:: $: D...
jackey-qiu/genx
filehandling.py
Python
gpl-3.0
7,538
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-03-23 20:28 from __future__ import unicode_literals from django.db import migrations import image_cropping.fields class Migration(migrations.Migration): dependencies = [ ('manager', '0002_auto_20180321_1228'), ] operations = [ ...
reyiyo/eventoL
eventol/manager/migrations/0003_auto_20180323_2028.py
Python
gpl-3.0
692
import bpy import os from . import m2 as m2_ from . import skin as skin_ def m2_to_blender_mesh(dir, filepath, filedata): """Import World of Warcraft M2 model to scene.""" print("\nImporting model: <<" + filepath + ">>") active_obj = bpy.context.scene.objects.active is_select = bpy.context.scene.obj...
skarnproject/Blender-WMO-import-export-scripts
io_scene_wmo/m2/import_m2.py
Python
gpl-3.0
5,574
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class IncomingCallHandlingSchedule(Document): pass
saurabh6790/erpnext
erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py
Python
gpl-3.0
296
import xmlrpclib import pygtk pygtk.require('2.0') import gtk import gtk.glade import ConfigParser class simpleGlade: def __init__(self): self.xml = None self.dicKeys = {} self.dicKeys['CTRL'] = gtk.gdk.CONTROL_MASK self.dicKeys['SHIFT'] = gtk.gdk.SHIFT_MASK self.dicKeys['...
juergenhamel/cuon
cuon_client/gtkMiniClient/gtkMiniClient.py
Python
gpl-3.0
5,413
## INFO ######################################################################## ## ## ## cutils ## ## ====== ...
petervaro/cutils
internal/static_hash_map.py
Python
gpl-3.0
8,112
#----------------------------------------------------------------------- #Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam # #Author: Daniel M. Pelt #Contact: D.M.Pelt@cwi.nl #Website: http://dmpelt.github.io/pyastratoolbox/ # # #This file is part of the Python interface to the #All Scale Tomographic Reconstruc...
decarlof/astra-toolbox
samples/python/s001_sinogram_par2d.py
Python
gpl-3.0
2,125
from __future__ import print_function import IMP import IMP.test class Tests(IMP.test.TestCase): """Class to test various low-level IMP module things""" def test_exceptions(self): """Make sure that exceptions work correctly""" # Using SWIG-generated std::vector classes (such as IMP.Particles...
shanot/imp
modules/em/test/test_module.py
Python
gpl-3.0
841
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2018 NIWA # # 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 yo...
jonnyhtw/cylc
lib/cylc/gui/updater_tree.py
Python
gpl-3.0
30,142
#!/usr/bin/env python # -*- coding: utf-8 -*- #================================================= # copyright Amin By [http://aminby.net] # Since 2014-4 #================================================= from parser import SParser PRT_FAIL = '\033[91m' OKBLUE = '\033[94m' PRT_ENDC = '\033[0m' def greeting(): pri...
leavesbnw/pyScheme
main.py
Python
gpl-3.0
1,237
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
roadmapper/ansible
lib/ansible/modules/network/cloudengine/ce_link_status.py
Python
gpl-3.0
22,366
"""Main module tests.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import os.path as op import tempfile import shutil import numpy as np import tables as tb from nose i...
DavidTingley/ephys-processing-pipeline
installation/klustaviewa-0.3.0/spikedetekt2/core/tests/test_main.py
Python
gpl-3.0
5,229
# -*- coding: utf-8 -*- import re from outwiker.libs.pyparsing import Regex class AlignFactory (object): @staticmethod def make(parser): return AlignToken(parser).getToken() class AlignToken (object): """ Токен для выравнивания """ def __init__(self, parser): self.parser =...
unreal666/outwiker
src/outwiker/pages/wiki/parser/tokenalign.py
Python
gpl-3.0
1,191
""" Plot form factor. """ import bornagain as ba from bornagain import nanometer, degree import bornplot as bp det = bp.Detector( 200, 0, 5, 0, 5 ) n = 4 results = [] for i in range(n): theta=30*i/(n-1) title = r'$\vartheta=%d^\circ$' % theta ff = ba.FormFactorFullSpheroid(3*nanometer, 13*nanometer) ...
waltervh/BornAgain
Doc/UserManual/fig/ff2/sim_FullSpheroid_tilt.py
Python
gpl-3.0
507
""" Copyright 2013 Steven Diamond 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...
SteveDiamond/cvxpy
examples/expr_trees/portfolio.py
Python
gpl-3.0
2,155
''' Class to represent a plane Author: ksakash@github.com (Akash Kumar Singh) ''' from innermodelnode import InnerModelNode from innermodelvector import InnerModelVector class InnerModelPlane (InnerModelNode): '''Class to represent a plane (but actually used for any box like object)''' def __init__ (self, id...
robocomp/robocomp
libs/innermodel-python3/innermodel_python3/innermodelplane.py
Python
gpl-3.0
2,483
# This module is the STUB for converting grammar into a Cython module import os import subprocess import shutil from string import Template from pyrser.codegen.c import template_cython from pyrser import meta from pyrser import fmt from pyrser import parsing from pyrser.parsing import functors from pyrser import gramma...
payet-s/pyrser
pyrser/codegen/c/cython.py
Python
gpl-3.0
14,744
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 Licen...
cylc/cylc
cylc/flow/unicode_rules.py
Python
gpl-3.0
8,017
''' Created on 2013-5-16 @author: Yubin Bai ''' import collections class Solution: # @return a string def minWindow(self, S, T): target = collections.Counter(T) current = {} for i in target: current[i] = 0 leftMin, rightMin, currMin = 0, 0, 1 << 33 left = r...
asraf209/leetcode
src/minWindowSubstring/main.py
Python
gpl-3.0
1,252
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons/netrender/slave.py
Python
gpl-3.0
17,900
import sys with open(sys.argv[1], 'r') as fh: for line in fh.readlines(): line = line.strip() if line == '': continue print 1 if int(line) % 2 == 0 else 0
cadyyan/codeeval
python/100_even_numbers.py
Python
gpl-3.0
198
# -*- coding: utf-8 -*- # © 2015 ABF OSIELL <http://osiell.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields, api from openerp.http import request class AuditlogHTTPRequest(models.Model): _name = 'auditlog.http.request' _description = u"Auditlog - HTTP re...
Benniphx/server-tools
auditlog/models/http_request.py
Python
agpl-3.0
2,347
from django.contrib.auth.models import User from django.test import TestCase from viewflow import flow class Test(TestCase): def test_available_callable(self): start = flow.Start().Available(lambda u: u.username.startswith('allowed')) self.privileged_user = User.objects.create_superuser('allowed',...
ribeiro-ucl/viewflow
tests/unit/tests/test_flow_start.py
Python
agpl-3.0
585
# -*- coding: utf-8 -*- # Copyright(C) 2014 Vincent A # # This file is part of weboob. # # weboob 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 opt...
Konubinix/weboob
modules/lutim/pages.py
Python
agpl-3.0
1,113
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-18 12:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0095_project_data_retention_days'), ] operations = [ migrations.Ad...
Linaro/squad
squad/core/migrations/0096_build_keep_data.py
Python
agpl-3.0
598
# -*- coding: utf-8 -*- """ Tests for credit course models. """ from __future__ import absolute_import import ddt from django.test import TestCase from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.credit.models import ( CreditCourse, CreditProvider, CreditRequest, CreditRequirem...
ESOedX/edx-platform
openedx/core/djangoapps/credit/tests/test_models.py
Python
agpl-3.0
7,908
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming import sys, os import essentia.standard as ess sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import utilFunctions as UF import stft as STFT import sineModel as SM def f0Yin(x...
acmaheri/sms-tools
lectures/6-Harmonic-model/plots-code/f0Yin.py
Python
agpl-3.0
1,742
# Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
xlqian/navitia
source/jormungandr/tests/direct_path_parking_with_asgard_integration_tests.py
Python
agpl-3.0
6,369
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-02-13 18:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('seqr', '0005_locuslist_projects'), ] operations = [ migrations.AddField( model_name='family', ...
macarthur-lab/seqr
seqr/migrations/0006_family_mme_notes.py
Python
agpl-3.0
417
# -*- coding: utf-8 -*- from south.v2 import DataMigration from django.contrib.contenttypes.management import update_contenttypes from django.contrib.auth.management import create_permissions from django.db.models import get_app, get_models class Migration(DataMigration): depends_on = ( ('activities', '00...
AllanNozomu/tecsaladeaula
core/migrations/0012_student_notes_and_professor_add_course_permissions.py
Python
agpl-3.0
14,503
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # Luis Felipe Mileo <mileo@kmee.com.br> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields from odoo.addons.financial.tests.financial_test_classes import \ FinancialTestCase class ManualFinancialProcess(FinancialTestCase): "...
thinkopensolutions/l10n-brazil
financial/tests/test_financial_receivable.py
Python
agpl-3.0
11,409
# -*- coding: utf-8 -*- from openerp import api, fields, models, _ from openerp.osv import expression from openerp.tools import float_is_zero from openerp.tools import float_compare, float_round from openerp.tools.misc import formatLang from openerp.exceptions import UserError, ValidationError import time import math...
optima-ict/odoo
addons/account/models/account_bank_statement.py
Python
agpl-3.0
47,169
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, scrub from frappe.utils import flt def execute(filters=None): if not filters: filters = frappe._dict() company_cu...
anandpdoshi/erpnext
erpnext/accounts/report/gross_profit/gross_profit.py
Python
agpl-3.0
10,766
from ..utils import * ## # Hero Powers # Lesser Heal (Anduin Wrynn) class CS1h_001: activate = Heal(TARGET, 2) ## # Minions # Northshire Cleric class CS2_235: events = Heal(ALL_MINIONS).on(Draw(CONTROLLER)) # Lightwarden class EX1_001: events = Heal().on(Buff(SELF, "EX1_001e")) # Cabal Shadow Priest class ...
liujimj/fireplace
fireplace/cards/classic/priest.py
Python
agpl-3.0
3,011
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='StudentClubYear', fields=[ ...
enjaz/enjaz
core/migrations/0002_studentclubyear.py
Python
agpl-3.0
1,145
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
ballouche/navitia
source/jormungandr/jormungandr/exceptions.py
Python
agpl-3.0
5,526
from cStringIO import StringIO import urllib import urlparse from twisted.web.client import getPage from twisted.web.error import Error from juju.errors import FileNotFound, ProviderError from juju.providers.common.utils import convert_unknown_error from juju.providers.orchestra.digestauth import ( DigestAuthenti...
anbangr/trusted-juju
juju/providers/orchestra/files.py
Python
agpl-3.0
2,840