repo_name stringlengths 5 104 | path stringlengths 4 248 | content stringlengths 102 99.9k |
|---|---|---|
Philippe-Lawrence/pyBar | classPrefs.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2007 Philippe LAWRENCE
#
# This file is part of pyBar.
# pyBar is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the Licen... |
amaivsimau/electrum-ltc | lib/paymentrequest.py | import hashlib
import httplib
import os.path
import re
import sys
import threading
import time
import traceback
import urllib2
try:
import paymentrequest_pb2
except:
print "protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto"
raise Exception()
import urlparse
import requests
from M2Crypto ... |
papedaniel/oioioi | oioioi/gamification/profile.py | from django.template.loader import render_to_string
from oioioi.base.menu import OrderedRegistry
from oioioi.gamification.friends import UserFriends
profile_registry = OrderedRegistry()
def profile_section(order):
""" Decorator for registering profile view sections.
The decorated function is passed the... |
alexandergraul/pvs-bot | launcher.py | import RoleManagement
import bot_logger
import purger
async def run_op(client, message, bot_log):
levels = {
'admin': ['admin'],
'high': ['admin', 'moderator', 'panda bat'],
'medium': ['trial moderator', 'moderator', 'admin', 'panda bat'],
'low': ['@everyone']
... |
jwlockhart/concept-networks | examples/draw_tripartite.py | # @author Jeff Lockhart <jwlock@umich.edu>
# Script for drawing the tripartite network underlying analysis.
# version 1.0
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
import sys
#add the parent directory to the current session's path
sys.path.insert(0, '../')
from network_utils import *
#... |
jebaum/neosyntax | rplugin/python3/neosyntax.py | import neovim
# TODO figure out the python way to do these imports, this is probably wrong
import pygments
import pygments.lexers
import pygments.token
@neovim.plugin
class Neosyntax(object):
def __init__(self, nvim):
self.nvim = nvim
# swap src_ids. from brefdl: allocate two ids, and swap, a... |
flake123p/ProjectH | Python/_Basics2_/A02_for_while/for_while.py | scores = [60, 73, 81, 95, 34]
n = 0
total = 0
for x in scores:
n += 1
total += x
avg = total/n
print("for loop print")
print(total)
print(avg)
i = 1
x = 0
while i <= 50:
x += 1
i += 1
print("while loop print")
print(x)
print(i)
|
Hammer2900/SunflowerX | application/plugins/default_toolbar/bookmarks_button.py | import gtk
class Button(gtk.ToolButton):
"""Toolbar control used to popup bookmarks menu"""
def __init__(self, application, name, config):
gtk.ToolButton.__init__(self)
# store parameters locally
self._name = name
self._config = config
self._application = application
... |
grcanosa/my-telegram-bot | src/not_used/handlers/cmdcollection.py | #!/usr/bin/python3
import random;
import logging;
import emoji
import telegram
from telegram import Update;
from telegram.ext import Updater;
from telegram.ext import CommandHandler as CH;
from ..data import peopleemoji as LPEOPLEEMOJI;
logger = logging.getLogger(__name__);
class CmdCollection:
def __init__(sel... |
arnif/CouchPotatoServer | couchpotato/core/providers/nzb/nzbmatrix/__init__.py | from .main import NZBMatrix
def start():
return NZBMatrix()
config = [{
'name': 'nzbmatrix',
'groups': [
{
'tab': 'searcher',
'subtab': 'nzb_providers',
'name': 'nzbmatrix',
'label': 'NZBMatrix',
'description': 'See <a href="https://nzbma... |
elifesciences/lax | src/publisher/api_v2_views.py | import json
import jsonschema
from django.core import exceptions as django_errors
from . import models, logic, fragment_logic, utils
from .utils import ensure, isint, toint, lmap
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts impo... |
yabirgb/OCManager | core/main/settings.py | """
Django settings for api project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
# ... |
davidh-ssec/polar2grid | polar2grid/compare.py | #!/usr/bin/env python3
# encoding: utf-8
# Copyright (C) 2014-2021 Space Science and Engineering Center (SSEC),
# University of Wisconsin-Madison.
#
# 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 Softw... |
mountaindust/Parasitoids | tests/test_ParsitoidModel.py | """
Test suite for ParasitoidModel, for use with py.test
Created on Fri May 08 12:12:19 2015
Author: Christopher Strickland
Email: wcstrick@live.unc.edu
"""
import pytest
import numpy as np
import math
from scipy import sparse, signal
import ParasitoidModel as PM
import globalvars
##################################... |
dandygithub/kodi | addons/DEPRECATED/plugin.video.unified.search/resources/lib/search_db.py | #!/usr/bin/python
# Writer (c) 2012, MrStealth
# Rev. 1.1.1
# License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
# -*- coding: utf-8 -*-
import os
import sqlite3 as sqlite
import xbmcaddon
import xbmc
__addon__ = xbmcaddon.Addon(id='plugin.video.unified.search')
#addon_path = __addon__.getAd... |
cpicanco/player_plugins | filter_opencv_threshold.py | # -*- coding: utf-8 -*-
'''
Pupil Player Third Party Plugins by cpicanco
Copyright (C) 2016 Rafael Picanço.
The present file is distributed under the terms of the GNU General Public License (GPL v3.0).
You should have received a copy of the GNU General Public License
along with this program. If not, see <ht... |
CalthorpeAnalytics/urbanfootprint | footprint/main/models/analysis_module/agriculture_module/agriculture_updater_tool.py |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... |
jlaine/python-netfilter | netfilter/parser.py | # -*- coding: utf-8 -*-
#
# python-netfilter - Python modules for manipulating netfilter rules
# Copyright (C) 2007-2012 Bolloré Telecom
# Copyright (C) 2013-2016 Jeremy Lainé
#
# 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
... |
rh-marketingops/dwm | dwm/test/test_records.py | record_lookupAll_genericLookup_caught = [{"emailAddress": "test@test.com", "field1": "badvalue"}]
record_lookupAll_genericLookup_uncaught = [{"emailAddress": "test@test.com", "field1": "badvalue-uncaught"}]
record_lookupAll_genericLookup_notChecked = [{"emailAddress": "test@test.com", "field2": "badvalue"}]
record_l... |
mfalesni/pytest-fauxfactory | tests/test_faux_string.py | # -*- coding: utf-8 -*-
"""Test the `faux_string` mark."""
import pytest
def is_numeric(value):
"""Check if value is numeric."""
return value.isnumeric()
def contains_number(value):
"""Check to see if the string contains a number."""
return any(char.isnumeric() for char in value)
def test_mark_pla... |
ghtdak/pyaxo | examples/create_states.py | #!/usr/bin/env python
import os
from pyaxo import Axolotl
# start with a fresh database
try:
os.remove('./alice.db')
os.remove('./bob.db')
except OSError:
pass
# unencrypted databases
a = Axolotl('alice', dbname='alice.db', dbpassphrase=None)
b = Axolotl('bob', dbname='bob.db', dbpassphrase=None)
a.in... |
ChawalitK/odoo | addons/event_sale/models/sale_order.py | # -*- coding: utf-8 -*-
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
@api.multi
def action_confirm(self):
self.ensure_one()
res = super(SaleOrder, self).action_confirm()
self.order_line._update_registrations(confirm=True)
if ... |
DreamSourceLab/DSView | libsigrokdecode4DSL/decoders/1-spi/pd.py | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>
## Copyright (C) 2012-2014 Uwe Hermann <uwe@hermann-uwe.de>
## Copyright (C) 2019 DreamSourceLab <support@dreamsourcelab.com>
##
## This program is free software; you can redistribute it and/or mo... |
huxianglin/pythonstudy | week05-胡湘林/ATM/shop/shop_conf/settings.py | #!/usr/bin/env python
# encoding:utf-8
# __author__: huxianglin
# date: 2016-09-18
# blog: http://huxianglin.cnblogs.com/ http://xianglinhu.blog.51cto.com/
import os
import logging
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
USER_DATABASE = {
"name":"users",
"path": os.path.join(os... |
Ecogenomics/GTDBNCBI | scripts_dev/ncbi_assembly_file_metadata.py | #!/usr/bin/env python
###############################################################################
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License... |
JMSkelton/Transformer | Transformer/Framework/Utilities.py | # Transfomer/Framework/Utilities.py
# ----------------
# Module Docstring
# ----------------
""" Utilities for (re)processing sets of structures in parallel. """
# -------
# Imports
# -------
import multiprocessing;
from Transformer import StructureSet;
from Transformer.Utilities import MultiprocessingHelper;
... |
MS3FGX/rpi_lcars | screens/authorize.py | import pygame
from pygame.mixer import Sound
from ui import colours
from ui.widgets.background import LcarsBackgroundImage
from ui.widgets.gifimage import LcarsGifImage
from ui.widgets.lcars_widgets import LcarsText, LcarsButton
from ui.widgets.screen import LcarsScreen
class ScreenAuthorize(LcarsScreen):
def set... |
mac389/brainpy | examples/a_2.py | from numpy import *
from numpy.random import randint
from scipy import *
import matplotlib.pyplot as plt
import neuroTools as tech
from matplotlib import rcParams, text
#--------------------------------------Plotting Options--------------------------------------------
params = {'backend': 'ps',
'axes.labels... |
IgorDubois/ComplementAlgoS4 | couverture_arbre/main.py | import networkx as nx
import random
import unittest
import kruskal
'''
for i in range(1,500,1):
for j in range(i+1,500,1):
G.add_edge(int(i),int(j),weight=random.randint(1,20))
nx.write_weighted_edgelist(G, "k500.adjlist")
'''
G = nx.read_weighted_edgelist("k500.adjlist" , nodetype=int)
print kruskal.krus... |
carlsonp/kaggle-TrulyNative | scikit_generate_prediction2.py | from __future__ import print_function
import pickle, os, sys, glob, hashlib
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
test_files = set(pd.read_csv('./data/sampleSubmission_v2.csv').file.values)
train = pd.read_csv('./data/train_v2.csv')
df_full = pickle.load(open( "df_full.p", "rb"))
... |
Capitains/MyCapytain | tests/retrievers/test_cts5.py | import unittest
import requests
import responses
from mock import patch, MagicMock
from MyCapytain.retrievers.cts5 import *
class TestEndpointsCts5(unittest.TestCase):
""" Test Cts5 Endpoint request making """
def setUp(self):
self.cts = HttpCtsRetriever("http://domainname.com/rest/cts")
def ... |
teichopsia-/python_practice | old_class_material/MITPerson_class.py | # Building inheritance
class MITPerson(Person):
nextIdNum = 0 #next ID number to assing
def __init__(self, name):
Person.__init__(self, name) #initialize Person attributes
# new MITPerson atrribute: a unique ID number
self.idNum = MITPerson.nextIdNum
MITPerson.nextIdNum += ... |
mozilla-services/shavar | shavar/tests/test_parse.py | import io
from shavar.exceptions import ParseError
from shavar.parse import (
parse_downloads,
parse_gethash,
parse_file_source,
parse_dir_source)
from shavar.types import (
Chunk,
ChunkList,
Downloads,
DownloadsListInfo,
LimitExceededError)
from shavar.tests.base import (
DELTA... |
benjohnston24/partyCoin-interface | funds_tracker/utilities.py | #! /usr/bin/env python
"""!
-----------------------------------------------------------------------------
File Name : utilities.py
Purpose:
Created: 08-Dec-2015 05:14:14 AEDT
-----------------------------------------------------------------------------
Revision History
---------------------------------------------... |
berinhard/newfies-dialer | newfies/dnc/forms.py | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# 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) 2011-2013 Star2Billing S.L.
#
# The Initia... |
diagramsoftware/odoomrp-wip | mrp_subcontracting/models/purchase_order.py | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class PurchaseOrd... |
MuckRock/muckrock | muckrock/organization/views.py | """
Views for the organization application
"""
# Django
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.cache import cache
from django.db.models.query import Prefetch
from django.h... |
geotagx/geotagx-project-template | src/test_question.py | # This module is part of the GeoTag-X project builder.
# Copyright (C) 2015 UNITAR.
#
# 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 your option... |
eltoncarr/tubular | tubular/exception.py | """
Exceptions used by various utilities.
"""
# pylint: disable=missing-docstring
class TimeoutException(Exception):
pass
class ImageNotFoundException(Exception):
pass
class MultipleImagesFoundException(Exception):
pass
class MissingTagException(Exception):
pass
class BackendError(Exception):
... |
mozaik-association/mozaik | mozaik_event_question_thesaurus/models/event_question.py | # Copyright 2021 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class EventQuestion(models.Model):
_inherit = "event.question"
# invisible for simple_choice and text_input questions, intended to
# be used for other types of questions when in... |
openbig/odoo-contract | portal_invitation/__openerp__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# portal_invitation
# (C) 2015 big-consulting GmbH
# (C) 2015 OpenGlobe
# Author: Thorsten Vocks (openBIG.org)
# Author: Mikołaj Dziurzyński, Grzegorz Grzelak (OpenGlobe)
#
# All Rights reserved
... |
eduNEXT/edunext-ecommerce | ecommerce/extensions/catalogue/management/commands/convert_course.py |
import logging
from django.core.management import BaseCommand
from django.db import transaction
from oscar.core.loading import get_model
from oscar.test.utils import RequestFactory
from threadlocals.threadlocals import set_thread_variable
from ecommerce.courses.models import Course
from ecommerce.extensions.catalog... |
mtlchun/edx | cms/djangoapps/contentstore/views/videos.py | """
Views related to the video upload feature
"""
from boto import s3
import csv
from uuid import uuid4
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseNotFound
from django.utils.translation import ugettext as _, ugettext_noop... |
vismartltd/edx-platform | cms/envs/devstack.py | """
Specific overrides to the base prod settings to make development easier.
"""
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"
DEBUG = True
USE_I18N = True
TEMPLATE_DEBU... |
Attorney-Online-Engineering-Task-Force/tsuserver3 | server/area_manager.py | # tsuserver3, an Attorney Online server
#
# Copyright (C) 2016 argoneus <argoneuscze@gmail.com>
#
# 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... |
khchine5/lino-welfare | lino_welfare/projects/eupen/tests/test_watchtim.py | # -*- coding: UTF-8 -*-
# Copyright 2013-2017 Luc Saffre
# This file is part of Lino Welfare.
#
# Lino Welfare 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 y... |
timrae/anki | aqt/main.py | # Copyright: Damien Elmes <anki@ichi2.net>
# -*- coding: utf-8 -*-
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import re
import signal
import zipfile
from send2trash import send2trash
from aqt.qt import *
from anki import Collection
from anki.utils import isWin, isMac, intTime, spl... |
rcgee/oq-hazardlib | openquake/hazardlib/source/area.py | # The Hazard Library
# Copyright (C) 2012-2016 GEM Foundation
#
# 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 your option) any later version.
#... |
eReuse/DeviceHub | ereuse_devicehub/resources/device/component/settings.py | from contextlib import suppress
from ereuse_devicehub.resources.device.benchmark_settings import BenchmarkHardDrive, BenchmarkProcessor, Benchmark
from ereuse_devicehub.resources.device.schema import Device
from ereuse_devicehub.resources.device.settings import DeviceSettings, DeviceSubSettings
class Component(Devic... |
openbig/odoo-contract | sale_contractmanagement/idoit_license_gen.py | # -*- coding: utf-8 -*-
from hashlib import sha1
from phpserialize import dumps
from calendar import timegm
from time import strptime
import zlib
#calendar.timegm(time.strptime('01/12/2011', '%d/%m/%Y'))
def create(data):
assert isinstance(data, dict)
assert 'request_data' in data
assert 'contract_data' i... |
NeoRazorX/ubuntufaq | enlaces.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of ubuntufaq
# Copyright (C) 2011 Carlos Garcia Gomez neorazorx@gmail.com
#
# 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 Foun... |
berkmancenter/mediacloud | apps/common/src/python/mediawords/solr/query.py | """
Functions for parsing Solr queries.
"""
import datetime
import re
from typing import Dict, Any, Optional, List
from dateutil.relativedelta import relativedelta
from mediawords.db import DatabaseHandler
from mediawords.util.log import create_logger
from mediawords.util.perl import decode_object_from_bytes_if_need... |
MostlyOpen/odoo_api | myo_person.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pub... |
Vauxoo/server-tools | datetime_formatter/__manifest__.py | # Copyright 2015, 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2016 Tecnativa, S.L. - Vicent Cubells
# Copyright 2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Date & Time Formatter",
"summary": "Helper functions to give correct format to date[t... |
jor-/simulation | simulation/util/args.py | import numpy as np
import measurements.all.data
import simulation.model.options
import simulation.model.cache
import simulation.optimization.constants
import simulation.accuracy.linearized
def init_model_options(model_name, time_step=1,
concentrations=None, concentrations_index=None, paramete... |
shagi/guifiadmin | vpn/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-11-01 08:23
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('guifi', '0001_initial'),
('account... |
jmesteve/saas3 | openerp/addons_extra/l10n_es_account_asset/account_asset.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2012 Servicios Tecnológicos Avanzados (http://www.serviciosbaeza.com)
# Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>
#
... |
Micronaet/micronaet-migration | sale_exchange/__init__.py | # -*- coding: utf-8 -*-
###############################################################################
#
# ODOO (ex OpenERP)
# Open Source Management Solution
# Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>)
# Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>)
# This pro... |
suutari/shoop | shuup_workbench/__main__.py | #!/usr/bin/env python
# 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 logging
import os
import sys
import warnings
from shuup.utils... |
eirmag/weboob | weboob/capabilities/housing.py | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... |
Cartocite/osmada | osmdata/exporters.py | import csv
import datetime
import io
from django.template.loader import render_to_string
class AbstractExporter:
pass
class CSVExporter(AbstractExporter):
def get_header_row(self):
return (
'id', 'version', 'timestamp', 'changeset',
'user', 'uid', 'action_type', 'element_type... |
pagekite/PyPagekite | droiddemo.py | #!/usr/bin/python -u
from __future__ import absolute_import
from __future__ import print_function
#
# droiddemo.py, Copyright 2010-2013, The Beanstalks Project ehf.
# http://beanstalks-project.net/
#
# This is a proof-of-concept PageKite enabled HTTP server for Android.
# It has bee... |
sstebbins/pppcpro | pppcemr/migrations/0123_auto_20160426_1253.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-26 16:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pppcemr', '0122_auto_20160425_1327'),
]
operations = [
migrations.AddField(
... |
mtlchun/edx | cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py | """
Test for assets cleanup of courses for Mac OS metadata files (with filename ".DS_Store"
or with filename which starts with "._")
"""
from django.core.management import call_command
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from xmodule.contentstore.content import XASSET_LOCATION_TAG
from xmodul... |
inovtec-solutions/OpenERP | openerp/addons/smsfee/__openerp__.py | {
'name': 'SMS Fee',
'version': '1.0',
'author': 'Inovtec Solutions',
'category': 'SMS Fee Management',
'description': """This Module is used for fee management for Compas ManagmentS ystem.""",
'website': 'http://www.inovtec.com.pk',
'images': [''],
'depends' : ['sms'],
'data': ['sec... |
openpolis/open_municipio | fabfile.sample/conf_production.py | import os
# IP/domain name of the production server
SERVER_MACHINE = 'www.openmunicipio.it' ## CHANGEME!
# Python interpreter executable to use on virtualenv creation
PYTHON_BIN = 'python' #pyhton 2.7
PYTHON_PREFIX = '' # e.g. ``/usr``, ``/usr/local``; leave empty for default.
PYTHON_FULL_PATH = "%s/bin/%s" % (PYTHON_... |
Gimpneek/jobseek | jobseekr/cv/forms/user.py | """ Forms for use with User objects """
from django import forms
from django.contrib.auth.models import User
class UserForm(forms.ModelForm):
"""
Form for django.contrib.auth.models.User
"""
class Meta:
"""
Meta data for User Form
"""
model = User
fields = ('us... |
victorclf/jcc-web | server/test/controller/test_partition.py | import unittest
import os
import shutil
import filecmp
import pytest
import marks
import options
import util
from controller.partition import PartitionController
class PartitionControllerTest(unittest.TestCase):
TEST_DATA_PATH = os.path.join(os.getcwd(), 'testdata')
def setUp(self):
self.control... |
avanzosc/avanzosc6.1 | avanzosc_stpick_expectdate/__init__.py |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2008-2014 AvanzOSC (Daniel). All Rights Reserved
# Date: 20/02/2014
#
# This program is free software: you can redistribute it and/o... |
blckshrk/Weboob | modules/caissedepargne/browser.py | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... |
mupi/escolamupi | core/templatetags/timtec_markdown.py | import markdown
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.encoding import force_unicode
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter(is_safe=True)
@stringfilter
def timtec_markdown(value):
extensions = ["... |
treytabner/cloudprefs-old | simulate.py | """Cloud Preferences simulation tool"""
# Copyright 2013 Trey Tabner
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
BirkbeckCTP/janeway | src/repository/migrations/0001_squashed_0019_auto_20201030_1423.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-11-10 13:37
from __future__ import unicode_literals
import core.file_system
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import repository.models
class Migration(mi... |
dretta/EmbassyEmergency | finder/migrations/0003_auto_20170309_2010.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-03-10 03:10
from __future__ import unicode_literals
from django.db import migrations, models
import finder.models
class Migration(migrations.Migration):
dependencies = [
('finder', '0002_auto_20170303_0253'),
]
operations = [
... |
skeledrew/web-dl | cookies.py | # -*- coding: utf-8 -*-
"""
Cookie handling module. (Ripped from coursera-dl)
TODO: Convert to Hy and make generic.
"""
import logging
import os
import ssl
import tempfile
import getpass
import requests
from requests.adapters import HTTPAdapter
try: # Workaround for broken Debian/Ubuntu packages? (See issue #331)
... |
skarphed/skarphed | admin/src/skarphedadmin/gui/ServerPropertyPage.py | #!/usr/bin/python
#-*- coding: utf-8 -*-
###########################################################
# © 2011 Daniel 'grindhold' Brendle and Team
#
# This file is part of Skarphed.
#
# Skarphed is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as ... |
ecreall/lagendacommun | lac/views/user_management/see_group.py | # Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPFound
from substanced.util import Batch
from dace.util import getSite
from dace.processin... |
laurentb/assnet | assnet/filters.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Romain Bignon, Laurent Bachelier
#
# This file is part of assnet.
#
# assnet 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... |
MTG/gaia | src/bindings/pygaia/scripts/dataset_to_csv.py | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Gaia
#
# Gaia 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 (FSF), either ve... |
PairMhai/Backend | membership/migrations/0005_admin.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-13 16:02
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('membership', '0004_auto_20... |
berkmancenter/mediacloud | apps/webapp-api/tests/python/auth/reset_password/test_send_password_reset_token.py | from mediawords.db import connect_to_db
from webapp.auth.register import add_user
from webapp.auth.reset_password import send_password_reset_token
from webapp.auth.user import NewUser
from webapp.test.dummy_emails import TestDoNotSendEmails
class TestResetPassword(TestDoNotSendEmails):
def test_send_password_res... |
funkring/fdoo | addons/calendar/calendar.py | # -*- coding: utf-8 -*-
import pytz
import re
import time
import openerp
import openerp.service.report
import uuid
import collections
import babel.dates
from werkzeug.exceptions import BadRequest
from datetime import datetime, timedelta
from dateutil import parser
from dateutil import rrule
from dateutil.relativedelta... |
frePPLe/frePPLe | freppledb/common/notifications.py | #
# Copyright (C) 2020 by frePPLe bv
#
# This library 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.
#
# This library is distri... |
CIRCL/AIL-framework | var/www/modules/showpaste/Flask_showpaste.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
'''
Flask functions and routes for the trending modules page
'''
import redis
import json
import os
import sys
import flask
from flask import Flask, render_template, jsonify, request, Blueprint, make_response, Response, send_from_directory, redirect, url_for, abort
from... |
jgmanzanas/CMNT_004_15 | project-addons/importation/import_account_due_list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import xmlrpclib
import socket
import xlrd
import datetime
class import_account_entries(object):
def __init__(self, dbname, user, passwd, accounts_file, file_type):
"""método incial"""
try:
self.url_template = "http://%s:%s/xml... |
mdhaman/superdesk-core | apps/archive/archive_link.py | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from eve.util... |
zenoss/pywbem | pywbem/_nocasedict.py | #
# (C) Copyright 2003-2007 Hewlett-Packard Development Company, L.P.
# (C) Copyright 2006-2007 Novell, Inc.
#
# 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 ... |
skosukhin/spack | var/spack/repos/builtin/packages/sickle/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... |
srange/SU2 | preconfigure.py | #!/usr/bin/env python
## \file configure.py
# \brief An extended configuration script.
# \author T. Albring
# \version 6.2.0 "Falcon"
#
# The current SU2 release has been coordinated by the
# SU2 International Developers Society <www.su2devsociety.org>
# with selected contributions from the open-source community.
#... |
amolenaar/gaphor | gaphor/RAAML/fta/basicevent.py | """Basic Event item definition."""
from gaphas.geometry import Rectangle
from gaphas.util import path_ellipse
from gaphor.core.modeling import DrawContext
from gaphor.diagram.presentation import (
Classified,
ElementPresentation,
from_package_str,
)
from gaphor.diagram.shapes import Box, IconBox, Text, st... |
aricaldeira/pybrasil | pybrasil/inscricao/pis.py | # -*- coding: utf-8 -*-
#
# PyBrasil - Functions useful for most Brazil's ERPs
#
# Copyright (C) 2016-
# Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
# publ... |
araisrobo/linuxcnc | src/emc/usr_intf/axis/scripts/linuxcnctop.py | #!/usr/bin/env python2
# This is a component of AXIS, a front-end for linuxcnc
# Copyright 2004, 2005, 2006 Jeff Epler <jepler@unpythonic.net>
# and Chris Radek <chris@timeguy.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GN... |
oVirt/ovirt-hosted-engine-ha | ovirt_hosted_engine_ha/env/config_ini.py | try:
import configparser
except ImportError:
import ConfigParser as configparser
from ovirt_hosted_engine_ha.env.config_shared import SharedConfigFile
class SharedIniFile(SharedConfigFile):
def __init__(self, id, local_path, sd_config,
remote_path=None, writable=False, logger=None):
... |
skosukhin/spack | var/spack/repos/builtin/packages/libtermkey/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... |
rspavel/spack | var/spack/repos/builtin/packages/claw/package.py | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Claw(CMakePackage):
"""CLAW Compiler targets performance portability problem in climate an... |
FedoraScientific/salome-smesh | doc/salome/examples/defining_hypotheses_ex11.py | # Projection 1D2D
# Project triangles from one meshed face to another mesh on the same box
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)... |
timesong/pycha | chavier/dialogs.py | # Copyright(c) 2007-2010 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Chavier.
#
# Chavier 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 Lice... |
dbrgn/django-tabination | tabination/tests/multilevel/tests.py | from django.core.exceptions import ImproperlyConfigured
from django.test.client import RequestFactory
from django.utils import unittest
from .views import (ParentTab, EmptyTab, FirstChildTab, SecondChildTab, BrokenChildTab)
class MultilevelTest(unittest.TestCase):
rf = RequestFactory()
def test_parent(self)... |
jacebrowning/gridcommand | gridcommand/tests/test_stores_game.py | # pylint: disable=unused-argument,no-self-use
import os
import tempfile
import logging
import pytest
from gridcommand.stores import GameMemoryStore, GameFileStore
from gridcommand import domain
@pytest.mark.parametrize("store_class", [GameMemoryStore, GameFileStore])
class TestGameStore:
def setup_method(self... |
SINGROUP/pycp2k | pycp2k/classes/_bse1.py | from pycp2k.inputsection import InputSection
class _bse1(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Num_z_vectors = None
self.Threshold_min_trans = None
self.Max_iter = None
self._name = "BSE"
self._keywords = {'Num_z_vectors': 'NUM_Z_VECTOR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.