code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from gaegraph.model import Node from gaeforms.ndb import property class Quero(Node): item = ndb.StringProperty(required=True) nome = ndb.StringProperty(required=True) descricao = ndb.Strin...
gutooliveira/progScript
tekton/backend/apps/quero_app/model.py
Python
mit
346
# coding=utf-8 from django.contrib import admin from ..models import TipoRecursoAli @admin.register(TipoRecursoAli) class TipoRecursoAliAdmin(admin.ModelAdmin): """ Especificación de la representación de TipoRecursoAli en la interfaz de administración. """ list_display = ( 'nombre', ...
desarrollogt-frm-utn/reservas
app_reservas/admin/tipoRecursoAli.py
Python
mit
487
import os from openslides.utils.plugins import collect_plugins MODULE_DIR = os.path.realpath(os.path.dirname(os.path.abspath(__file__))) # This is not set to the docker environment OPENSLIDES_USER_DATA_DIR = "/app/personal_data/var" # Application definition INSTALLED_APPS = [ "openslides.core", "openslide...
CatoTH/OpenSlides
server/openslides/global_settings.py
Python
mit
3,385
# Time: O(n) # Space: O(1) # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None # Two pointers solution. class Solution(object): def plusOne(self, head): """ :type head: ListNode :rtype: ListNode """...
tudennis/LeetCode---kamyu104-11-24-2015
Python/plus-one-linked-list.py
Python
mit
1,560
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from broadcasts.models import BroadcastMessage from broadcasts.forms import BroadcastMessageForm class BroadcastAdmin(admin.ModelAdmin): """Admin class for the broadcast messages""" form = BroadcastMessageForm list_d...
Natgeoed/django-broadcasts
broadcasts/admin.py
Python
mit
1,181
from .asyncioscheduler import AsyncIOScheduler from .ioloopscheduler import IOLoopScheduler from .geventscheduler import GEventScheduler from .gtkscheduler import GtkScheduler from .twistedscheduler import TwistedScheduler from .tkinterscheduler import TkinterScheduler from .pygamescheduler import PyGameScheduler from ...
Sprytile/Sprytile
rx/concurrency/mainloopscheduler/__init__.py
Python
mit
443
# import matplotlib.pyplot as plt def u(n): f = lambda x: int(2 ** (30.403243784 - x * x)) * 1e-9 return -1 if n == 0 else f(u(n - 1)) if __name__ == "__main__": i = 0 while abs(u(i + 2) - u(i)) > 1e-10: i += 101 print u(i) + u(i + 1)
EdisonAlgorithms/ProjectEuler
vol4/197.py
Python
mit
265
# profile_server.py import cProfile import simple_server def run(port=8080, logging=False, trace_sql=False, db_engine='sqlite3'): cProfile.runctx( 'simple_server.run(port=%d, logging=%s, trace_sql=%s, db_engine=%r)' % (port, logging, trace_sql, db_engine), globals(), locals(), 'profile...
e-loue/pyke
examples/web_framework/profile_server.py
Python
mit
442
#! /usr/bin/env python import sys import os import re import glob import argparse from matplotlib import pyplot def main(args = sys.argv[1:]): """ Plot results from either Bitcoin Traffic Bulletin or this repository. """ opts = parse_args(args) generate_spike_plots(opts.datadir, opts.plotdir) ...
nathan-at-least/bitcoin_load_spike
plotter.py
Python
mit
3,406
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import os import numpy as np from rmgpy import getPath from rmgpy.qm.main import QMCalculator from rmgpy.molecule import Molecule from rmgpy.qm.mopac import MopacMolPM3, MopacMolPM6, MopacMolPM7 mopacEnv = os.getenv('MOPAC_DIR', default="/opt/mopac") if os....
chatelak/RMG-Py
rmgpy/qm/mopacTest.py
Python
mit
7,951
#### 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/wearables/vest/shared_vest_s03.iff" result.attribute_template_id = ...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/vest/shared_vest_s03.py
Python
mit
450
""" 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, modify, merge, publish, distr...
benosteen/RDFDatabank
rdfdatabank/tests/testlib/TestUtils.py
Python
mit
5,297
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl from openpyxl.compat import basestring, unicode from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Alias, Typed, Integer, Set, MinMax, ) from openpyxl.descriptors.excel import Perce...
aragos/tichu-tournament
python/openpyxl/drawing/colors.py
Python
mit
11,201
#### 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/base/shared_poi_all_lair_thicket_large_evil_fire_red.iff" resu...
obi-two/Rebelion
data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_thicket_large_evil_fire_red.py
Python
mit
468
#### 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 = Intangible() result.template = "object/draft_schematic/clothing/shared_clothing_dress_formal_26.iff" result.attri...
anhstudios/swganh
data/scripts/templates/object/draft_schematic/clothing/shared_clothing_dress_formal_26.py
Python
mit
462
''' conda create -n py2711xr python=2.7 conda config --add channels conda-forge source activate py2711xr conda install xarray dask netCDF4 bottleneck conda update --all ''' import netCDF4,re from netCDF4 import Dataset def get(filename): nc = Dataset(filename,'r') print nc.date, '\n', nc.description,'\n' ...
wolfiex/RopaJL
treecluster/ncdata.py
Python
mit
1,008
"""Test kytos.core.switch module.""" import asyncio import json from datetime import datetime from unittest import TestCase from unittest.mock import MagicMock, Mock, patch from kytos.core import Controller from kytos.core.config import KytosConfig from kytos.core.constants import FLOOD_TIMEOUT from kytos.core.interfa...
kytos/kytos
tests/unit/test_core/test_switch.py
Python
mit
12,374
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, unicode_literals, print_function) from file_metadata.video.video_file import VideoFile class OGVFile(VideoFile): @classmethod def create(cls, *args, **kwargs): return cls(*args, **kwargs) def ana...
AbdealiJK/file-metadata
file_metadata/video/ogv_file.py
Python
mit
683
"""Views for when a user first visits.""" from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic import TemplateView from open_connect.connect_core.utils.views import CommonViewMixin class WelcomeView(CommonViewMixin, TemplateView): """WelcomeView red...
lpatmo/actionify_the_news
open_connect/welcome/views.py
Python
mit
815
#### 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/wearables/armor/stormtrooper/shared_armor_stormtrooper_chest_plate.i...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/armor/stormtrooper/shared_armor_stormtrooper_chest_plate.py
Python
mit
507
import os from subprocess import call annotation_file = '/Users/idriver/Downloads/Mus_musculus_UCSC_mm10/Mus_musculus/UCSC/mm10/Annotation/Archives/archive-2014-05-23-16-05-10/Genes/genes.gtf' result_file = '/Users/idriver/RockLab-files/test' for h, k, l in os.walk(result_file): g_cell_name = (h.split('/')[-1]) ...
idbedead/RNA-sequence-tools
Tophat_Cluster_submission/cuffquant_call.py
Python
mit
650
# -*- coding: utf-8 -*- import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt # noqa: E402 exchanges = {} # a placeholder for your instances for id in ccxt.exchanges: exchange = getattr(ccxt, id) exchanges[id...
ccxt/ccxt
examples/py/instantiate-all-at-once.py
Python
mit
447
import abc from functools import reduce import hearthbreaker.constants from hearthbreaker.constants import CARD_RARITY, MINION_TYPE from hearthbreaker.game_objects import Bindable, GameObject, GameException, Hero def _battlecry_targetable(target): return target.player is target.player.game.current_player or not t...
bingshuika/hearthbreaker-new
hearthbreaker/cards/base.py
Python
mit
26,680
from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), ) from .views import urlpatterns as test_urlpatterns...
barseghyanartur/django-rest-framework-hstore
tests/drf_hstore_tests/urls.py
Python
mit
492
"""Detail firewall.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import firewall from SoftLayer.CLI import formatting from SoftLayer import utils @click.command() @click.argument('identifier') @environment.pass_env def cli(e...
nanjj/softlayer-python
SoftLayer/CLI/firewall/detail.py
Python
mit
1,514
from pyqrllib.pyqrllib import bin2hstr, QRLHelper from qrl.core import config from qrl.core.AddressState import AddressState from qrl.core.misc import logger from qrl.core.txs.Transaction import Transaction class TokenTransaction(Transaction): """ TokenTransaction to create new Token. """ def __init...
randomshinichi/QRL
src/qrl/core/txs/TokenTransaction.py
Python
mit
9,390
import unittest, test.support import sys, io, os import struct import subprocess import textwrap import warnings import operator import codecs # count the number of test runs, used to create unique # strings to intern in test_intern() numruns = 0 try: import threading except ImportError: threading = None cla...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/test/test_sys.py
Python
mit
32,006
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: dr-prodigy <maurizio....
ryanss/holidays.py
holidays/countries/aruba.py
Python
mit
3,023
''' Carousel ======== .. versionadded:: 1.4.0 The :class:`Carousel` widget provides the classic mobile-friendly carousel view where you can swipe between slides. You can add any content to the carousel and use it horizontally or verticaly. The carousel can display pages in loop or not. Example:: class Example1(...
niavlys/kivy
kivy/uix/carousel.py
Python
mit
21,776
# Author: Param Singh <paramsingh258@gmail.com> # Cracking the code i, k, s = map(int, raw_input().split()) ai, bi = map(int, raw_input().split()) diff = k - i v = diff / 2 if diff % 2 == 0: val = (2 ** (4*v-s)) * (ai + bi) else: val = (2 ** (4*v - s + 1.5) * (ai + (3 ** 0.5) * bi)) print "%f" % val
paramsingh/codechef-solutions
src/long/sep15/question5.py
Python
mit
310
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running pivxd with the -rpcbind and -rpcallowip options.""" import sys from test_framework.netut...
PIVX-Project/PIVX
test/functional/rpc_bind.py
Python
mit
6,476
from .binary_heap import * from .skyline import * from .sliding_window_max import * from .merge_sorted_k_lists import * from .k_closest_points import *
HoussemCharf/FunUtils
heap/__init__.py
Python
mit
152
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-14 11:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Quotes...
GunnerJnr/_CodeInstitute
Stream-3/Full-Stack-Development/4.Hello-Django-Administration/4.-Wire-Up-A-Model-To-A-Template/challenge_solution/QuoteOfTheDay/Quotes_app/migrations/0001_initial.py
Python
mit
702
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), migrations.swappable_dependency(settings.AUT...
rizumu/pinax-invitations
pinax/invitations/migrations/0001_initial.py
Python
mit
1,824
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # 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 with...
SimplyAutomationized/python-snap7
snap7/six.py
Python
mit
26,731
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "curso.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
cursoweb/ejemplo-django
manage.py
Python
mit
248
#!/usr/local/bin/python2.7 from sys import exit from os import environ, system environ['KERAS_BACKEND'] = 'tensorflow' import numpy as np import utils import signal from keras.layers import Input, Dense, Dropout, concatenate, LSTM, BatchNormalization from keras.models import Model from keras.callbacks import Model...
sidnarayanan/BAdNet
train/pf/adv/train_lstm.py
Python
mit
6,337
import json from flask import make_response from marshmallow import fields, Schema, post_load, EXCLUDE from flask_apispec.utils import Ref from flask_apispec.views import MethodResource from flask_apispec import doc, use_kwargs, marshal_with # All the following schemas are set with unknown = EXCLUDE # because part ...
jmcarp/flask-apispec
tests/test_views.py
Python
mit
13,432
from twilio.twiml.voice_response import VoiceResponse, Say, Sms response = VoiceResponse() response.say('Our store is located at 123 Easy St.') response.sms('Store Location: 123 Easy St.') print(response)
TwilioDevEd/api-snippets
twiml/voice/sms/sms-2/sms-2.6.x.py
Python
mit
207
# mihome_energy_monitor.py 28/05/2016 D.J.Whale # # A simple demo of monitoring and logging energy usage of mihome devices # # Logs all messages to screen and to a file energenie.csv # Any device that has a switch, it toggles it every 2 seconds. # Any device that offers a power reading, it displays it. import energe...
hairychris/energenie-test
src/mihome_energy_monitor.py
Python
mit
1,609
""" Compute WordVectors using Yelp Data """ from gensim.models.word2vec import Word2Vec from util.language import detect_language, tokenize_text from data_handling import get_reviews_data # Set to true for zero in in English reviews. Makes the process much slower FILTER_ENGLISH = True # Name for output w2v model file ...
lukedeo/fancy-cnn
datasets/yelp/yelp_w2v.py
Python
mit
1,086
# file openpyxl/workbook.py # Copyright (c) 2010-2011 openpyxl # # 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, ...
Jian-Zhan/customarrayformatter
openpyxl/workbook.py
Python
mit
8,298
#/usr/bin/env python3 import webtools as wt import os, crypt, cgitb cgitb.enable() modes = {"0": "no mode", "1": "lock", "2": "sticky", "3": "stickylock", "4": "permasage" } settings = "./settings.txt" b_conf = [] cd = {} with open(settings, "r") as settings: setting...
153/wbs
admin.py
Python
cc0-1.0
4,183
""" Bytecode analysing utils. Originally added for using in smart step into. Note: not importable from Python 2. """ import sys if sys.version_info[0] < 3: raise ImportError('This module is only compatible with Python 3.') from _pydev_bundle import pydev_log from types import CodeType from _pydevd_frame_eval.ven...
fabioz/Pydev
plugins/org.python.pydev.core/pysrc/_pydevd_bundle/pydevd_bytecode_utils.py
Python
epl-1.0
25,462
import ConfigurationFileProbe
seblefevre/testerman
plugins/probes/configurationfile/__init__.py
Python
gpl-2.0
30
# check_load.py - Check load average. Thresholds can be specified from the commandline # Import PluginHelper and some utility constants from the Plugins module from pynag.Plugins import PluginHelper,ok,warning,critical,unknown # Create an instance of PluginHelper() helper = PluginHelper() # Optionally, let helper ha...
llange/pynag
examples/Plugins/check_load.py
Python
gpl-2.0
1,986
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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...
jalavik/inspire-next
inspire/dojson/jobs/fields/bd1xx.py
Python
gpl-2.0
4,856
# 2015.09.05 18:13:46 ora legale Europa occidentale # Embedded file name: b.py from a import x def x(): print 'b' x() from a import x x() # okay decompyling C:\Users\nicola user\wotmods\files\originals\tests\overriding\b.pyc # decompiled 1 files: 1 okay, 0 failed, 0 verify failed # 2015.09.05 18:13:46 ora legal...
jstar88/wotmods
files/uncompyled/tests/overriding/b.py
Python
gpl-2.0
341
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio 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...
dset0x/invenio-checker
invenio_checker/workflows/base_bundle.py
Python
gpl-2.0
847
# Copyright (C) 2014 - 2020 Eaton # # 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 in t...
42ity/fty-core
tests/CI/shared.py
Python
gpl-2.0
2,130
#!/usr/bin/python # # Copyright (c) 2008 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have ...
dmacvicar/spacewalk
client/solaris/rhnclient/compile.py
Python
gpl-2.0
3,533
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Tests for the Fetcher (fetch2/) # # Copyright (C) 2012 Richard Purdie # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # publis...
jaimeantena4040/MiSitioWeb
lib/bb/tests/fetch.py
Python
gpl-2.0
36,571
""" Oozebane is a script to turn off the extruder before the end of a thread and turn it on before the beginning. The default 'Activate Oozebane' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called. The important value for the oozebane preferences ...
natetrue/ReplicatorG
skein_engines/skeinforge-0006/skeinforge_tools/oozebane.py
Python
gpl-2.0
29,728
import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from apps.admin.utils.exception_handling import ExceptionHandler from apps.commission.models import Commission from apps.seller.models.product import Product from settings.people import support_team import re from apps...
tomcounsell/Cobra
apps/public/views/custom_order.py
Python
gpl-2.0
4,294
#! /usr/bin/env python # Copyright (C) 2011-2012 Free Software Foundation, Inc. # # This file is part of GDB. # # 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, ...
adapteva/epiphany-gdb
gdb/copyright.py
Python
gpl-2.0
11,525
# NamoInstaller ActiveX Control 1.x - 3.x # CVE-NOMATCH import logging log = logging.getLogger("Thug") def Install(self, arg): if len(arg) > 1024: log.ThugLogging.log_exploit_event(self._window.url, "NamoInstaller ActiveX", ...
pdelsante/thug
thug/ActiveX/modules/NamoInstaller.py
Python
gpl-2.0
1,217
# # Copyright 2018 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 in th...
nirs/vdsm
lib/vdsm/storage/operation.py
Python
gpl-2.0
6,412
#!/usr/bin/env python2 # Terminator by Chris Jones <cmsj@tenshu.net> # GPL v2 only """terminal_popup_menu.py - classes necessary to provide a terminal context menu""" import string from gi.repository import Gtk from version import APP_NAME from translation import _ from encoding import TerminatorEncoding from termi...
wpjunior/terminator
terminatorlib/terminal_popup_menu.py
Python
gpl-2.0
11,983
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # cmk_cisco-dom - check-mk plugin for SNMP-based Cisco Digital-Optical-Monitoring monitoring # # Authors: # Thomas Liske <liske@ibh.de> # # Copyright Holder: # 2015 - 2016 (C) IBH IT-Service GmbH [http://www.ibh.de/] # # License: # This program is ...
DE-IBH/cmk_cisco-dom
perfometer/cisco_dom.py
Python
gpl-2.0
1,321
#### SkyEye common module #### import os from ctypes import * libcommon_path = os.getenv("SKYEYEBIN") + "/../lib/skyeye/libcommon.so" libcommon = CDLL(libcommon_path, RTLD_GLOBAL) #### SkyEye other modules #### libdisasm_path = os.getenv("SKYEYEBIN") + "/../lib/skyeye/libdisasm.so" libpmon_path = os.getenv("SKYEYEBI...
aguirrem/skyeye
utils/pycli/skyeye_common_module.py
Python
gpl-2.0
970
import attr import pytest import warnings from fixtures import terminalreporter from cfme.utils import conf from cfme.utils.path import log_path from cfme.utils.appliance import ( load_appliances_from_config, stack, DummyAppliance, IPAppliance, ApplianceSummoningWarning) warnings.simplefilter('error', Ap...
jkandasa/integration_tests
cfme/test_framework/appliance.py
Python
gpl-2.0
2,985
# OeQ autogenerated correlation for 'Window/Wall Ratio West in Correlation to the Building Age' import math import numpy as np from . import oeqCorrelation as oeq def window_wall_west_ratio_MFH_by_building_age_correlation(*xin): # OeQ autogenerated correlation for 'Window to Wall Ratio in Western Direction' A...
UdK-VPT/Open_eQuarter
mole3/stat_corr/window_wall_west_ratio_MFH_by_building_age_correlation.py
Python
gpl-2.0
570
# Copyright (C) 2015 Red Hat, Inc. # # Authors: Pavel Odvody <podvody@redhat.com> # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This progr...
Distrotech/yum-utils
plugins/ovl/ovl.py
Python
gpl-2.0
1,800
from base64 import b64encode from suds.wsse import UsernameToken, Token try: from hashlib import sha1, md5 except: from sha import new as sha1 class UsernameDigestToken(UsernameToken): """ Represents a basic I{UsernameToken} WS-Security token with password digest @ivar username: A username. ...
ricardosiri68/patchcap
cam/wsse.py
Python
gpl-2.0
2,243
from artifactor import ArtifactorBasePlugin import requests import json def overall_test_status(statuses): # Handle some logic for when to count certain tests as which state for when, status in statuses.iteritems(): if when == "call" and status[1] and status[0] == "skipped": return "xfaile...
lehinevych/cfme_tests
artifactor/plugins/ostriz.py
Python
gpl-2.0
1,605
"""Module for reading volumetric data from VASP calculations. Charge density and dipole moment Local potential Electron localization function """ import os import numpy as np from ase.calculators.vasp import Vasp, VaspChargeDensity from POTCAR import get_ZVAL def get_volumetric_data(self, filename='CHG', **kwargs): ...
jboes/jasp
jasp/volumetric_data.py
Python
gpl-2.0
5,279
#CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #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; Version 2. # #This program is distributed in the hope...
chipsecintel/chipsec
source/tool/chipsec/modules/tools/vmm/venom.py
Python
gpl-2.0
1,660
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio 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 yo...
kaplun/Invenio-OpenAIRE
modules/websubmit/lib/bibdocfile_regression_tests.py
Python
gpl-2.0
12,722
from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier from Components.Button import Button from Components.Label import Label from Components.ActionMap import ActionMap from Components.MenuList import MenuList from Components.FileList import FileList from Components.Task import Task, Job, job_manager, ...
vitmod/dvbapp
lib/python/Plugins/SystemPlugins/SoftwareManager/Flash_online.py
Python
gpl-2.0
18,755
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles.views import serve from django.views.decorators.cache import never_cache urlpatterns = patterns('', url(r'^admin/', include...
danijar/invoicepad
invoicepad/invoicepad/urls.py
Python
gpl-3.0
1,168
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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 vers...
bioinformatics-ua/catalogue
emif/utils/validate_questionnaire.py
Python
gpl-3.0
1,852
import os import csv import tempfile import codecs from urlparse import urlsplit from shutil import abspath import requests from metadown.utils.etree import etree namespaces = { "gmx": "http://www.isotc211.org/2005/gmx", "gsr": "http://www.isotc211.org/2005/gsr", "gss": "http://www.isotc211.org/2005/gss"...
asascience-open/metadown
metadown/collectors/geonetwork.py
Python
gpl-3.0
2,788
import os import urllib.request import zipfile from _socket import timeout from http.client import IncompleteRead from io import BytesIO from urllib.parse import urlparse import _socket _socket.setdefaulttimeout(10) # set timeout def ransomware_and_malware_domain_check(list_of_domains): while True: try:...
pielco11/SSMA
src/blacklisted_domain_ip.py
Python
gpl-3.0
2,731
# coding=utf-8 # (c) 2018, NetApp Inc. # 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 try: from unittest import mock except ImportError: import mock from ansible.module_utils.net...
cchurch/ansible
test/units/modules/storage/netapp/test_netapp_e_volume.py
Python
gpl-3.0
58,947
from promise import Promise from ..utils import base64, unbase64, is_str from .connectiontypes import Connection, PageInfo, Edge def connection_from_list(data, args=None, **kwargs): ''' A simple function that accepts an array and connection arguments, and returns a connection object for use in GraphQL. I...
public-ink/public-ink
server/appengine/lib/graphql_relay/connection/arrayconnection.py
Python
gpl-3.0
4,642
# Copyright (C) 2011 Canonical # # Authors: # Matthew McGowan # Michael Vogt # # 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; version 3. # # This program is distributed in the hope that it wi...
armikhael/software-center
softwarecenter/db/enquire.py
Python
gpl-3.0
13,223
# -*- coding: utf-8 -*- from module.common.json_layer import json_loads from module.plugins.Account import Account class SimplyPremiumCom(Account): __name__ = "SimplyPremiumCom" __type__ = "account" __version__ = "0.05" __description__ = """Simply-Premium.com account plugin""" __license__ ...
immenz/pyload
module/plugins/accounts/SimplyPremiumCom.py
Python
gpl-3.0
1,650
from zdict import utils from zdict.api import dump from zdict.constants import VERSION as __version__
zdict/zdict
zdict/__init__.py
Python
gpl-3.0
102
""" WSGI config for dtcbusroutes 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_APPLICATI...
dhirajt/dtc
wsgi/dtcbusroutes/dtcbusroutes/wsgi.py
Python
gpl-3.0
1,146
""" It is used to test client->db-> service. It requires the Monitoring service. """ import unittest import tempfile import time from datetime import datetime from DIRAC import gLogger from DIRAC.MonitoringSystem.Client.MonitoringClient import MonitoringClient from DIRAC.Core...
Andrew-McNab-UK/DIRAC
tests/Integration/Monitoring/Test_MonitoringSystem.py
Python
gpl-3.0
18,888
from ImageScripter import * from elan.functions import Get_Device_List_Simple,Diff from elan import * #Past_List = ['2GIG GC3', '2GIG GC3', '2GIG GC3 (3.2 firmware)', 'Ademco VISTA-128BP,250BP,FA1660C', 'Ademco VISTA-128BPT,250BPT', 'Ademco VISTA-128FBP,250FBP', 'Bosch/Radionics D7412G,D9412G', 'DSC MAXSYS', 'DSC Powe...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/elan/Pools/AddRemove/1_Count_Security_Panels.py
Python
gpl-3.0
2,762
# Copyright (C) 2008-2012 Joachim B. Haga and Fredrik Valdmanis # # This file is part of DOLFIN. # # DOLFIN 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 License, or # (at your...
maciekswat/dolfin_1.3.0
site-packages/dolfin/common/plotting.py
Python
gpl-3.0
4,997
# OpenShot Video Editor is a program that creates, modifies, and edits video files. # Copyright (C) 2009 Jonathan Thomas # # This file is part of OpenShot Video Editor (http://launchpad.net/openshot/). # # OpenShot Video Editor is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
XXLRay/libreshot
libreshot/blender/scripts/lens_flare.py
Python
gpl-3.0
7,662
""" Test watchpoint condition API. """ import os, time import unittest2 import lldb import lldbutil from lldbtest import * class WatchpointConditionAPITestCase(TestBase): mydir = os.path.join("python_api", "watchpoint", "condition") def setUp(self): # Call super's setUp(). TestBase.setUp(sel...
s20121035/rk3288_android5.1_repo
external/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
Python
gpl-3.0
3,895
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
lootr/netzob
netzob/src/netzob/Model/Vocabulary/Messages/L2NetworkMessage.py
Python
gpl-3.0
4,639
from slave.quantum_design.ppms import PPMS
p3trus/slave
slave/quantum_design/__init__.py
Python
gpl-3.0
43
# systemRocketEmDamage # # Used by: # Celestials named like: Wolf Rayet Effect Beacon Class (6 of 6) runTime = "early" type = ("projected", "passive") def handler(fit, beacon, context): fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Rockets"), "emDa...
Ebag333/Pyfa
eos/effects/systemrocketemdamage.py
Python
gpl-3.0
473
import sys from setuptools import setup, find_packages version = '0.1.0' requirements = ['lxml'] if sys.version_info.major >= 3: requirements.append('suds-py3') else: requirements.append('suds') setup( name="lather_ui", version=version, author="Adam Clemons", author_email="adam@adamclmns.com...
bheklilr/lather_ui
setup.py
Python
gpl-3.0
897
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.forms import SetPasswordForm urlpatterns = [ url( r"^login/$", auth_views.login, {"template_name": "registration/log...
hzlf/openbroadcast.org
website/tools/registration/auth_urls.py
Python
gpl-3.0
1,439
#!/usr/bin/python # # Copyright (C) 2015 Custodia project Contributors, for licensee see COPYING from distutils.core import setup setup( name='custodia', version='0.1.0', license='GPLv3+', maintainer='Custodia project Contributors', maintainer_email='simo@redhat.com', url='https://github.com/...
shaded-enmity/custodia
setup.py
Python
gpl-3.0
712
# Eloipool - Python Bitcoin pool server # Copyright (C) 2011-2013 Luke Dashjr <luke-jr+eloipool@utopios.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # L...
fengjz1/eloipool-litecoin
networkserver.py
Python
agpl-3.0
11,206
# -*- coding: utf-8 -*- """ flaskbb.management.models ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains all management related models. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from wtforms import (TextField, IntegerField, FloatField, BooleanField, ...
nathanhilbert/FPA_Core
openspending/forum/management/models.py
Python
agpl-3.0
8,135
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import contextlib import six from shuup.apps.provides import get...
suutari-ai/shoop
shuup/admin/module_registry.py
Python
agpl-3.0
1,750
#!/usr/bin/env python import os, sys, time from ctypesgencore.descriptions import * from ctypesgencore.ctypedescs import * from ctypesgencore.messages import * import ctypesgencore.libraryloader # So we can get the path to it import test # So we can find the path to local files in the printer package def path_to_loc...
AsherBond/MondocosmOS
grass_trunk/lib/python/ctypes/ctypesgencore/printer/printer.py
Python
agpl-3.0
11,921
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-17 15:22 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('reference_data', '0007_auto_20180809_2053'), ] operations = [ migrations.CreateModel(...
macarthur-lab/seqr
reference_data/migrations/0008_geneexpression.py
Python
agpl-3.0
724
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from .common import PurchaseTestCommon from odoo.addons.stock_account.tests.common import StockAccountTestCommon from odoo.tests import Form class TestFifoPrice(PurchaseTestCommon, StockAccountTestCommon): ...
ygol/odoo
addons/purchase_stock/tests/test_fifo_price.py
Python
agpl-3.0
16,403
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 ErpAndCloud All Rights Reserved # https://github.com/jmesteve # <engineering@erpandcloud.com> # # ...
jmesteve/saas3
openerp/addons_extra/website_login/controller/__init__.py
Python
agpl-3.0
1,072
"""added passphrase_hash column to journalists table Revision ID: 2d0ce3ee5bdc Revises: fccf57ceef02 Create Date: 2018-06-08 15:08:37.718268 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2d0ce3ee5bdc' down_revision = 'fccf57ceef02' branch_labels = None depe...
heartsucker/securedrop
securedrop/alembic/versions/2d0ce3ee5bdc_added_passphrase_hash_column_to_.py
Python
agpl-3.0
1,753
from cStringIO import StringIO from twisted.internet.defer import fail, succeed from twisted.web.error import Error from juju.errors import FileNotFound, ProviderError, ProviderInteractionError from juju.lib.testing import TestCase from juju.providers.orchestra import MachineProvider from .test_digestauth import Get...
anbangr/trusted-juju
juju/providers/orchestra/tests/test_files.py
Python
agpl-3.0
6,631
# -*- coding: utf-8 -*- """ Copyright 2013 Olivier Cortès <oc@1flow.io> This file is part of the 1flow project. 1flow 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 o...
bladebo/1flow
oneflow/settings/snippets/000_nobother.py
Python
agpl-3.0
1,544