repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
andresailer/DIRAC
ConfigurationSystem/private/ConfigurationData.py
""" ConfigurationData module is the base for cfg files management """ import os.path import zlib import zipfile import thread import time import DIRAC from DIRAC.Core.Utilities.File import mkDir from DIRAC.Core.Utilities import List, Time from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR from DIRAC.Core.Uti...
Turgon37/SMSShell
SMSShell/exceptions.py
# -*- coding: utf8 -*- # This file is a part of SMSShell # # Copyright (c) 2016-2018 Pierre GINDRAUD # # SMSShell 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...
thegrill/grill-names
grill/tokens/ids/__init__.py
import enum import typing import configparser from importlib import resources from functools import lru_cache class _TokenID(typing.NamedTuple): description: str short_name: str pattern: str = r'\w+' default: str = '' @lru_cache() def __getattr__(name): cfg_fname = f'{name}.cfg' if resources...
UoE-macOS/app-approval
server/setup.py
#!/usr/bin/python from distutils.core import setup import glob setup(name='python-jssapproval', version='0.2', description='Server-side componets to harvest and process policy requests on the JSS', long_description='Part of the JSS Approval framework', license='GPLv3', author='Geoff Lee...
mkouhei/shiori
shiori/bookmark/models.py
# -*- coding: utf-8 -*- """ Model of bookmark """ from django.db import models from django.db.models.signals import pre_save from django.contrib.auth.models import User from shortuuidfield import ShortUUIDField import jsonfield from pyquery import PyQuery from shiori.bookmark.agents.feed_parser import FeedParser from s...
DevinDewitt/pyqt5
doc/sphinx/conf.py
# -*- coding: utf-8 -*- # # PyQt documentation build configuration file, created by # sphinx-quickstart on Sat May 30 14:28:55 2009. # # 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 # autogenerated file. # # All co...
OpenAgInitiative/openag_python
openag/db_names.py
__all__ = ["all_dbs", "global_dbs", "per_farm_dbs"] all_dbs = set() global_dbs = set() per_farm_dbs = set() def global_db(db): all_dbs.add(db) global_dbs.add(db) return db def per_farm_db(db): all_dbs.add(db) per_farm_dbs.add(db) return db RECIPE = global_db("recipes") SOFTWARE_MODULE_TYPE =...
acuriel/nahuatilli
contracts/models/clauses.py
from django.db import models import sections import contract from string import Template class Clause(sections.LatexModel): before_template = "\\clausula{$name} " after_template = "\n" name = models.CharField(max_length=128, null=True) description = models.CharField(max_length=512, null=True) cont...
dmsimard/ansible
lib/ansible/module_utils/common/arg_spec.py
# -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type from copy import deepcopy from ansible.module_utils.common.para...
lizardsystem/lizard-rijnmond
setup.py
from setuptools import setup version = '0.3dev' long_description = '\n\n'.join([ open('README.rst').read(), open('TODO.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'Django', 'django-extensions', 'django-nose', 'lizard-ui', 'pkgi...
NoctuaNivalis/qutebrowser
tests/helpers/fixtures.py
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-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 GNU General Public License as published by # the Free S...
fitnr/buoyant
setup.py
# -*- coding: utf-8 -*- # Copyright 2014-17 Neil Freeman # 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. # This program...
h3llrais3r/Auto-Subliminal
tests/parsers/test_guessit.py
# coding=utf-8 from autosubliminal.parsers import guessit def test_guessit_rename_parts_to_episode_numbers(): guess = guessit('Buried.Knights.Templar.and.the.Holy.Grail.2018.Season.1.Part1.720p.WEB.h264-CookieMonster.mkv') assert guess is not None assert guess['type'] == 'episode' assert guess['title...
mypinballs/indianajones
well_of_souls.py
# Well Of Souls Game Mode __author__="jim" __date__ ="$Jan 18, 2011 1:36:37 PM$" import procgame import locale import logging from procgame import * base_path = config.value_for_key_path('base_path') game_path = base_path+"games/indyjones/" speech_path = game_path +"speech/" sound_path = game_path +"sound/" music_p...
nop33/indico-plugin-livesync
indico_livesync/marcxml.py
# This file is part of Indico. # Copyright (C) 2002 - 2014 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...
Hoohm/pyHomeVM
pyHomeVM/settings/settings.py
import logging import os import ConfigParser import traceback from .. import CONSTANTS logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) handler = logging.FileHandler(CONSTANTS.CONSTANTS['log_file_path']) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler.se...
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_chart_radar02.py
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
RedFantom/GSF-Parser
parsing/tesseract.py
""" Author: RedFantom Contributors: Daethyra (Naiii) and Sprigellania (Zarainia) License: GNU GPLv3 as in LICENSE Copyright (C) 2016-2018 RedFantom """ # Standard Library import os from subprocess import Popen, PIPE # Packages from PIL import Image, ImageFilter from pytesseract import pytesseract as tesseract # Project...
hakuji/game3
src/rect.py
# Copyright 2013 by akuji # # This file is part of game 3. # # game 3 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. # # game 3 is dis...
quillford/redeem
redeem/PathPlanner.py
""" Path planner for Replicape. Just add paths to this and they will be executed as soon as no other paths are being executed. It's a good idea to stack up maybe five path segments, to have a buffer. Author: Elias Bakken email: elias(dot)bakken(at)gmail(dot)com Website: http://www.thing-printer.com License: GNU GPL v3...
ciudadanointeligente/votainteligente-portal-electoral
merepresenta/voluntarios/forms.py
# coding=utf-8 from django import forms from backend_candidate.models import CandidacyContact from merepresenta.models import VolunteerGetsCandidateEmailLog from .models import VolunteerProfile from votai_utils.send_mails import send_mail class VolunteerGetsCandidateEmailLogMixin(object): def _save_log(self, cont...
tulir/maulabbot
gitlab_matrix/commands/base.py
# gitlab - A GitLab client and webhook receiver for maubot # Copyright (C) 2021 Tulir Asokan # # 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 License, or # (at yo...
arbalet-project/arbasdk
arbalet/core/arbamodel.py
""" Arbalet - ARduino-BAsed LEd Table Model - Arbalet State Store a snapshot of the table state Copyright 2015 Yoan Mollard - Arbalet project - http://github.com/arbalet-project License: GPL version 3 http://www.gnu.org/licenses/gpl.html """ import numpy as np import json from copy import deepcopy...
coroa/calypso
calypso/__init__.py
# -*- coding: utf-8 -*- # # This file is part of Calypso - CalDAV/CardDAV/WebDAV Server # Copyright © 2011 Keith Packard # Copyright © 2008-2011 Guillaume Ayoub # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # # This library is free software: you can redistribute it and/or modify # it under the term...
botswana-harvard/bcpp-subject
bcpp_subject/migrations/0020_auto_20170217_1014.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-17 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bcpp_subject', '0019_auto_20170217_0031'), ] operations = [ migrations.AddF...
dgilman/echobot
echobot/irc.py
import inspect import asyncio import irc3 import irc3.utils from irc3 import IrcBot class IRCClient(object): defaults = dict( nick='echobot', realname='echobot', userinfo='echobot IRC client', ) events = {"JOIN": 'joined', "PART": 'dramaparted', "QUIT":...
rd2b/tools
monitoring/monitoring.py
#!/usr/bin/env python """ monitoring.py : Monitoring Server and client with web Overview """ __author__ = "Remi Debay" __date__ = "2013/02/27" import argparse def main(): """ Default main function """ # parse command line options parser = argparse.ArgumentParser() parser.add_argument('--foo', help...
samuto/ladybug
src/Ladybug_Colored Sky Visualizer.py
# Visualize a Perez sky # # Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Ladybug. # # Copyright (c) 2013-2015, Trygve Wastvedt and Chris Mackey <Trygve.Wastvedt@gmail.com and Chris@MackeyArchitecture.com> # Ladybug is free software; you can redi...
Yukarumya/Yukarum-Redfoxes
testing/mozbase/docs/_static/structured_example.py
import argparse import sys import traceback import types from mozlog import commandline, get_default_logger class TestAssertion(Exception): pass def assert_equals(a, b): if a != b: raise TestAssertion("%r not equal to %r" % (a, b)) def expected(status): def inner(f): def test_func(): ...
Callek/build-relengapi
relengapi/blueprints/docs/__init__.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 StringIO import os import pkg_resources import shutil import structlog from flask import Blueprint from flask im...
lucasallan/boulder
test/integration-test.py
#!/usr/bin/env python2.7 import argparse import atexit import base64 import datetime import errno import json import os import random import re import requests import shutil import subprocess import signal import struct import sys import tempfile import time import urllib2 import startservers import chisel from chise...
CompassionCH/compassion-modules
crm_compassion/tests/test_crm_compassion.py
############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Albert SHENOUDA <albert.shenouda@efrei.net> # # The licence is in the file __manifest__.py # ############...
alanjw/GreenOpenERP-Win-X86
python/Lib/site-packages/psycopg2/tests/test_green.py
#!/usr/bin/env python # test_green.py - unit test for async wait callback # # Copyright (C) 2010-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com> # # psycopg2 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 Fou...
dokterbob/django-docdata
docdata/views.py
import logging logger = logging.getLogger(__name__) from django.http import HttpResponse, HttpResponseNotFound from docdata.models import PaymentCluster def status_change(request): """ Update URL should have ?merchant_transaction_id=<id> set. """ transaction_id = request.GET.get('merchant_transaction_id') ...
kailIII/emaresa
trunk.cl/rent/rent.py
# -*- encoding: utf-8 -*- # # OpenERP Rent - Renting Module # Copyright (C) 2010-2011 Thibaut DIRLIK <thibaut.dirlik@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
MarcosCommunity/odoo
comunity_modules/account_open_receivables_payables_xls/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2010-2015 Noviat nv/sa (www.noviat.com). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
suutari/shoop
shuup/admin/modules/sales_units/views/edit.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce 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 __future__ import unicode_literals from shuup.admin.utils.vi...
blooparksystems/website
website_compress_html/ir/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, an open source suite of business apps # This module copyright (C) 2015 bloopark systems (<http://bloopark.de>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
zusantunfimmeri/python-exercises
ch3/ex0.py
#!/usr/bin/env python # *** SKIP THIS *** # To be used as an exercise template for all the rest of the exercises. # # Style guide to be used: https://google.github.io/styleguide/pyguide.html # # EX <number>: exercise text # # Example: # *** STOP SKIPPING HERE *** # # EX 0: print hello world. # def main(): print "...
Pexego/PXGO_00053_2013_VT
project-addons/account_banking_sepadd_groupby_partner/wizard/export_sdd.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Pexego S.I. (<http://www.pexego.es>). # # All other contributions are (C) by their respective contributors # # All Rights Reserved # # This program is free software: you can redistri...
umitproject/openmonitor-aggregator
icm_tests/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Adriano Monteiro Marques <adriano@umitproject.org> ## Author: Diogo Pinheiro <diogormpinheiro@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify...
cherrygirl/micronaet-product
csv_import_product/wizard/csv_import_wizard.py
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
fnp/koed-quiz
apps/quiz/views.py
# This file is part of KOED-Quiz, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.shortcuts import get_object_or_404, render, redirect from quiz.forms import QuestionForm from quiz.models import Quiz def question(request, slug=None): ...
suutari/shoop
shuup_tests/notify/test_event.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce 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. import pytest from shuup.notify.base import Event from shuup_tests...
jbzdak/edx-platform
lms/djangoapps/verify_student/tests/test_views.py
# encoding: utf-8 """ Tests of verify_student views. """ import json import urllib from datetime import timedelta, datetime from uuid import uuid4 import ddt import httpretty import mock import boto import moto import pytz from bs4 import BeautifulSoup from mock import patch, Mock, ANY import requests from django.co...
steromano87/Woodpecker
woodpecker/misc/contrib/validate.py
# validate.py # -*- coding: utf-8 -*- # pylint: disable= # # A Validator object. # # Copyright (C) 2005-2014: # (name) : (email) # Michael Foord: fuzzyman AT voidspace DOT org DOT uk # Mark Andrews: mark AT la-la DOT com # Nicola Larosa: nico AT tekNico DOT net # Rob Dennis: rdennis AT gmail DOT com # Eli Courtwright: ...
hasgeek/funnel
funnel/models/organization_membership.py
from __future__ import annotations from typing import Set from werkzeug.utils import cached_property from coaster.sqlalchemy import DynamicAssociationProxy, immutable, with_roles from . import db from .helpers import reopen from .membership_mixin import ImmutableUserMembershipMixin from .user import Organization, U...
CLVsol/oehealth_ichu
oehealth_comm/oehealth_family_member/__init__.py
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2012 Carlos Eduardo Vercelino - CLVsol # # ...
node13h/droll
droll/access/migrations/0002_auto_20160528_2108.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from ..models import UserManager class Migration(migrations.Migration): dependencies = [ ('access', '0001_initial'), ] operations = [ migrations.AlterModelManagers( name=...
rolandgeider/wger
wger/core/views/misc.py
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 ...
InstitutoPascal/campuswebpro
controllers/docentes.py
# coding: utf8 # try something like @auth.requires_membership(role='Docentes') def index(): response.title="Docentes" response.subtitle="Menú Principal" # si me pasan en la URL el docente, lo filtro usuario=auth.user.id q = db.personal.user_id == usuario docentes=db(q).select(db.personal.no...
bzamecnik/sms-tools
smst/ui/models/sprModel_GUI_frame.py
# GUI frame for the sineModel_function.py import os from Tkinter import * import tkFileDialog import tkMessageBox from . import sprModel_function from smst.utils import audio from smst.utils.files import strip_file class SprModelFrame: def __init__(self, parent): self.parent = parent self.initU...
odoo-brazil/l10n-brazil-wip
l10n_br_account_product/sped/nfe/document.py
# -*- coding: utf-8 -*- # Copyright (C) 2013 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from datetime import datetime from openerp import pooler from openerp.exceptions import Warning as UserError from openerp.tools.translate import _ from openerp.addons.l10n_br_account....
RAMSProject/rams
alembic/versions/1ed43776064f_initial_alter_statements.py
"""Initial alter statements Revision ID: 1ed43776064f Revises: ff7e7ae6d711 Create Date: 2017-04-23 19:06:40.644549 """ # revision identifiers, used by Alembic. revision = '1ed43776064f' down_revision = 'ff7e7ae6d711' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa try: ...
eicher31/compassion-modules
hr_attendance_management/models/hr_attendance_rules.py
# -*- coding: utf-8 -*- # Copyright (C) 2018 Compassion CH # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api class HrAttendanceRules(models.Model): _name = 'hr.attendance.rules' _description = "HR attendance break time rule" ###########################...
vijos/vj4
vj4/model/oplog.py
from bson import objectid from vj4 import db from vj4.util import argmethod TYPE_DELETE_DOCUMENT = 1 TYPE_DELETE_SUB_DOCUMENT = 2 TYPE_REJUDGE = 3 # TODO(twd2) @argmethod.wrap async def add(uid: int, type: int, **kwargs): """Add an operation log. Returns the document id.""" obj_id = objectid.ObjectId() coll =...
EDUlib/edx-platform
openedx/core/djangoapps/user_authn/views/tests/test_password.py
""" Tests for user authorization password-related functionality. """ import json import logging import re from datetime import datetime, timedelta from unittest.mock import Mock, patch import pytest import ddt from django.conf import settings from django.contrib.auth import get_user_model from django.core import mail ...
wevoice/wesub
apps/messages/management/commands/update_thread_tips.py
from optparse import make_option from django.core.management.base import BaseCommand from django.db.models import Q import logging from messages.models import Message logger = logging.getLogger(__name__) class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--days', ...
concentricsky/badgr-server
apps/badgrlog/events/badgeuser.py
from mainsite.utils import client_ip_from_request from .base import BaseBadgrEvent class UserSignedUp(BaseBadgrEvent): def __init__(self, request, user, **kwargs): self.request = request self.user = user def to_representation(self): return { 'username': self.user.username...
CredoReference/edx-platform
common/djangoapps/credo_modules/migrations/0020_custom_user_roles.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-03-25 13:29 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import opaque_keys.edx.django.models class Migration(migrations.Migration): dependencies = ...
defivelo/db
apps/challenge/migrations/0006_auto_20150901_1210.py
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('challenge', '0005_auto_20150831_1624'), ] operations = [ migrations.CreateModel( name='SessionActivity', fields=[ ...
akx/shoop
shoop/core/templatetags/shoop_common.py
# -*- coding: utf-8 -*- # 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 __future__ import unicode_literals from datetime import date from json...
mohamedhagag/community-addons
openeducat_erp/op_book_movement/__init__.py
# -*- coding: utf-8 -*- ############################################################################### # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2009-TODAY Tech-Receptives(<http://www.techreceptives.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
BeDjango/intef-openedx
common/djangoapps/third_party_auth/migrations/0002_auto_20161213_1028.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0001_initial'), ] operations = [ migrations.AlterField( model_name='oauth2providerconfig', ...
mcolom/ipolDevel
ipol_demo/modules/core/main.py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # 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. # This program is distrib...
jwg4/flask-restless
tests/helpers.py
# helpers.py - helper functions for unit tests # # Copyright 2011 Lincoln de Sousa <lincoln@comum.org>. # Copyright 2012, 2013, 2014, 2015, 2016 Jeffrey Finkelstein # <jeffrey.finkelstein@gmail.com> and contributors. # # This file is part of Flask-Restless. # # Flask-Restless is distributed under both the GNU...
jolyonb/edx-platform
common/lib/xmodule/xmodule/tests/test_conditional_logic.py
# -*- coding: utf-8 -*- """Test for Conditional Xmodule functional logic.""" from xmodule.conditional_module import ConditionalDescriptor from . import LogicTest class ConditionalModuleTest(LogicTest): """Logic tests for Conditional Xmodule.""" descriptor_class = ConditionalDescriptor def test_ajax_requ...
macarthur-lab/xbrowse
seqr/migrations/0040_auto_20180603_1309.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-03 13:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('seqr', '0039_merge_20180531_1604'), ] operations = [ migrations.AddField( ...
zvolsky/foxwww
applications/viewer/languages/cs.py
# -*- coding: utf-8 -*- { '!=': '!=', '!langcode!': 'cs-cz', '!langname!': 'čeština', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': 'Kolonka "Upravit" je nepovinný výraz, například "pole1=\'nováhodnota\'". Výsledky databázového JOINu nemůžete ma...
Hattivat/hypergolic-django
hypergolic/catalog/urls/guidance_system_urls.py
from django.conf.urls import url from ..views import (GuidanceSystemListView, GuidanceSystemCreateView, GuidanceSystemDetailView, GuidanceSystemUpdateView, GuidanceSystemDeleteView) from django.contrib.auth.decorators import login_required urlpatterns = [ url(r'^create/$', # NOQA log...
SKIRT/PTS
core/config/manage_simulations.py
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
wbsavage/shinken
test/test_livestatus_db.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2010: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licens...
morrillo/l10n_ar_invoice
__init__.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...
fnp/redakcja
src/catalogue/migrations/0004_auto_20191002_1224.py
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencie...
dhondta/tinyscript
tinyscript/report/objects.py
# -*- coding: UTF-8 -*- """Module for defining report element classes. """ import numpy as np import pandas as pd from .base import * __all__ = __features__ = ["Code", "Footer", "Header", "Table", "Section", "Text", "Title"] HEAD_CSS = "@%(pos)s-left{%(left)s};@%(pos)s-center{%(center)s};...
fedora-infra/the-new-hotness
tests/requests/test_insert_data_request.py
# -*- coding: utf-8 -*- # # Copyright (C) 2021 Red Hat, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This ...
reimandlab/Visualistion-Framework-for-Genome-Mutations
website/imports/sites/uniprot/importer.py
import gzip from abc import abstractmethod from types import SimpleNamespace from warnings import warn from pandas import read_table, to_numeric, DataFrame, read_csv, concat from helpers.parsers import parse_fasta_file import imports.protein_data as importers from imports.sites.site_importer import SiteImporter cla...
leapp-to/prototype
tests/scripts/test_utils_project.py
import os import pytest from helpers import TESTING_REPOSITORY_NAME from leapp.exceptions import CommandError from leapp.utils.repository import requires_repository, to_snake_case, make_class_name, make_name,\ find_repository_basedir, get_repository_name, get_repository_metadata def setup_module(): os.envir...
FlorianLance/neuron-computing-cuda
scripts/python/generate_stim.py
# -*- coding: utf-8 -*- """ Created on 11 janv. 2012 @author: Xavier HINAUT xavier.hinaut #/at\# inserm.fr """ import mdp import numpy as np import random import reservoir import sys def write3DArrays(data, fileToCreate): # Write the array to disk if len(data) > 0: with file(fileToCreate, 'w') as ...
jortel/gofer
src/gofer/tools/mgt.py
# # Copyright (c) 2015 Red Hat, Inc. # # This software is licensed to you under the GNU Lesser General Public # License as published by the Free Software Foundation; either version # 2 of the License (LGPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # includin...
skosukhin/spack
var/spack/repos/builtin/packages/py-pytz/package.py
############################################################################## # Copyright (c) 2013-2017, 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...
codiez/pywurfl
pywurfl/serialize.py
# pywurfl - Wireless Universal Resource File Tools in Python # Copyright (C) 2006-2009 Armand Lynch # # 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...
sim-x/simx
simx/process.py
# Copyright (c) 2013, 2014 Los Alamos National Security, LLC. # This material was produced under U.S. Government contract DE-AC52-06NA25396 # for Los Alamos National Laboratory (LANL), which is operated by Los Alamos # National Security, LLC for the U.S. Department of Energy. The U.S. Government # has rights to use...
zhuomingzhe/myapx_admin
channel/views.py
from collections import OrderedDict from django.http import HttpResponse from django.shortcuts import render # Create your views here. from channel.models import Driver, Channel import json from game.models import Game def get_driver_schema(request, id): properties = {} for driver in Driver.objects.all(): ...
vicnet/weboob
modules/bred/bred/pages.py
# -*- coding: utf-8 -*- # Copyright(C) 2018 Célande Adrien # # This file is part of a weboob module. # # This weboob module 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 Licen...
nortd/bomfu
admin/boms.py
# -*- coding: utf-8 -*- import webapp2 from web.models import Bom from boilerplate import forms from boilerplate.handlers import BaseHandler from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from google.appengine.api import users as googleusers from collections import Or...
stsouko/CGRtools
CGRtools/utils/functional_groups.py
# -*- coding: utf-8 -*- # # Copyright 2020 Ramil Nugmanov <nougmanoff@protonmail.com> # Copyright 2020 Dinar Batyrshin <batyrshin-dinar@mail.ru> # This file is part of CGRtools. # # CGRtools is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as pub...
tiagocoutinho/bliss
bliss/tango/servers/gpib_ds.py
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. """ GPIB Tango device server bridge to GPIB. It uses the Salsa GPIB connection. Consider using it if you need to connnect to Spec for ex...
McIntyre-Lab/papers
fear_sem_sd_2015/scripts/ggm_network_analysis_shortest_path.py
#!/usr/bin/env python import os import logging import numpy as np import networkx as nx import matplotlib.pyplot as plt import pickle import itertools def setLogger(fname,loglevel): """ Function to handle error logging """ logging.basicConfig(filename=fname, filemode='w', level=loglevel, format='%(asctime)s -...
FEniCS/ufl
demo/HarmonicMap2.py
# # Harmonic map demo using one mixed function u to represent x and y. # Author: Martin Alnes # Date: 2009-04-09 # from ufl import (Coefficient, FiniteElement, VectorElement, derivative, dot, dx, grad, inner, split, triangle) cell = triangle X = VectorElement("Lagrange", cell, 1) Y = FiniteElement("La...
whoissqr/python-learn
week4/problem4_4.py
""" Problem 4_4: This problem is to build on phones.py. You add a new menu item r) Reorder This will reorder the names/numbers in the phone list alphabetically by name. This may sound difficult at first thought, but it really is straight forward. You need to add two lines to the main_loop and one line to menu_cho...
jamalmazrui/InPy
WebClient_Yahoo!TermExtractions.py
sWebContent = GetUrl() if not sWebContent: sWebContent = ReadValue('WebContent') sWebContent = IniFormDialogInput('Input', 'Web Content', sWebContent) if not sWebContent: Exit() SayLine('Please wait') WriteValue('WebContent', sWebContent) if sWebContent.find('://') == -1: sWebContent = 'http://' + sWebContent sH...
maweis1981/hey001
mayversion/mayversion/bookreader/debug.py
#!/usr/bin/env python # encoding: utf-8 """ untitled.py Created by peter on 2010-03-30. Copyright (c) 2010 __MyCompanyName__. All rights reserved. """ import sys import os import re import urllib from SinaReader import safe_str ,safe_unicode def url_get(url): print url u = urllib.urlopen(url) c = unico...
douglasrizzo/catsim
docs/estimation-2.py
import numpy as np import matplotlib.pyplot as plt from catsim.estimation import * from catsim.cat import generate_item_bank test_size = 20 items = generate_item_bank(20) items = items[items[:,1].argsort()] # order by difficulty ascending r0 = [True] * 7 + [False] * 13 r1 = [True] * 10 + [False] * 10 r2 = [True] * 15 ...
a115/scalendar
scalendar/migrations/0001_initial.py
# encoding: utf8 from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Scalendar', fields=[ ('id', models.AutoField(verbose_n...
SINGROUP/pycp2k
pycp2k/classes/_each50.py
from pycp2k.inputsection import InputSection class _each50(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Metad...
angelgerardo/accidentes
recordtrafficdata.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import time; # This is required to include time module. import datetime; # This is required to include time module. import eventos import unicodedata import sys reload(sys) sys.setdefaultencoding( "latin-1" ) while True: try: f = open("traffic...
seananderson/aenea-grammars
_rstudio.py
from natlink import setMicState from aenea import * from dragonfly.actions.keyboard import keyboard from dragonfly.actions.typeables import typeables if 'semicolon' not in typeables: typeables["semicolon"] = keyboard.get_typeable(char=';') # import words # import generic # import osx # import vocab import r_vocab...
kstopa/cams-tools
cams/__init__.py
#!/usr/bin/env python3 # Copyright 2017 Krzysztof Stopa (stopa.krzysztof.k@gmail.com) # This file is part of Copernicus Atmosphere Monitoring Service (CAMS) downloading and # processing tools (CAMS tools). # CAMS tools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Gen...
svpcom/pyzmq-ctypes
zmq/tests/test_pubsub.py
# # Copyright (c) 2010 Brian E. Granger # # This file is part of pyzmq. # # pyzmq is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option)...