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
import web import time import timeit from collections import deque from sys import exit, exc_info, argv import math import os localport = os.environ.get('PORT', 8080) from cStringIO import StringIO clock = timeit.default_timer; web.config.debug = False; urls = ( '/u','controller', '/u2','controller2', '/...
slremy/bioinspiredbackend
websingleton.py
Python
gpl-3.0
12,276
# coding: utf-8 natural_language = [ 'Natural Language :: Portuguese (Brazilian)', ]
hiatobr/Paloma
src/setup/classifiers/natural_language.py
Python
gpl-3.0
90
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@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...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/favourites_manager.py
Python
gpl-3.0
2,043
import sys from gossip import Node if __name__ == '__main__': server_port = sys.argv[1] peers = sys.argv[2:] n = Node(server_port, peers) while True: pass
abdelwas/GossipPubSub
subscriber.py
Python
gpl-3.0
183
"""Askbot template context processor that makes some parameters from the django settings, all parameters from the askbot livesettings and the application available for the templates """ from django.conf import settings import askbot from askbot import api from askbot.conf import settings as askbot_settings from askbot....
aavrug/askbot-devel
askbot/context.py
Python
gpl-3.0
1,070
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org> # Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import...
h3biomed/ansible
lib/ansible/modules/crypto/openssl_certificate.py
Python
gpl-3.0
79,027
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Transform OEB content into RB compatible markup. ''' import re from calibre import prepare_string_for_xml from calibre.ebooks.rb import unique_name TAGS = [ 'b', ...
Eksmo/calibre
src/calibre/ebooks/rb/rbml.py
Python
gpl-3.0
7,383
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-25 12:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('venue', '0005_auto_20170916_0701'), ] operations = [ migrations.CreateModel...
tornadoalert/kmcoffice
venue/migrations/0006_eventcalander.py
Python
gpl-3.0
725
import logging from django.utils.html import format_html import django_tables2 as tables from django_tables2.rows import BoundPinnedRow, BoundRow logger = logging.getLogger(__name__) # A cheat to force BoundPinnedRows to use the same rendering as BoundRows # otherwise links don't work # BoundPinnedRow._get_and_ren...
sdolemelipone/django-crypsis
crypsis/tables.py
Python
gpl-3.0
4,778
from os import path s1 = 'one seven three five one six two six six seven' s2 = 'four zero two nine one eight five nine zero four' s3 = 'one nine zero seven eight eight zero three two eight' s4 = 'four nine one two one one eight five five one' s5 = 'eight six three five four zero two one one two' s6 = 'two three nine z...
georgesterpu/pyVSR
pyVSR/ouluvs2/scripts/create_labels.py
Python
gpl-3.0
1,947
# Created By: Eric Mc Sween # Created On: 2007-12-12 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
fokusov/moneyguru
core/model/date.py
Python
gpl-3.0
21,665
import sys import os import time import serial #DTR0 - blue DATA #RTS0 - purple STB RX #DTR1 - (blue on 232 side) then green CLK #CTS0 - black LD #RTS1 - purple STB TX delay=0.001 def getserials(): s0 = serial.Serial("/dev/ttyUSB0") s1 = serial.Serial("/dev/ttyUSB1") return (s0,s1) def test(): per...
johngumb/danphone
wavetx2.py
Python
gpl-3.0
2,677
from django.core.management import BaseCommand from django.db.models import Count from zds.notification.models import Subscription class Command(BaseCommand): help = "Delete all but last duplicate subscriptions" def handle(self, *args, **options): self.stdout.write("Starting uniquifying subscription...
ChantyTaguan/zds-site
zds/notification/management/commands/uniquify_subscriptions.py
Python
gpl-3.0
1,008
#!/usr/bin/env python # -*- coding: utf-8 -*- ##This file is part of pySequence ############################################################################# ############################################################################# ## ## ## ...
cedrick-f/pySequence
src/lien.py
Python
gpl-3.0
36,961
from ..base import BaseShortener from ..exceptions import ShorteningErrorException class Shortener(BaseShortener): """ TinyURL.com shortener implementation Example: >>> import pyshorteners >>> s = pyshorteners.Shortener() >>> s.tinyurl.short('http://www.google.com') 'http...
ellisonleao/pyshorteners
pyshorteners/shorteners/tinyurl.py
Python
gpl-3.0
1,019
################################################################################################### # Author: Jodi Jones <venom@gen-x.co.nz> # URL: https://github.com/VeNoMouS/Sick-Beard # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of t...
AlexBoogaard/Sick-Beard-Torrent-Edition
sickbeard/providers/bithdtv.py
Python
gpl-3.0
11,100
class Solution(object): def twoSum(self, nums, target): lookup = {} for i, num in enumerate(nums): if target - num in lookup: return [lookup[target - num], i] lookup[num] = i return [] if __name__ == '__main__': print Solution().twoSum((0, 2, 7, 1...
ravyg/algorithms
python/1_twoSum.py
Python
gpl-3.0
331
# coding: utf-8 import os from UserDict import DictMixin from fnmatch import fnmatch from datetime import datetime from datetime import date import pytz from pyramid.threadlocal import get_current_registry from pyramid.traversal import resource_path from sqlalchemy import Boolean from sqlalchemy import Column from sq...
toway/towaymeetups
mba/resources.py
Python
gpl-3.0
34,486
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def findTilt(self, root): """ :type root: TreeNode :rtype: int """ def dfs(root):...
zqfan/leetcode
algorithms/563. Binary Tree Tilt/solution.py
Python
gpl-3.0
585
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './QtGUI.ui' # # Created: Sat Oct 11 18:25:23 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from gui.LrBase.main import * try: _fromUtf8 = QtCore...
Rareson/LammpsRelated
gui.py
Python
gpl-3.0
7,329
#!/usr/bin/env python # License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net> from typing import TYPE_CHECKING, Optional from .base import ( MATCH_TAB_OPTION, ArgsType, Boss, PayloadGetType, PayloadType, RCOptions, RemoteCommand, ResponseType, Window ) if TYPE_CHECKING: from kitty.cli_st...
kovidgoyal/kitty
kitty/rc/focus_tab.py
Python
gpl-3.0
1,267
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "commanding_velocity" PROJECT_SPACE_DI...
lukeexton96/Robotics
catkin_ws/build/commanding_velocity/catkin_generated/pkg.installspace.context.pc.py
Python
gpl-3.0
386
#!/usr/bin/python import pypm, sys, time DEV_NAME = 'nanoPAD2 MIDI 1' OUT_NAME = 'fs' #OUT_NAME = 'MIDI IN' #OUT_NAME = 'Synth input port (20116:0)' FIRST_NOTE = 24 + 4 # E, not C SECOND_NOTE = FIRST_NOTE + 5 PADS1 = range(51, 35, -2) PADS2 = range(50, 34, -2) shorten_bools = lambda bool_list: ''.join(('0' if b else...
t184256/soundcontrol
nanopad2/test.py
Python
gpl-3.0
3,864
# -*- coding: utf-8 -*- # Aplicación web que gestiona los datos a completar en el formulario de Declaración Jurada de Generación de Residuos Sólidos Urbanos No Domiciliarios para presentar en la Intendencia de Montevideo # Copyright (C) 2016 LKSur S.A. # # Este programa es software libre: usted puede redistribuirlo y...
LKSur/gestion-residuos
modules/app/utils.py
Python
gpl-3.0
16,591
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np import astropy.units as u from .utils import norm_vector, e2h __all__ = ['polarization_vectors', 'Q_reflection', 'paralleltransport_matrix', 'parallel_transport'] def polarization_vectors(dir_array, angles): '''Converts polarization...
Chandra-MARX/marxs
marxs/math/polarization.py
Python
gpl-3.0
6,636
# -*- coding: utf-8 -*- # TextGridTools -- Read, write, and manipulate Praat TextGrid files # Copyright (C) 2013-2014 Hendrik Buschmeier, Marcin Włodarczak # # 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...
hbuschme/TextGridTools
tgt/tests/test_core.py
Python
gpl-3.0
33,889
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-09 18:13 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bot', '0013_auto_20171109_1759'), ] operations = [ migratio...
foxcarlos/decimemijobot
bot/migrations/0014_auto_20171109_1813.py
Python
gpl-3.0
694
#!/usr/bin/env python # rsak - Router Swiss Army Knife # Copyright (C) 2011 Pablo Castellano <pablo@anche.no> # # 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, o...
PabloCastellano/rsak
src/routermodelbase.py
Python
gpl-3.0
1,149
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
jakubbrindza/gtg
GTG/backends/__init__.py
Python
gpl-3.0
8,418
# coding=utf-8 """ This file is used to make a crawl """ import __init__ import os import re import urllib from utility import prgbar def get_html(url): """Get the html """ page = urllib.urlopen(url) html = page.read() return html def get_pdf(html): """ xxx""" reg = r'href="(.+?\.pdf)">pdf'...
JustJokerX/PaperCrawler
COLT/COLT2015.py
Python
gpl-3.0
1,083
# pyGeoNet_readGeotiff #import sys #import os from osgeo import gdal #from string import * import numpy as np from time import clock import pygeonet_defaults as defaults import pygeonet_prepare as Parameters from math import modf, floor #from scipy.stats.mstats import mquantiles def read_dem_from_geotiff(demFileName...
harish2rb/pyGeoNet
test/test_pygeonet_processing.py
Python
gpl-3.0
4,709
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver from splinter.driver.webdriver.remote import WebDriver as Re...
ritashugisha/OmniTube
splinter/browser.py
Python
gpl-3.0
1,638
from setuptools import setup#, find_packages, Extension import distutils.command.build as _build import setuptools.command.install as _install import sys import os import os.path as op import distutils.spawn as ds import distutils.dir_util as dd import posixpath def run_cmake(arg=""): """ Forcing to run cmak...
vulogov/zq
setup.py
Python
gpl-3.0
3,597
# # core.py # # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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....
s0undt3ch/Deluge
deluge/plugins/Execute/deluge/plugins/execute/core.py
Python
gpl-3.0
5,677
''' Created on Oct 29, 2015 @author: yangke ''' from model.TaintVar import TaintVar from TraceTrackTest import TraceTrackTest class Test_objdump_addr: def test(self): passed_message="BINUTILS-2.23 'addr[1]' TEST PASSED!" not_pass_message="ERRORS FOUND IN BINUTILS-2.23 'addr[1]' TEST!" answe...
yangke/cluehunter
test/Test_objdump_addr.py
Python
gpl-3.0
852
# coding=utf-8 import traceback from flask_babel import lazy_gettext from mycodo.config import SQL_DATABASE_MYCODO from mycodo.databases.models import Conversion from mycodo.databases.models import DeviceMeasurements from mycodo.databases.utils import session_scope from mycodo.inputs.base_input import AbstractInput f...
kizniche/Mycodo
mycodo/inputs/ads1256_analog_ph_ec.py
Python
gpl-3.0
31,269
//codecademy course answer #Set eggs equal to 100 using exponentiation on line 3! eggs = 10 ** 2 print eggs
nurhandipa/python
codecademy/exponentiation.py
Python
gpl-3.0
111
import sys from core import loop from util import jsonmanager, debug def make_console_menu(name): menu_data_file_path = '_Resources/Data/MenuData/' path = menu_data_file_path + name + '.json' data = jsonmanager.get_data(path) title = data['Title'] item_data = data['Items'] args = [] for...
monodokimes/pythonmon
core/menu.py
Python
gpl-3.0
1,737
#!/usr/bin/python3 import sys from lxml import html import urllib3 import re http = urllib3.PoolManager() baseUrl = 'http://scoreboard.uscyberpatriot.org/' scoresPage = html.fromstring(http.request('GET', baseUrl + 'team.php?team=' + sys.argv[1]).data) # XPath for chart script: /html/body/div[2]/div/script[1] char...
glen3b/CyberPatriotScoreboardParser
scoreovertime.py
Python
gpl-3.0
756
from buildpal_client import compile as buildpal_compile import os import subprocess import asyncio import sys import struct import threading import pytest from buildpal.common import MessageProtocol class ProtocolTester(MessageProtocol): @classmethod def check_exit_code(cls, code): if ...
pkesist/buildpal
Python/test/test_client.py
Python
gpl-3.0
4,561
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-12-09 00:06 from __future__ import unicode_literals from django.conf import settings import django.core.files.storage from django.db import migrations, models import django.db.migrations.operations.special import django.db.models.deletion import django.util...
MozillaSecurity/FuzzManager
server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py
Python
mpl-2.0
15,946
""" Setup file. """ import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: README = f.read() requires = ['cornice', 'metlog-py', 'mozsvc', 'PasteScript', 'waitress', 'PyBrowserID', 'Requests', 'webtest'] setup(nam...
ncalexan/server-fxap
setup.py
Python
mpl-2.0
1,001
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/ from __future__ import division, absolute_import, print_function, unicode_literals import OpenSSL im...
Drewsif/OpenVPN-Config-Generator
OpenVPNConfig.py
Python
mpl-2.0
14,441
# 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 https://mozilla.org/MPL/2.0/. import pytest import math as m import numpy as np from sisl import Spin pytestmark = [pytest.mark.physics, pytest.ma...
zerothi/sisl
sisl/physics/tests/test_spin.py
Python
mpl-2.0
4,252
# 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/. """ Rudimentary system stats collection using ``psutil``. """ import time from switchy import event_callback, utils def...
sangoma/switchy
switchy/apps/measure/sys.py
Python
mpl-2.0
3,923
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
ClearCorp/account-financial-tools
account_multicompany_usability/__openerp__.py
Python
agpl-3.0
1,507
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
ksrajkumar/openerp-6.1
openerp/addons/itara_multi_payment/__init__.py
Python
agpl-3.0
1,080
# encoding: utf-8 """Tests of Branding API """ from __future__ import absolute_import, unicode_literals import mock from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse from branding.api import _footer_business_links, get_foo...
jolyonb/edx-platform
lms/djangoapps/branding/tests/test_api.py
Python
agpl-3.0
10,470
# # Copyright (C) 2014 Jonathan Finlay <jfinlay@riseup.net> # # 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 la...
jonathanf/infosalud
visit/visit.py
Python
agpl-3.0
3,450
import sys for m in range(0, 2): n = raw_input() for i in range(0, int(n)): print "\x11" + str(m) + ": " + raw_input() + "\x11" #sys.stdout.flush()
pniedzielski/fb-hackathon-2013-11-21
src/pythonCode.py
Python
agpl-3.0
155
# -*- coding: utf-8 -*- import StringIO import csv from xml.etree.ElementTree import Element, SubElement, Comment, tostring from xml.dom import minidom import configdb def prettify(elem): """Return a pretty-printed XML string for the Element. """ rough_string = tostring(elem, 'utf-8') reparsed = mini...
Som-Energia/invoice-janitor
Taxes/municipaltax.py
Python
agpl-3.0
9,574
import ckanext.deadoralive.config as config import ckanext.deadoralive.tests.helpers as custom_helpers class TestConfig(custom_helpers.FunctionalTestBaseClass): def test_that_it_reads_settings_from_config_file(self): """Test that non-default config settings in the config file work.""" # These non...
ckan/ckanext-deadoralive
ckanext/deadoralive/tests/test_config.py
Python
agpl-3.0
572
import datetime import decimal from django.test import TestCase from django.core.cache import cache from httmock import HTTMock from django_dynamic_fixture import G, N from postnl_checkout.contrib.django_postnl_checkout.models import Order from .base import PostNLTestMixin class OrderTests(PostNLTestMixin, TestC...
dokterbob/python-postnl-checkout
tests/test_django.py
Python
agpl-3.0
13,320
from django.conf.urls import url from ..views import (PowerCycleListView, PowerCycleCreateView, PowerCycleDetailView, PowerCycleUpdateView, PowerCycleDeleteView) from django.contrib.auth.decorators import login_required urlpatterns = [ url(r'^create/$', # NOQA login_required(PowerCyc...
Hattivat/hypergolic-django
hypergolic/catalog/urls/power_cycle_urls.py
Python
agpl-3.0
826
# Standard Library Imports # 3rd Party Imports # Local Imports from PokeAlarm.Utils import get_gmaps_link, get_applemaps_link, \ get_waze_link, get_dist_as_str, get_team_emoji, get_ex_eligible_emoji from . import BaseEvent from PokeAlarm import Unknown class GymEvent(BaseEvent): """ Event representing the cha...
kvangent/PokeAlarm
PokeAlarm/Events/GymEvent.py
Python
agpl-3.0
3,808
############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino # # The licence is in the file __manifest__.py # ###########################################...
CompassionCH/compassion-switzerland
website_event_compassion/controllers/events_controller.py
Python
agpl-3.0
14,186
""" Script to process pytest warnings output by pytest-json-report plugin and output it as a html """ import argparse import io import itertools import json import os import re from collections import Counter from write_to_html import ( HtmlOutlineWriter, ) # noqa pylint: disable=import-error,useless-suppression...
msegado/edx-platform
openedx/core/process_warnings.py
Python
agpl-3.0
9,900
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # 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 ver...
taigaio/taiga-back
taiga/base/utils/diff.py
Python
agpl-3.0
1,614
# -*- coding: utf-8 -*- """ Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U This file is part of Orion Context Broker. Orion Context Broker 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,...
jmcanterafonseca/fiware-orion
test/acceptance/behave/components/common_steps/general_steps.py
Python
agpl-3.0
18,232
# pylint: disable=unused-import """ Python APIs exposed by the bulk_email app to other in-process apps. """ # Public Bulk Email Functions from __future__ import absolute_import from bulk_email.models_api import ( is_bulk_email_enabled_for_course, is_bulk_email_feature_enabled, is_user_opted_out_for_course...
ESOedX/edx-platform
lms/djangoapps/bulk_email/api.py
Python
agpl-3.0
899
from flask import Flask __version__ = '0.1.1' app = Flask(__name__) app.config.from_object('frijoles.default_settings') app.config.from_envvar('FRIJOLES_SETTINGS', silent=True) import frijoles.views
Antojitos/frijoles
src/frijoles/__init__.py
Python
agpl-3.0
202
#!/usr/bin/python # -*- coding: UTF-8 -*- # Normalize soundfiles in a folder, and write them to a new folder # called normalized/ # Import Python modules import contextlib import os import shutil import sys import wave # Import user modules def normalize(): """ Normalizes a set of sound files to norm-To dB return ...
elerno/cascaBell
normalizeFiles.py
Python
agpl-3.0
1,436
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from django.sho...
sunnychaudhari/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/course.py
Python
agpl-3.0
54,618
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('search', '0008_auto_20151117_1526'), ] operations = [ migrations.AlterField( model_name='docket', na...
brianwc/courtlistener
cl/search/migrations/0009_auto_20151210_1124.py
Python
agpl-3.0
734
""" Answers with an Error message to a previous Error message. """ import copy import random from src import Msg from src import SomeIPPacket from src.attacks import AttackerHelper def sendErrorOnError(a, msgOrig): """ Attack Specific Function. """ sender = msgOrig.receiver receiver = msgOrig.sender ...
Egomania/SOME-IP_Generator
src/attacks/sendErrorOnError.py
Python
agpl-3.0
1,693
# Copyright 2014-2015 Tecnativa S.L. - Jairo Llopis # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2017 Tecnativa S.L. - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Partner Contact Department", "summary": "Assign contacts to departments", "vers...
OCA/partner-contact
partner_contact_department/__manifest__.py
Python
agpl-3.0
765
from .common import * INTERNAL_IPS = ['127.0.0.1', ] CORS_ORIGIN_WHITELIST = ( 'localhost:8000', ) CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', } } Q_CLUSTER = { 'name': 'DjangORM', 'workers': 2, 'timeout': 90, 'retry': 120, 'queue_limit': 5...
spacedogXYZ/sms_checkin
sms_checkin/settings/development.py
Python
agpl-3.0
883
"""Tests covering utilities for integrating with the catalog service.""" # pylint: disable=missing-docstring from __future__ import absolute_import from collections import defaultdict from datetime import timedelta import mock import six from django.contrib.auth import get_user_model from django.core.cache import ca...
ESOedX/edx-platform
openedx/core/djangoapps/catalog/tests/test_utils.py
Python
agpl-3.0
34,566
from django.db import migrations class Migration(migrations.Migration): dependencies = [("uk_results", "0022_postresult_confirmed_resultset")] operations = [ migrations.AlterModelOptions( name="candidateresult", options={"ordering": ("-num_ballots_reported",)}, ) ...
DemocracyClub/yournextrepresentative
ynr/apps/uk_results/migrations/0023_auto_20160505_1636.py
Python
agpl-3.0
322
# -*- coding: utf-8 -*- """ Code to manage fetching and storing the metadata of IdPs. """ #pylint: disable=no-member from celery.task import task # pylint: disable=import-error,no-name-in-module import datetime import dateutil.parser import logging from lxml import etree import requests from onelogin.saml2.utils impor...
mushtaqak/edx-platform
common/djangoapps/third_party_auth/tasks.py
Python
agpl-3.0
6,642
from tests.api import auth_for from tests.data import add_fixtures, clubs, users def test_lva(db_session, client): lva = clubs.lva(owner=users.john()) add_fixtures(db_session, lva) res = client.get("/clubs/{id}".format(id=lva.id)) assert res.status_code == 200 assert res.json == { "id": l...
skylines-project/skylines
tests/api/views/clubs/read_test.py
Python
agpl-3.0
1,643
import os import shutil import boto from boto.s3.key import Key import subprocess from io import StringIO from django.core.management.base import BaseCommand from django.core.management import call_command from django.conf import settings from django.utils import timezone from django.core.mail import send_mail from c...
BirkbeckCTP/janeway
src/utils/management/commands/backup.py
Python
agpl-3.0
5,466
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- #Copyright (c) 1986 Nick Wong. #Copyright (c) 2016-2026 TP-NEW Corp. # License: TP-NEW (www.tp-new.com) __author__ = "Nick Wong" """ 用asyncio提供的@asyncio.coroutine可以把一个generator标记为coroutine类型,然后在coroutine内部用yield from调用另一个coroutine实现异步操作 从Python 3.5开始引入了新的语法async和await,可以...
nick-huang-cc/GraffitiSpaceTT
UnderstandStudyPython/IO_coroutine_stu1.py
Python
agpl-3.0
1,188
import numpy as np import pandas as pd import xarray as xr from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela from tikon.central.res import Resultado from tikon.datos import Obs from tikon.utils import EJE_TIEMPO, EJE_PARC f_inic = '2000-01-01' crds = {'eje 1': ['a', 'b'], 'eje 2': ['x', 'y', 'z']}...
julienmalard/Tikon
pruebas/test_central/rcrs/modelo_valid.py
Python
agpl-3.0
1,156
import logging import tmlib.models as tm class SubmissionManager(object): '''Mixin class for submission and monitoring of computational tasks.''' def __init__(self, experiment_id, program_name): ''' Parameters ---------- experiment_id: int ID of the processed expe...
TissueMAPS/TmLibrary
tmlib/submission.py
Python
agpl-3.0
1,761
from __future__ import absolute_import from __future__ import division import os, traceback, math, re, zlib, base64, time, sys, platform, glob, string, stat import cPickle as pickle if sys.version_info[0] < 3: import ConfigParser else: import configparser as ConfigParser from Cura.util import resources from Cura.ut...
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/Cura/util/profile2.py
Python
agpl-3.0
23,092
############################################################################## # # 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-Louvain
learning_unit/api/serializers/learning_unit.py
Python
agpl-3.0
6,633
from IPython import embed import annotateit from annotateit import model, db, es from flask import g def main(): app = annotateit.create_app() with app.test_request_context(): g.user = model.User.fetch('admin') embed(display_banner=False) if __name__ == '__main__': main()
openannotation/annotateit
console.py
Python
agpl-3.0
306
from django.conf import settings from rest_framework import viewsets from rest_framework.response import Response import snotes20.models as models class EditorViewSet(viewsets.ViewSet): def list(self, request): return Response([ { 'short': short, 'long': long, ...
shownotes/snotes20-restapi
snotes20/views/EditorViewSet.py
Python
agpl-3.0
444
from .AugmentedWeapon import AugmentedWeapon from .Cloaked import Cloaked from .Ethereal import Ethereal from .Muted import Muted from .TemporaryIllumination import TemporaryIllumination from .Undead import Undead from .HealthDrain import HealthDrain __all__ = [ "AugmentedWeapon", "Cloaked", "Ethereal", ...
etkirsch/legends-of-erukar
erukar/content/conditions/magical/__init__.py
Python
agpl-3.0
394
# coding=utf-8 __author__ = "Daniel Arroyo <daniel@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import logging import threading import time import os from octoprint.server import eventManager from octoprint.events import Events from octoprint.settings import...
AstroPrint/AstroBox
src/astroprint/network/mac_dev.py
Python
agpl-3.0
5,835
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import politube.views urlpatterns = patterns('', url(r'^$', politube.views.home, name='home'), url(r'^about/', politube.views.about, name='about'), ...
gdesmott/politube
politube/urls.py
Python
agpl-3.0
710
# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) from odoo.exceptions import ValidationError from odoo.addons.analytic_tag_dimension.tests.test_analytic_dimension import ( TestAnalyticDimensionBase, ) class TestAnalyticDimensionCase(T...
OCA/account-analytic
analytic_tag_dimension_enhanced/tests/test_analytic_dimension.py
Python
agpl-3.0
7,081
# coding=utf-8 """Ingest workflow management tool FileNameSource Class """ __copyright__ = "Copyright (C) 2016 University of Maryland" __license__ = "GNU AFFERO GENERAL PUBLIC LICENSE, Version 3" import abc import os import sys import psycopg2 class FileNameSource: def __init__(self): pass def __ite...
UMD-DRASTIC/drastic
drastic/DrasticLoader/FileNameSource.py
Python
agpl-3.0
7,914
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Region.region_code' db.alter_column('region', 'region_...
SeedScientific/polio
datapoints/migrations/0039_auto__chg_field_region_region_code.py
Python
agpl-3.0
15,288
from itertools import repeat, chain from operator import itemgetter from django.db.models import Count, Sum, Case, When, IntegerField, Value, FloatField from django.db.models.expressions import CombinedExpression from django.http import JsonResponse from django.shortcuts import render from django.utils.translation imp...
monouno/site
judge/views/stats.py
Python
agpl-3.0
3,624
# -*- coding:Utf-8 -*- from django.conf import settings from django.core.urlresolvers import is_valid_path from django.http import HttpResponseRedirect from django.utils.cache import patch_vary_headers from django.utils import translation from django.middleware.locale import LocaleMiddleware from corsheaders.middlewar...
Naeka/vosae-app
www/middleware.py
Python
agpl-3.0
2,513
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResUsers(models.Model): _inherit = 'res.users' has_group_warning_account = fields.Boolean( 'A warning can be set on a partner (Account)', compute='_compute_groups_...
maxive/erp
addons/account/models/res_users.py
Python
agpl-3.0
933
#!/usr/bin/env python # Copyright(C) 2012 thomasv@gitorious # 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. # # ...
creditbit/electrum-creditbit-server
run_electrum_creditbit_server.py
Python
agpl-3.0
11,252
""" Test cases to cover Accounts-related serializers of the User API application """ import logging from django.test import TestCase from django.test.client import RequestFactory from testfixtures import LogCapture from openedx.core.djangoapps.user_api.accounts.serializers import UserReadOnlySerializer from common....
stvstnfrd/edx-platform
openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py
Python
agpl-3.0
2,122
############################################################################## # # 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
program_management/ddd/repositories/program_tree_version.py
Python
agpl-3.0
19,400
# -*- coding: utf-8 -*- # Copyright 2019 OpenSynergy Indonesia # Copyright 2022 PT. Simetri Sinergi Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "New Assignment Career Transition " "Integration With Timesheet Computation", "version": "8.0.1.0.0", "category": "Human...
open-synergy/opnsynid-hr
hr_assignment_transition_timesheet_computation/__openerp__.py
Python
agpl-3.0
655
# Django specific from django.db.models import Q # Tastypie specific from tastypie import fields from tastypie.constants import ALL from tastypie.resources import ModelResource from tastypie.serializers import Serializer # Data specific from iati.models import Activity from api.v3.resources.helper_resources import Ti...
schlos/OIPA-V2.1
OIPA/api/v3/resources/activity_list_resources.py
Python
agpl-3.0
4,609
# Nessus results viewing tools # # Developed by Felix Ingram, f.ingram@gmail.com, @lllamaboy # http://www.github.com/nccgroup/lapith # # Released under AGPL. See LICENSE for more information import wx import os from model.Nessus import NessusFile, NessusTreeItem, MergedNessusReport, NessusReport, NessusItem ...
nccgroup/lapith
controller/viewer_controller.py
Python
agpl-3.0
22,502
# Generated by Django 2.2.12 on 2020-04-29 05:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('edxval', '0001_squashed_0016_add_transcript_credentials_model'), ] operations = [ migrations.AddField( model_name='video', ...
edx/edx-val
edxval/migrations/0002_add_error_description_field.py
Python
agpl-3.0
464
# -*- coding: utf-8 -*- # import the main window object (mw) from ankiqt from aqt import mw # import the "show info" tool from utils.py from aqt.utils import showInfo # import all of the Qt GUI library from aqt.qt import * from anki.exporting import * from anki.hooks import addHook class LatexNoteExporter(Exporter): ...
TentativeConvert/LaTeX-Note-Importer-for-Anki
Anki 2.1/latexbiport/latexexport.py
Python
agpl-3.0
4,809
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase from models import Place class SimpleTest(TestCase): def test_simple_place_creation(self): ...
TheCodingMonkeys/checkin-at-fmi
checkinatfmi_project/university/tests.py
Python
agpl-3.0
694
""" Users API URI specification """ from django.conf import settings from django.conf.urls import url from django.db import transaction from edx_solutions_api_integration.users import views as users_views from rest_framework.urlpatterns import format_suffix_patterns COURSE_ID_PATTERN = settings.COURSE_ID_PATTERN url...
edx-solutions/api-integration
edx_solutions_api_integration/users/urls.py
Python
agpl-3.0
3,599
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
CLVsol/odoo_addons
clv_medicament_template/history/clv_medicament_template_history.py
Python
agpl-3.0
4,727
from django import forms from django.utils.html import escape from django.forms.utils import ErrorList from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from booktype.utils.misc import booktype_slugify from booki.editor.models import BookiGroup from booktype.ut...
MiczFlor/Booktype
lib/booktype/apps/portal/forms.py
Python
agpl-3.0
2,755