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 Default.side_bar import * class NewFileAtCommand(sublime_plugin.WindowCommand): def is_visible(self): return False def is_enabled(self): return False class DeleteFileCommand(sublime_plugin.WindowCommand): def is_visible(self): return False def is_enabled(self): return False class NewFolderCommand(subl...
constantx/dotfiles
sublime3/Packages/SideBarEnhancements-st3/SideBarDefaultDisable.py
Python
mit
960
from numpy.testing import * def _show_system_info(self): import os import sys nose = nosetester.import_nose() import numpy print "NumPy version %s" % numpy.__version__ npdir = os.path.dirname(numpy.__file__) print "NumPy is installed in %s" % npdir import scipy print "SciPy versi...
huahbo/pyamg
pyamg/testing/__init__.py
Python
mit
824
#!/usr/bin/python3 import sys import nltk import json import os import tagger_settings TAGGER_IGNORE = tagger_settings.TAGGER_IGNORE TAGGER_TYPE_IGNORE = tagger_settings.TAGGER_TYPE_IGNORE # Main method for generating tags. Takes in raw data, and outputs data to the # folder specified by foldername. If any data ex...
aliu139/forkme
tagger/tagger.py
Python
mit
2,535
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys from decimal impor...
superjudge/bitcoin
qa/rpc-tests/test_framework/util.py
Python
mit
14,583
#### 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 = Creature() result.template = "object/mobile/shared_dressed_naboo_queen_kylantha_01.iff" result.attribute_template...
obi-two/Rebelion
data/scripts/templates/object/mobile/shared_dressed_naboo_queen_kylantha_01.py
Python
mit
458
from flask import session, jsonify, redirect, request, Response, abort from flask.ext.login import current_user from werkzeug.utils import secure_filename from functools import wraps from packages.objects import User from packages.database import db, Base import json import urllib import requests import xml.etree.Elem...
MaxLeiter/packages.knightos.org
packages/common.py
Python
mit
2,326
""" WSGI config for sitem project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sitem.settings") from django.core.wsgi ...
gencelo/tlog
app/sitem/wsgi.py
Python
mit
385
class PyRAS(object): """ """ def __init__(self): pass
gisdev-km/pyras
pyras/core/__init__.py
Python
mit
76
"""Discover and run doctests in modules and test files.""" import bdb import inspect import os import platform import sys import traceback import types import warnings from contextlib import contextmanager from pathlib import Path from typing import Any from typing import Callable from typing import Dict from typing im...
RonnyPfannschmidt/pytest
src/_pytest/doctest.py
Python
mit
25,474
from .core import FrameBase from .cframe import CFrameBase from .builtin import *
adrn/gala
gala/potential/frame/__init__.py
Python
mit
82
#### 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/ship/components/armor/shared_arm_sorosuub_improved_light_plastisteel...
obi-two/Rebelion
data/scripts/templates/object/tangible/ship/components/armor/shared_arm_sorosuub_improved_light_plastisteel.py
Python
mit
522
# -*- coding: utf-8 -*- from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = 'unknown'
cpaulik/pyscaffold
src/pyscaffold/__init__.py
Python
mit
205
from tkinter import * from modules.gestionnaire import * def couleurAffiche(couleur): """Fonction permettant de modifier les couleurs et les rendre plus proche du Rubik's Cube""" if couleur == "red": return "#CC0000" elif couleur == "green": return "#006600" elif couleur == "blue": return "#0000C...
katyushacccp/ISN_projet_final
final 2.0/modules/affichage.py
Python
cc0-1.0
2,845
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 NXEZ.COM. # http://www.nxez.com # # Licensed under the GNU General Public 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.gnu.org/licen...
spoonysonny/SAKS-tutorials
saks-v1.x/digital-stopwatch/main.py
Python
gpl-2.0
2,194
import pytest from cfme import test_requirements from cfme.containers.container import Container from cfme.containers.image import Image from cfme.containers.provider import ContainersProvider from cfme.containers.service import Service from cfme.utils.appliance.implementations.ui import navigate_to pytestmark = [ ...
nachandr/cfme_tests
cfme/tests/containers/test_projects_dashboard.py
Python
gpl-2.0
5,623
# backends # # Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.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; either version 2 of the License, or # (at your option) any later ver...
tsdgeos/poppler_mirror
regtest/backends/__init__.py
Python
gpl-2.0
11,077
#!/usr/bin/python # # Convert an 84x48 image into a bitmap suitable for use on SkyDrop. # The image must be in an arbitrary format understood by ImageMagick and # in b/w format. Anything in "white" will be transparent and any other # color will be "black". # # If you only give a single input file (and no output file), ...
fhorinek/SkyDrop
skydrop/utils/img/convert-image-to-LOGO.py
Python
gpl-2.0
2,631
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2008 Douglas S. Blank # # 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 opt...
gramps-project/addons-source
ExportRaw/ExportRaw.py
Python
gpl-2.0
4,677
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## # Author: Peter Manev # # peter.manev@openinfosecfoundation.org # ## ## ## !!! IMPORTANT - LATEST DEV Scapy is needed !!! # REMOVE your current scapy installation !!! # th...
pevma/PtP
ProtoIPv6/IPv6_ICMP.py
Python
gpl-2.0
91,097
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
opinkerfi/check_mk
modules/check_mk_base.py
Python
gpl-2.0
58,542
# -*- coding: utf-8 -*- # # This file is part of CERN Open Data Portal. # Copyright (C) 2017 CERN. # # CERN Open Data Portal 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, o...
tiborsimko/opendata.cern.ch
cernopendata/modules/fixtures/__init__.py
Python
gpl-2.0
857
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
sixuanwang/SAMSaaS
wirecloud-develop/src/wirecloud/oauth2provider/provider.py
Python
gpl-2.0
3,591
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.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 Li...
hos7ein/firewalld
src/firewall/core/io/icmptype.py
Python
gpl-2.0
6,808
#!/usr/bin/python #Audio Tools, a module and set of tools for manipulating audio data #Copyright (C) 2007-2012 Brian Langenberger #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...
Excito/audiotools
audiotools/musicbrainz.py
Python
gpl-2.0
10,879
import json from django.conf import settings from django.http import JsonResponse from django.views.decorators.csrf import ensure_csrf_cookie from django.contrib.auth import get_user_model import webgis from webgis.map.project import get_project, get_user_projects from webgis.auth.decorators import login_required fro...
gislab-npo/gislab-web
server/webgis/app/views.py
Python
gpl-2.0
1,725
"""Learn tab.""" import Tkinter as gui from config.config import CONFIG from tools.colorlog import log from tools.localize import _ class Learn(object): """Learn tab.""" def __init__(self, master): """Draw Learn tab.""" self.frame = gui.Frame(master, bd=1) self.title = gui.Label( ...
nihlaeth/asetniop-trainer
tabs/learn.py
Python
gpl-2.0
851
#!/usr/bin/env python #-*- coding: utf-8 -*- from . import constructor as Block from .constructor import Kit Kit = Kit() ######################################################################## class Pinguino(object): pinMode = lambda n:Kit.addFunct("Pinguino", "pinMode", 2, fill=["spin-int", "choice-io"]) ...
emmanuelol/pinguino-ide
qtgui/gide/py_bloques/pinguino.py
Python
gpl-2.0
2,805
# -*- coding: utf-8 -*- import mimetypes import wx from beatle.lib.decorators import classproperty class MimeHandler(object): """Class for handling mime types""" instance = None def __init__(self): """init""" import gtk from gio import content_type_get_icon self._extra_b...
melviso/phycpp
beatle/lib/ostools/mime.py
Python
gpl-2.0
6,062
## # Copyright 2009-2013 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://vscentrum.be/nl/en), # the Hercules foundation (htt...
geimer/easybuild-easyblocks
easybuild/easyblocks/m/metis.py
Python
gpl-2.0
5,142
# # Copyright (C) 2011, 2013 Red Hat, Inc. # Copyright (C) 2011 Cole Robinson <crobinso@redhat.com> # # Python implementation of autodrawer, originally found in vinagre sources: # http://git.gnome.org/browse/vinagre/tree/vinagre/view # Copyright (c) 2005 VMware Inc. # # This program is free software; you can redistribu...
giuseppe/virt-manager
virtManager/autodrawer.py
Python
gpl-2.0
18,994
import math def _check_length(l1,l2): if l1!=l2: raise ValueError('length of line1 ('+str(l1)+') do not match length of line2 ('+str(l2)+')!') #Calculate Pearson coefficient for two vector on SAME LENGTH def pearson_lines(line1,line2,param=None): l=len(line1) _check_length(l,len(line2)) c=0; s1=[0,0]; s2=[0,0]...
yanxiangtianji/Neuron
dataAnalysis/method_base.py
Python
gpl-2.0
1,451
#!/usr/bin/python3 from collections import OrderedDict ordered = OrderedDict() ordered[1] = 'liuzhuang' ordered[2] = 'ljj' ordered[4] = 'sssd' print(ordered) # by default last = True print(ordered.popitem(last=False)) print(ordered) print(ordered.popitem(last=True)) print(ordered)
zhuango/python
pythonLearning/dataStructure/orderedMap.py
Python
gpl-2.0
284
#!/usr/bin/env python """ update local cfg """ import os from DIRAC.Core.Base import Script Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[1], 'Usage:', ' %s [option|cfgFile] ... DB ...' % Script.scriptName] ) ) Script.parseComma...
Andrew-McNab-UK/DIRAC
tests/Jenkins/dirac-cfg-update-server.py
Python
gpl-3.0
7,536
# -*- encoding: utf-8 -*- import functools from abjad.tools.abctools.AbjadObject import AbjadObject @functools.total_ordering class OrdinalConstant(AbjadObject): r'''An ordinal constant. .. container:: example Initializes with `dimension`, `value` and `representation`: :: >>> ...
mscuthbert/abjad
abjad/tools/datastructuretools/OrdinalConstant.py
Python
gpl-3.0
5,303
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
GirlsCodePy/girlscode-coursebuilder
models/messages.py
Python
gpl-3.0
18,584
# droneDurabilityArmorHPBonus # # Used by: # Modules named like: Drone Durability Enhancer (6 of 8) type = "passive" def handler(fit, module, context): fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"), "armorHP", module.getModifiedItemAttr("hullHpBonus...
Ebag333/Pyfa
eos/effects/dronedurabilityarmorhpbonus.py
Python
gpl-3.0
324
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
SiCKRAGETV/SickRage
tests/__init__.py
Python
gpl-3.0
4,891
# -*- coding: utf-8 -*- from parameterized import parameterized from app.api.helpers.data_layers import MOVE_TYPE_COMMENT from tests.unittests.utils.base_test_case import BaseTestCase, request_context from tests.unittests.utils.payload.move import MovePayload class TestMoveCreateComment(BaseTestCase): """Test M...
kumy/geokrety-api
tests/unittests/api/moves/test_move_create_comment.py
Python
gpl-3.0
1,967
# -*- coding: utf-8 -*- import hashlib from base64 import b64decode m = hashlib.md5() m.update(b'lalala') print(m.hexdigest()) sha1 = hashlib.sha1(b'lalala') print(sha1.hexdigest()) sha256 = hashlib.sha256(b'lalala') print(sha256.hexdigest())
ttauri/practice
hash.py
Python
gpl-3.0
244
#!/usr/bin/env python # -*- coding: latin-1 -*- """ ExtractMsg: Extracts emails and attachments saved in Microsoft Outlook's .msg files https://github.com/mattgwwalker/msg-extractor """ __author__ = "Matthew Walker" __date__ = "2013-11-19" __version__ = '0.2' # --- LICENSE ---------------------------------------...
frbapolkosnik/msg-extractor
ExtractMsg.py
Python
gpl-3.0
16,523
"""Slices is an interactive text control in which a user types in commands to be sent to the interpreter. This particular shell is based on wxPython's wxStyledTextCtrl. Sponsored by Orbtech - Your source for Python programming expertise. Slices is a version of shell modified by David Mashburn.""" __author__ = "David...
163gal/Time-Line
libs/wx/py/sliceshell.py
Python
gpl-3.0
151,308
#!/usr/bin/env python # encoding: utf-8 """ Chart rendering code and relevant Gtk widgets. The chart is drawn via cairo and a tiny bit of math. """ # Stdlib: import math import colorsys # Internal: from shredder.util import size_to_human_readable from shredder.tree import Column # External: import cairo from gi.r...
SeeSpotRun/rmlint
gui/shredder/chart.py
Python
gpl-3.0
19,200
from varapp.data_models.variants import * from varapp.constants.filters import ALL_VARIANT_FILTER_NAMES from varapp.common.utils import timer import numpy as np import itertools def variants_collection_factory(db, qs=None): """Create a VariantsCollection instance from a Variant QuerySet *qs*, or the entire da...
444thLiao/VarappX
varapp/variants/variants_factory.py
Python
gpl-3.0
3,476
# $Id: __init__.py,v 1.9 2005/03/07 09:34:51 snakeru Exp $ """ All features of xmpppy library contained within separate modules. At present there are modules: simplexml - XML handling routines protocol - jabber-objects (I.e. JID and different stanzas and sub-stanzas) handling routines. debug - Jacob Lundquist's debugg...
sgala/gajim
src/common/xmpp/__init__.py
Python
gpl-3.0
1,893
# Upside-down Chess from pychess.Utils.const import * from pychess.Utils.Board import Board UPSIDEDOWNSTART = "RNBQKBNR/PPPPPPPP/8/8/8/8/pppppppp/rnbqkbnr w - - 0 1" class UpsideDownBoard(Board): variant = UPSIDEDOWNCHESS __desc__ = _("FICS wild/5: http://www.freechess.org/Help/HelpFiles/wild.html\n" + ...
metiscus/pychess
lib/pychess/Variants/upsidedown.py
Python
gpl-3.0
867
def PPS(self,p): """ Parallel solver implementing a PETSc KSP linear routine over the entire scene as a single patch (PPS = Parallel PETSc Single) """ try: import mpi4py from mpi4py import MPI except: print 'PPS requires that mpi4py be install...
bminchew/Recon3d
archive/old.petsc_func.py
Python
gpl-3.0
4,726
# -*- coding: iso-8859-15 -*- # Copyright (C) 2008, 2009 Rafael Cantos Villanueva # # 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)...
JavierDorado/dbr
src/settings.py
Python
gpl-3.0
5,166
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2009 Thomas Vander Stichele # This file is part of whipper. # # whipper 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 t...
JoeLametta/morituri
whipper/command/drive.py
Python
gpl-3.0
3,865
# shipEnergyTransferRange1 # # Used by: # Ship: Guardian type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Capacitor Transmitter", "maxRange", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser")
Ebag333/Pyfa
eos/effects/shipenergytransferrange1.py
Python
gpl-3.0
320
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os import sys from hashlib import md5...
r-o-b-b-i-e/pootle
pootle/apps/pootle_app/management/commands/update_tmserver.py
Python
gpl-3.0
12,298
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
schumi2004/NOT_UPDATED_Sick-Beard-Dutch
sickbeard/db.py
Python
gpl-3.0
9,406
# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models forward = """ -- The summary table does not have a history table associated. -- Add last editor id column ALTER TABLE catmaid_skeleton_summary ADD COLUMN last_editor_id integer; UPDATE catmaid_skele...
tomka/CATMAID
django/applications/catmaid/migrations/0053_add_last_editor_column_to_summary.py
Python
gpl-3.0
26,779
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2014 Torsten Duwe <duwe@suse.de> ## Copyright (C) 2014 Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public Lic...
Entropy512/libsigrokdecode
decoders/timing/pd.py
Python
gpl-3.0
4,537
# This file is part of Indico. # Copyright (C) 2002 - 2017 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; either version 3 of the # License, or (a...
nop33/indico
indico/modules/events/registration/models/items.py
Python
gpl-3.0
14,769
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
erh3cq/hyperspy
hyperspy/_components/error_function.py
Python
gpl-3.0
2,140
"""Default plugin about page.""" import os from qtpy import QtGui from qtpy import QtWidgets from qtpy import uic Ui_AboutPage = uic.loadUiType(os.path.join(os.path.dirname( os.path.abspath(__file__)), 'about_page.ui'))[0] class AboutPage(QtWidgets.QWidget, Ui_AboutPage): def __init__(self, desc, parent=No...
ankostis/ViTables
vitables/plugins/aboutpage.py
Python
gpl-3.0
724
# increaseSignatureRadiusOnline # # Used by: # Modules from group: Inertial Stabilizer (7 of 7) type = "passive" def handler(fit, module, context): fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusBonus"))
Ebag333/Pyfa
eos/effects/increasesignatureradiusonline.py
Python
gpl-3.0
248
import time #import the time module from python built-in-library def main(): start = input("Do you want to start a count down timer? 'Y'/'N' ") #Ask a user if ready to start a count down timer while start.lower == 'y': how_many_minute = int(input("How many minutes do you want to count down to? ")) #Ask...
hacktoberfest17/programming
make_timer/make_timer.py
Python
gpl-3.0
1,093
# -*- coding: utf-8 -*- # (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Defines helper parameters / constants for the test run. """ from os.path import abspath, dirname, join SAMPLES_DIR = join(dirname(abspath(__file__)), 'samples')
Z2PackDev/bandstructure_utils
tests/parameters.py
Python
gpl-3.0
297
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This file is part of MoaT, the Master of all Things. ## ## MoaT is Copyright © 2007-2016 by Matthias Urlichs <matthias@urlichs.de>, ## it is licensed under the GPLv3. See the file `README.rst` for details...
smurfix/MoaT
modules/fs20avr.py
Python
gpl-3.0
11,247
from django.conf import settings from django.db import models from django.db.models import Q from opencontext_py.apps.entities.uri.models import URImanagement from opencontext_py.apps.ocitems.manifest.models import Manifest from opencontext_py.apps.ocitems.assertions.models import Assertion from opencontext_py.apps.lda...
portableant/open-context-py
opencontext_py/apps/edit/modpredicates.py
Python
gpl-3.0
3,341
# -*- coding: utf-8 -*- # Copyright (C) 2013 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
kamawanu/pydbgr
trepan/bwprocessor/command/step.py
Python
gpl-3.0
2,665
## $Id$ ''' Defines database backend library and database table and object relationships. Example usage: import database, db_mid # get platform with id 7; will raise exception if no such platform. p7 = database.Platforms[7] # get platforms with friendly name "commodore 64" p_c64 = database.Platforms.find(user_frie...
keyz182/BOINC-7.0
py/Boinc/database.py
Python
gpl-3.0
9,311
#!/usr/bin/python3 """ This package creates methods to easily call the various Salseforce APIs. """ import json import webservice import urllib import time import sys import os from mimetypes import MimeTypes from zeep import Client, xsd, ns API_VERSION = '50.0' METADATA_WSDL_FILE = os.path.join(os.path.dirname(os.p...
gbarger/PySalesforce
pysalesforceutils.py
Python
gpl-3.0
159,549
#!/usr/bin/python3 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2017 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...
chipaca/snapcraft
snapcraft/project/_schema.py
Python
gpl-3.0
2,453
# This file is part of the Printrun suite. # # Printrun 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. # # Printrun is distributed in ...
xoan/Printrun
printrun/gviz.py
Python
gpl-3.0
22,213
from p2pool.bitcoin import networks PARENT = networks.nets['ecurrency'] SHARE_PERIOD = 10 # seconds CHAIN_LENGTH = 12*60*60//10 # shares REAL_CHAIN_LENGTH = 12*60*60//10 # shares TARGET_LOOKBEHIND = 20 # shares SPREAD = 20 # blocks IDENTIFIER = 'f0e41ab70eff1e12'.decode('hex') PREFIX = 'e01fa73e0af1e40a'.decode('hex')...
ptcrypto/p2pool-adaptive
p2pool/networks/ecurrency.py
Python
gpl-3.0
699
def with_overload(x, y: int) -> list: pass
snakeleon/YouCompleteMe-x64
third_party/ycmd/third_party/jedi_deps/jedi/test/examples/typing_overload/file.py
Python
gpl-3.0
47
from django.shortcuts import render, HttpResponseRedirect from django.core.urlresolvers import reverse from django.views.generic import View from django.contrib.auth import authenticate, login, update_session_auth_hash from rest_framework.viewsets import ViewSet from rest_framework.response import Response from rest_fr...
rainforest1155/bennedetto
authenticating/views.py
Python
gpl-3.0
2,516
import os from sam import constants from test_plugin1.models.test_model import TestModel def install(): # install endpoint for i in range(len(constants.default_urls)/2): if constants.default_urls[i*2] == '/test_url': constants.default_urls[i*2+1] = 'test_plugin2.pages.test_url.TestUrl' ...
JoePelz/SAM
spec/python/plugins/test_plugin1/sam_installer.py
Python
gpl-3.0
463
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015 Daniel Schadt # Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the G...
NoctuaNivalis/qutebrowser
scripts/dev/update_3rdparty.py
Python
gpl-3.0
5,673
# Generated by Django 3.0.5 on 2020-05-20 08:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('perf', '0031_fix_application_in_constraints'), ] operations = [ migrations.CreateModel( name='PerformanceTag', field...
jmaher/treeherder
treeherder/perf/migrations/0032_add_performance_tag.py
Python
mpl-2.0
823
import os from paste.deploy import loadapp from waitress import serve if __name__ == "__main__": port = int(os.environ.get("PORT", 5000)) scheme = os.environ.get("SCHEME", "https") app = loadapp('config:production.ini', relative_to='.') serve(app, host='0.0.0.0', port=port, url_scheme=scheme)
ablanco/yith-library-web-client
runapp.py
Python
agpl-3.0
313
# -*- encoding: utf-8 -*- ############################################################################## # # Purchase - Package Quantity Module for Odoo # Copyright (C) 2013-Today GRAP (http://www.grap.coop) # @author Julien WESTE # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This progr...
jweste/odoo-addons-cpo
purchase_package_qty/model/__init__.py
Python
agpl-3.0
1,142
# -*- coding: utf-8 -*- from datetime import timedelta, datetime import ddt import json import requests.exceptions import pytz from django.conf import settings from django.db.utils import IntegrityError from django.test import TestCase from mock import patch from nose.tools import assert_is_none, assert_equals, assert...
adoosii/edx-platform
lms/djangoapps/verify_student/tests/test_models.py
Python
agpl-3.0
35,196
import os import subprocess import pytest import s2p from tests_utils import data_path def test_compute_disparity_map_timeout(timeout=1): """ Run a long call to compute_disparity_map to check that the timeout kills it. """ img = data_path(os.path.join("input_pair", "img_01.tif")) disp = data_pat...
carlodef/s2p
tests/block_matching_test.py
Python
agpl-3.0
1,331
""" Helper functions for loading environment settings. """ from __future__ import print_function import io import json import os import sys from time import sleep import memcache from lazy import lazy from path import Path as path from paver.easy import BuildFailure, sh from six.moves import configparser from paveli...
philanthropy-u/edx-platform
pavelib/utils/envs.py
Python
agpl-3.0
11,682
# -*- coding: utf-8 -*- # License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa # See README.rst file on addon root folder for more details from . import mail_mail from . import mail_mandrill_message from . import mail_mandrill_event
acsone/social
mail_mandrill/models/__init__.py
Python
agpl-3.0
239
# pylint: disable=W0223 """Video is ungraded Xmodule for support video content.""" import json import logging from lxml import etree from pkg_resources import resource_string, resource_listdir import datetime import time from django.http import Http404 from xmodule.x_module import XModule from xmodule.raw_module im...
rationalAgent/edx-platform-custom
common/lib/xmodule/xmodule/video_module.py
Python
agpl-3.0
8,709
""":mod:`sassutils.builder` --- Build the whole directory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import with_statement import collections import io import os import os.path import re from six import string_types from sass import compile __all__ = 'SUFFIXES', 'SUFFIX_PATTERN',...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/sassutils/builder.py
Python
agpl-3.0
9,183
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 OpenERP Italian Community (<http://www.openerp-italia.org>). # $Id$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
dhp-denero/LibrERP
l10n_it_base/__init__.py
Python
agpl-3.0
1,051
# Generated by Django 2.2.1 on 2019-05-27 11:18 from django.db import migrations def create_zenodo_license_choosers(apps, schema_editor): """ Creates LicenseChooser objects for zenodo repositories as they were hard-coded before introduced model. """ License = apps.get_model('deposit', 'License') R...
wetneb/dissemin
deposit/zenodo/migrations/0001_populate_license_chooser.py
Python
agpl-3.0
2,138
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class NetcdfC(AutotoolsPackage): """NetCDF (network Common Data Form) is a set of software libra...
iulian787/spack
var/spack/repos/builtin/packages/netcdf-c/package.py
Python
lgpl-2.1
11,002
#*************************************************************************** #* * #* Copyright (c) 2013 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This ...
balazs-bamer/FreeCAD-Surface
src/Mod/Material/Init.py
Python
lgpl-2.1
1,940
#!/usr/bin/env python2 good_time = 1.0 # in seconds default_test_ip = ( ("Intranet (Local Router)", "192.168.0.1", 80), ("Same ISP", "200.210.52.20", 80), ("UNICAMP/Brazil", "143.106.10.30", 80), ("Slashdot", "66.35.250.150", 80), ("Error", "192.168.1.123", 1234), ) default_test_name = ( ...
ramalho/eagle-py
examples/inet-tester.py
Python
lgpl-2.1
5,333
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@frii...
kkoksvik/FreeCAD
src/Mod/Draft/DraftTools.py
Python
lgpl-2.1
211,741
# Copyright Cartopy Contributors # # This file is part of Cartopy and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Combine the shapefile access of pyshp with the geometry representation of shapely: >>> import cartopy.io.shaper...
QuLogic/cartopy
lib/cartopy/io/shapereader.py
Python
lgpl-3.0
19,391
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly 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, either version 3 of the L...
Versatilus/dragonfly
dragonfly/examples/_notepad_foodgroups.py
Python
lgpl-3.0
3,632
import re import os def bump_version(): with open("setup.py") as f: s = f.read() m = re.search(r'version="(.*)\.(.*)\.(.*)",', s) v1, v2, v3 = m.groups() oldv = "{}.{}.{}".format(v1, v2, v3) newv = "{}.{}.{}".format(v1, v2, str(int(v3) + 1)) print("Current version is: {}, write new ver...
huazh/python-opcua
release.py
Python
lgpl-3.0
1,112
import unittest from charm.schemes.commit.commit_gs08 import Commitment_GS08 from charm.toolbox.pairinggroup import PairingGroup, G1 debug = False class Commitment_GS08Test(unittest.TestCase): def testCommitment_GS08(self): groupObj = PairingGroup('SS512') cm = Commitment_GS08(groupObj) ...
JHUISI/charm
charm/test/schemes/commit/commit_gs08_test.py
Python
lgpl-3.0
671
############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
data-exp-lab/girder
test/jobs/test_constants.py
Python
apache-2.0
944
# Copyright 2014 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
jgeewax/gcloud-python
datastore/unit_tests/test_transaction.py
Python
apache-2.0
8,360
#!/usr/bin/env python import yaml import json from pprint import pprint as pp with open("xfile.yml") as f: xlist_y = yaml.load(f) pp(xlist_y) with open("xfile.json") as f: xlist_j = json.load(f) pp(xlist_j)
astir-py/pynet-class
print_yml_json.py
Python
apache-2.0
218
from a10sdk.common.A10BaseClass import A10BaseClass class Fragmentation(A10BaseClass): """Class Description:: sixrd fragmentation parameters. Class fragmentation supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param Dev...
amwelch/a10sdk-python
a10sdk/core/cgnv6/cgnv6_sixrd_fragmentation.py
Python
apache-2.0
899
# Copyright 2018 Espressif Systems (Shanghai) PTE LTD # # 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 ...
www220/esp-idf
tools/esp_prov/transport/ble_cli.py
Python
apache-2.0
7,928
r''' Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
0x0mar/nogotofail
nogotofail/mitm/connection/handlers/connection/log.py
Python
apache-2.0
3,063
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
Peddle/hue
apps/beeswax/src/beeswax/conf.py
Python
apache-2.0
7,608
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
tanglei528/glance
glance/tests/functional/v2/test_schemas.py
Python
apache-2.0
2,296
""" This test suite contains tests to validate certificate create/edit/delete with different possible way and with different roles of users. Test requirement: Below Env variables need to be set CATTLE_TEST_URL - url to rancher server ADMIN_TOKEN - Admin token from rancher USER_TOKEN - User token from rancher RANCHER_CL...
rancher/rancher
tests/validation/tests/v3_api/test_certificate.py
Python
apache-2.0
34,024
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
geokala/cloudify-manager
tests/mock_plugins/cloudify_agent/installer/operations.py
Python
apache-2.0
4,189