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
#!/usr/bin/python import sys intgenes = set() for i in open(sys.argv[1]): intgenes.add(i.rstrip()) # read gene.fpkm xloc = set() for i in open(sys.argv[2]): f = i.rstrip().split("\t") genes = f[4].split(",") for g in genes: if g in intgenes: xloc.add(f[0]) isoforms = open(sys.argv[3]) print isoforms.readli...
TravisCG/SI_scripts
gettrbygene.py
Python
gpl-3.0
409
""" code from nanophotonics/npmie repository url: https://github.com/nanophotonics/npmie code by Alan Sanders modified to use in MSTM-studio by L.Aavakyan """ import numpy as np from mstm_studio.mstm_spectrum import Material try: from scipy.special import sph_jnyn except: from scipy.special import sp...
lavakyan/mstm-spectrum
mstm_studio/mie_theory.py
Python
gpl-3.0
6,127
# -*- coding: utf-8; Mode: python; tab-width: 4; indent-tabs-mode:nil; -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2016 Sébastien Buchoux <sebastien.buchoux@gmail.com> # # This file is part of FATSLiM. # # FATSLiM is free software: you can redistribute it and/or modify # ...
FATSLiM/fatslim
fatslimlib/builtins.py
Python
gpl-3.0
33,431
from libjournal.libj import libJournal libj = libJournal() # libj.create_db("test") # libj.format_db("test.db") libj.set_db_location("test.db") # libj.entry_new("Dogs", "Cats") libj.entries_all() libj.most_recent_entry() libj.search_by_title("Dogs") libj.search_by_number(1)
undystopia/libjournal
tests/__init__.py
Python
gpl-3.0
279
#!/bin/env python3 import urllib.request import datetime import json import re URL = 'http://api.linux-statt-windows.org/infos.json' def callback(): return '/lsw thema', monthly_topic def monthly_topic(inp): now = datetime.datetime.now() names = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Ju...
Linux-statt-Windows/BOLT
src/modules/themadesmonats.py
Python
gpl-3.0
769
# Copyright 2014, candidtim (https://github.com/candidtim) # # This file is part of Vagrant AppIndicator for Ubuntu. # # Vagrant AppIndicator for Ubuntu 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 v...
candidtim/vagrant-appindicator
vgapplet/test/test_appindicator.py
Python
gpl-3.0
1,613
from pypy.interpreter.pyparser import automata from pypy.interpreter.pyparser.pygram import tokens from pypy.interpreter.pyparser.pytoken import python_opmap from pypy.interpreter.pyparser.error import TokenError, TokenIndentationError, TabError from pypy.interpreter.pyparser.pytokenize import tabsize, alttabsize, whit...
StyXman/ayrton
.pc/pypy_py35-python36.diff/ayrton/parser/pyparser/pytokenizer.py
Python
gpl-3.0
15,849
# 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/. def counter(): """Yields "better" ids for parametrized test cases""" count = 0 while True: yield "...
mozilla-services/tecken
eliot-service/tests/utils.py
Python
mpl-2.0
356
#!/usr/bin/env python import os config = { "default_actions": [ 'clobber', 'checkout-sources', 'get-blobs', 'update-source-manifest', 'build', 'build-symbols', 'make-updates', 'prep-upload', 'upload', 'make-socorro-json', 'uploa...
lissyx/build-mozharness
configs/b2g/releng-emulator.py
Python
mpl-2.0
4,161
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-20 11:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church_directory', '0001_auto_20170920_0853'), ] operations = [ migrations....
gtalent/soma
api_server/church_directory/migrations/0002_clearancetype_builtin.py
Python
mpl-2.0
504
# 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 base import FirefoxUIArguments class UpdateBaseArguments(object): name = 'Firefox UI Update Tests' args =...
Yukarumya/Yukarum-Redfoxes
testing/firefox-ui/harness/firefox_ui_harness/arguments/update.py
Python
mpl-2.0
2,072
import logging import newrelic.agent import simplejson as json from celery.exceptions import SoftTimeLimitExceeded from requests.exceptions import HTTPError from treeherder.autoclassify.tasks import autoclassify from treeherder.etl.artifact import (serialize_artifact_json_blobs, s...
KWierso/treeherder
treeherder/log_parser/tasks.py
Python
mpl-2.0
6,066
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
klahnakoski/SpotManager
vendor/jx_elasticsearch/meta.py
Python
mpl-2.0
52,725
# -*- 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): # Adding unique constraint on 'Region', fields ['region_code'] db.create_...
SeedScientific/polio
datapoints/migrations/0041_auto__add_unique_region_region_code.py
Python
agpl-3.0
15,909
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from erpnext.accounts.utils import validate_fiscal_year from frappe import _ from f...
suyashphadtare/test
erpnext/hr/doctype/leave_block_list/leave_block_list.py
Python
agpl-3.0
2,260
import ckan.logic import json _get_or_bust = ckan.logic.get_or_bust _get_action = ckan.logic.get_action def package_contact_show(context, data_dict): pkg_id = _get_or_bust(data_dict, 'package_id') package = _get_action('package_show')(context, {'id': pkg_id}) search_param = data_dict.pop('search_param', ...
ccca-dc/ckanext-mdedit
ckanext/mdedit/logic/action.py
Python
agpl-3.0
931
import purchase_requisition_group import stock_picking
vnsofthe/odoo-dev
addons/rhwl_library/wizard/__init__.py
Python
agpl-3.0
54
# -*- coding: utf-8 -*- # Copyright 2008-2015 Canonical # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) # # 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 ...
magicicada-bot/magicicada-server
magicicada/server/integtests/test_sync.py
Python
agpl-3.0
94,053
from unittest.mock import PropertyMock, patch from django.test import TestCase from candidates.tests.factories import BallotPaperFactory from elections.api.next.serializers import BallotSerializer class TestBallotSerializerGetCancelled(TestCase): def test_when_cancelled(self): ballot = BallotPaperFactory...
DemocracyClub/yournextrepresentative
ynr/apps/elections/tests/test_serializers.py
Python
agpl-3.0
1,764
""" End-to-end tests for w2ui of biz feature """ from datetime import datetime import pytz from bok_choy.web_app_test import WebAppTest from nose.plugins.attrib import attr from common.test.acceptance.pages.biz.ga_contract import BizContractDetailPage, BizContractPage from . import AGGREGATOR_USER_INFO, GaccoBizTest...
nttks/edx-platform
common/test/acceptance/tests/biz/test_ga_w2ui.py
Python
agpl-3.0
15,111
# -*- encoding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) import time from product._common import rounding from osv import osv, fields from tools.translate import _ import openerp.addons.decimal_precision as dp import netsvc from ope...
Elico-Corp/openerp-7.0
purchase_price_control/purchase.py
Python
agpl-3.0
31,137
# -*- coding: utf-8 -*- import os import shutil import signal import subprocess import logging import gnupg import psutil import pytest os.environ['SECUREDROP_ENV'] = 'test' # noqa import config # TODO: the PID file for the redis worker is hard-coded below. # Ideally this constant would be provided by a test harnes...
garrettr/securedrop
securedrop/tests/conftest.py
Python
agpl-3.0
2,552
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron and Valeureux Copyright Valeureux.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Valeureux/wezer-exchange
__unreviewed__/account_wallet/__openerp__.py
Python
agpl-3.0
2,328
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('snotes20', '0007_auto_20141125_1737'), ] operations = [ migrations.AlterField( model_name='publication', ...
shownotes/snotes20-restapi
snotes20/migrations/0008_auto_20150827_1159.py
Python
agpl-3.0
669
import numpy as np import pytest import matrix.constants import matrix.errors import matrix.tests.random # *** solve *** # test_solve_setups = [ (n, dense, complex_values, type_str, invertible, b) for n in (10,) for dense in (True, False) for complex_values in (True, False) for type_str in matri...
jor-/matrix-decomposition
matrix/tests/test_solve.py
Python
agpl-3.0
1,188
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_website
Elico-Corp/odoo-addons
website_captcha_nogoogle/tests/__init__.py
Python
agpl-3.0
163
__author__ = 'root' import urllib2 import httplib import traceback import oauth from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from settings import settings from mongodb import mongoDb import sys, os class MockOAuthDataStore(oauth.OAuthDataStore): def __init__(self): self.mongoDb = mongoD...
cloudspaces/eyeos-u1db
serverU1DB/serverOauth.py
Python
agpl-3.0
9,347
from rest_framework import serializers from .models import BTBeacon, Website class BTBeaconSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = BTBeacon fields = '__all__' class WebsiteSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Website...
Fresnoy/kart
common/serializers.py
Python
agpl-3.0
600
# encoding: utf-8 import 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 'Episode.serie' db.alter_column('serie_episode', 'serie_id', self.gf('django.db.models.fi...
alabs/petateca
petateca/apps/serie/migrations/0017_auto__chg_field_episode_serie__del_field_link_bot__add_field_link_user.py
Python
agpl-3.0
12,986
""" Plugin definition for the opat OPAL plugin """ from opal.core import plugins from opat.urls import urlpatterns class OpatPlugin(plugins.OpalPlugin): """ Main entrypoint to expose this plugin to our OPAL application. """ urls = urlpatterns javascripts = { 'opal.controllers': [ ...
openhealthcare/opal-opat
opat/__init__.py
Python
agpl-3.0
1,820
# coding: utf-8 import datetime import re import xlrd from django.contrib.auth.models import User from django.core.management.base import BaseCommand def convert_xls_to_ss_structure(xls_file_object, strip_empty_rows=True): """ The goal: Convert an XLS file object to a CSV string. This draws on code from...
onaio/kpi
kpi/management/commands/import_xls_to_collection.py
Python
agpl-3.0
4,171
# -*- coding: utf-8 -*- # © 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 import logging from openerp.tests import common _logger = logging.getLogger('aeat') @common.at_install(False) @common.post_install(True) class TestL10nEsAeatModBase(common.T...
RamonGuiuGou/l10n-spain
l10n_es_aeat/tests/test_l10n_es_aeat_mod_base.py
Python
agpl-3.0
7,974
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django.contrib.auth import get_user_model, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.core.urlresolvers im...
kaifabian/lana-dashboard
lana_dashboard/usermanagement/views.py
Python
agpl-3.0
3,672
# -*- 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...
aimas/TuniErp-8.0
addons/hr/__openerp__.py
Python
agpl-3.0
2,378
# -*- coding: utf-8 -*- # pylint: disable=W0401 from .test_views import * from .test_serializers import *
IMIO/django-fixmystreet
django_fixmystreet/api/reports/tests/__init__.py
Python
agpl-3.0
106
NOTIFI_ALL_USERS = 1 NOTIFI_ALL_ADMIN = 2 NOTIFI_ALL_CLIENTS = 3 NOTIFI_ALL_SUPER = 4 NOTIFI_ONCE = 5 NOTIFI_TYPE_DANGER = 1 NOTIFI_TYPE_WARNING = 2 NOTIFI_TYPE_INFO = 3 NOTIFI_TYPE_SUCCESS = 4 GUESTTRACK_PRELOGIN = 1 GUESTTRACK_LOGIN = 2 GUESTTR...
Spotipo/spotipo
unifispot/core/const.py
Python
agpl-3.0
2,599
# -*- coding: utf-'8' "-*-" import base64 try: import simplejson as json except ImportError: import json from hashlib import sha1 import hmac import logging import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_adyen.controllers.main import Adye...
andreparames/odoo
addons/payment_adyen/models/adyen.py
Python
agpl-3.0
7,766
# -*- coding: utf-8 -*- { 'name': 'vnsoft020', 'version': '0.1', 'category': 'sale', 'sequence': 20, 'summary': '根据销售订单手工产生采购单', 'description': """ 手工生成采购订单 ================================== 1.指定销售订单产品明细的来源采购供应商,生成对应的采购订单。 """, 'author': 'VnSoft', 'website': 'http://blog.csdn.net/vn...
vnsofthe/odoo-dev
addons/vnsoft020/__openerp__.py
Python
agpl-3.0
756
from nose.tools import eq_, with_setup, raises from elasticsearch import NotFoundError from . import db, cleanall @with_setup(cleanall, cleanall) @raises(NotFoundError) def test_delete_wrong_id(): db.delete_book("unidacaso") @with_setup(cleanall, cleanall) def test_delete_id(): id = db.add_book(body=dict(ti...
g3-3k/libreant
libreantdb/test/test_delete.py
Python
agpl-3.0
820
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Camtocamp SA # @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume # European Central Bank and Polish National Bank # invented by Grzegorz Grzelak # Banxico implemented by Agus...
rschnapka/account-financial-tools
currency_rate_update/__init__.py
Python
agpl-3.0
1,167
# -*- 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...
draugiskisprendimai/odoo
addons/stock/stock.py
Python
agpl-3.0
270,837
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Savoir-faire Linux (<www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the t...
OCA/program
program_multi_menu/program_result.py
Python
agpl-3.0
2,520
from django.conf.urls import include, url from .views import NewsPodcastList, NewsPodcastDetail expressions = { 'newspodcast': r'(?P<slug>[\w-]+)', } news = [ url(r'^$', NewsPodcastList.as_view(), name='list'), url(r'^{newspodcast}/$'.format(**expressions), NewsPodcastDetail.as_view(), name='detail'), ]...
GISAElkartea/amv2
antxetamedia/news/urls.py
Python
agpl-3.0
381
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2019 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.p...
ecino/compassion-switzerland
invoice_postfinance_payment_controller/wizards/send_postfinance_link_wizard.py
Python
agpl-3.0
3,773
#------------------------------------------------------------------------------ # 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
cpsm/operational_limits/voltage_limit.py
Python
agpl-3.0
1,642
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pppcemr', '0025_auto_20151015_1517'), ] operations = [ migrations.RemoveField( model_name='treatment', ...
sstebbins/pppcpro
pppcemr/migrations/0026_auto_20151017_1024.py
Python
agpl-3.0
556
""" Tests suite for the bootstrap forms app. """ from django import forms from django.test import SimpleTestCase from django.template import Context, Template class TestForm(forms.Form): """ Test form """ # To be tested # - Non field errors # - Hidden fields # - Visible required / optional field...
TamiaLab/PySkCodeOnlineTester
apps/bootstrapform/tests.py
Python
agpl-3.0
47,872
# -*- coding: utf-8 -*- # Copyright 2013 Guewen Baconnier, Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). {'name': 'Sale Cancel Reason', 'version': '10.0.1.0.0', 'author': "Camptocamp,Odoo Community Association (OCA)", 'category': 'Sale', 'license': 'AGPL-3', 'complexity': 'norm...
kittiu/sale-workflow
sale_cancel_reason/__manifest__.py
Python
agpl-3.0
629
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by #...
MostlyOpen/odoo_addons_jcafb
myo_document_cst/wizard/document_create_xls_TCP17_wizard.py
Python
agpl-3.0
8,483
from selenium import webdriver from cv.features.steps.page_objects import signup, login import os def before_all(context): if os.environ.get('TRAVIS'): context.browser = webdriver.PhantomJS() else: context.browser = webdriver.Firefox() def after_all(context): context.browser.close() de...
Gimpneek/jobseek
jobseekr/cv/features/environment.py
Python
agpl-3.0
711
# Copyright 2017 Francesco Apruzzese <f.apruzzese@apuliasoftware.it> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from datetime import datetime from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError class DeclarationOfIntentYearlyLimit(models.Model): _...
OCA/l10n-italy
l10n_it_declaration_of_intent/models/declaration.py
Python
agpl-3.0
10,883
import unittest import json import csv import os from atomizer import make_file_writer, make_mongo_writer, atomize class TestAtomizeFunc(unittest.TestCase): def setUp(self): self.path = os.path.dirname(__file__) self.data_path = os.path.join(self.path,'../../data/knoedler_sample.csv') self.output_directory = ...
gri-is/lodjob
OLD_REPOSITORY/jobs/knoedler/tasks/test/test_atomizer.py
Python
agpl-3.0
1,715
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from django.conf import settings from django.core.exceptions ...
shawnadelic/shuup
shuup_tests/core/test_order_creator.py
Python
agpl-3.0
6,813
import logging import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit log = logging.getLogger(__name__) class DateSearchPlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) plugins.implements(plugins.IPackageController, inherit=True) def update_config(self, config): ...
18F/ckanext-datesearch
ckanext/datesearch/plugin.py
Python
agpl-3.0
1,661
#################################################################################################### # # C2cApiClient - A Python client for the camptocamp.org API # Copyright (C) 2017 Salvaire Fabrice # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
FabriceSalvaire/c2c-api-client
C2cApiClient/Client.py
Python
agpl-3.0
14,554
"""Fetcher to analyze Juliet test cases. Juliet is a static analysis test suite provided by NIST's SAMATE team. It contains injected, known CWE's in specific points and similar code snippets with the injected flaws fixed. """ import tempfile import kiskadee.queue class Fetcher(kiskadee.fetchers.Fetcher): """Fet...
LSS-USP/kiskadee
kiskadee/fetchers/juliet.py
Python
agpl-3.0
1,312
#!/usr/bin/env python2.6 #Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # #This file is part of Shinken. # #Shinken 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 Fr...
baloo/shinken
test/test_notifway.py
Python
agpl-3.0
4,797
# Copyright (C) 2015 Forest and Biomass Romania # Copyright (C) 2020 NextERP Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging import requests from odoo import api, fields, models _logger = logging.getLogger(__name__) CEDILLATRANS = bytes.maketrans( "\u015f\u0163\u015e...
OCA/l10n-romania
l10n_ro_partner_create_by_vat/models/res_partner.py
Python
agpl-3.0
7,366
from . import stock_move from . import stock_quant from . import stock_picking_type from . import stock_reserve_rule
OCA/stock-logistics-warehouse
stock_reserve_rule/models/__init__.py
Python
agpl-3.0
117
# Generated by Django 1.11.15 on 2018-11-20 20:29 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0132_person_works_to_major_works'), ] operations = [ migrations.AlterUniqueTogether( name='courserunsocial...
edx/course-discovery
course_discovery/apps/course_metadata/migrations/0133_remove_courserun_social_network_and_add_title_to_person_socialnetwork.py
Python
agpl-3.0
1,064
# The Hazard Library # Copyright (C) 2014-2017 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. #...
gem/oq-hazardlib
openquake/hazardlib/tests/geo/utils_test.py
Python
agpl-3.0
17,940
import logging import os from comics.aggregator.tests.command import * from comics.aggregator.tests.crawler import * logging.basicConfig(level=logging.CRITICAL, filename=os.devnull)
klette/comics
comics/aggregator/tests/__init__.py
Python
agpl-3.0
184
#!/usr/bin/env python # encoding: utf-8 import warnings import numpy as np from collections import OrderedDict from gensim import utils from six import string_types """ Produce translation matrix to translate the word from one language to another language, using either standard nearest neighbour method or globally c...
macks22/gensim
gensim/models/translation_matrix.py
Python
lgpl-2.1
13,753
from drawingDimensioning.command import * from drawingDimensioning.svgConstructor import arrowHeadSVG, numpy, directionVector d = DimensioningCommand() d.registerPreference( 'arrowL1') d.registerPreference( 'arrowL2') d.registerPreference( 'arrowW') d.registerPreference( 'strokeWidth' ) d.registerPreference( 'lineColo...
hamish2014/FreeCAD_drawing_dimensioning
drawingDimensioning/weldingSymbols.py
Python
lgpl-2.1
21,758
# Copyright (C) 2007, Red Hat, Inc. # Copyright (C) 2009, Aleksey Lim, Sayamindu Dasgupta # # 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 of the License, or (at your ...
sugarlabs/sugar-toolkit-gtk3
src/sugar3/graphics/window.py
Python
lgpl-2.1
14,622
import ocl import camvtk import time import vtk import datetime import math # note 2018.08: # the Weave class is not provided to python, so this deprecated example script won't run if __name__ == "__main__": print(ocl.version()) myscreen = camvtk.VTKScreen() a = ocl.Point(0,1,0.3) myscreen.addActor(...
aewallin/opencamlib
examples/python/fiber/fiber_07_weave.py
Python
lgpl-2.1
4,236
# Copyright (C) Linaro Limited -0700,2015,2017 # Author: Milo Casagrande <milo.casagrande@linaro.org> # # 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 2.1 of the License, ...
kernelci/kernelci-backend
app/utils/report/tests/test_report_common.py
Python
lgpl-2.1
5,916
import dateutil.parser import time import os import logging from urlparse import parse_qs from helper import * logger = logging.getLogger() logger.setLevel(logging.DEBUG) """ --- Functions that control the bot's behavior --- """ def help(intent_request): help_topics = get_slots(intent_request)["HelpTopics"...
opsxbot/opsbot
src/help/help-init/code.py
Python
lgpl-2.1
12,722
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
qtproject/pyside-pyside
tests/QtGui/qitemselection_test.py
Python
lgpl-2.1
1,792
#!/usr/bin/env python # # Roadhouse # Copyright (C) 2013 Sandaruwan Silva <c-h [-a-t-] users [-dot-] sf [-dot-] net> # # 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...
s-silva/roadhouse
Server/core/photos.py
Python
lgpl-2.1
3,761
""" Fedora Notifications internal API """ from collections import defaultdict import inspect import logging import re import smtplib from dogpile.cache import make_region try: from dogpile.cache.util import kwarg_function_key_generator except ImportError: from fmn.dogpile_backports import kwarg_function_key_g...
fedora-infra/fmn
fmn/lib/__init__.py
Python
lgpl-2.1
9,136
#!/usr/bin/env python from distutils.core import setup setup( name='pyclut', version='0.1', description='pyclutter widgets library', author='Eric Colleu', author_email='eric.colleu@gmail.com', url='http://code.google.com/p/pyclutter-widgets/', packages=[ 'pyclut', 'pyclut.basics', 'pyclut.controls', 'p...
ericcolleu/pyclutter-widgets
setup.py
Python
lgpl-2.1
418
# This file is part of fedmsg. # Copyright (C) 2012-2014 Red Hat, Inc. # # fedmsg 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 versi...
msimacek/fedmsg_meta_fedora_infrastructure
fedmsg_meta_fedora_infrastructure/bz.py
Python
lgpl-2.1
5,637
# -*- coding: UTF-8 -*- # stack_tab.py # Created by Francesco Porcari on 2010-12-19. # Copyright (c) 2010 Softwell. All rights reserved. "Test page description" class GnrCustomWebPage(object): py_requires = "gnrcomponents/testhandler:TestHandlerFull" auto_polling = 0 user_polling = 0 def windowTitle(...
poppogbr/genropy
packages/test15/webpages/dojo/layout/stack_tab.py
Python
lgpl-2.1
3,719
# Copyright (C) 2012 Red Hat, Inc. All rights reserved. # # 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. # # ...
jsafrane/openlmi-storage
src/openlmi/storage/LMI_DiskPartitioningConfigurationService.py
Python
lgpl-2.1
26,572
############################################################################## # 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/albert/package.py
Python
lgpl-2.1
1,746
# Copyright (C) 2016 Anne Mulhern <amulhern@redhat.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 Foundation; either version 2.1 of the License, or (at your # option) any later version. # Thi...
mulkieran/parseudev
tests/test_version.py
Python
lgpl-2.1
1,255
# coding=utf-8 # This file is part of cclib (http://cclib.github.io), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2007-2014, the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public ...
Clyde-fare/cclib
src/cclib/method/lpa.py
Python
lgpl-2.1
4,979
# Copyright (C) 2011 Jeff Forcier <jeff@bitprophet.org> # # This file is part of ssh. # # 'ssh' 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) # ...
bitprophet/ssh
ssh/pipe.py
Python
lgpl-2.1
3,937
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) 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. # # This program is distributed in the hope that it will b...
felixonmars/suds-ng
suds/serviceproxy.py
Python
lgpl-3.0
2,935
# Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from dolfin import * from rbnics import * from sampling import LinearlyDependentUniformDistribution @ExactParametrizedFunctions() @PullBackFormsToReferenceDomain() @AffineShapeParametrizati...
mathLab/RBniCS
tests/methodology/tutorials/12_stokes_linear/tutorial_stokes_linear_1_rb_exact.py
Python
lgpl-3.0
4,809
# (C) British Crown Copyright 2014 - 2019, Met Office # # This file is part of cartopy. # # cartopy 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)...
ocefpaf/cartopy
lib/cartopy/io/ogc_clients.py
Python
lgpl-3.0
35,567
# Generated from /Users/pelson/dev/scitools/cf-units/cf_units/_udunits2_parser/parser/udunits2Lexer.g4 by ANTLR 4.7.2 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u...
ocefpaf/cf_units
cf_units/_udunits2_parser/parser/udunits2Lexer.py
Python
lgpl-3.0
26,105
from research.three_phase.Engine.Devices.branch import * from research.three_phase.Engine.Devices.bus import * class LineTypeSeq: def __init__(self, name, Z_SEQ, Ysh_SEQ): """ 3-phase branch defined from the positive sequence elements :param name: name of the line type object :par...
SanPen/GridCal
src/research/three_phase/Engine/Devices/line.py
Python
lgpl-3.0
4,311
files = [ "wb_fmc130m_4ch.vhd", "xwb_fmc130m_4ch.vhd", "wbgen/fmc_130m_4ch_regs_pkg.vhd", "wbgen/fmc_130m_4ch_regs.vhd" ];
lerwys/bpm-sw-old-backup
hdl/modules/dbe_wishbone/wb_fmc130m_4ch/Manifest.py
Python
lgpl-3.0
129
#!/usr/bin/env python ''' Script to convert ORCA basis set file to Dalton library format. Reads: stdin Writes: stdout Example usage: $ ./orca2dalton.py < ano-pV5Z.bas > ano-pV5Z.dalton Author: Radovan Bast <lastname at kth.se> ''' import sys from chemistry impor...
bast/BasisSetConversionTools
orca2dalton.py
Python
lgpl-3.0
5,222
from six import iteritems from six.moves import StringIO from numpy import array, zeros, unique from pyNastran.bdf.dev_vectorized.utils import slice_to_iter from pyNastran.bdf.field_writer_8 import print_card_8 from pyNastran.bdf.field_writer_16 import print_card_16 from pyNastran.bdf.bdf_interface.assign_typ...
saullocastro/pyNastran
pyNastran/bdf/dev_vectorized/cards/elements/bush/pbush.py
Python
lgpl-3.0
3,397
import datetime from google.appengine.api import users from google.appengine.ext import db class User(db.Model): name = db.StringProperty('Full Name') account = db.UserProperty() phone_number = db.PhoneNumberProperty('Phone Number') address = db.PostalAddressProperty('Postal Address') website = db....
theintencity/flash-videoio
examples/django-apps/project/experts/models.py
Python
lgpl-3.0
3,541
import wx from coinpy.model.constants.bitcoin import COIN class BalancePanel(wx.Panel): def __init__(self, parent): super(BalancePanel, self).__init__(parent) self.confirmed_count_label = wx.StaticText(self, -1, "") self.unconfirmed_count_label = wx.StaticText(self, -1, "") ...
sirk390/coinpy
coinpy-client/src/coinpy_client/view/wallet/balance.py
Python
lgpl-3.0
1,159
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. """Base hook system. Check the :ref:`bliss-motion-hook-how-to` to find how to use motion hooks in your system""" import weakref __all__...
tiagocoutinho/bliss
bliss/common/hook.py
Python
lgpl-3.0
1,301
MODULES = ['main', 'backend'] DEPS = [ (['any'], [ ('plugin', 'services'), ('app', 'dnsmasq', 'dnsmasq') ]) ] NAME = 'Dnsmasq' PLATFORMS = ['any'] DESCRIPTION = 'dnsmasq configuration' VERSION = '0.1' AUTHOR = 'Ajenti team' HOMEPAGE = 'http://ajenti.org'
DmZ/ajenti
plugins/dnsmasq/__init__.py
Python
lgpl-3.0
287
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from rest_framework import routers from .views import * router = routers.DefaultRouter() router.register(r'muncipalities', MuncipalityViewSet, base_name='muncipality') router.register(r'districts', DistrictViewSet, base_name='district') router...
webuildcity/wbc
wbc/region/urls.py
Python
lgpl-3.0
522
# IfcOpenShell - IFC toolkit and geometry engine # Copyright (C) 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of IfcOpenShell. # # IfcOpenShell 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 Foundat...
IfcOpenShell/IfcOpenShell
src/ifcopenshell-python/test/api/library/test_remove_library.py
Python
lgpl-3.0
1,827
#!/usr/bin/python # -*- coding: utf-8 -*- #Anki add-on #Written by Sara Jakša sarajaksa@gmail.com from anki.hooks import addHook from aqt import mw from anki.sound import play import os import random #lenght of a cycle (after how many answers does the audio play) number = 5 #Folder with Audios (add the path to the fo...
sarajaksa/anki-addons
reward_sound.py
Python
unlicense
1,432
## Script (Python) "getPautasPautao" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=data='', ##title=Retorna a lista de pautas do pautao ret = { 'manha': [], 'tarde': [], 'noite': [], 'nota':[], 'programas': [], 'semturno': [] } if...
lflrocha/ebc.pauta
ebc/pauta/skins/ebc_pauta_custom_templates/getPautasPautao.py
Python
unlicense
1,317
# -*- coding: iso-8859-15 -*- # This program is public domain # Author: Paul Kienzle u""" Adds average mass for the elements: * mass, mass_units (u) The molar mass averaged over natural isotope abundance. Adds mass and abundance information for isotopes: * mass, mass_units (u) The molar mass...
rogcg/environment
externals/periodictable/mass.py
Python
unlicense
109,839
# 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 agreed to in writing, software # d...
openstack/ironic
ironic/tests/unit/common/test_wsgi_service.py
Python
apache-2.0
3,424
# Echo client program import socket import time import sys HOST = sys.argv[1] PORT = int(sys.argv[2]) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) if len(sys.argv) < 5: s.sendall('GET ' + sys.argv[3] + '\r\n\r\n') else: s.sendall('GET ' + sys.argv[3] + ' ' + sys.argv[4] + '\r\...
flashscope/testJavaWebServer
public_html/cli.py
Python
apache-2.0
440
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ("sponsors", "0001_initial"), ] operations = [ migrations.AlterField( model_name="sponsor", name="cont...
proevo/pythondotorg
sponsors/migrations/0002_auto_20150416_1853.py
Python
apache-2.0
808
#!/usr/bin/env python #------------------------------------------------------------------------------- # Name: WebApp Profiler for ZAP # Purpose: Script for parsing persistent ZAP session file # # Author: spartantri # # Created: 17/06/2016 # Copyright: (c) mleos 2016 # License: GPLv3 #--------...
spartantri/webappprofiler
webappprofiler-v1.py
Python
apache-2.0
12,694