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
# -*- coding: utf-8 -*- import os import asyncio import struct from .logger import get_logger from .protocol import PeerStreamIterator from .message import (MessageID, InterestedMessage, HandshakeMessage, BitFieldMessage, NotInte...
kracekumar/bt
bt/server.py
Python
gpl-3.0
8,012
import logging import time import zlib from collections import defaultdict from datetime import datetime from hashlib import sha1 from operator import itemgetter import simplejson as json from _mysql_exceptions import IntegrityError from django.conf import settings from django.core.cache import cache from django.core....
vaishalitekale/treeherder
treeherder/model/derived/jobs.py
Python
mpl-2.0
83,969
import torch def get_data(params): batch_size = params["batch_size"] M, N, K = params["problem"]["size"] flop = (2.0 * M * N * K) params["problem"]["flop_estimated"] = flop * params["nb_epoch"] * batch_size m = params["problem"]["size"][0] n = params["problem"]["size"][1] k = params["probl...
undertherain/benchmarker
benchmarker/kernels/batchmatmul/data.py
Python
mpl-2.0
448
# Details used to log into Reddit. reddit_client_id = "" reddit_client_secret = "" reddit_user = "" reddit_pass = "" # Auth key used to log into Discord. discord_key = "" # Command/feature modules. module_names = ( "default", ) # Do not change this value! config_version = 2
Yalnix/BarryBot
config.py
Python
mpl-2.0
290
from textwrap import dedent from bedrock.mozorg.tests import TestCase from bedrock.sitemaps.models import NO_LOCALE, SitemapURL class TestSitemapView(TestCase): def setUp(self): data = [ { 'path': '/firefox/all/', 'locale': 'de', 'lastmod': '202...
MichaelKohler/bedrock
bedrock/sitemaps/tests/test_views.py
Python
mpl-2.0
3,829
#!/usr/bin/env python3 '''ioriodb CLI client to interact with the api from the command line''' from __future__ import print_function import time import json import argparse import iorio def get_arg_parser(): '''build the cli arg parser''' parser = argparse.ArgumentParser(description='Iorio DB CLI') parser...
javierdallamore/ioriodb
tools/ioriocli.py
Python
mpl-2.0
8,730
#!/usr/bin/env python # coding:utf-8 class Ob(object): def __init__(self, *args, **kwds): for i in args: self.__dict__.update(args) self.__dict__.update(kwds) def __getattr__(self, name): return self.__dict__.get(name, '') def __setattr__(self, name, value): ...
noman798/dcny
lib/f42/f42/ob.py
Python
mpl-2.0
1,570
import subprocess def main(): error = True while error: error = False try: subprocess.check_call("./asteroids -hostAt=\":10034\" &> /dev/null", shell=True) except subprocess.CalledProcessError: error = True if __name__ == "__main__": main()
jonbuckley33/Asteroids
run_asterois.py
Python
mpl-2.0
258
""" Test models, managers, and validators. """ from __future__ import absolute_import, division, unicode_literals import six from completion import models, waffle from completion.test_utils import CompletionWaffleTestMixin, submit_completions_for_testing from django.core.exceptions import ValidationError from django....
ESOedX/edx-platform
openedx/tests/completion_integration/test_models.py
Python
agpl-3.0
9,761
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Functional tests for XPI file format""" __metaclass__ = type import re import unittest from zope.component import getUtility from lp.app.interfaces.launchpad import ILau...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/translations/utilities/tests/test_xpi_import.py
Python
agpl-3.0
15,963
""" Unit tests for django-registration. These tests assume that you've completed all the prerequisites for getting django-registration running in the default setup, to wit: 1. You have ``registration`` in your ``INSTALLED_APPS`` setting. 2. You have created all of the templates mentioned in this application's doc...
cc-archive/commoner
src/commoner/registration/tests.py
Python
agpl-3.0
12,845
import os import time import mechanize CKAN = os.environ.get('CKAN', 'http://data.england.nhs.uk/') class Transaction(object): def __init__(self): self.custom_timers = {} def run(self): # create a Browser instance br = mechanize.Browser() # don't bother with robots.txt ...
nhsengland/iit-infrastructure
tests/performance_tests/CKAN/test_scripts/ckan_search.py
Python
agpl-3.0
1,654
from rest_framework import renderers from django.utils.xmlutils import SimplerXMLGenerator from django.utils.six.moves import StringIO from django.utils.encoding import smart_text from rest_framework.compat import six from rest_framework import negotiation import json """ @author: Jon Nordling @date: 06/19/2016 XFor...
Cadasta/cadasta-geoodk
xforms/renderers.py
Python
agpl-3.0
2,727
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 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 # pu...
gurneyalex/connector-magento
__unported__/magentoerpconnect_pricing/__openerp__.py
Python
agpl-3.0
1,568
import ckan.controllers.package as package import ckan.lib.dictization.model_dictize as model_dictize import ckan.model as model from ckan.common import c class MapactionPackageController(package.PackageController): def groups(self, id): q = model.Session.query(model.Group) \ .filter(model....
aptivate/ckanext-mapactiontheme
ckanext/mapactiontheme/controllers/package.py
Python
agpl-3.0
1,023
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP module # Copyright (C) 2010 Micronaet srl (<http://www.micronaet.it>) # # Italian OpenERP Community (<http://www.openerp-italia.com>) # #####################################################...
Micronaet/micronaet-accounting
account_invoice_multipartner/multipartner.py
Python
agpl-3.0
2,506
import time import random import os import os.path import logging import urlparse import functools import lms.lib.comment_client as cc import django_comment_client.utils as utils import django_comment_client.settings as cc_settings from django.core import exceptions from django.contrib.auth.decorators import login_r...
TsinghuaX/edx-platform
lms/djangoapps/django_comment_client/base/views.py
Python
agpl-3.0
20,227
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-07-04 14:52 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("events", "0004_create_basic_calendars")] operations = [ migrations.AlterField( ...
lafranceinsoumise/api-django
agir/events/migrations/0005_auto_20170704_1452.py
Python
agpl-3.0
521
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-10-05 09:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('explorer', '0006_auto_20181004_1159'), ] operations = [ migrations.AddField...
muccg/rdrf
rdrf/explorer/migrations/0007_fieldvalue_column_name.py
Python
agpl-3.0
482
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 Trustcode - www.trustcode.com.br # # ...
Trust-Code/trust-addons
trust_second_unit_of_measure/models/mrp_bom.py
Python
agpl-3.0
3,943
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE import lxml ''' A set of functions related to Data Manager and the <data_manager> node in Opus Project Configuration files. ''' def get_tool_nodes(projec...
apdjustino/DRCOG_Urbansim
src/opus_gui/data_manager/data_manager_functions.py
Python
agpl-3.0
1,946
# -*- coding: utf-8 -*- """ End-to-end tests for Student's Profile Page. """ from contextlib import contextmanager from datetime import datetime from bok_choy.web_app_test import WebAppTest from nose.plugins.attrib import attr from ...pages.common.logout import LogoutPage from ...pages.lms.account_settings import Acc...
alu042/edx-platform
common/test/acceptance/tests/lms/test_learner_profile.py
Python
agpl-3.0
34,219
from datetime import datetime from pymongo import DESCENDING from libs.lib import tee_db from libs.statisticator import Job class SuicidesJob(Job): def __init__(self): """ Job to get player suicides Collection name: kill_results Struture: {'player': STR , ...
titilambert/teeawards
old/jobs/suicides/suicides.py
Python
agpl-3.0
4,168
# -*- coding: utf8 -*- # This file is part of Mnemosyne. # # Copyright (C) 2013 Daniel Lombraña González # # Mnemosyne 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...
PyBossa/mnemosyne
mnemosyne/core.py
Python
agpl-3.0
1,728
import glob import os import shutil import sys import tarfile import traceback from model import Model from subprocess import Popen, PIPE class Apsim75(Model): def run(self, latidx, lonidx): try: apsim_bin = self.config.get('executable') # The apsim 'executable' is a gzipped tarba...
RDCEP/psims
pysims/models/apsim75.py
Python
agpl-3.0
2,004
# *** submodules *** # from matrix import constants, decompositions, errors, approximation, nearest # *** functions *** # from matrix.calculate import (is_positive_semidefinite, is_positive_definite, is_invertible, decompose, solve) # *** constants *** # from matrix.constants import (...
jor-/matrix-decomposition
matrix/__init__.py
Python
agpl-3.0
1,947
from logging import getLogger from ckan.lib.base import request, BaseController, abort, json, c from ckan.plugins import toolkit import ckan.plugins as p import json import pylons.config as config import subprocess import shlex import os, sys log = getLogger(__name__) class Resource_api_harvestController(BaseContro...
odevsp/ckanext-api_harvest
ckanext/api_harvest/controller.py
Python
agpl-3.0
6,252
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
geotagx/geotagx-pybossa-archive
pybossa/hateoas.py
Python
agpl-3.0
2,393
#!/usr/bin/env jython import sys #sys.path.append("/usr/share/java/itextpdf-5.4.1.jar") sys.path.append("itextpdf-5.4.1.jar") #sys.path.append("/usr/share/java/itext-2.0.7.jar") #sys.path.append("/usr/share/java/xercesImpl.jar") #sys.path.append("/usr/share/java/xml-apis.jar") from java.io import FileOutputStream fro...
jeffery9/mixprint_addons
ineco_thai_account/report/jy_serv.py
Python
agpl-3.0
1,612
# -*- coding: utf-8 -*- """ Unit tests for embargo app admin forms. """ from __future__ import absolute_import import six # Explicitly import the cache from ConfigurationModel so we can reset it after each test from config_models.models import cache from django.test import TestCase from opaque_keys.edx.locator import...
ESOedX/edx-platform
openedx/core/djangoapps/embargo/tests/test_forms.py
Python
agpl-3.0
5,361
# This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
zheguang/voltdb
lib/python/voltcli/voltdb.d/recover.py
Python
agpl-3.0
1,849
from django.contrib.gis.geos import GEOSGeometry, GeometryCollection from arches.app.utils.betterJSONSerializer import JSONSerializer, JSONDeserializer class GeoUtils(object): def create_geom_collection_from_geojson(self, geojson): geoms = [] for feature in geojson['features']: geoms....
cvast/arches
arches/app/utils/geo_utils.py
Python
agpl-3.0
1,092
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-06-23 15:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mendel', '0008_auto_20160613_1911'), ] operations =...
Architizer/mendel
mendel/migrations/0009_auto_20160623_1141.py
Python
agpl-3.0
1,091
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import getdate, validate_email_add, today from frappe.model.naming import make_autoname from frappe import throw, _ imp...
ShashaQin/erpnext
erpnext/hr/doctype/employee/employee.py
Python
agpl-3.0
8,327
# Copyright 2012-2015 Mattias Fliesberg # # This file is part of opmuse. # # opmuse 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 versi...
opmuse/opmuse
opmuse/test/test_security.py
Python
agpl-3.0
1,210
import datetime from django.db import models, transaction class Key(models.Model): uid = models.CharField(max_length=255, unique=True) name = models.TextField() created = models.DateTimeField(default=datetime.datetime.utcnow) class Meta: ordering = ('-created',) get_latest_by = 'cr...
lamby/buildinfo.debian.net
bidb/keys/models.py
Python
agpl-3.0
744
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class AccountAccountType(models.Model): _inherit = 'account.account.type' _order = 'sequence asc' sequence = fields.Integer( string=u'Sequence', )
thinkopensolutions/l10n-brazil
financial_account/models/inherited_account_account_type.py
Python
agpl-3.0
318
""" Views to support bulk email functionalities like opt-out. """ import logging from six import text_type from django.contrib.auth.models import User from django.http import Http404 from bulk_email.models import Optout from courseware.courses import get_course_by_id from edxmako.shortcuts import render_to_respons...
cpennington/edx-platform
lms/djangoapps/bulk_email/views.py
Python
agpl-3.0
2,070
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import from .test import * f...
nttks/edx-platform
lms/envs/acceptance.py
Python
agpl-3.0
6,447
# This file is part of trc.me. # # trc.me is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # trc.me is distributed in the hope that it...
kaapstorm/trc_me
src/trc_me/api/forms.py
Python
agpl-3.0
937
# -*- coding: utf-8 -*- # © 2017 Didotech srl (www.didotech.com) { "name": "BoM Warning", "version": "4.0.1.2", "depends": [ "mrp", "base", "product", "warning" ], "author": "Didotech srl", "description": """ This module is aim to track the warning on Bills o...
iw3hxn/LibrERP
mrp_bom_warning/__openerp__.py
Python
agpl-3.0
588
# -*- coding: utf-8 -*- ''' .. module:: genomics.config :synopsis: library configuration :noindex: :copyright: Copyright 2014 by Tiago Antao :license: GNU Affero, see LICENSE for details .. moduleauthor:: Tiago Antao <tra@popgen.net> ''' import os import configparser as cp config_file = os.path.expandus...
tiagoantao/pygenomics
genomics/config.py
Python
agpl-3.0
1,713
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo.tools import convert_file def import_csv_data(cr, registry): """Import CSV data as it is faster than xml and because we can't use noupdate anymore with csv""" filenames = ['data/res.better.zip.csv'] ...
brain-tec/l10n-switzerland
l10n_ch_zip/hooks.py
Python
agpl-3.0
506
# -*- coding: utf-8 -*- # # # Author: Nicolas Bessi. Copyright Camptocamp SA # Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> # Ignacio Ibeas <ignacio@acysos.com> # Alejandro Santana <alejandrosantana@anubia.es> # # This program is free software: you can redist...
QANSEE/partner-contact
base_location/models/partner.py
Python
agpl-3.0
3,295
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.test import TestCase from ..forms import QuoteForm class TestQuoteForm(TestCase): def setUp(self): pass def test_validate_emtpy_quote(self): form = QuoteForm({'message': ''}) self.assertFals...
gabrielsaldana/sqmc
sabesqmc/quote/tests/test_forms.py
Python
agpl-3.0
2,384
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is f...
ryepdx/shipping_api_fedex
logistic_company.py
Python
agpl-3.0
2,090
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi from dace.processinstance.gateway import ( ExclusiveGateway, ParallelGateway, InclusiveGateway) from .core import FlowNodeDefinition, Path class GatewayDefinitio...
ecreall/dace
dace/processdefinition/gatewaydef.py
Python
agpl-3.0
3,567
import json from urllib.parse import urlencode from tests import TestCase from tests.fixtures.factories import ProfessorFactory, CourseFactory class SearchTestCase(TestCase): def setUp(self): super().setUp() ProfessorFactory(first_name='Mathias') CourseFactory(title='Math Stuff') de...
SCUEvals/scuevals-api
tests/resources/test_search.py
Python
agpl-3.0
709
# -*- coding: UTF-8 -*- # Copyright 2014-2017 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at y...
khchine5/lino-welfare
lino_welfare/modlib/aids/mixins.py
Python
agpl-3.0
13,679
import unittest import ccs import time #################################################################################################################### # OKCOINCOM # ##############################################...
Honzin/ccs
tests/testAdapter/testOkcoincom/testTrades.py
Python
agpl-3.0
1,366
''' Copyright (C) 2016-2019 Vanessa Sochat. 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. This program is distribute...
vsoch/singularity-python
singularity/analysis/reproduce/hash.py
Python
agpl-3.0
6,435
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'designer/getaddons.ui' # # Created: Fri Aug 22 00:57:31 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ex...
weihautin/anki
aqt/forms/getaddons.py
Python
agpl-3.0
2,703
#! /usr/bin/env python # -*- coding: utf-8 -*- import logging import os from openfisca_france_data import default_config_files_directory as config_files_directory from openfisca_france_data.erfs.input_data_builder import ( # analysis:ignore step_01_pre_processing as pre_processing, step_02_imputation_loyer...
benjello/openfisca-france-data
openfisca_france_data/erfs/input_data_builder/__init__.py
Python
agpl-3.0
2,482
""" tests for the models """ import json from datetime import datetime, timedelta import ddt from pytz import utc from student.roles import CourseCcxCoachRole from student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from xmodu...
jolyonb/edx-platform
lms/djangoapps/ccx/tests/test_models.py
Python
agpl-3.0
7,054
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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; version 2 dated June...
rwl/openpowersystem
dynamics/dynamics/generators/gen_sync.py
Python
agpl-3.0
1,631
''' Copyright (C) 2017 The Board of Trustees of the Leland Stanford Junior University. Copyright (C) 2016-2017 Vanessa Sochat. 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...
singularityware/singularity-python
singularity/analysis/metrics.py
Python
agpl-3.0
2,085
#!/usr/bin/env python import os, sys from polib import pofile from config import CONFIGURATION from extract import SOURCE_WARN from execute import execute TRANSIFEX_HEADER = 'Translations in this file have been downloaded from %s' TRANSIFEX_URL = 'https://www.transifex.com/projects/p/edx-studio/' def push(): exe...
praveen-pal/edx-platform
i18n/transifex.py
Python
agpl-3.0
2,066
#!/usr/bin/env python # coding: utf-8 # # StreamBuddy - a video and data streaming serviweng zieleinfahrtce. # Copyright (c) 2015, Tobias Bleiker & Dumeni Manatschal # # 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 # ...
tbleiker/StreamBug
tests/cmd_interface_02_server_clients.py
Python
agpl-3.0
3,447
# -*- coding: utf-8 -*- from django.conf import settings as settings from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect, Http404 f...
elimence/edx-platform
lms/djangoapps/simplewiki/views.py
Python
agpl-3.0
21,289
"""pdbquery RAPD plugin""" """ This file is part of RAPD c Copyright (C) 2017, Cornell University All rights reserved. RAPD 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, version 3. RAPD is distributed ...
RAPD/RAPD
src/plugins/pdbquery/plugin.py
Python
agpl-3.0
47,200
############################################################################## # # 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
base/signals/publisher.py
Python
agpl-3.0
1,579
__author__ = 'sweemeng' from rest_framework import status from popit.signals.handlers import * from popit.models import * from popit.tests.base_testcase import BasePopitAPITestCase class PersonLinkAPITestCase(BasePopitAPITestCase): def test_view_person_link_list_unauthorized(self): response = self.client...
Sinar/popit_ng
popit/tests/test_person_misc_api.py
Python
agpl-3.0
32,087
""" (Future home of) Tests for program enrollment writing Python API. Currently, we do not directly unit test the functions in api/writing.py. This is okay for now because they are all used in `rest_api.v1.views` and is thus tested through `rest_api.v1.tests.test_views`. Eventually it would be good to directly test th...
ESOedX/edx-platform
lms/djangoapps/program_enrollments/api/tests/test_writing.py
Python
agpl-3.0
574
import datetime import os from django.conf import settings from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from comics.core.managers import ComicManager class Comic(models.Model): LANGUAGES = ( ...
datagutten/comics
comics/core/models.py
Python
agpl-3.0
4,089
#!usr/bin/python # -*- coding:utf-8 -*- from osv import osv,fields import time from datetime import datetime from dateutil import rrule class qingjia_calendar(osv.osv): _name='qingjia.calendar' _columns={ 'start_date':fields.datetime('start_date'), 'end_date':fields.datetime('end...
alangwansui/mtl_ordercenter
openerp/addons/001_qingjia/qingjia_calendar.py
Python
agpl-3.0
2,648
__author__ = 'sweemeng' from rest_framework import status from popit.signals.handlers import * from popit.models import * from django.conf import settings import json import logging from popit.tests.base_testcase import BasePopitTestCase from popit.tests.base_testcase import BasePopitAPITestCase from popit.serializers....
Sinar/popit_ng
popit/tests/tests_person_api.py
Python
agpl-3.0
50,109
import pytest from gaphas.painter import BoundingBoxPainter from gaphas.view import GtkView from gaphor.diagram.painter import ItemPainter from gaphor.diagram.selection import Selection from gaphor.diagram.tests.fixtures import diagram, element_factory, event_manager @pytest.fixture def view(diagram): view = Gtk...
amolenaar/gaphor
gaphor/diagram/diagramtools/tests/conftest.py
Python
lgpl-2.1
570
import json import numpy as np from glob import glob inputs = { 'xml_file_path' : "./data/single_wavelength_copy", 'file_set' : {'p38' : glob( "./data/single_wavelength_copy/*.xml")}, 'section' : '280_480_TOP_120', 'ligand_order' : ['Bosutinib','Bosutinib Isomer','Erlotinib','Gefitinib'...
choderalab/assaytools
examples/direct-fluorescence-assay/inputs_p38_singlet.py
Python
lgpl-2.1
1,067
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # 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...
xiangke/pycopia
core/pycopia/OS/Linux/IOCTL.py
Python
lgpl-2.1
3,107
"""autogenerated by genpy from hrl_lib/Pose3DOF.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class Pose3DOF(genpy.Message): _md5sum = "646ead44a0e6fecf4e14ca116f12b08b" _type = "hrl_lib/Pose3DOF" _has_header = True #flag ...
HailStorm32/Q.bo_stacks
qbo_stereo_anaglyph/hrl_lib/src/hrl_lib/msg/_Pose3DOF.py
Python
lgpl-2.1
5,992
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # 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...
xiangke/pycopia
experimental/pycopia/GUI/canvas.py
Python
lgpl-2.1
1,013
# -*- Mode: Python; coding: iso-8859-1 -*- # vi:si:et:sw=4:sts=4:ts=4 # # Stoqdrivers # Copyright (C) 2005 Async Open Source <http://www.async.com.br> # All rights reserved # # 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 # ...
stoq/stoqdrivers
stoqdrivers/printers/capabilities.py
Python
lgpl-2.1
4,905
#!/usr/bin/env python # -*- coding:utf8 -*- from setuptools import setup import picuplib setup( name = 'picuplib', packages = ['picuplib'], version = picuplib.__version__, description = 'Picflash upload library', author = 'Arvedui', author_email = 'arvedui@posteo.de', url =...
Arvedui/picuplib
setup.py
Python
lgpl-2.1
950
############################################################################## # Copyright (c) 2013-2018, 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...
EmreAtes/spack
lib/spack/spack/test/svn_fetch.py
Python
lgpl-2.1
3,319
''' Created on 2015年1月19日 @author: Guan-yu Willie Chen ''' # -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.support.select import Select from selenium.webdriver.common.keys import Keys import time #browser = webdriver.Firefox() #browser = webdriver.Ie() browser = ...
williechen/DailyApp
18/py201501/sample/sample.py
Python
lgpl-3.0
1,423
from scipy.spatial import distance as dist class Searcher: def __init__(self, index): self.index = index def search(self, queryFeature): results = {} for (k, feature) in self.index.items(): d = dist.euclidean(queryFeature, feature) results[k] = d results = sorted([(v, k) for (k, v) in results.items()])...
CoderEnko007/Pokedex
tools/searcher.py
Python
lgpl-3.0
337
from .spec import BASIC_PROPS_SET, encode_basic_properties def encode_message(frame, headers, body, frame_size): """Encode message headers and body as a sequence of frames.""" for f in frame.encode(): yield f props, headers = split_headers(headers, BASIC_PROPS_SET) if headers: props['h...
seatme/nucleon.amqp
nucleon/amqp/encoding.py
Python
lgpl-3.0
1,062
#! /usr/bin/env python # -*- coding: utf-8 -*- from openturns import coupling_tools import os import time import sys wanted_lines = '# ooo\nE=@E\nE1=@E\nFE1=@F#oo\nZ=@Z@Z\n# ooo\n' semi_parsed = '# ooo\nE=2\nE1=2\nFE1=@F#oo\nZ=@Z@Z\n# ooo\n' parsed = '# ooo\nE=1.6\nE1=1.6\nFE1=5#oo\nZ=66\n# ooo\n' # how many Mo for ...
dbarbier/privot
python/test/t_coupling_tools.py
Python
lgpl-3.0
21,167
# vi: sw=4 ts=4 et: """microarray.py - cMonkey microarray related processing This module captures the microarray-specific scoring component of cMonkey. This file is part of cMonkey Python. Please see README and LICENSE for more information and licensing details. """ import numpy as np import logging import datamatrix ...
jashworth-isb/cmonkey-python
cmonkey/microarray.py
Python
lgpl-3.0
7,657
from bacpypes.apdu import SubscribeCOVRequest, SimpleAckPDU, RejectPDU, AbortPDU from bacpypes.iocb import IOCB from bacpypes.core import deferred from bacpypes.pdu import Address from bacpypes.object import get_object_class, get_datatype from bacpypes.constructeddata import Array from bacpypes.primitivedata import Tag...
ChristianTremblay/BAC0
BAC0/core/functions/cov.py
Python
lgpl-3.0
5,711
# coding:utf-8 from django.conf.urls import patterns, include, url from kylin_log.views import * urlpatterns = patterns('', url(r'^list/(\w+)/$', log_list, name='log_list'), url(r'^detail/(\w+)/$', log_detail, name='log_detail'), url(r'^history/$', l...
cwm-kylin/kylin_ops
kylin_log/urls.py
Python
lgpl-3.0
519
#!/usr/bin/env python # # Copyright 2009 The Closure Library Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
SOCR/HTML5_WebSite
HTML5/BrainPainter/X/lib/closure-library/closure/bin/build/depswriter.py
Python
lgpl-3.0
6,203
#! /usr/bin/env python from openturns import * TESTPREAMBLE() try : try : # Instanciate one distribution object meanPoint = NumericalPoint(1) meanPoint[0] = 1.0 sigma = NumericalPoint(1) sigma[0] = 1.0 R = CorrelationMatrix(1) distribution = Normal(meanPo...
dbarbier/privot
python/test/t_Normal_wrongarg.py
Python
lgpl-3.0
760
"""Hypertext Transfer Protocol (HTTP) These objects provide support for :rfc:`HTTP <2616>`. .. seealso:: :mod:`HTTP authentication <bedframe.auth.http>` """ __copyright__ = "Copyright (C) 2014 Ivan D Vasin" __docformat__ = "restructuredtext" from ._exc import * from ._services import *
nisavid/bedframe
bedframe/http/__init__.py
Python
lgpl-3.0
292
######################################################################## # File name: service.py # This file is part of: aioxmpp # # LICENSE # # 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 Foundati...
horazont/aioxmpp
aioxmpp/roster/service.py
Python
lgpl-3.0
25,618
from dolfin import * from dolfin_adjoint import * parameters["adjoint"]["cache_factorizations"] = True mesh = UnitSquareMesh(3, 3) V = FunctionSpace(mesh, "R", 0) test = TestFunction(V) trial = TrialFunction(V) def main(m): u = interpolate(Constant(0.1), V, name="Solution") F = inner(u*u, test)*dx - inner(...
live-clones/dolfin-adjoint
tests_dolfin/hessian_identity_list/hessian_identity_list.py
Python
lgpl-3.0
1,279
__author__ = 'soporte' from .base import * DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': Path.join(BASE_DIR, 'db.sqlite3'), } } STATIC_URL = '/static/'
xskylarx/skytube-web
CursoDjango/CursoDjango/settings/local.py
Python
lgpl-3.0
265
#!/usr/bin/env python # -*- coding: utf-8 -*- #*/1 * * * * python /xxx/monitor.py >> /xxx/logs/monitor.log 2>&1 & import sys import subprocess import os.path as op import socket def this_abs_path(script_name): return op.abspath(op.join(op.dirname(__file__), script_name)) def monitor_process(key_word, cmd): ...
JamesLinus/OMMPS
ProcessMonitor.py
Python
lgpl-3.0
1,496
# -*- coding: utf-8 -*- from . import stock_return_picking
rfhk/awo-custom
sale_line_quant_extended/wizard/__init__.py
Python
lgpl-3.0
60
from skimage import measure import numpy as np import struct import math as m from PIL import Image from simplify import simplify import argparse parser = argparse.ArgumentParser(description='convert apk heightmaps to floating point tiff') parser.add_argument('file', type=str, help='the apk heightmap file') args ...
tarnheld/ted-editor
hm/apkhm.py
Python
unlicense
3,380
""" Covariance estimators using shrinkage. Shrinkage corresponds to regularising `cov` using a convex combination: shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile ...
seckcoder/lang-learn
python/sklearn/sklearn/covariance/shrunk_covariance_.py
Python
unlicense
17,960
#!/usr/bin/env python def load_velocity(filename): import os if not os.path.exists(filename): return None from numpy import zeros from vtk import vtkPolyDataReader, vtkCellDataToPointData reader = vtkPolyDataReader() reader.SetFileName(filename) reader.ReadAllVectorsOn() rea...
mrklein/vtk-plot
plot-vtk.py
Python
unlicense
2,344
from django.shortcuts import render, redirect, get_object_or_404 from django.views.generic import TemplateView from farxiv.forms import * class Index(TemplateView): template_name = 'index.html' def get_context_data(self, **kwargs): context = super(TemplateView, self).get_context_data(**kwargs) ...
ghallsimpsons/farxiv
farxiv/views.py
Python
unlicense
1,516
data = [set(open(i).read().split()) for i in ('C:\\Users\\Aliwka\\Desktop\\ДЗ-курсы\\Homework6\\first.txt', 'C:\\Users\\Aliwka\\Desktop\\ДЗ-курсы\\Homework6\\second.txt')] diff = data[0].difference(data[1]) if diff: print(diff, 'слова которые есть в первом файле, но нет во втором') print(data[1],data[0],'слова...
Torkvamedo/smx
Homework/lesson 6/second.py
Python
unlicense
414
import sys sys.path.append('../..') import codestudio a = codestudio.load('s1level32') a.speed = 'fastest' for count in range(360): a.move_backward(1) a.left(1) a.check()
skilstak/code-dot-org-python
solutions/stage05-artist1/s1level32b.py
Python
unlicense
181
from setuptools import setup install_requires = [ 'requests', 'beautifulsoup4' ] setup( name='urbandefinition', install_requires=install_requires, version=0.3, description='Get Urban Dictionary definitions from the terminal', author='Asad Dhamani', author_email='dhamaniasad+code@gmail....
dhamaniasad/urbandefinition
setup.py
Python
unlicense
568
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
grengojbo/st2
st2actions/tests/unit/test_remote_runners.py
Python
apache-2.0
6,700
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
google/tf-quant-finance
tf_quant_finance/experimental/pricing_platform/framework/core/models.py
Python
apache-2.0
1,474
#!/usr/bin/env python # Copyright 2016 Criteo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
criteo/biggraphite
biggraphite/cli/import_whisper.py
Python
apache-2.0
8,945
## # Copyright (c) 2011-2015 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
red-hood/calendarserver
contrib/performance/loadtest/trafficlogger.py
Python
apache-2.0
3,436