code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
import sys, os
import time
import traceback
from dfu.log_handler import TimestampLogger
import Nordicsemi
class MasterEmulator(object):
""" Master Emulator DLL wrapper. """
def __init__(self, peer_device_address):
self.peer_device_address = peer_device_address
self.num_of_errors = 0
... | DroneBucket/Drone_Bucket_CrazyFlie2_NRF_Firmware | nrf51_sdk/nrf51822/Board/nrf6310/device_firmware_updates/ble_dfu_send_hex/dfu/master_emulator.py | Python | gpl-3.0 | 8,856 |
# -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... | dasbruns/netzob | src/netzob/NetzobResources.py | Python | gpl-3.0 | 3,333 |
import sqlite3
_conexion = sqlite3.connect('universidad.db')
with _conexion:
_cursor = _conexion.cursor()
nueva_carrera = ('Lic. Educacion Fisica', '1005')
_cursor.execute('UPDATE alumno SET carrera = ? WHERE cuenta = ?', nueva_carrera)
# Innecesario
#_conexion.commit()
#_conexion.close() | UNAH-SISTEMAS/2017-2PAC-POO | 301_base_datos/301_4_update.py | Python | gpl-3.0 | 305 |
# 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/_synoname.py | Python | gpl-3.0 | 27,047 |
############################################################################
#
# Program: GDCM (Grassroots DICOM). A DICOM library
#
# Copyright (c) 2006-2011 Mathieu Malaterre
# All rights reserved.
# See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
#
# This software is distributed ... | gbook/nidb | src/gdcm/Testing/Source/MediaStorageAndFileFormat/Python/TestIPPSorter.py | Python | gpl-3.0 | 741 |
#!/usr/bin/env python3
"""Module providing parsing and traversal functions, as well as
classes to model parsetree nodes.
Parsetree nodes extend the behaviour of tuples of the following form:
tree ::= (int, (tree | str)*)
This involves two node classes: NonTerminalNode and TerminalNode, both
subclasses of ParseT... | 941design/ptTools | ptTools/parsetree/__init__.py | Python | gpl-3.0 | 4,311 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# BZI documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 3 13:51:27 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autoge... | jerjorg/BZI | docs/source/conf.py | Python | gpl-3.0 | 10,022 |
#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list ... | cs-au-dk/Artemis | WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py | Python | gpl-3.0 | 6,504 |
import subprocess, signal, sys
def play(string):
if (string == 'rick roll'):
p = subprocess.Popen(['mpg123', '../rick.mp3'], stdout=subprocess.PIPE)
if (string == 'cook'):
p = subprocess.Popen(['mpg123', '../cooking.mp3'], stdout=subprocess.PIPE)
if (string == 'kazoo'):
p = subproce... | starfys/furbymt | furby_music.py | Python | gpl-3.0 | 401 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2018 Jonathan Peirce
# Distributed under the terms of the GNU General Public License (GPL).
"""Idea: Run or debug an experiment script using exactly the same code,
i.e., for both testing and online data acquisition. To debug ... | hoechenberger/psychopy | psychopy/hardware/emulator.py | Python | gpl-3.0 | 12,696 |
#!/usr/bin/env python3
'''OpenVG clipping operations (masking and clearing).
Scissoring operations are all performed through the OpenVG context, and
so are found in povg.context.
'''
# Copyright © 2014 Tim Pederick.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | perey/povg | povg/clip.py | Python | gpl-3.0 | 3,472 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
neoTaxonomy - A python API to deal with NCBI taxonomy in a neo4j database
Copyright (C) 2016-2017 Paolo Cozzi <paolo.cozzi@ptp.it>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | bioinformatics-ptp/neoTaxonomy | src/neotaxonomy/Neo4j.py | Python | gpl-3.0 | 20,881 |
import logging
import json
from urllib2 import urlopen, URLError
from urllib import quote
from message.appinfo_message import AppInfoMessage, AppInfoListMessage
class AppInfoGetter(object):
ITUNES_SEARCH_URL = 'https://itunes.apple.com/search?term={term}&media=software'
@classmethod
def search(cls, term... | usersource/anno | anno_gec_server/helper/fetch_app.py | Python | mpl-2.0 | 1,323 |
# 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 . import StorageBase
class ConfigFlags(StorageBase):
""" A fake configuration manager.
Set initial value... | jrconlin/pushsrv_ws | pushsrv_ws/storage/fakeflags.py | Python | mpl-2.0 | 1,258 |
"""mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | dimitrianos/BigDataEurope-EventDetectionService | mysite/urls.py | Python | mpl-2.0 | 832 |
# 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 configman.dotdict import DotDict
import pytest
from socorro.processor.rules.general import (
CPUInfoRule,
... | lonnen/socorro | socorro/unittest/processor/rules/test_general.py | Python | mpl-2.0 | 12,660 |
# 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 sys
import socket
from six.moves import socke... | digidotcom/python-suitcase | suitcase/examples/client_server.py | Python | mpl-2.0 | 2,344 |
from __future__ import print_function, unicode_literals
import operator
from django.conf import settings
from django.db import models, transaction
from django.db.models import Q
from django.db.utils import DatabaseError
from django.utils.html import strip_tags
import bleach
from django_extensions.db.fields.json impor... | CSCI-462-01-2017/bedrock | bedrock/wordpress/models.py | Python | mpl-2.0 | 3,706 |
# 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 logging
import sched
import socket
import ssl
import uuid
try:
from base64 import encodestring as encodebytes... | noisyboiler/wampy | wampy/transports/websocket/connection.py | Python | mpl-2.0 | 13,972 |
from gevent import monkey
monkey.patch_all()
from .calls import TestCallsMixin
from .rooms import TestRoomsMixin
from .websocket import TestWebsocketMixin
from loads.case import TestCase
import os
DEFAULT_SIMPLE_PUSH_URL = "https://call.stage.mozaws.net/"
class TestLoop(TestCallsMixin, TestRoomsMixin, TestWebsocket... | kitcambridge/loop-server | loadtests/loadtest/__init__.py | Python | mpl-2.0 | 1,595 |
from badgekitapiclient import models
from badgekitapiclient.client.utils import context_requires, Generator
def get_systems (client):
options = {
'path': client._path + models.System.path_part,
'filter': 'systems',
'default': [],
'generator': Generator(models.System, client),
}
... | mozilla/badgekit-api-python-client | badgekitapiclient/client/methods/systems.py | Python | mpl-2.0 | 857 |
# 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 ldap
from ldap.filter import filter_format
from django.conf import settings
from django.contrib.auth.models impor... | AdrianGaudebert/elmo | lib/auth/backends.py | Python | mpl-2.0 | 9,276 |
from uuid import uuid4
from datetime import datetime
from flask import (Blueprint, render_template, current_app, request,
flash, url_for, redirect, session, abort)
from flask.ext.mail import Message
from flask.ext.babel import gettext as _
from flask.ext.login import login_required, login_user, curr... | poppingtonic/call-power | call_server/user/views.py | Python | agpl-3.0 | 10,344 |
from argparse import ArgumentParser, RawTextHelpFormatter
import logging.config
import json
import sys
import os
import time
import settings
from openedx_certificates.queue_xqueue import XQueuePullManager
from gen_cert import CertificateGen
from gen_pok_cert import PokCertificateGen
logging.config.dictConfig(settings.... | marcore/edx-certificates | certificate_agent.py | Python | agpl-3.0 | 6,810 |
#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | marionleborgne/nupic.research | projects/image_test/run_mnist_with_noise.py | Python | agpl-3.0 | 11,677 |
from django.conf.urls import patterns, include, url
from django.views.decorators.cache import cache_page
from django.conf import settings
from redactor.forms import FileForm, ImageForm
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns =patterns('... | VikParuchuri/movide | frontend/urls.py | Python | agpl-3.0 | 2,570 |
#
# 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... | frePPLe/frePPLe | freppledb/input/notifications.py | Python | agpl-3.0 | 9,354 |
import time
from django.test import TestCase
from lily.accounts.factories import AccountFactory
from lily.tenant.factories import TenantFactory
class AccountTests(TestCase):
def test_update_modified(self):
"""
Test that the modified date of a case gets set properly.
"""
tenant = T... | HelloLily/hellolily | lily/accounts/tests.py | Python | agpl-3.0 | 654 |
from django.contrib.auth import get_user_model
from django.db import models
# Create your models here.
from django.urls import reverse
class Cohort(models.Model):
title = models.CharField(max_length=50)
slug = models.SlugField()
image = models.ImageField(upload_to='cohorts/')
quote = models.TextField... | pythonprobr/pythonpro-website | pythonpro/cohorts/models.py | Python | agpl-3.0 | 2,524 |
"""Pylm base package"""
__import__('pkg_resources').declare_namespace(__name__)
| nfqsolutions/pylm-registry | pylm/__init__.py | Python | agpl-3.0 | 80 |
from datetime import datetime
import numpy as np
import xarray
from matplotlib.pyplot import figure
from matplotlib.colors import LogNorm
from matplotlib.ticker import LogFormatterMathtext # ,ScalarFormatter
import matplotlib.colors as colors
from typing import Tuple, Sequence, Any
#
from sciencedates.ticks import tic... | scienceopen/meridian-spectrometer-reader | dmsp/plots.py | Python | agpl-3.0 | 5,414 |
"""
Course checklists page.
"""
from bok_choy.page_object import PageObject
from .helpers import parse_course_id
from . import BASE_URL
class ChecklistsPage(PageObject):
"""
Course Checklists page.
"""
name = "studio.checklists"
def url(self, course_id=None): # pylint: disable=W0221
""... | pelikanchik/edx-platform | common/test/acceptance/edxapp_pages/studio/checklists.py | Python | agpl-3.0 | 732 |
import unittest
import numpy
from openquake.commonlib.datastore import DataStore, view
@view.add('key1_upper')
def view_key1_upper(key, dstore):
return dstore['key1'].upper()
class DataStoreTestCase(unittest.TestCase):
def setUp(self):
self.dstore = DataStore()
def tearDown(self):
self.... | g-weatherill/oq-risklib | openquake/commonlib/tests/datastore_test.py | Python | agpl-3.0 | 2,366 |
"""
Helpers for updating DuplicateSuggestion models after merging.
"""
from .models import DuplicateSuggestion
def alter_duplicate_suggestion_post_merge(source_person, dest_person):
# Case 1, the primary and secondary people are the same as the DS
# Because the secondary person is about to get deleted, we n... | DemocracyClub/yournextrepresentative | ynr/apps/duplicates/merge_helpers.py | Python | agpl-3.0 | 1,379 |
from django.db import models
from django.db.models import Q
from django.conf import settings
from search.models import Item, Tag, Person, Community
from search import utils
import functools
SEARCH_SETTINGS = settings.SEARCH_SETTINGS
def retrieve(query, dict_format=False, communities_list=None):
'''
A query c... | ictofnwi/steep | search/retrieval.py | Python | agpl-3.0 | 6,719 |
import couchdb
from couchdb.design import ViewDefinition
import unittest
import requests
from copy import deepcopy
from random import shuffle
host = 'http://localhost'
port = '15996'
url = host + ':' + port
couch = couchdb.Server(url)
class ServerInfoTestCase(unittest.TestCase):
def test_validate_server_sig... | RipcordSoftware/AvanceDB | src/avancedb/test/scripts/python/test.py | Python | agpl-3.0 | 35,229 |
import os
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from collections import Counter, defaultdict
from csv import DictWriter
from pathlib import Path
from tempfile import NamedTemporaryFile
from zipfile import ZipFile, ZIP_DEFLATED
import seaborn as sns
import matplotlib.pyplot as plt
import pa... | cfe-lab/MiCall | micall/utils/scan_run_folders.py | Python | agpl-3.0 | 4,902 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''**********************************************************************
Freeciv-web - the web version of Freeciv. http://play.freeciv.org/
Copyright (C) 2009-2015 The Freeciv-web project
This program is free software: you can redistribute it and/or modify
... | adaxi/freeciv-web | freeciv-proxy/freeciv-proxy.py | Python | agpl-3.0 | 4,847 |
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | gauravjns/taiga-back | taiga/projects/votes/utils.py | Python | agpl-3.0 | 3,248 |
#
# Copyright (c) 2015 ThoughtWorks, Inc.
#
# Pixelated 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.
#
# Pixelated is distrib... | kaeff/pixelated-user-agent | service/pixelated/adapter/mailstore/body_parser.py | Python | agpl-3.0 | 2,298 |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... | SKIRT/PTS | magic/tests/Sources_light/config.py | Python | agpl-3.0 | 1,230 |
# Copyright 2021 Camptocamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# @author: Sébastien Alix <sebastien.alix@camptocamp.com>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl)
from odoo import api, fields, models
class ProductQtyByPackagingMixin(models.AbstractModel):
"""Allow display... | OCA/stock-logistics-warehouse | stock_packaging_calculator/models/product_qty_by_packaging_mixin.py | Python | agpl-3.0 | 2,052 |
# talkatv - Commenting backend for static pages
# Copyright (C) 2012 talkatv contributors, see AUTHORS
#
# 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... | talkatv/talkatv | talkatv/comment/views.py | Python | agpl-3.0 | 1,957 |
import flow.interfaces
import injector
import pkg_resources
@injector.singleton
@injector.inject(i=injector.Injector)
class ServiceLocator(flow.interfaces.IServiceLocator):
def __init__(self):
self._services = {}
def _get_missing_service(self, name):
for ep in pkg_resources.iter_entry_points('... | genome/flow-core | flow/service_locator.py | Python | agpl-3.0 | 794 |
# -*- coding: utf-8 -*-
###############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2009-TODAY Tech-Receptives(<http://www.techreceptives.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the... | mohamedhagag/community-addons | openeducat_erp/op_exam_attendees/op_exam_attendees.py | Python | agpl-3.0 | 1,503 |
""" pgp.py
this is where the armorable PGP block objects live
"""
import binascii
import calendar
import collections
import contextlib
import copy
import functools
import itertools
import operator
import os
import re
import warnings
import weakref
import six
from datetime import datetime
from cryptography.hazmat.pr... | leapcode/leap_mx | src/leap/mx/vendor/pgpy/pgp.py | Python | agpl-3.0 | 98,967 |
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo import fields, models
from odoo.addons import decimal_precision as dp
class StockLocationLimit(models.Model):
_name = 'stock.locatio... | Vauxoo/stock-logistics-warehouse | stock_location_limit_product/models/stock_location_limit.py | Python | agpl-3.0 | 925 |
from flask import Blueprint, request
bg1_40123126_2 = Blueprint('bg1_40123126_2', __name__, url_prefix='/bg1_40123126_2', template_folder='templates')
head_str = '''
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>網際 2D 繪圖</title>
<!-- IE 9: display inline SVG -->
<meta http-equiv="X-UA-... | 2015fallhw/cdw11 | users/b/g1/bg1_40123126_2.py | Python | agpl-3.0 | 30,446 |
# !/usr/bin/python
# -*- coding: cp1252 -*-
#
##################################################################################
#
# Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com)
#
# This program is part of OSRFramework. You can redistribute it and/or modify
# it under the terms of... | i3visio/osrframework | osrframework/wrappers/pending/torsearch.py | Python | agpl-3.0 | 4,687 |
from dmoj.celery import app as celery_app
| DMOJ/site | dmoj/__init__.py | Python | agpl-3.0 | 42 |
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | antoine-de/navitia | source/jormungandr/jormungandr/interfaces/v1/Status.py | Python | agpl-3.0 | 2,891 |
# -*- coding: utf-8 -*-
# Copyright 2013-2014 Victor Amin, http://vamin.net/
"""MESS.DB reset module
This module contains the reset tool class and load function.
"""
from __future__ import print_function
from __future__ import unicode_literals
import glob
import os
import shutil
import sys
from mess.tool import Ab... | vamin/MESS.DB | mess/tools/reset.py | Python | agpl-3.0 | 3,292 |
"""personalhomepage URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
... | sclarson/personal-home-page | personalhomepage/urls.py | Python | agpl-3.0 | 883 |
# -*- coding: utf-8 -*-
# Copyright 2018 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models
| acsone/knowledge | attachment_lock/__init__.py | Python | agpl-3.0 | 160 |
'''
This file is part of Habitam.
Habitam 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.
Habitam is distributed in the hope that ... | habitam/habitam-core | habitam/ui/templatetags/ui_extras.py | Python | agpl-3.0 | 4,017 |
import os, re, time, datetime, csv, sys, json, errno
from upload import upload
import rethinkdb as r
from Bio import SeqIO
import argparse
import subprocess
from parse import parse
from upload import parser
sys.path.append('') # need to import from base
from base.rethink_io import rethink_io
from vdb.flu_upload import... | blab/nextstrain-db | tdb/vidrl_upload.py | Python | agpl-3.0 | 7,050 |
# -*- coding: utf-8 -*-
{'active': False,
'author': 'Ingenieria ADHOC',
'website': 'www.ingadhoc.com',
'category': 'Accounting & Finance',
'data': [
'workflow/account_voucher_workflow.xml',
'views/account_voucher_view.xml',
'security/ir.model.access.csv',
],
'demo': [],
... | dvitme/odoo-addons | account_voucher_double_validation/__openerp__.py | Python | agpl-3.0 | 756 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free soft... | hidext/oemedical | oemedical_emr/models/oemedical_signs_and_symptoms.py | Python | agpl-3.0 | 1,726 |
# Generated by Django 2.2.3 on 2019-07-24 14:28
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_prometheus.models
class Migration(migrations.Migration):
dependencies = [
("payments", "0013_auto_20190724_1628"),
("system_pay", "... | lafranceinsoumise/api-django | agir/system_pay/migrations/0004_auto_20190724_1628.py | Python | agpl-3.0 | 2,865 |
import pyinotify
import time
import os
from pydispatch import dispatcher
from os.path import normpath
from events import PathChannel
from log import Loggable
from listeners import StoreWatchListener, OrganizeListener
from handler import ProblemFileHandler
from organizer i... | radiorabe/airtime | python_apps/media-monitor/mm2/media/monitor/manager.py | Python | agpl-3.0 | 10,547 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-08 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0011_satellite_manual_tle'),
]
operations = [
migrations.AlterField(... | cshields/satnogs-network | network/base/migrations/0012_auto_20160508_1516.py | Python | agpl-3.0 | 602 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Weckan -- Web application using CKAN model
# By: Emmanuel Raviart <emmanuel@raviart.com>
#
# Copyright (C) 2013 Etalab
# http://github.com/etalab/weckan
#
# This file is part of Weckan.
#
# Weckan is free software; you can redistribute it and/or modify
# it under the t... | etalab/weckan | setup.py | Python | agpl-3.0 | 3,243 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010 Wil Mahan <wmahan+fatics@gmail.com>
#
# This file is part of FatICS.
#
# FatICS 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 Lice... | ecolitan/fatics | src/block.py | Python | agpl-3.0 | 1,921 |
# -*- coding: utf-8 -*-
from django.db import models
from entity.models import Workflow, WorkflowMethod, SerializableSimpleEntity, Attribute
class AttributeInAMethod(SerializableSimpleEntity):
'''
'''
attribute = models.ForeignKey(Attribute)
# ASSERT: exactly one out of workflow and implementation_met... | davidegalletti/koa-proof-of-concept | kag/application/models.py | Python | agpl-3.0 | 1,808 |
# Generated by Django 1.11.27 on 2020-01-21 18:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('publisher', '0088_delete_enable_email_notifications_switch'),
]
operations = [
migrations.RemoveField(
model_name='course',
... | edx/course-discovery | course_discovery/apps/publisher/migrations/0089_drop_tables.py | Python | agpl-3.0 | 7,480 |
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.shortcuts import HttpResponse
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('sunobs.views',
(r'^$', 'home'),
(r'^logout/', 'logout_user'),
)
urlpatterns += patterns('sunobs.observat... | tyler46/sunobs | urls.py | Python | agpl-3.0 | 1,133 |
# -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | CLVsol/odoo_addons | clv_medicament_group_member/clv_medicament_group/clv_medicament_group.py | Python | agpl-3.0 | 1,779 |
# -*- coding: utf-8 -*-
from __future__ import division
from datetime import date
from numpy import maximum as max_, minimum as min_
from openfisca_core import columns, reforms
from .. import entities
from ..model.base import dated_function
from ..model.prelevements_obligatoires.impot_revenu import reductions_impot... | benjello/openfisca-france | openfisca_france/reforms/plfr2014.py | Python | agpl-3.0 | 15,296 |
"""Enhanced stat operations for bup."""
import os
import stat as pystat
from bup import _helpers
try:
_bup_utimensat = _helpers.bup_utimensat
except AttributeError, e:
_bup_utimensat = False
try:
_bup_utimes = _helpers.bup_utimes
except AttributeError, e:
_bup_utimes = False
try:
_bup_lutimes = _... | jbaber/bup | lib/bup/xstat.py | Python | lgpl-2.1 | 4,537 |
##############################################################################
# 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/packages/tophat/package.py | Python | lgpl-2.1 | 1,886 |
#!/usr/bin/env python
#! -*- coding: utf-8 -*-
###
# Copyright (c) Rice University 2012
# This software is subject to
# the provisions of the GNU Lesser General
# Public License Version 2.1 (LGPL).
# See LICENCE.txt for details.
###
from rhaptos2.repo import app
d = {
'rhaptos2repo_use_logging':'Y',
'rha... | philschatz/rhaptos2.repo | rhaptos2/repo/tests/tryme.py | Python | lgpl-2.1 | 849 |
import unittest
import sys
# some Python 2.3 unittest compatibility fixes
if not hasattr(unittest.TestCase, 'assertTrue'):
unittest.TestCase.assertTrue = unittest.TestCase.failUnless
if not hasattr(unittest.TestCase, 'assertFalse'):
unittest.TestCase.assertFalse = unittest.TestCase.failIf
if not hasattr(unitte... | fancycode/pylzma | tests/__init__.py | Python | lgpl-2.1 | 1,326 |
#
# p.haul command line arguments parsers
#
import sys
import argparse
import htype
import images
import criu_api
import iters
def parse_client_args():
"""Parse p.haul command line arguments"""
parser = argparse.ArgumentParser("Process HAULer")
parser.set_defaults(pre_dump=iters.PRE_DUMP_AUTO_DETECT)
parser.ad... | arthurlockman/p.haul | phaul/args_parser.py | Python | lgpl-2.1 | 3,115 |
# Copyright 2013 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
from .. import _create_enu... | pwaller/pgi | pgi/cffilib/gir/giarginfo.py | Python | lgpl-2.1 | 1,788 |
#!/usr/bin/env python
"""
Arista Queue Handling
=====================
A set of tools to handle creating a queue of transcodes and running them
one after the other.
License
-------
Copyright 2008 - 2011 Daniel G. Taylor <dan@programmer-art.org>
This file is part of Arista.
... | hansraj/video-transcoding | arista/queue.py | Python | lgpl-2.1 | 7,874 |
import sys, os
try:
from gnr.core import gnrhome
_PLATFORM_DEFAULT_PATH = gnrhome.PATH
except:
if sys.platform == 'win32':
_PLATFORM_DEFAULT_PATH = 'C:\genro'
else:
_PLATFORM_DEFAULT_PATH = '/usr/local/genro'
_GNRHOME = os.path.split(os.environ.get('GNRHOME', _PLATFORM_DEFAULT_PATH))
... | poppogbr/genropy | gnrpy/gnr/core/gnrenv.py | Python | lgpl-2.1 | 862 |
import django
from django.db import models
from pytigon_lib.schdjangoext.fields import *
from pytigon_lib.schdjangoext.models import *
import pytigon_lib.schdjangoext.fields as ext_models
from pytigon_lib.schtools import schjson
from django.utils.translation import gettext_lazy as _
from django.contrib import admin
... | Splawik/pytigon | pytigon/prj/_schtools/schcommander/models.py | Python | lgpl-3.0 | 494 |
#################################################################
# @Program: utils.py #
# @Version: 1 #
# @Author: Chris Plaisier #
# @Sponsored by: ... | baliga-lab/sygnal | python/src/utils.py | Python | lgpl-3.0 | 3,337 |
"""
Utilities related to managing data types.
"""
from rez.vendor.schema.schema import Schema, Optional
from rez.exceptions import RexError
from threading import Lock
from rez.vendor.six import six
if six.PY2:
from collections import MutableMapping
else:
from collections.abc import MutableMapping
basestring ... | fnaum/rez | src/rez/utils/data_utils.py | Python | lgpl-3.0 | 18,575 |
#!/usr/bin/python3
# coding=utf-8
# -------------------------------------------------------------------------------
# This file is part of Phobos, a Blender Add-On to edit robot models.
# Copyright (C) 2020 University of Bremen & DFKI GmbH Robotics Innovation Center
#
# You should have received a copy of the 3-Clause ... | rock-simulation/phobos | phobos/io/entities/light.py | Python | lgpl-3.0 | 2,056 |
# Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from UM import i18nCatalog
from UM.Message import Message
I18N_CATALOG = i18nCatalog("cura")
class PrintJobUploadErrorMessage(Message):
"""Message shown when uploading a print job to a cluster failed."""
def __i... | Ultimaker/Cura | plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadErrorMessage.py | Python | lgpl-3.0 | 630 |
#! /usr/bin/env python3
# coding: utf-8
import random
from collections import OrderedDict
import pixelqt
class Pixel:
def __init__(self, color):
self.color = color if color else [random.randint(0, 255) for i in range(3)]
self.x, self.y = random.choice(poslist)
del poslist[poslist.ind... | meequz/color_pixels | colorpixels.py | Python | lgpl-3.0 | 6,268 |
from shadowcraft.core import exceptions
class Settings(object):
def __init__(self, cycle, response_time=.5, latency=.03, merge_damage=True, style='time', limit=10):
self.cycle = cycle #for the spec
self.response_time = response_time #general player reaction time
self.latency = latency #shi... | Pathal/ShadowCraft-Engine | shadowcraft/calcs/darkmantle/settings.py | Python | lgpl-3.0 | 1,876 |
# -*- coding: utf-8 -*-
from gluon.custom_import import track_changes
track_changes(True)
loading = DIV([DIV(_id="fountainG_%s"%i, _class="fountainG") for i in range(8)], _id="fountainG")
## GLOBAL IMPORTS ##
from gluon.tools import prettydate
import uuid
from os import path
from gluon.sqlhtml import repr... | francielsilvestrini/soupport | models/_0_utils_v1.py | Python | lgpl-3.0 | 3,907 |
# This file is a part of the "SuMPF" package
# Copyright (C) 2018-2021 Jonas Schulte-Coerne
#
# This program 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 License, or (at your ... | JonasSC/SuMPF | tests/tests/_data/_spectrums/test_constant.py | Python | lgpl-3.0 | 1,496 |
#Created by Dmytro Konobrytskyi, 2013 (github.com/Akson)
class Backend(object):
def __init__(self, parentNode):
self._parentNode = parentNode
def Delete(self):
"""
This method is called when a parent node is deleted.
"""
pass
def GetParameters(self):
"""... | Akson/RemoteConsolePlus3 | RemoteConsolePlus3/RCP3/Backends/Processors/HtmlFormatting/OpenCLBuildInfo2Html.py | Python | lgpl-3.0 | 1,525 |
# Copyright 2016 Casey Jaymes
# This file is part of Expatriate.
#
# Expatriate 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 License, or
# (at your option) any later version.... | cjaymes/expatriate | src/expatriate/xpath/TypeNodeTest.py | Python | lgpl-3.0 | 1,488 |
#!/usr/bin/env python
import redis
import json
import sys
c = redis.StrictRedis(host='r-uf6db21c0dd00ee4.redis.rds.aliyuncs.com', password='')
d = redis.StrictRedis(host='localhost', password='')
cursor = 0
while True:
r = c.scan(cursor, match='record_rds_sample*')
for k in r[1]:
pids = c.zrange(k... | sansna/PythonWidgets.py | python/dumpRedis.py | Python | lgpl-3.0 | 818 |
from pycp2k.inputsection import InputSection
class _each330(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Just_energy = None
self.Powell_opt = None
self.Qs_scf = None
self.Xas_scf = None
self.Md = None
self.Pint = None
self.Meta... | SINGROUP/pycp2k | pycp2k/classes/_each330.py | Python | lgpl-3.0 | 1,114 |
from Tkinter import (Scrollbar, Frame)
import json
import signal
import sys
from threading import Timer
import tkFont
import Tkinter as tk
try: # Style C -- may be imported into Caster, or externally
BASE_PATH = "C:/NatLink/NatLink/MacroSystem/"
if BASE_PATH not in sys.path:
sys.path.append(BASE_PAT... | j127/caster | caster/asynch/stickylist.py | Python | lgpl-3.0 | 4,410 |
##############################################################################
##
## This file is part of Sardana
##
## http://www.sardana-controls.org/
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Sardana is free software: you can redistribute it and/or modify
## it under the terms of the GN... | sagiss/sardana | src/sardana/pool/poolcontrollers/Slit.py | Python | lgpl-3.0 | 3,836 |
"""Utility functions for reading, writing and validating SBML."""
from pathlib import Path
from typing import List, Union
import libsbml
from sbmlutils import log, validation
from sbmlutils.utils import deprecated
logger = log.get_logger(__name__)
def read_sbml(
source: Union[Path, str],
promote: bool = F... | matthiaskoenig/sbmlutils | src/sbmlutils/io/sbml.py | Python | lgpl-3.0 | 6,559 |
'''NetworkManager mock template
This creates the expected methods and properties of the main
org.freedesktop.NetworkManager object, but no devices. You can specify any
property such as 'NetworkingEnabled', or 'WirelessEnabled' etc. in
"parameters".
'''
# This program is free software; you can redistribute it and/or m... | lucasdemarchi/python-dbusmock | dbusmock/templates/networkmanager.py | Python | lgpl-3.0 | 7,752 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# PYTHON_ARGCOMPLETE_OK
#
# Timetra is a time tracking application and library.
# Copyright © 2010-2014 Andrey Mikhaylenko
#
# This file is part of Timetra.
#
# Timetra is free software: you can redistribute it and/or modify
# it under the terms of the GNU L... | neithere/timetra.diary | timetra/diary/cli_old.py | Python | lgpl-3.0 | 27,344 |
#!/usr/bin/env python
'''Python 2 Program Template
This program does something.
###############################################################################
# Author :
# Project :
# Date created : YYYY-MM-DD
# Purpose :
# Description :
#
# Parameters :
#
# Date(YYY... | WDavidX/init | templates/py_template.py | Python | lgpl-3.0 | 3,641 |
#!/usr/bin/env python
# Built-in packages
import argparse
from argparse import RawDescriptionHelpFormatter
import logging
import sys
# Add-on packages
import numpy as np
# McLab Packages
import mclib_Python as mclib
import semnet
def getOptions():
""" Function to pull in arguments """
description = """"This ... | McIntyre-Lab/papers | fear_sem_sd_2015/scripts/add_new_gene_to_network.py | Python | lgpl-3.0 | 3,035 |
# This file is part of the KeepKey project.
#
# Copyright (C) 2019 ShapeShift
#
# 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 3 of the License, or
# (at your option) any ... | keepkey/python-keepkey | tests/test_msg_ethereum_makerdao.py | Python | lgpl-3.0 | 5,767 |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Provides NIMROD file format capabilities."""
import glob
import numpy as np
import os
import struct
import sys
import iris... | pp-mo/iris | lib/iris/fileformats/nimrod.py | Python | lgpl-3.0 | 9,707 |
from PyQt4 import QtCore, QtGui, uic
class MyOverlayDlg (QtGui.QDialog) :
secondFlag = False
infile = ""
def __init__(self) :
QtGui.QDialog.__init__(self)
self.ui = uic.loadUi("uiPlotOverlayDlg.ui", self)
self.ui.overlayBrowseButton.clicked.connect (self.browseFile)
def setP... | kirillzhuravlev/atrex | Software/MyOverlayDlg.py | Python | lgpl-3.0 | 837 |
#!/usr/bin/python
import random
class CommunicationBus(object):
def __init__(self, name = None, verbose = False):
self.name = name
self.verbose = verbose
self.tick()
def tick(self):
self.messages = []
def send(self, message):
if self.verbose:
print "Message posted to communication bus %s: %s" % (sel... | maxikov/wirelessnegotiator | CommunicationBus.py | Python | lgpl-3.0 | 451 |