code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------------------------------------
# Program Name: Lychee
# Program Description: MEI document manager for formalized document control
#
# Filename: lychee/__init__.py
# Purpose: ... | nCoda/lychee | lychee/__init__.py | Python | gpl-3.0 | 1,444 |
"""Provide history manager for SCCTool."""
import json
import logging
import scctool.settings.translation
from scctool.settings import getJsonFile, idx2race, race2idx
module_logger = logging.getLogger(__name__)
_ = scctool.settings.translation.gettext
class HistoryManager:
"""History manager for SCCTool."""
... | teampheenix/StarCraft-Casting-Tool | scctool/settings/history.py | Python | gpl-3.0 | 4,381 |
# coding=utf-8
import unittest
"""804. Unique Morse Code Words
https://leetcode.com/problems/unique-morse-code-words/description/
International Morse Code defines a standard encoding where each letter is
mapped to a series of dots and dashes, as follows: `"a"` maps to `".-"`, `"b"`
maps to `"-..."`, `"c"` maps to `"-... | openqt/algorithms | leetcode/python/ac/lc804-unique-morse-code-words.py | Python | gpl-3.0 | 2,281 |
import warnings
from pathlib import Path
from typing import Union
try:
import xlwings as xw
except ImportError:
xw = None
from larray.util.misc import _positive_integer
from larray.core.group import _translate_sheet_name
from larray.core.array import asarray, zip_array_items
from larray.example import load_ex... | liam2/larray | larray/inout/xw_reporting.py | Python | gpl-3.0 | 35,378 |
# 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 So... | t-wissmann/qutebrowser | qutebrowser/qutebrowser.py | Python | gpl-3.0 | 9,154 |
from typing import Optional
from lib.data import CustomFieldArgs
async def fieldUser(args: CustomFieldArgs) -> Optional[str]:
if args.field.lower() == 'user' or args.field.lower() == 'nick':
if args.nick:
return (args.prefix or '') + args.nick + (args.suffix or '')
else:
r... | MeGotsThis/BotGotsThis | pkg/custom_command/custom/user.py | Python | gpl-3.0 | 363 |
#!/usr/bin/python
# usage: A debugging class
import pdb
version=2.0
def my_add(a,b):
''' This is the function for addition of numbers and strings '''
print "value of a is {}".format(a)
print "value of b is {}".format(b)
return a+b
def my_div(a,b):
''' This is the function for division '''
return a/b
... | tuxfux-hlp-notes/python-batches | archieves/batch-57/debugging/first.py | Python | gpl-3.0 | 954 |
#
# Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU G... | mostaphaRoudsari/Honeybee | src/Honeybee_EnergyPlus NoMass Opaque Material.py | Python | gpl-3.0 | 5,463 |
#
# Copyright 2013, 2018, 2019 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 ... | marcusmueller/gnuradio | gr-utils/python/modtool/core/disable.py | Python | gpl-3.0 | 7,940 |
from nose.tools import *
import iDibo
def setup():
print "SETUP!"
def teardown():
print "TEAR DOWN!"
def test_basic():
print "I RAN!" | anaoprea/iDibo | tests/iDibo_tests.py | Python | gpl-3.0 | 148 |
#!/usr/bin/python
# coding=utf-8
# Copyright (c) 2015, 2016 Björn Schrader
#
# 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 ve... | BjoernSch/WLANThermo_v2 | software/usr/sbin/wlt_2_nextion.py | Python | gpl-3.0 | 53,246 |
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst.
# -*- coding: utf-8 -*-
"""
Round raster to set decimals.
"""
from os.path import dirname, exists
import argparse
import os
from osgeo import gdal
import numpy as np
from raster_tools import datasets
# output driver and optinos
DRIVER = gdal.GetDriverByName('g... | nens/raster-tools | raster_tools/roundd.py | Python | gpl-3.0 | 2,683 |
# -*- coding: utf8 -*-
from phystricks import *
def rotation(angle,pts):
ptsp=[ x.rotation(angle) for x in pts ]
return tuple(ptsp)
def truc(A,B,C,D,points_names,angle,pspicts,n):
A,B,C,D=rotation(angle,[A,B,C,D])
quadri=Polygon(A,B,C,D)
quadri.put_mark(0.2,points_names=points_names,pspicts=psp... | LaurentClaessens/phystricks | testing/demonstration/phystricksENQZooVqRaIv.py | Python | gpl-3.0 | 1,151 |
# Generated by Django 3.1.4 on 2020-12-13 20:14
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_ca.models
class Migration(migrations.Migration):
dependencies = [
('django_ca', '0019_certificate_autogenerat... | mathiasertl/django-ca | ca/django_ca/migrations/0020_auto_20201213_2014.py | Python | gpl-3.0 | 7,726 |
# Copyright (C) 2016 William Langhoff WildBill567@users.noreply.github.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 of the License, or
# (at your optio... | WildBill567/nn-toy | neat/phenome.py | Python | gpl-3.0 | 8,014 |
#Made by Kerb
import sys
from com.l2scoria import Config
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "644_GraveRobberAnnihilation"
#Drop rate
DROP_CHANCE = 75
#Npc
... | zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/644_GraveRobberAnnihilation/__init__.py | Python | gpl-3.0 | 2,948 |
def main():
s = 'this is a string'
for c in s:
print(c, end='')
else:
print(' else')
print()
for i in range(10, 0, -1):
print(i, end=' ')
if __name__ == "__main__":
main()
| Safuya/python_3_essential_training | 07 Loops/loop_control.py | Python | gpl-3.0 | 223 |
import numpy as np
from .abstract_layer import LayerBase, NoParamMixin
from ..util import zX, zX_like, white, scalX
class PoolLayer(NoParamMixin, LayerBase):
def __init__(self, filter_size, compiled=True):
LayerBase.__init__(self, activation="linear", trainable=False)
if compiled:
fr... | csxeba/brainforge | brainforge/layers/tensor.py | Python | gpl-3.0 | 3,630 |
'''Publish sensor events to MQTT broker.'''
import logging
import paho.mqtt.publish as mqtt_pub
import paho.mqtt.client as mqtt
import socket
class MqttPublisher():
'''Publish sensor events to an MQTT broker.'''
def __init__(self, broker, topic_prefix='/sensors'):
'''Initialize a MqttPublisher inst... | motlib/mqtt-ts | src/pub/evtpub.py | Python | gpl-3.0 | 1,817 |
# coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... | Thraxis/SickRage | sickbeard/notifiers/growl.py | Python | gpl-3.0 | 7,057 |
import sys
import random
import collections
import itertools
import bisect
# @include
def nonuniform_random_number_generation(values, probabilities):
prefix_sum_of_probabilities = (
[0.0] + list(itertools.accumulate(probabilities)))
interval_idx = bisect.bisect(prefix_sum_of_probabilities,
... | meisamhe/GPLshared | Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/nonuniform_random_number_generation.py | Python | gpl-3.0 | 1,235 |
# Maked by Mr. Have fun! Version 0.2
# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project
# Visit http://forum.l2jdp.com for more details
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.... | zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/404_PathToWizard/__init__.py | Python | gpl-3.0 | 12,640 |
import json
import hashlib
from django.db import models
from django.db.models import Count, Func
from django.contrib.postgres.fields import ArrayField
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.utils.translation import gettext_lazy as _
# from social.apps.django_app.default.mod... | pashinin-com/pashinin.com | src/core/models.py | Python | gpl-3.0 | 22,154 |
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
smuggle_url,
)
class TeleQuebecIE(InfoExtractor):
_VALID_URL = r'https?://zonevideo\.telequebec\.tv/media/(?P<id>\d+)'
_TEST = {
'url': 'http://zonevideo.telequebec.tv/... | Dunkas12/BeepBoopBot | lib/youtube_dl/extractor/telequebec.py | Python | gpl-3.0 | 1,419 |
#
# SPDX-FileCopyrightText: 2020 Dmytro Kolomoiets <amerlyq@gmail.com> and contributors.
#
# SPDX-License-Identifier: GPL-3.0-only
#
import pickle
import urwid
import zmq
from ..ifc import *
def tui_client(src_uri, dst_uri, log_uri):
set_current_thread_name()
_log = getLogger()
ctx = zmq.Context.instan... | miur/miur | tui/urwid_tui.py | Python | gpl-3.0 | 1,631 |
import os
sys = os.system
CC = 'g++ {} -std=gnu++0x -Wall'
FLAG_clear = ['/c', '-c']
FLAG_window = ['/w', '-w']
FLAG_exit = ['/e', '-e']
def main():
print('List of existing <*.cpp> files:')
files = []
counter = 0
for file in os.listdir():
if file[-4:] == '.cpp':
counter += 1
files.append(file)
print('... | Lipen/LipenDev | Azeroth/Pandaria/process.py | Python | gpl-3.0 | 2,341 |
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
setup(name='peloton_bloomfilters',
author = 'Adam DePrince',
author_email = 'adam@pelotoncycle.com',
url = 'https://github.com/pelotoncycle/peloton_bloomfilters',
version='0.0.1'... | pelotoncycle/shared_memory_bloomfilter | setup.py | Python | gpl-3.0 | 572 |
#!/usr/bin/env python
""" create rst files for documentation of DIRAC """
import os
import shutil
import socket
import sys
import logging
import glob
from diracdoctools.Utilities import writeLinesToFile, mkdir, makeLogger
from diracdoctools.Config import Configuration, CLParser as clparser
LOG = makeLogger('CodeRef... | chaen/DIRAC | docs/diracdoctools/cmd/codeReference.py | Python | gpl-3.0 | 13,727 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
###############################################################################
# Module to define chemical reaction functionality
###############################################################################
from math import exp, log
import sqlite3
from numpy import pol... | edusegzy/pychemqt | lib/reaction.py | Python | gpl-3.0 | 9,477 |
#!/usr/bin/env python
from __future__ import absolute_import, print_function
from grid_cell_model.submitting import flagparse
import noisefigs
from noisefigs.env import NoiseEnvironment
import config_standard_gEE_3060 as config
parser = flagparse.FlagParser()
parser.add_flag('--bumpDriftSweep')
args = parser.parse_a... | MattNolanLab/ei-attractor | grid_cell_model/simulations/007_noise/figures/paper/ee_connections_ei_flat/figure_drifts.py | Python | gpl-3.0 | 501 |
"""
Form widgets for ToscaWidgets.
To download and install::
easy_install twForms
"""
from tw.api import Widget
from tw.forms.core import *
from tw.forms.fields import *
from tw.forms.datagrid import *
from tw.forms.calendars import *
# build all so doc tools introspect me properly
from tw.forms.core import _... | jokajak/itweb | data/env/lib/python2.6/site-packages/tw.forms-0.9.9-py2.6.egg/tw/forms/__init__.py | Python | gpl-3.0 | 578 |
""" unit test for Watchdog.py
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# imports
import os
from mock import MagicMock
# sut
from DIRAC.WorkloadManagementSystem.JobWrapper.Watchdog import Watchdog
mock_exeThread = MagicMock()
mock_spObject = Mag... | yujikato/DIRAC | src/DIRAC/WorkloadManagementSystem/JobWrapper/test/Test_Watchdog.py | Python | gpl-3.0 | 958 |
import sys
# where RobotControl.py, etc lives
sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary')
from RobotControl import *
#################################
### Define Deck Layout
#################################
deck="""\
DW96W DW96W DW96W BLANK BLANK BLANK BLANK
DW96W DW96W DW96W BLANK BLANK B... | tdlong/YeastRobot | UserPrograms/ASE/Mon_Wash_3_temp.py | Python | gpl-3.0 | 1,361 |
# Copyright 2018-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | chrislit/abydos | abydos/distance/_tarantula.py | Python | gpl-3.0 | 4,524 |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 30 20:12:17 2017
@author: Mohtashim
"""
# Create a list of strings: spells
spells = ["protego", "accio", "expecto patronum", "legilimens"]
# Use map() to apply a lambda function over spells: shout_spells
shout_spells = map(lambda item: item + '!!!', spells)
# Convert s... | Moshiasri/learning | Python_dataCamp/Map()LambdaFunction.py | Python | gpl-3.0 | 474 |
from os.path import abspath
import wptools
from mycroft.messagebus.message import Message
from mycroft.skills.LILACS_knowledge.services import KnowledgeBackend
from mycroft.util.log import getLogger
__author__ = 'jarbas'
logger = getLogger(abspath(__file__).split('/')[-2])
class WikidataService(KnowledgeBackend):... | ElliotTheRobot/LILACS-mycroft-core | mycroft/skills/LILACS_knowledge/services/wikidata/__init__.py | Python | gpl-3.0 | 2,400 |
# Copyright (C) 2018 Philipp Hörist <philipp AT hoerist.com>
#
# This file is part of nbxmpp.
#
# 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 opt... | gajim/python-nbxmpp | nbxmpp/modules/chat_markers.py | Python | gpl-3.0 | 1,984 |
# -*- coding: utf-8 -*-
'''
Mepinta
Copyright (c) 2011-2012, Joaquin G. Duo
This file is part of Mepinta.
Mepinta 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 opti... | joaduo/mepinta | core/python_core/mepinta/testing/plugins_testing/ModuleAutoTesterUtil.py | Python | gpl-3.0 | 990 |
# coding=utf-8
# This file is part of SickChill.
#
# URL: https://sickchill.github.io
# Git: https://github.com/SickChill/SickChill.git
#
# 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 Free Software Foundation, either vers... | coderbone/SickRage-alt | tests/sickchill_tests/show/coming_episodes_tests.py | Python | gpl-3.0 | 3,730 |
# coding: utf-8
"""
Wheel will try to read configurations from environment variables
so you dont need this local_settings.py file if you have env vars.
1. You can set as a file
export WHEEL_SETTINGS='/path/to/settings.py'
2. You can set individual values
export WHEEL_MONGODB_DB="wheel_db"
export WHEEL_MONGODB_HOST... | seraphln/wheel | wheel/example.local_settings.py | Python | gpl-3.0 | 1,093 |
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2021 Martin Glueck All rights reserved
# Neugasse 2, A--2244 Spannberg, Austria. martin@mangari.org
# #*** <License> ************************************************************#
# This module is free software; you can redistribute it and/or modify
# it under the terms of th... | selfbus/development-tools | test-case-generator/STG/Program.py | Python | gpl-3.0 | 8,523 |
from multiprocessing import Process,Queue
import os
class TestMP:
def __init__(self,n):
self.n = n
@staticmethod
def worker(q):
"""worker function"""
# print('worker',*args)
# print("ppid= {} pid= {}".format(os.getppid(),os.getpid()))
q.put([1,'x',(os.getpid(),[])])
... | vleo/vleo-notebook | test_python/multiprocessing/test_multiprocessing.py | Python | gpl-3.0 | 811 |
import sys
import unittest
sys.path.insert(0, "../src/build")
import addonconf
class AddonConfModuleTestCase(unittest.TestCase):
def test_load(self):
# act
config = addonconf.load("configs/config.json")
# assert
self.assertEqual(config, None, "Wrong return value for not exists con... | seleznev/firefox-complete-theme-build-system | tests/test_addonconf.py | Python | mpl-2.0 | 1,050 |
import os
from configurations.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "morgoth.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Production")
application = DjangoWhiteNoise(get_wsgi_application())
| rehandalal/morgoth | morgoth/wsgi.py | Python | mpl-2.0 | 296 |
# 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 hashlib
import StringIO
import gzip
import web
import mock
from nose.tools import eq_, ok_
from datetime import ... | Tchanders/socorro | socorro/unittest/collector/test_wsgi_breakpad_collector.py | Python | mpl-2.0 | 17,334 |
# -*- coding: utf-8 -*-
SFDC_COUNTRIES = {
'af': 'Afghanistan',
'ax': 'Aland Islands',
'al': 'Albania',
'dz': 'Algeria',
'as': 'American Samoa',
'ad': 'Andorra',
'ao': 'Angola',
'ai': 'Anguilla',
'aq': 'Antarctica',
'ag': 'Antigua and Barbuda',
'ar': 'Argentina',
'am': 'Armenia',
'aw': 'Aruba... | glogiotatidis/basket | basket/news/country_codes.py | Python | mpl-2.0 | 10,229 |
import functools
from . import (
constants,
utils,
)
class Card():
def __init__(self, kind=None, strength=None, value=None, verbose=None, **kwargs):
if kind is None:
raise(TypeError("Missing required 'kind' argument."))
self.kind = kind
self.strength = strength
... | julka2010/games | games/tichu/cards.py | Python | mpl-2.0 | 2,702 |
# 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/.
config = {
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart"... | vladikoff/fxa-mochitest | tests/config/mozharness/marionette.py | Python | mpl-2.0 | 2,925 |
# 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 firefox_ui_harness.arguments import UpdateArguments
from firefox_ui_harness.runners import UpdateTestRunner
from fi... | galgeek/firefox-ui-tests | firefox_ui_harness/cli_update.py | Python | mpl-2.0 | 492 |
# 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) 2015 Digi International Inc. All Rights Reserved.
import json
from wva.test.test_utilities import WVAT... | digidotcom/python-wvalib | wva/test/test_subscriptions.py | Python | mpl-2.0 | 2,119 |
"""
rebuildbot/travis.py
Wrapper around travispy
The latest version of this package is available at:
<https://github.com/jantman/rebuildbot>
################################################################################
Copyright 2015 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
This file... | jantman/rebuildbot | rebuildbot/travis.py | Python | agpl-3.0 | 10,259 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0003_auto_20141128_0831'),
]
operations = [
migrations.AlterField(
model_name='acl',
name='us... | Virako/authapi | authapi/api/migrations/0004_auto_20141128_0914.py | Python | agpl-3.0 | 419 |
from django.conf.urls.defaults import *
from twistranet.core.views import AsView
from views import *
urlpatterns = patterns('sharing',
url(r'^like_toggle_by_id/(\d+)$', AsView(LikeToggleView, lookup = 'id'), name=LikeToggleView.name),
url(r'^like_toggle_by_slug/(\d+)$', AsView(LikeToggleView, lookup = 'slug')... | numericube/twistranet | twistranet/sharing/urls.py | Python | agpl-3.0 | 351 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Item Info')
class TestItemInfo(unittest.TestCase):
pass
| reddymeghraj/showroom | erpnext/buying/doctype/item_info/test_item_info.py | Python | agpl-3.0 | 300 |
# -*- encoding: utf-8 -*-
# © 2014 Elico Corp (https://www.elico-corp.com)
# Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html)
from datetime import datetime
from dateutil.relativedelta import relativedelta
import time
from osv import fields, orm, osv
from tools.translate import _
import netsvc
import ... | Elico-Corp/openerp-7.0 | stock_back2back_order_proc/stock.py | Python | agpl-3.0 | 26,042 |
"""
Comprehensive Theming support for Django's collectstatic functionality.
See https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/
"""
from __future__ import absolute_import
import os.path
import posixpath
import re
from django.conf import settings
from django.contrib.staticfiles.finders import find
from ... | ESOedX/edx-platform | openedx/core/djangoapps/theming/storage.py | Python | agpl-3.0 | 13,828 |
"""
Discounts application configuration
"""
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.apps import AppConfig
class DiscountsConfig(AppConfig):
name = 'openedx.features.discounts'
| ESOedX/edx-platform | openedx/features/discounts/apps.py | Python | agpl-3.0 | 220 |
# -*- coding: utf-8 -*-
from .base_premierecinemas import BasePremierecinemasCinemaSpider
class Spider(BasePremierecinemasCinemaSpider):
name = 'praha-premierecinemas'
calendar_url = 'http://www.premierecinemas.cz/'
| zitkino/backend | zitkino/spiders/praha_premierecinemas.py | Python | agpl-3.0 | 229 |
# Part of Patient Flow.
# See LICENSE file for full copyright and licensing details.
from openerp.osv import orm, fields, osv
from openerp import SUPERUSER_ID
import logging
_logger = logging.getLogger(__name__)
class nh_etake_list_review(orm.Model):
_name = "nh.etake_list.review"
_inherits = {'nh.activity':... | NeovaHealth/patientflow | nh_etake_list/review.py | Python | agpl-3.0 | 8,568 |
from . import test_invoice_mode_weekly
from . import test_invoice_mode_weekly_is_it_today
| OCA/account-invoicing | account_invoice_mode_weekly/tests/__init__.py | Python | agpl-3.0 | 90 |
# -*- coding: utf-8 -*-
# Author: Alexandre Fayolle
# Copyright 2013 Camptocamp SA
# Author: Damien Crier
# Copyright 2015 Camptocamp SA
# © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya
# License LGPL-3.0 or lat... | SerpentCS/purchase-workflow | purchase_order_line_sequence/models/__init__.py | Python | agpl-3.0 | 413 |
#!/usr/bin/env python
#! -*- coding: utf-8 -*-
###
# Copyright (c) Rice University 2012-13
# This software is subject to
# the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
###
"""
THis exists solely to provide less typing for a "leaf node"
in a simple real... | jbarmash/rhaptos2.user | rhaptos2/user/cnxbase.py | Python | agpl-3.0 | 1,673 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2010 - 2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it a... | open-synergy/runbot-addons | runbot_build_instructions/runbot_build.py | Python | agpl-3.0 | 6,892 |
from .api import API, ApiMethods
from .config import Config
__all__ = ["API", "ApiMethods", "Config"] | Aurorastation/BOREALISbot2 | core/subsystems/__init__.py | Python | agpl-3.0 | 102 |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ChangeRequest(Document):
pass
| gangadharkadam/office_erp | erpnext/projects/doctype/change_request/change_request.py | Python | agpl-3.0 | 275 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | wbsavage/shinken | shinken/modules/syslog_broker.py | Python | agpl-3.0 | 1,841 |
# -*- coding: utf-8 -*-
from odoo import api, models, fields, tools, _
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, float_repr
from odoo.tests.common import Form
from odoo.exceptions import UserError
from datetime import datetime
from lxml import etree
from PyPDF2 import PdfFileReader
import io
import logging... | ddico/odoo | addons/account_edi_facturx/models/account_edi_format.py | Python | agpl-3.0 | 12,584 |
# TmLibrary - TissueMAPS library for distibuted image analysis routines.
# Copyright (C) 2016 Markus D. Herrmann, University of Zurich and Robin Hafen
#
# 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 Softwa... | TissueMAPS/TmLibrary | tmlib/tools/base.py | Python | agpl-3.0 | 24,061 |
# -*- coding: utf-8 -*-
#
#
# Author: Yannick Vaucher
# Copyright 2014 Camptocamp SA
#
# 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,... | xpansa/purchase-workflow | purchase_requisition_multicurrency/model/purchase_order.py | Python | agpl-3.0 | 2,905 |
from cStringIO import StringIO
from captcha.models import CaptchaStore
from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404
import Image,ImageDraw,ImageFont,ImageFilter
import random
from captcha.conf import settings
def captcha_image(request,key):
store = get_object_or_404(... | DraXus/andaluciapeople | captcha/views.py | Python | agpl-3.0 | 2,889 |
# Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.addons.website_sale.controllers.main import WebsiteSale
from odoo import http
class WebsiteSaleProductDetailAttributeImage(WebsiteSale):
@http.route()
def product(self, product, category='', ... | Vauxoo/e-commerce | website_sale_product_detail_attribute_image/controllers/main.py | Python | agpl-3.0 | 661 |
from setuptools import setup, find_packages # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as... | odevsp/ckanext-api_basic_functions | setup.py | Python | agpl-3.0 | 3,241 |
import logging
from datetime import datetime
import os
import json
from flask import request, g, Response
#from openspending.core import cache
from openspending.auth import require
from openspending.lib.jsonexport import jsonify
from openspending.views.api_v2.common import blueprint
from openspending.views.error impo... | nathanhilbert/FPA_Core | openspending/views/api_v2/cubes_ext.py | Python | agpl-3.0 | 9,418 |
# -*- 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 GN... | hivam/l10n_co_doctor | doctor_attentions_diseases_inherit.py | Python | agpl-3.0 | 2,526 |
import ConfigParser
import os
import re
from itertools import product
import LineRegress
import ResultScraper
def readconfig(filename):
## SETS DEFaULTS
#all defaults must be in a list even if only one value
speciesFile = ""
outFolder = ""
lineRegressConfig = ""
lambdas = [1.0]
startPopu... | BrianTrethewey/negui | neLineRegress/SimBatchRun.py | Python | agpl-3.0 | 11,399 |
# -*- coding: utf-8 -*-
"""
Views to support exchange of authentication credentials.
The following are currently implemented:
1. AccessTokenExchangeView:
3rd party (social-auth) OAuth 2.0 access token -> 1st party (open-edx) OAuth 2.0 access token
2. LoginWithAccessTokenView:
1st party (open-edx) ... | kmoocdev2/edx-platform | openedx/core/djangoapps/auth_exchange/views.py | Python | agpl-3.0 | 8,123 |
# -*- encoding: utf-8 -*-
# © 2014 Elico Corp (https://www.elico-corp.com)
# Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html)
from datetime import datetime
import time
from osv import fields, osv
from tools.translate import _
from tools import ustr
#import tools
class gap_analysis_effort(osv.Model):... | Elico-Corp/openerp-7.0 | gap_analysis/gap_analysis.py | Python | agpl-3.0 | 21,590 |
# Copyright 2018 Silvio Gregorini (silviogregorini@openforce.it)
# Copyright (c) 2018 Openforce Srls Unipersonale (www.openforce.it)
# Copyright (c) 2019 Matteo Bilotta
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
... | OCA/l10n-italy | l10n_it_vat_statement_split_payment/models/account_config.py | Python | agpl-3.0 | 520 |
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Account Invoice Margin Sale Delivered Sync",
"summary": "Sync invoice margin between invoices and sale orders",
"version": "12.0.1.0.1",
"development_status": "Beta",
"maintainers":... | OCA/margin-analysis | account_invoice_margin_sale_delivered_sync/__manifest__.py | Python | agpl-3.0 | 676 |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | uclouvain/osis | assessments/tests/factories/score_responsible.py | Python | agpl-3.0 | 2,160 |
# coding: utf-8
# Copyright (C) 1994-2016 Altair Engineering, Inc.
# For more information, contact Altair at www.altair.com.
#
# This file is part of the PBS Professional ("PBS Pro") software.
#
# Open Source License Information:
#
# PBS Pro is free software. You can redistribute it and/or modify it under the
# terms ... | vinodchitrali/pbspro | test/fw/ptl/lib/pbs_testlib.py | Python | agpl-3.0 | 502,834 |
# coding=utf-8
"""
Provides crossplatform checking of current power source, battery warning level and battery time remaining estimate.
Allows you to add observer for power notifications if platform supports it.
Usage:
from power import PowerManagement, PowerManagementObserver # Automatically imports platform-speci... | tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/power/__init__.py | Python | agpl-3.0 | 1,441 |
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-
#############################################################################
#
# Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | funkring/fdoo | addons-funkring/official_holiday/wizard/official_holiday_wizard.py | Python | agpl-3.0 | 2,655 |
# -*- coding: utf-8 -*-
"""
Interactive wizard to guide user to set up EFB and modules.
Since newer version of pip (>=9.0), which checks Python version
prior to installation, is already widespread, we are dropping
Python version check in wizard script, and assuming user is
running an appropriate Python version.
"""
i... | blueset/ehForwarderBot | ehforwarderbot/wizard.py | Python | agpl-3.0 | 28,382 |
import inspect
import os
import sys
from datetime import timedelta
from io import StringIO
from unittest.mock import Mock
from urllib.error import HTTPError
import django
import django.db
import django.test.runner
import django.test.testcases
import django.test.utils
from django.test import TestCase
from aid.test.dat... | andersroos/rankedftw | aid/test/base.py | Python | agpl-3.0 | 7,615 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2011 Pexego Sistemas Informáticos. All Rights Reserved
# $Omar Castiñeira Saavedra$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | diagramsoftware/l10n-spain | l10n_es_igic/data/__init__.py | Python | agpl-3.0 | 985 |
from django import template
from django.conf import settings
from django.template.defaultfilters import stringfilter
import os
register = template.Library()
@register.filter(name='basename')
@stringfilter
def basename(value):
return os.path.basename(value)
@register.filter(name='replace_macros')
@stringfilter... | troeger/opensubmit | web/opensubmit/templatetags/projecttags.py | Python | agpl-3.0 | 1,869 |
"""Remove any personally identifying information from the database"""
from django.core.management.base import BaseCommand
from django.conf import settings
from django.contrib.admin.models import LogEntry
from django_openid_auth.models import UserOpenID
from rest_framework.authtoken.models import Token
from reversion.mo... | lutris/website | common/management/commands/anon_db.py | Python | agpl-3.0 | 2,839 |
#!/usr/bin/env python
from distutils.core import setup
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setup(
name="wrtfreezer",
version="0.1",
description="A simple utility to mass build OpenWRT images.",
author="Shuhao Wu",
license="AGPL",
url="https://github.com/shuhaowu/wrt... | shuhaowu/wrtfreezer | setup.py | Python | agpl-3.0 | 408 |
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 (a... | nischu7/paramiko | tests/test_buffered_pipe.py | Python | lgpl-2.1 | 2,696 |
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------#
# This file is part of Py-notify. #
# #
# Copyright (C) 2006, 2007, 2008 Paul Pogonyshev. #
# ... | berinhard/py-notify | notify/utils.py | Python | lgpl-2.1 | 11,952 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
import pycurl
import unittest
import sys
try:
import urllib.parse as urllib_parse
except ImportError:
import urllib as urllib_parse
from . import appmanager
from . import util
setup_module, teardown_module = appmanager.setup(('app', 8380))
class Re... | andrewleech/script.module.pycurl | lib/pycurl/pycurl-7.19.5.1/tests/reset_test.py | Python | lgpl-2.1 | 2,691 |
#!/usr/bin/python3
"""
Copyright 2012-2013 YouView TV Ltd.
2014-2017 stb-tester.com Ltd.
License: LGPL v2.1 or (at your option) any later version (see
https://github.com/stb-tester/stb-tester/blob/master/LICENSE for details).
"""
import argparse
import sys
import _stbt.core
from _stbt import imgproc_cache
... | stb-tester/stb-tester | stbt_run.py | Python | lgpl-2.1 | 2,110 |
#!/usr/bin/python
## image-to-gcode 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. image-to-gcode is distributed in the hope
## ... | yishinli/emc2 | src/emc/usr_intf/axis/scripts/image-to-gcode.py | Python | lgpl-2.1 | 26,563 |
##############################################################################
# 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... | skosukhin/spack | var/spack/repos/builtin.mock/packages/a/package.py | Python | lgpl-2.1 | 2,262 |
# -*- coding: utf8 -*-
# Extract entities from text
#
# Author: Romary Dupuis <romary.dupuis@altarika.com>
#
# Copyright (C) 2016 Romary Dupuis
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
from commis import Command
from commis import color
from feet.entities.extractor import Extractor... | Altarika/feet | feet/commands/extract.py | Python | lgpl-2.1 | 2,821 |
#! /usr/bin/env python
"""
Sample for python PCSC wrapper module: send a Control Code to a card or
reader
__author__ = "Ludovic Rousseau"
Copyright 2007-2010 Ludovic Rousseau
Author: Ludovic Rousseau, mailto:ludovic.rousseau@free.fr
This file is part of pyscard.
pyscard is free software; you can redistribute it and... | moreati/pyscard | smartcard/Examples/scard-api/sample_control.py | Python | lgpl-2.1 | 4,389 |
##############################################################################
# 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... | TheTimmy/spack | var/spack/repos/builtin/packages/r-limma/package.py | Python | lgpl-2.1 | 1,617 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import slopos
class TestTagger(unittest.TestCase):
def setUp(self):
slopos.load_from_path("slopos/sl-tagger.pickle")
def testSentenceTagging(self):
tagged = slopos.tag("To je test.")
self.assertEqual(tagge... | izacus/slo_pos | tests.py | Python | lgpl-2.1 | 987 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import argparse
import datetime
import time
import gettext
from pseudo_cluster.task import Task_record
from pseudo_cluster.tasks_list import Tasks_list
from pseudo_cluster.extended_task import Extended_task_record
from pseudo_cluster.actions_list impor... | pseudo-cluster/pseudo-cluster | scripts/run_pseudo_tasks_slurm.py | Python | lgpl-2.1 | 7,019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.