repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
warwick-one-metre/domed
warwick/observatory/dome/config.py
# # This file is part of domed. # # domed 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. # # domed is distributed in the hope that it ...
stakahama/aprl-ssp
substructure_adjacent_atoms.py
#!/usr/bin/env python ################################################################################ ## ## substructure_generate_fulltable.py ## Author: Satoshi Takahama (satoshi.takahama@epfl.ch) ## Nov. 2014 ## ## ----------------------------------------------------------------------------- ## ## This file is part...
Eksmo/calibre
src/calibre/gui2/convert/mobi_output_ui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/gugu/w/calibre/src/calibre/gui2/convert/mobi_output.ui' # # Created: Thu Jul 19 23:32:30 2012 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: ...
projecthamster/hamster-dbus
tests/objects/conftest.py
"""General fixtures.""" from __future__ import absolute_import, unicode_literals import datetime import os import signal import subprocess import time import dbus import dbusmock import fauxfactory import pytest from pytest_factoryboy import register from hamster_dbus import helpers from .. import factories regist...
YiqunPeng/Leetcode-pyq
solutions/253MeetingRoomsII.py
# Definition for an interval. # class Interval: # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution: def minMeetingRooms(self, intervals): """ :type intervals: List[Interval] :rtype: int """ start = [i.start for i in intervals] ...
AlphaX2/FotoShareN9
1.6.1/fotoshare/opt/FotoShareN9/plugins/flickr/libs/flickrapi/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- '''A FlickrAPI interface. The main functionality can be found in the `flickrapi.FlickrAPI` class. See `the FlickrAPI homepage`_ for more info. .. _`the FlickrAPI homepage`: http://stuvel.eu/projects/flickrapi ''' __version__ = '1.4.2' __all__ = ('FlickrAPI', 'IllegalA...
markuspg/PrSi
tsreferencesolutions.py
############################################################################## ## ## Copyright 2015 Markus Prasser ## ## This file is part of PrSi. ## ## PrSi 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 Foundatio...
qrkourier/ansible
lib/ansible/cli/config.py
# (c) 2017, Ansible by Red Hat, Inc. # # 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 distributed in the hope...
jponf/wpm1py
wpm1formula_test.py
# -*- coding: utf-8 -*- import sys import unittest import wpm1formula class TestFormula(unittest.TestCase): num_vars = 3 inf = 16 clauses = [ (1, [-1, 2, 3]), (2, [1, 2, -3]), (4, [1, -2, 3]), (4, [1, 2 ,3]), (5, [-1, -2, 3]), ...
ColumBrennan/data-dumper
app.py
#!/usr/bin/python3 from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import psycopg2 import xlsxwriter import os import sys import smtplib #usage python3 colum.py filename toaddress SQL_Code = open(str(sys.a...
acerv/marvin
marvin/tests/test_remote.py
""" .. module:: test_remote :platform: Unix :synopsis: Unittests for the remote module. :license: GPL3 .. moduleauthor:: Andrea Cervesato <andrea.cervesato@mailbox.org> """ import os import sys import shutil import unittest from marvin.remote import OpenSSH from marvin.remote import OpenSSHProtocol from marv...
patwat/python-unitex
documentation/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Python bindings for Unitex/GramLab documentation build configuration file, created by # sphinx-quickstart on Sun Feb 28 11:29:29 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration valu...
COMBINE-lab/matryoshka_work
coredomains-import/python-src/jaccard_matrix.py
40000# parse their domains, our domains, compute overlap import sys #import numpy.bisect import numpy as np #import igraph import collections import matplotlib.pyplot as plt import math from CoreDomain import jaccard, Domain # # Main # print "Calculating self-similarity between our domains at different resolutions" dp...
HEG-Arc/paleo-2015-gestionair-remote
GPIOEmulator/EmulatorGUI.py
from tkinter import * import tkinter as tk from .PIN import PIN from .TypeChecker import typeassert import threading import time # http://www.tutorialspoint.com/python/tk_button.htm dictionaryPins = {} dictionaryPinsTkinter = {} GPIONames = ["14", "15", "18", "23", "24", "25", "8", "7", "12", "16", "20", "21", "2",...
owatte/rlieh-pwm
rlieh_pwm/tests.py
# @Author: Olivier Watté <user> # @Date: 2017-07-25T12:22:59-04:00 # @Email: owatte@ipeos.com # @Last modified by: user # @Last modified time: 2017-08-09T13:48:23-04:00 # @License: GPLv3 # @Copyright: Olivier Watté # Rlieh-pwm provides an interface to manage PWM on RLIEH systems. # Copyright (C) 2017 Olivier Watt...
argilo/bbhn-utils
topology.py
#!/usr/bin/env python3 # Copyright 2014-2017 Clayton Smith # # This file is part of bbhn-utils # # bbhn-utils 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, or (at your option) # any later ...
t-wissmann/qutebrowser
tests/helpers/fixtures.py
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 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 GNU General Public License as published by # the Free S...
nexedi/dream
dream/simulation/Examples/CompoundMachine.py
from dream.simulation.imports import Machine, Exit, Queue, Globals, Part, ExcelHandler from dream.simulation.imports import G from dream.simulation.Globals import runSimulation # models the behaviour of the buffers in the compound machine class InternalQueue(Queue): def canAccept(self, callerObject=None): ...
duanyifei/python_modules_test
test_functools.py
# coding:utf8 import functools from functools import partial # cmp_to_key(mycmp) # Convert a cmp= function into a key= function # 将比较函数转换为 key 函数 # 所谓比较函数 就是接受两个参数,然后在函数内判断大小返回True或False # 所谓 key 函 就是接收一个函数, 然后将其转换为一个可比较的东西 # 比如 原序列是 [1,2,3,4,5] 进行排序的序列就是 [key(1), key(2), key(3), ...] # sorted(range(5), key=lambda x: ...
facepalm/bliss-station-game
src/equipment/general.py
"""Equipment: most kinds of mechanical shit that does things. It may need power. It may take from atmo. It may open onto space. It may spontaneously explode. Equipment is guaranteed to liven up any old party! Equipment is not for everyone. Consult your doctor before using equipment.""" from atmospherics import...
BTA-BATA/electrum-bta-master
plugins/trezor.py
from binascii import unhexlify from struct import pack from sys import stderr from time import sleep from base64 import b64encode, b64decode import unicodedata import threading import re from PyQt4.Qt import QMessageBox, QDialog, QVBoxLayout, QLabel, QThread, SIGNAL, QGridLayout, QInputDialog, QPushButton import PyQt4...
operep/PythonAutoLearn
complexPrograms/euCapitalsQuizGenerator.py
#! python2 #Program which will use dictionary and generate random quiz files with #questions and answers in random order along with answer key import random, os #The quiz data. dictionary={'United Kingdom' : 'London', 'Albania' : 'Tirana', 'Andorra' : 'Andorra la Vella', 'Austria' : 'Vienna', ...
procamora/Gestor-Series
app/views/ui/msgbox_ui.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/procamora/Documents/Gestor-Series/app/utils/../../app/views/ui/msgbox.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Di...
WarriorIng64/type-fight
commandoutput.py
#!/bin/python import datetime, pygame from collections import deque pygame.font.init() output_font = pygame.font.Font("fonts/Share_Tech_Mono/ShareTechMono-Regular.ttf", 14) output_bkg_color = pygame.color.Color(0, 255, 255, 255/10) output_text_color = pygame.color.Color(0, 255, 255, 255/2) padding = 10 max_output_li...
czli/Canopy
canopy/config.py
import os, platform from canopy import package_name, bin_path, global_path, local_path DEBUG = False # global debugging flag if "DEBUG" in os.environ: if os.environ["DEBUG"]: if os.environ["DEBUG"].lower()[0] in ["1", "t", "y", "d"]: DEBUG = True else: DEBUG = False else...
javiermon/Cassilda
cassilda/debian_squeeze_builder.py
__version__ = "cassilda 0.0.1" """ Debian Squeeze builder """ import time from .builder import Builder from .networks import Network class debian_squeeze_Builder(Builder): buildertype = 'debian_squeeze' def __init__(self, callback = None, repository = None): """ Constructor. Receives the callback fo...
ralphbean/bugwarrior
tests/test_bts.py
from unittest import mock from bugwarrior.services import bts from .base import ServiceTest, AbstractServiceTest class FakeBTSBug: bug_num = 810629 package = "wnpp" subject = ("ITP: bugwarrior -- Pull tickets from github, " "bitbucket, bugzilla, jira, trac, and others into " ...
KernelAnalysisPlatform/KlareDbg
middleware/qira_webstatic.py
# eventually, this can live in a different process # or we can break the boundary at static2 # these calls don't have to be included for qira to work import qira_config from qira_webserver import socketio from qira_webserver import socket_method from qira_webserver import app from flask import Flask, Response, redir...
regionbibliotekhalland/digitalaskyltar
panel.py
# Copyright 2013 Regionbibliotek Halland # # This file is part of Digitala skyltar. # # Digitala skyltar 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...
davidwilson-85/easymap
graphic_output/Pillow-4.2.1/Tests/test_image_draft.py
from helper import unittest, PillowTestCase, fromstring, tostring from PIL import Image class TestImageDraft(PillowTestCase): def setUp(self): codecs = dir(Image.core) if "jpeg_encoder" not in codecs or "jpeg_decoder" not in codecs: self.skipTest("jpeg support not available") def...
PennyDreadfulMTG/Penny-Dreadful-Discord-Bot
maintenance/generate_translations.py
import subprocess from distutils.dist import Distribution # pylint: disable=no-name-in-module,import-error from typing import Any, Dict, Generator, List import pystache from babel.messages import frontend from poeditor.client import POEditorAPI from shared import configuration from shared_web import template def a...
tkhirianov/kpk2016
recursion/turtle_koh.py
from turtle import * def koh_forward(L, n): if n == 0: t.forward(L) else: koh_forward(L/3, n-1) t.left(60) koh_forward(L/3, n-1) t.right(120) koh_forward(L/3, n-1) t.left(60) koh_forward(L/3, n-1) def demo(): for n in range(0, 4): t....
wesley1001/dokomoforms
dokomoforms/handlers/api/surveys.py
"""API endpoints dealing with surveys.""" from tornado.escape import to_unicode import dokomoforms.api.survey as survey_api import dokomoforms.api.submission as submission_api from dokomoforms.handlers.util.base import APIHandler, \ catch_bare_integrity_error, get_json_request_body class SurveysAPIHandler(APIHan...
fjruizruano/ngs-protocols
trinotate_auto.py
#!/usr/bin/python import sys from subprocess import call print "Usage: trinotate_auto.py FastaFile NumberOfThreads Analyses(xph) DataBase(su) [MinimumLenghtCDS]" try: transcripts = sys.argv[1] except: transcripts = raw_input("Introduce FASTA file: ") try: threads = sys.argv[2] tt = int(threads) exce...
calispac/digicampipe
digicampipe/tests/test_hillas.py
import os import tempfile import numpy as np from pkg_resources import resource_filename import pandas as pd from digicampipe.image.hillas import compute_alpha, correct_hillas from digicampipe.utils.docopt import convert_pixel_args from digicampipe.scripts.pipeline import main_pipeline from digicampipe.scripts.plot_pi...
Florianboux/zds-site
zds/urls.py
# encoding: utf-8 from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.sitemaps import GenericSitemap, Sitemap from zds.article.models import Article from zds.forum.models import Category, Forum, Topic from zds.tutorial.mod...
craigderington/SagittariusA
milkyway/constellations/views.py
# constellations/views.py from django.views import generic from django.shortcuts import render, redirect, get_object_or_404 from django.core.urlresolvers import reverse, reverse_lazy from django.db.models import Count from django.utils import timezone from .models import Constellation from .forms import ConstellationF...
FabriceLapeyrere/audiostories-python
public/__init__.py
from zope.interface import implements from twisted.internet import defer from twisted.web.resource import Resource, NoResource from twisted.web.static import File from twisted.web.server import NOT_DONE_YET from jinja2 import Template, Environment, PackageLoader from twisted.web import rewrite from twisted.web.util imp...
jfinkels/fraciso
docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # fraciso documentation build configuration file, created by # sphinx-quickstart on Mon Mar 31 19:03:33 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
turdusmerula/kipartman
kipartman/dialogs/dialog_edit_part_parameter.py
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Nov 13 2017) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impo...
coderbone/SickRage-alt
sickbeard/providers/tntvillage.py
# coding=utf-8 # Author: Giovanni Borri # Modified by gborri, https://github.com/gborri for TNTVillage # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
hoosteeno/kuma
kuma/core/helpers.py
import datetime import HTMLParser import json import urllib import bleach import jinja2 import pytz from babel import localedata from babel.dates import format_date, format_datetime, format_time from babel.numbers import format_decimal from django.conf import settings from django.contrib.messages.storage.base import L...
gerv/slic
license_data.py
# -*- coding: utf-8 -*- ############################################################################### # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #################...
asokoloski/griper
test.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from griper import ( compile_sql, assignments_raw, assignments, Elements as E, Name...
Yukarumya/Yukarum-Redfoxes
testing/marionette/harness/marionette_harness/tests/unit/test_quit_restart.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_driver.errors import MarionetteException from marionette_harness import MarionetteTestCase class Test...
gdestuynder/mozdef_lib
setup.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # Author: gdestuynder@mozilla.com import os from distutil...
geoelectric/lsgaiatest
lsgaiatest/cmd.py
#!/usr/bin/env python """List what tests gaiatest would run for a given set of options.""" # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import argparse import json...
walac/build-mozharness
configs/android/androidarm_4_3.py
import os config = { "buildbot_json_path": "buildprops.json", "host_utils_url": "http://talos-remote.pvt.build.mozilla.org/tegra/tegra-host-utils.Linux.1109310.2.zip", "robocop_package_name": "org.mozilla.roboexample.test", "tooltool_manifest_path": "testing/config/tooltool-manifests/androidarm_4_3/rel...
addisonElliott/SmartShopTouchScreen
Windows/purchaseHistoryWindow.py
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from Windows.centralWindow import * from Windows import purchaseHistoryWindow_ui from Util import constants, scroller from Util.enums import * from Util.SqlTableModel import * import logging logger = logging.getLogger(__name__) class ...
edx-solutions/edx-platform
openedx/core/djangoapps/course_groups/management/commands/convert_cohort_format.py
""" Converts the old cohort_config format to the new one. """ from django.core.management import BaseCommand from xmodule.modulestore.django import modulestore class Command(BaseCommand): """ Command to convert settings in cohort_config to ones that can be translated by the lazy converter. For the so...
nick-huang-cc/GraffitiSpaceTT
UnderstandStudyPython/Email_SMTP_stu2.py
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- # Copyright (c) 1986 Nick Wong. # Copyright (c) 2016-2026 TP-NEW Corp. # License: TP-NEW (www.tp-new.com) ''' SMTP 发送邮件 添加发件人和其他友好信息 ''' from email import encoders from email.header import Header from email.mime.text import MIMEText from email.utils import parseaddr,...
akx/shoop
shoop_tests/utils/test_united_decimal.py
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from decimal import Decimal import pytest import six from shoop.utils.numbers import UnitedDecimal...
pronexo-odoo/odoo-argentina
l10n_ar_base_vat/base_vat.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 OpenERP - Team de Localización Argentina. # https://launchpad.net/~openerp-l10n-ar-localization # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
liqd/a4-meinberlin
meinberlin/apps/ideas/migrations/0011_idea_image.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-21 08:10 from __future__ import unicode_literals from django.db import migrations import adhocracy4.images.fields class Migration(migrations.Migration): dependencies = [ ('meinberlin_ideas', '0010_moderateable'), ] operations = [...
OCA/hr
hr_employee_id/models/res_company.py
# Copyright 2015 Salton Massally <smassally@idtlabs.sl> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResCompany(models.Model): _inherit = "res.company" ...
flux3dp/fluxghost
fluxghost/websocket/config.py
import logging import platform import dbm from os.path import expanduser import sys from .base import WebSocketBase, BinaryUploadHelper, WebsocketBinaryHelperMixin logger = logging.getLogger("WS.CONFIG") WRITE_OP = "w" READ_OP = "r" class WebsocketConfig(WebsocketBinaryHelperMixin, WebSocketBase): operation ...
gelnior/newebe
deploy/fabfile.py
import random import string from fabric.api import sudo, cd, task, prompt from fabric.contrib import files from fabtools import require, python, supervisor # Constants newebe_dir = "/usr/local/var/newebe" newebe_log_dir = "/usr/local/var/log/newebe" newebe_conf_dir = "/usr/local/etc/newebe" newebe_user_dir = "/usr/lo...
nathansamson/sisacal
sisa.py
# This file is part of SisACal. # SisACal is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # SisACal is distributed in the hope...
open-synergy/opnsynid-stock-logistics-warehouse
stock_picking_subtype_policy_multi_address/__openerp__.py
# -*- coding: utf-8 -*- # Copyright 2021 OpenSynergy Indonesia # Copyright 2021 PT. Simetri Sinergi Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # pylint: disable=locally-disabled, manifest-required-author { "name": "Stock Picking/Move Policy Based on Subtype - Multi Address", "vers...
MTG/dunya
dashboard/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-06 15:02 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operation...
School-of-Innovation-Experiment/InnovationManagement
student/urls.py
# coding: UTF-8 ''' Created on 2012-11-5 @author: tianwei ''' from django.conf.urls import patterns, include, url from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template urlpatterns = patterns('', url( r'^$', direct_to_template, {'template': 'student/ho...
foosel/OctoPrint
src/octoprint/filemanager/analysis.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms...
spacewiki/spacewiki-io
spacewiki_io/io_common.py
from flask import Blueprint, current_app, request import dispatcher BLUEPRINT = Blueprint('io_common', __name__, static_folder='static') def try_io_url(error, endpoint, values): mgmt_app = dispatcher.current_dispatcher.default_app values.pop('_external', None) req_host = request.host.split(':', 1) if ...
SKIRT/PTS
modeling/config/initialize_fit.py
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
mozaik-association/mozaik
user_bypass_security/models/res_partner.py
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo import api, models _logger = logging.getLogger(__name__) class ResPartner(models.Model): _inherit = "res.partner" @api.model def _apply_ir_rules(self, query, mode="read"): """...
tsotetsi/textily-web
temba/urls.py
from __future__ import unicode_literals import importlib import logging from celery.signals import worker_process_init from django.conf.urls import include, url from django.contrib.auth.models import User, AnonymousUser from django.conf import settings from temba.channels.views import register, sync from django.views...
magfest/ubersystem
alembic/versions/416eb615ff1a_initial_migration.py
"""Initial migration Revision ID: 416eb615ff1a Revises: 1ed43776064f Create Date: 2017-04-23 19:07:31.868613 """ # revision identifiers, used by Alembic. revision = '416eb615ff1a' down_revision = '1ed43776064f' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa import residue t...
sevein/archivematica
src/dashboard/src/main/urls.py
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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 ...
ESOedX/edx-platform
openedx/core/djangoapps/user_authn/utils.py
""" Utility functions used during user authentication. """ from __future__ import absolute_import from django.conf import settings from django.utils import http from oauth2_provider.models import Application from six.moves.urllib.parse import urlparse # pylint: disable=import-error def is_safe_login_or_logout_redir...
apdjustino/DRCOG_Urbansim
src/opus_gui/results_manager/controllers/dialogs/configure_existing_batch_indicator_visualization.py
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from PyQt4.QtCore import QString from opus_gui.main.controllers.dialogs.message_box import MessageBox from opus_gui.results_manager.controllers.dialogs.ab...
michal-ruzicka/archivematica
src/MCPClient/lib/clientScripts/trimVerifyManifest.py
#!/usr/bin/python -OO # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, e...
Elico-Corp/openerp-7.0
sale_prepayment/sale.py
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or Later(http://www.gnu.org/licenses/agpl.html) from openerp.osv import orm, fields from collections import Iterable class sale_order(orm.Model): _inherit = 'sale.order' _columns = { 'has_prepaid': fields.boo...
CanalTP/kirin
kirin/poller_workers/siri_et_lite_idfm/__init__.py
# coding=utf-8 # Copyright (c) 2001, 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 ope...
Tejal011089/trufil-erpnext
erpnext/stock/doctype/stock_entry/stock_entry.py
# 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 import frappe.defaults from frappe import _ from frappe.utils import cstr, cint, flt, comma_or, getdate from erpnext.stock.utils import ge...
OCA/manufacture
mrp_production_grouped_by_product/models/mrp_production.py
# Copyright 2018 Tecnativa - David Vidal # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from dateutil.relativedelta import relativedelta from odoo import api, fields, models from odoo.tools import config class MrpProduction(models.Model): _inherit = "...
rwl/openpowersystem
rdflib/syntax/parsers/RDFaParser.py
""" RDFa parser. RDFa is a set of attributes used to embed RDF in XHTML. An important goal of RDFa is to achieve this RDF embedding without repeating existing XHTML content when that content is the metadata. REFERENCES: http://www.w3.org/2001/sw/BestPractices/HTML/2005-rdfa-syntax LICENSE: BSD CHANGE HISTORY: ...
chudaol/edx-platform
lms/djangoapps/verify_student/urls.py
from django.conf.urls import patterns, url from verify_student import views from verify_student.views import PayAndVerifyView from django.conf import settings urlpatterns = patterns( '', url( r'^show_requirements/{}/$'.format(settings.COURSE_ID_PATTERN), views.VerifyView.as_view(), ...
USStateDept/FPA_Core
openspending/auth/__init__.py
import inspect from werkzeug.exceptions import Forbidden # These have to be imported for the permission system to work import account # NOQA import dataset # NOQA from flask import abort from functools import wraps from flask.ext.login import current_user from openspending.auth.perms import is_authenticated, is_mod...
pdebuyl/openForumBe
publishconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://npettiaux.github.io/openForumBe/' RELA...
acsone/mozaik
mozaik_communication/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of mozaik_communication, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # mozaik_communication is free software: # you can redistribute it and/or # ...
CENMetaLex/metalex-web-converter
src/metalex_web_converter/settings.py
# -*- coding: utf-8 -*- ''' MetaLex Web Converter ===================== @author: Rinke Hoekstra @contact: hoekstra@uva.nl @organization: Universiteit van Amsterdam @version: 0.1 @status: beta @website: http://doc.metalex.eu @copyright: 2011, Rinke Hoekstra, Universiteit van Amsterdam @deprecated: No longer used @lice...
open-synergy/opnsynid-hr
hr_timesheet_computation_overtime/models/hr_overtime_request.py
# -*- coding: utf-8 -*- # Copyright 2018 OpenSynergy Indonesia # Copyright 2020 PT. Simetri Sinergi Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models from openerp.exceptions import Warning as UserError from openerp.tools.translate import _ class HrOverti...
edx/auth-backends
test_settings.py
""" These settings are here to use during tests, because django requires them. In a real-world use case, apps in this project are installed into other Django applications, so these settings will not be used. """ SECRET_KEY = 'insecure-secret-key' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.cont...
edx/course-discovery
course_discovery/apps/edx_catalog_extensions/migrations/0001_create_program_types.py
from django.db import migrations PAID_SEAT_TYPES = ('credit', 'professional', 'verified',) PROGRAM_TYPES = ('XSeries', 'MicroMasters',) def add_program_types(apps, schema_editor): SeatType = apps.get_model('course_metadata', 'SeatType') ProgramType = apps.get_model('course_metadata', 'ProgramType') seat...
Dekker1/moore
src/members/signals.py
import datetime from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.db.models.signals import pre_save from django.dispatch import receiver from django.template import loader from django.utils import timezone from simple_email_confirmation import unconfirmed_email_created fr...
Gentux/etalage-passim
etalagepassim/subscribers.py
# -*- coding: utf-8 -*- # Etalage-Passim -- Customization of Etalage for Passim # By: Emmanuel Raviart <eraviart@easter-eggs.com> # # Copyright (C) 2011, 2012, 2013 Easter-eggs # http://gitorious.org/passim/etalage-passim # # This file is part of Etalage-Passim. # # Etalage-Passim is free software; you can redistribu...
ubic135/odoo-design
openerp/addons/base/ir/ir_qweb.py
# -*- coding: utf-8 -*- import collections import copy import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates impo...
eduNEXT/edunext-platform
common/djangoapps/third_party_auth/pipeline.py
"""Auth pipeline definitions. Auth pipelines handle the process of authenticating a user. They involve a consumer system and a provider service. The general pattern is: 1. The consumer system exposes a URL endpoint that starts the process. 2. When a user visits that URL, the client system redirects the user t...
dkodnik/arp
addons/delivery/delivery.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
trabacus-softapps/docker-edumedia
additional_addons/Edumedia_India/ed_partner.py
from openerp.osv import fields,osv from openerp.tools.translate import _ import time from datetime import datetime from dateutil.relativedelta import relativedelta class res_partner(osv.osv): _inherit = 'res.partner' def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar...
mallconnectionorg/openerp
logistica/psn/wizard/psn_wizard.py
# -*- coding: utf-8 -*- ############################################################################## # # Cesar Lopez # Copyright (C) 2011 Cesar Lopez(<http://www.ronin.cl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
xiangke/pycopia
aid/pycopia/tty.py
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # This library 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...
Distrotech/pygobject
demos/gtk-demo/demos/builder.py
#!/usr/bin/env python # -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2010 Red Hat, Inc., John (J5) Palmieri <johnp@redhat.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License a...
TresysTechnology/setools
tests/categoryquery.py
# Copyright 2015, Tresys Technology, LLC # # This file is part of SETools. # # SETools 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. ...
chenbojian/SU2
SU2_PY/compute_stability.py
#!/usr/bin/env python ## \file compute_stability.py # \brief Python script for performing the shape optimization. # \author T. Lukaczyk, F. Palacios # \version 3.2.9 "eagle" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # Dr. Thomas D. Economon (econ...
prefetchnta/questlab
bin/x64bin/python/36/Lib/concurrent/futures/_base.py
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. __author__ = 'Brian Quinlan (brian@sweetapp.com)' import collections import logging import threading import time FIRST_COMPLETED = 'FIRST_COMPLETED' FIRST_EXCEPTION = 'FIRST_EXCEPTION' ALL_COMPLETED = 'A...
EmreAtes/spack
var/spack/repos/builtin/packages/openfst/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
FedoraScientific/salome-paravis
test/VisuPrs/GaussPoints/B5.py
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library 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 2.1 of the License, or (at your option) any later version. # # This library ...
amluto/libseccomp
tests/10-sim-syscall_priority_post.py
#!/usr/bin/env python # # Seccomp Library test program # # Copyright (c) 2012 Red Hat <pmoore@redhat.com> # Author: Paul Moore <pmoore@redhat.com> # # # This library is free software; you can redistribute it and/or modify it # under the terms of version 2.1 of the GNU Lesser General Public License as # published by t...
OGRECave/blender2ogre
io_ogre/ui/importer.py
import bpy, os, getpass, math, mathutils, logging from pprint import pprint # When bpy is already in local, we know this is not the initial import... if "bpy" in locals(): # ...so we need to reload our submodule(s) using importlib import importlib if "config" in locals(): importlib.reload(config) ...