code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
# Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
from pyramid.view import view_config
from dace.processinstance.core import DEFAULTMAPPING_ACTIONS_VIEWS
from pontus.view import BasicView
from lac.content.processes.... | ecreall/lagendacommun | lac/views/user_management/deactivate.py | Python | agpl-3.0 | 857 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Modules used for ETL - Create User
# Modules required:
import os
import xmlrpclib, sys, csv, ConfigParser
from datetime import datetime
# Set up parameters (for connection to Open ERP Database) *********************
config = ConfigParser.ConfigParser()
file_config = o... | Micronaet/micronaet-quality | quality/etl/errata_corrige.py | Python | agpl-3.0 | 1,215 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms... | foosel/OctoPrint | src/octoprint/server/api/printer.py | Python | agpl-3.0 | 15,729 |
{
'name': 'Website Gross/Net Price (B2B/B2C)',
'summary': 'Website Product Gross/Net Price (B2B/B2C)',
'category': 'Website',
'version': '1.0',
"sequence": 10,
'website': 'http://wt-io-it.at',
'author': 'WT-IO-IT GmbH',
'depends': ['website_sale_options', 'account_product_gross_net'],
... | initOS/odoo-addons | website_product_gross_net/__openerp__.py | Python | agpl-3.0 | 468 |
# -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import sale
| Eficent/odoo-operating-unit | sale_operating_unit/models/__init__.py | Python | agpl-3.0 | 261 |
from common.constants import gameModes
from pp import ez
from pp import wifipiano3
from pp import cicciobello
PP_CALCULATORS = {
gameModes.STD: ez.Ez,
gameModes.TAIKO: ez.Ez,
gameModes.CTB: cicciobello.Cicciobello,
gameModes.MANIA: wifipiano3.WiFiPiano
}
| osuripple/lets | pp/__init__.py | Python | agpl-3.0 | 272 |
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# 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 ... | Micronaet/micronaet-production | working_bom/__openerp__.py | Python | agpl-3.0 | 1,492 |
# vim: set tw=0:
from django.conf.urls import url, include
from django.core.urlresolvers import RegexURLPattern
from rest_framework.urlpatterns import format_suffix_patterns
from rest_framework.authtoken.views import obtain_auth_token
from . import views
def format_patterns(urlpatterns):
"If a URL pattern ends i... | editorsnotes/editorsnotes | editorsnotes/api/urls.py | Python | agpl-3.0 | 3,744 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010 Eduardo Robles Elvira <edulix AT gmail DOT com>
#
# 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 yo... | wadobo/timebank | user/forms.py | Python | agpl-3.0 | 5,777 |
"""
Tests for Blocks api.py
"""
from django.test.client import RequestFactory
from course_blocks.tests.helpers import EnableTransformerRegistryMixin
from student.tests.factories import UserFactory
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestC... | analyseuc3m/ANALYSE-v1 | lms/djangoapps/course_api/blocks/tests/test_api.py | Python | agpl-3.0 | 3,474 |
##############################################################################
#
# Swiss localization Direct Debit module for OpenERP
# Copyright (C) 2014 Compassion (http://www.compassion.ch)
# @author: Cyril Sester <cyril.sester@outlook.com>
#
# This program is free software: you can redistribute it... | ndtran/l10n-switzerland | l10n_ch_lsv_dd/wizard/lsv_export_wizard.py | Python | agpl-3.0 | 21,814 |
##############################################################################
#
# Copyright (C) 2016 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__.py
#
#####################... | CompassionCH/compassion-modules | partner_communication/wizards/pdf_wizard.py | Python | agpl-3.0 | 2,115 |
from daisyproducer.documents.models import Document, Version, Product
from daisyproducer.abacus_import.management.commands.importABACUS import get_type, get_documents_by_product_number, get_documents_by_source_or_title_source_edition
from django.core.management.base import BaseCommand, CommandError
from django.db impor... | sbsdev/daisyproducer | daisyproducer/abacus_import/management/commands/importProductData.py | Python | agpl-3.0 | 4,413 |
# -*- encoding: utf-8 -*-
###############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
############# Credits ########################################... | lombritz/odoo | addons/pos_delivery_restaurant/wizard/__init__.py | Python | agpl-3.0 | 1,334 |
###########################################################################
# (C) Vrije Universiteit, Amsterdam (the Netherlands) #
# #
# This file is part of AmCAT - The Amsterdam Content Analysis Toolkit #
# ... | amcat/amcat | api/rest/viewsets/sentence.py | Python | agpl-3.0 | 2,276 |
import numpy as np
import os
import pandas as pd
import statsmodels.formula.api as smf
import sys
# @params: takes mobaid codes string
# @returns: list of mobaid strings
def splitCode(x):
if type(x) is str:
codes = x.split(',')
return codes
else:
return []
# @returns binary T/F if string code is in string/lis... | DSSG-paratransit/main_repo | Access_Analysis_Project/Scripts/dwellTimeAnalysis.py | Python | agpl-3.0 | 4,203 |
#!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | carthach/essentia | test/src/unittests/all_tests.py | Python | agpl-3.0 | 8,953 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2020 Didotech S.r.l. (<http://www.didotech.com/>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
#... | iw3hxn/LibrERP | purchase_discount_combined/__openerp__.py | Python | agpl-3.0 | 1,361 |
import abc
import re
from typing import Union as U, Iterator, Optional as O
from pymongo import ASCENDING, DESCENDING
from sqlparse import tokens, parse as sqlparse
from sqlparse.sql import Token, Identifier, Function, Comparison, Parenthesis, IdentifierList, Statement
from . import query as query_module
from ..excepti... | nesdis/djongo | djongo/sql2mongo/sql_tokens.py | Python | agpl-3.0 | 12,682 |
# -*- coding: utf-8 -*-
# Copyright 2015-2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import mock
from contextlib import contextmanager
from odoo import _
from odoo.addons.connector_carepoint import related_action
from .common import SetUpCarepointBase
mk_file = 'odoo.add... | laslabs/odoo-connector-carepoint | connector_carepoint/tests/test_related_action.py | Python | agpl-3.0 | 4,249 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2012 OpenERP - Team de Localización Argentina.
# https://launchpad.net/~openerp-l10n-ar-localization
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | pronexo-odoo/odoo-argentina | l10n_ar_wsafip_fe/__openerp__.py | Python | agpl-3.0 | 2,467 |
from hearthstone.enums import GameTag
from . import enums
class Manager(object):
def __init__(self, obj):
self.obj = obj
self.observers = []
def __getitem__(self, tag):
if self.map.get(tag):
return getattr(self.obj, self.map[tag], 0)
raise KeyError
def __setitem__(self, tag, value):
setattr(self.obj... | Ragowit/fireplace | fireplace/managers.py | Python | agpl-3.0 | 7,048 |
import os
import sys
import time
import unittest
sys.path.append('../..')
import spade
import xmpp
import xml.dom.minidom
def CreateSD(s=""):
sd = spade.DF.ServiceDescription()
sd.setName("servicename1"+s)
sd.setType("type1"+s)
sd.addProtocol("sdprotocol1"+s)
sd.addOntologies("sdontology1"+s)
... | exic/spade2 | examples/unittests/dadTestCase.py | Python | lgpl-2.1 | 14,968 |
#!/usr/bin/python2
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Nova Billing
# Copyright (C) 2010-2012 Grid Dynamics Consulting Services, Inc
# All Rights Reserved
#
# 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 t... | altai/nova-billing | setup.py | Python | lgpl-2.1 | 1,852 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012, 2013 Sebastian Wiesner <lunaryorn@gmail.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, ... | mulkieran/pyudev | pyudev/monitor.py | Python | lgpl-2.1 | 20,793 |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | choderalab/FAHMunge | fahmunge/_version.py | Python | lgpl-2.1 | 18,449 |
"""Setup script for NodeTrie"""
from setuptools import setup, find_packages, Extension
import versioneer
try:
from Cython.Build import cythonize
except ImportError:
USING_CYTHON = False
else:
USING_CYTHON = True
ext = 'pyx' if USING_CYTHON else 'c'
extensions = [Extension("nodetrie.nodetrie",
... | NodeTrie/NodeTrie_Py | setup.py | Python | lgpl-2.1 | 2,127 |
# -*- coding: utf-8 -*-
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_10(fissureCoude):
# cas test ASCOU17
# ---------------------------------------------------------------------------
def setParamGeometrieSaine(self):
"""
Paramètres géométriques du tuyau coudé sain:
angl... | FedoraScientific/salome-smesh | src/Tools/blocFissure/CasTests/fissureCoude_10.py | Python | lgpl-2.1 | 4,425 |
# -*- coding: utf-8 -*-
from . import website_sale_available_fake
| ilmir-k/website-addons | website_sale_available_fake/controllers/__init__.py | Python | lgpl-3.0 | 66 |
############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the co... | stdgregwar/elve | personaltypes.py | Python | lgpl-3.0 | 2,750 |
# -*- encoding: utf-8 -*-
# Yuuno - IPython + VapourSynth
# Copyright (C) 2017,2018 StuxCrystal (Roland Netzsch <stuxcrystal@encode.moe>)
#
# 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... | stuxcrystal/yuuno | yuuno_ipython/ipython/apps/feature.py | Python | lgpl-3.0 | 1,634 |
"""Garbage collection thread for representing zmq refcount of Python objects
used in zero-copy sends.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013 Brian E. Granger & Min Ragan-Kelley
#
# This file is part of pyzmq
#
# Distributed under the terms of the New ... | ellisonbg/pyzmq | zmq/utils/garbage.py | Python | lgpl-3.0 | 5,396 |
# 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 ... | xuwenbao/suds | suds/client.py | Python | lgpl-3.0 | 26,012 |
import sys
import types as types
from PySide import QtGui
from PySide.QtGui import *
from PySide.QtCore import *
class MTextStylrtView(QWidget):
colorChanged = Signal(list)
def __init__(self, color = None, parent = None):
super(MColorView, self).__init__(parent)
self.painter = QPainter()
... | s910324/Sloth | bokehPlotter/BokehGraphEditor/MaterialDesignList/MTextStyler.py | Python | lgpl-3.0 | 9,249 |
# -*- coding: utf-8 -*-
"""Round-robin scheduling."""
# Copyright (C) 2015 Alexander Jones
#
# 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 yo... | happy5214/competitions-scheduler | competitions/scheduler/roundrobin.py | Python | lgpl-3.0 | 9,367 |
#!/usr/bin/env python3
# This file is part of cron-wrap.
#
# cron-wrap 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.
#
# cron-wrap i... | crustymonkey/cron-wrap | cwrap.py | Python | lgpl-3.0 | 33,872 |
#!/usr/bin/env python2
# References:
# https://fedoraproject.org/wiki/Koji/ServerHowTo
# https://github.com/sbadakhc/kojak/blob/master/scripts/install/install
import util.cfg as cfg
import util.pkg as pkg
import util.cred as cred
from util.log import log
#
# Setup
#
log.info("General update")
pkg.clean()
pkg.update... | ASzc/nagoya | cfg/koji-builder/setup.py | Python | lgpl-3.0 | 1,421 |
from facile import constraint, solve_all, sum, variable
# http://xkcd.com/287/
# Some amount (or none) of each dish should be ordered to give a total of
# exactly 15.05
price = [215, 275, 335, 355, 420, 580]
total = 1505
products = [
"mixed fruit",
"french fries",
"side salad",
"host wings",
"mo... | xoolive/facile | examples/xkcd.py | Python | lgpl-3.0 | 1,013 |
"""
DAQmxDO.py
Part of the AQuA Cesium Controller software package
author=Martin Lichtman
created=2013-10-19
modified>=2015-05-24
This file holds everything to model a National Instruments DAQmx pulse output. It communicated to LabView via the higher up LabView class.
"""
from __future__ import division
__author__ ... | QuantumQuadrate/CsPyController | python/DAQmxDO.py | Python | lgpl-3.0 | 8,406 |
from __future__ import annotations
import base64
from collections import OrderedDict
from datetime import timedelta
from itertools import chain
import numbers
import random
import re
import sys
from typing import (
Any,
Iterable,
Iterator,
Mapping,
Tuple,
TYPE_CHECKING,
TypeVar,
Union,
... | lablup/sorna-common | src/ai/backend/common/utils.py | Python | lgpl-3.0 | 9,171 |
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# Copyright 2012 Canonical
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
"""Tests for the TextInput Qml... | LeoTestard/qt-ubuntu-components | tests/autopilot/tavastia/tests/textfield/test_textfield.py | Python | lgpl-3.0 | 923 |
import unittest
import responses
import digitalocean
import json
from .BaseTest import BaseTest
class TestTags(BaseTest):
def setUp(self):
super(TestTags, self).setUp()
@responses.activate
def test_load(self):
data = self.load_from_file('tags/single.json')
url = self.base_url +... | koalalorenzo/python-digitalocean | digitalocean/tests/test_tag.py | Python | lgpl-3.0 | 4,000 |
## Script that takes in a list of fastas and generates summaries of their differences
# this is python implementation to which bugMat was compared in our publication.
# code by Drs Madeleine Cule and David Eyre, Oxford University
import sys, re, os, gzip
from Bio import SeqIO
from itertools import izip
bas... | davidhwyllie/bugMat | python_comparator_code.py | Python | lgpl-3.0 | 2,568 |
#!/usr/bin/env python
import rospy
from easy_handeye.handeye_server_robot import HandeyeServerRobot
def main():
rospy.init_node('easy_handeye_calibration_server_robot')
while rospy.get_time() == 0.0:
pass
calibration_namespace=rospy.get_param('~calibration_namespace')
cw = HandeyeServerRob... | marcoesposito1988/easy_handeye | easy_handeye/scripts/robot.py | Python | lgpl-3.0 | 414 |
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from ..BaseModel import BaseModel
class ClusterPrintJobConstraints(BaseModel):
"""Class representing a cloud cluster print job constraint"""
def __init__(self, require_printer_name: Op... | Ultimaker/Cura | plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraints.py | Python | lgpl-3.0 | 717 |
# Copyright (C) 2015-2022 by the RBniCS authors
#
# This file is part of RBniCS.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from numpy.linalg import solve
from rbnics.backends.abstract import LinearProblemWrapper
from rbnics.backends.online.basic import LinearSolver as BasicLinearSolver
from rbnics.backends.online... | mathLab/RBniCS | rbnics/backends/online/numpy/linear_solver.py | Python | lgpl-3.0 | 1,491 |
"""
Copyright (c) 2016-2017 The Nirdizati Project.
This file is part of "Nirdizati".
"Nirdizati" 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 lat... | nirdizati/nirdizati-runtime | PredictiveMethods/RemainingTime/batch/PredictiveMonitor.py | Python | lgpl-3.0 | 3,958 |
from pathplanning import *
| wannesvl/topap | pathplanning/__init__.py | Python | lgpl-3.0 | 27 |
import hashlib
def hash160(data):
hash1 = hashlib.sha256(data).digest()
ripemd160 = hashlib.new('ripemd160')
ripemd160.update(hash1)
return ripemd160.digest()
| sirk390/coinpy | coinpy-lib/src/coinpy/tools/bitcoin/hash160.py | Python | lgpl-3.0 | 176 |
import logging
from binascii import hexlify
from socket import inet_aton, inet_ntoa
from struct import pack, unpack_from
from . import DHTError
from ..messaging.anonymization.tunnel import IntroductionPoint, PEER_SOURCE_DHT
from ..peer import Peer
from ..util import cast_to_bin
class DHTCommunityProvider(object):
... | qstokkink/py-ipv8 | ipv8/dht/provider.py | Python | lgpl-3.0 | 2,972 |
# (C) British Crown Copyright 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 ve... | Jozhogg/iris | docs/iris/example_tests/test_polynomial_fit.py | Python | lgpl-3.0 | 1,274 |
import os
import pickle
import sys
import getopt
import numpy as np
from keras.models import Sequential
from keras.layers import Flatten, Dropout, Dense, Bidirectional
from keras.layers.convolutional import Conv1D
from keras.layers.convolutional import MaxPooling1D
from keras.layers.embeddings import Embeddi... | moment-of-peace/EventForecast | rnn_text.py | Python | lgpl-3.0 | 9,696 |
#!/usr/bin/env python
import os
import os.path
from setuptools import setup
NAME = 'iris_grib'
PYPI_NAME = 'iris-grib'
PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGE_ROOT = os.path.join(PACKAGE_DIR, NAME)
packages = []
for d, _, _ in os.walk(os.path.join(PACKAGE_DIR, NAME)):
if os.path.exists(o... | SciTools/iris-grib | setup.py | Python | lgpl-3.0 | 3,340 |
# This file is part of quichem.
#
# quichem 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.
#
# quichem is distributed in the ho... | spamalot/quichem | quichem/compilers/display/__init__.py | Python | lgpl-3.0 | 2,168 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-30 19:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contratos', '0002_auto_20170330_1328'),
]
operations = [
migrations.RenameField(
... | axelleonhart/TrainingDjango | materiales/apps/contratos/migrations/0003_auto_20170330_1333.py | Python | lgpl-3.0 | 432 |
# This file is part of MSMTools.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# MSMTools 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 ... | trendelkampschroer/msmtools | msmtools/analysis/dense/correlations.py | Python | lgpl-3.0 | 10,071 |
from setuptools import setup
setup(name='confdown',
version='0.1',
description='A Markdown-based self documenting configuration lib',
url='http://github.com/abbgrade/confdown',
author='Steffen Kampmann',
author_email='confdown@abbgra.de',
license='LGPL3',
packages=['confdown']... | abbgrade/confdown | setup.py | Python | lgpl-3.0 | 399 |
from copper.cop.cop_node import CopNode
import pyopencl as cl
import numpy
from PIL import Image
class COP2_Comp_Add(CopNode):
'''
This filter adds foreground over background using OpenCL
'''
type_name = "add"
category = "comps"
def __init__(self, engine, parent):
super(CLC_Comp_Add, self).__init__(engine, ... | cinepost/Copperfield_FX | copper/cop/cop_comps.py | Python | unlicense | 2,456 |
import io
import json
import pdb
import random
import string
from datetime import datetime
from flask import Flask, render_template, make_response, redirect
from flask.ext.restful import Api, Resource, reqparse, abort
from twitter import Twitter
# Define our priority levels.
# These are the values that the "priority... | danuzclaudes/helpdesk | server.py | Python | unlicense | 6,950 |
import sys
import struct
import logging
import ibapi
from ibapi.client import EClient
from ibapi.wrapper import EWrapper, iswrapper
import PyQt5.Qt as qt
import PyQt5.QtNetwork as qtnetwork
import tws_async.util as util
util.allowCtrlC()
__all__ = ['TWSClientQt', 'iswrapper']
class TWSClientQt(EWrapper, EClient)... | erdewit/tws_async | tws_async/twsclientqt.py | Python | unlicense | 5,611 |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: type_Params.py
from types import *
PARAMS_ENCODING_ASCII = 0
PARAMS_ENCODING_UNICODE = 1
PARAMS_MIN_THRESHOLD = 2
class Params:
def __init__(se... | DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/file/cmd/strings/type_Params.py | Python | unlicense | 3,175 |
# Day 19 of Advent of Code
i = 0
for o in range(1, 3012211):
i = (i+2)%o
print(i+1)
| broad-well/aoc2016 | day19p1.py | Python | unlicense | 89 |
# encoding=utf8
import sublime
def get_message_from_ftype(ftype, argpos):
msg = ftype["name"] + "("
i = 0
for name, type in ftype["args"]:
if i > 0: msg += ", "
if i == argpos: msg += "*"
msg += name + ("" if type == "?" else ": " + type)
i += 1
msg += ")"
if ftype["retval"] is not None:
... | michael-ball/sublime-text | sublime-text-3/Packages/tern_for_sublime/utils/renderer.py | Python | unlicense | 3,925 |
# coding=utf-8
__author__ = 'etcher3rd'
__version__ = "alpha31"
__guid__ = '5b6dab14-577b-48b8-955a-80c0112a2aee'
import sys
import ctypes
from os import _exit
if __name__ == "__main__":
if hasattr(sys, 'frozen'):
sys.stdout = open("stdout.log", "w")
sys.stderr = open("stderr.log", "w")
# ... | etcher3rd/EKPI | main.py | Python | unlicense | 552 |
import relations
employees = relations.Relation('name', 'emp_id', 'dept_name')
employees.add(name='Harry', emp_id=3415, dept_name='Finance')
employees.add(name='Sally', emp_id=2241, dept_name='Sales')
employees.add(name='George', emp_id=3401, dept_name='Finance')
employees.add(name='Harriet', emp_id=2202, dept_name='... | zacharyvoase/relations | test/test_joins.py | Python | unlicense | 867 |
# -*- coding: utf-8 -*-
#
# Copyright 2015-2022 BigML
#
# 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... | bigmlcom/python | bigml/tests/create_sample_steps.py | Python | apache-2.0 | 2,068 |
import logging
import threading
import time
from django.utils.functional import cached_property, SimpleLazyObject
import jmespath
from zentral.core.compliance_checks import register_compliance_check_class
from zentral.core.compliance_checks.compliance_checks import BaseComplianceCheck
from zentral.core.compliance_check... | zentralopensource/zentral | zentral/contrib/inventory/compliance_checks.py | Python | apache-2.0 | 5,942 |
# Copyright (c) 2016 b<>com
#
# 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, softw... | openstack/watcher-dashboard | watcher_dashboard/content/goals/panel.py | Python | apache-2.0 | 715 |
#
# KVM HA in OpenStack (Demo Version)
#
# Copyright HP, Corp. 2014
#
# Authors:
# Lei Li <li.lei2@hp.com>
#
# 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
#
# ht... | leilihh/novaha | nova/kvmha/internal_driver.py | Python | apache-2.0 | 2,236 |
#
# Licensed to the Apache Software Foundation (ASF) 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 us... | snowch/biginsight-examples | examples/ElasticsearchIntegrationWithSpark/export_to_elasticsearch.py | Python | apache-2.0 | 2,079 |
import sys
import linecache
import time
import socket
import traceback
import thread
import threading
import Queue
from idlelib import CallTips
from idlelib import AutoComplete
from idlelib import RemoteDebugger
from idlelib import RemoteObjectBrowser
from idlelib import StackViewer
from idlelib import... | Jeff-Tian/mybnb | Python27/Lib/idlelib/run.py | Python | apache-2.0 | 12,890 |
# Copyright 2013 University of Chicago
class EEAgentParameterException(Exception):
def __init__(self, message):
Exception.__init__(self, message)
class EEAgentUnauthorizedException(Exception):
pass
class EEAgentSupDException(Exception):
def __init__(self, message):
Exception.__init_... | ooici/eeagent | eeagent/eeagent_exceptions.py | Python | apache-2.0 | 337 |
import yaml
from mongoengine import *
import datetime
import time
import hashlib
import uuid
from pprint import pprint
from user import User, Users
from cloudmesh_management.generate import random_user
from cloudmesh_management.user import read_user
FILENAME = "/tmp/user.yaml"
connect('user', port=27777)
users = Us... | rajpushkar83/cloudmesh | cloudmesh/management/read.py | Python | apache-2.0 | 752 |
import trollius
from trollius import From
import pygazebo.msg.joint_cmd_pb2
import numpy as np
class SampleAgent():
def __init__(self, brica_agent, visual_comp, action_comp):
self.brica_agent = brica_agent
self.sensor_comp = visual_comp
self.action_comp = action_comp
def run(self):
... | masayoshi-nakamura/CognitiveArchitectureLecture | examples/brainsimulator_agent/pygazebo_agent.py | Python | apache-2.0 | 1,805 |
# Copyright 2013 Rackspace Hosting
#
# 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 ... | rmyers/clouddb-rpc | dashboard/stashboard/content/databases/views.py | Python | apache-2.0 | 19,542 |
from math import fabs
from epicduels.content import game_state as GS
def square_state(board, pos):
return board['board'][pos['x']][pos['y']]
def is_diagonal(origin, target):
"""
Verify if points are diagonal
"""
return fabs(origin['x'] - target['x']) == fabs(origin['y'] - target['y'])
# verif... | aelkikhia/pyduels27 | epicduels/rules/board_rules.py | Python | apache-2.0 | 7,465 |
#
# Copyright (c) 2013,2014, Oracle and/or its affiliates. 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
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the... | scavarda/mysql-dbcompare | mysql-utilities-1.6.0/mysql/fabric/failure_detector.py | Python | apache-2.0 | 8,960 |
# Copyright 2021 The Matrix.org Foundation C.I.C.
#
# 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 a... | matrix-org/sydent | sydent/config/sms.py | Python | apache-2.0 | 2,871 |
# Copyright 2016 Google 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 law or agre... | google/openhtf | openhtf/util/xmlrpcutil.py | Python | apache-2.0 | 4,133 |
# -*- coding: utf-8 -*-
# Copyright 2022 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | googleapis/python-area120-tables | samples/generated_samples/area120tables_v1alpha1_generated_tables_service_list_tables_async.py | Python | apache-2.0 | 1,496 |
from ...index import BaseIndex
class AsyncIndex(BaseIndex):
async def get_es_version(self):
return await self._cluster.get_es_version()
async def get_compiler(self):
return await self._cluster.get_compiler()
async def get(
self, doc_or_id, doc_cls=None, doc_type=None, source=... | anti-social/elasticmagic | elasticmagic/ext/asyncio/index.py | Python | apache-2.0 | 5,855 |
"""Let's Encrypt CLI."""
# TODO: Sanity check all input. Be sure to avoid shell code etc...
import argparse
import atexit
import functools
import logging
import logging.handlers
import os
import pkg_resources
import sys
import time
import traceback
import configargparse
import configobj
import OpenSSL
import zope.com... | fmarier/letsencrypt-debian | letsencrypt/cli.py | Python | apache-2.0 | 36,949 |
from unittest.mock import Mock
import requests
from boxsdk.network.default_network import DefaultNetworkResponse
from boxsdk.network.network_interface import Network
class MockNetwork(Network):
"""Mock implementation of the network interface for testing purposes."""
def __init__(self):
super().__init... | box/box-python-sdk | test/integration/mock_network.py | Python | apache-2.0 | 1,019 |
# Copyright 2019 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 agreed to in writing, ... | google-coral/edgetpu | tests/multiple_tpus_test.py | Python | apache-2.0 | 3,359 |
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as sio
import os.path as osp
import random, os
import cv2
import cPickle as cp
import scipy.signal as ssig
import scipy.stats as sstat
import pygame, pygame.locals
from pygame import freetype
#import Image
from PIL impor... | ankush-me/SynthText | text_utils.py | Python | apache-2.0 | 23,512 |
# Licensed to the Apache Software Foundation (ASF) 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 u... | NonVolatileComputing/arrow | python/pyarrow/tests/test_types.py | Python | apache-2.0 | 4,240 |
# Copyright 2012 OpenStack Foundation
# 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 requ... | openstack/python-ironicclient | ironicclient/tests/unit/common/apiclient/test_exceptions.py | Python | apache-2.0 | 5,355 |
from django import forms
from django.utils.safestring import mark_safe
from markupfield.widgets import MarkupTextarea
from .models import Nomination
class NominationForm(forms.ModelForm):
class Meta:
model = Nomination
fields = (
"name",
"email",
"previous_boa... | proevo/pythondotorg | nominations/forms.py | Python | apache-2.0 | 1,948 |
# Copyright 2019 The Kubeflow Authors
#
# 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... | kubeflow/pipelines | sdk/python/tests/compiler/testdata/add_pod_env.py | Python | apache-2.0 | 1,058 |
from collections import defaultdict
# source: wikipedia article on HLA-DQ
dq_allele_freq_table = """
05:01 02:01 13.16
02:01 02:02 11.08
03:02 02:02 0.08
03:01 04:02 0.03
03:02 04:02 0.11
04:01 04:02 2.26
01:01 05:01 10.85
01:02 05:01 0.03
01:03 05:01 0.03
01:04 05:01 0.71
01:02... | iskandr/prototype-pan-allele-class2 | mhc_names.py | Python | apache-2.0 | 3,134 |
import pandas as pd
with open("ssize.100.spe.10.l2.0.iters.5.fltr/summaries.tsv", "r") as f:
df = pd.read_csv(f, sep="\t")
df = df[df["run"] == "L2S.F1"]
print df[["partial", "confidence"]].corr("pearson")
print df[["partial", "confidence"]].corr("spearman")
print df[["partial", "confidence"]].corr("kendall")
| kedz/cuttsum | trec2015/sbin/l2s/cor.py | Python | apache-2.0 | 320 |
from __future__ import absolute_import, division, print_function
import contextlib
import os
import platform
import socket
import sys
import textwrap
from tornado.testing import bind_unused_port
# Delegate the choice of unittest or unittest2 to tornado.testing.
from tornado.testing import unittest
skipIfNonUnix = u... | legnaleurc/tornado | tornado/test/util.py | Python | apache-2.0 | 4,446 |
# -*- coding: utf-8 -*-
import syslog
from .models import Audit
class ActionNotFound(Exception):
pass
class ActionLogger:
""" A wrapper to log actions """
def __init__(self):
self._actions = {
"create": "Criou",
"update": "Atualizou",
"delete": "Removeu",
... | globocom/vault | actionlogger/actionlogger.py | Python | apache-2.0 | 1,424 |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | our-city-app/oca-backend | src/solutions/common/jobs/notifications.py | Python | apache-2.0 | 8,697 |
from model.contact import Contact
import random
import string
import os.path
import jsonpickle
import getopt
import sys
try:
opts, args = getopt.getopt(sys.argv[1:], "n:f", ["number of contacts", "file"])
except getopt.GetoptError as err:
getopt.usage()
sys.exit(2)
n = 5
f = "data/contacts.json"
for o, a... | dariansk/python_training | generator/contact.py | Python | apache-2.0 | 1,606 |
# third party
from sqlalchemy import Column
from sqlalchemy import JSON
from sqlalchemy import String
# relative
from . import Base
class Dataset(Base):
__tablename__ = "dataset"
id = Column(String(256), primary_key=True)
name = Column(String(256))
manifest = Column(String(2048))
description = C... | OpenMined/PySyft | packages/syft/src/syft/core/node/common/node_table/dataset.py | Python | apache-2.0 | 435 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
v0.1.2 2016/12/19 yilai 建表改成utf8mb4字符集
v0.1.1 2016/09/21 yilai 加了些参数
v0.1.0 2016/07/20 yilai created
"""
from datetime import datetime,date,timedelta
from decimal import Decimal
import traceback
import logging
from pymysqlreplication import BinLogStreamReader
... | 58daojia-dba/mysqlbinlog_flashback | joint_sql.py | Python | apache-2.0 | 10,015 |
# Copyright 2014 Scalyr Inc.
#
# 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, so... | scalyr/scalyr-agent-2 | tests/unit/log_processing_test.py | Python | apache-2.0 | 127,218 |
import os
import os.path
from freight.constants import PROJECT_ROOT
from freight.exceptions import CommandError
class UnknownRevision(CommandError):
pass
class Vcs(object):
ssh_connect_path = os.path.join(PROJECT_ROOT, "bin", "ssh-connect")
def __init__(self, workspace, url, username=None):
se... | getsentry/freight | freight/vcs/base.py | Python | apache-2.0 | 1,987 |
#!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
# 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... | sassoftware/amiconfig | amiconfig_test/plugin_disablesshpasswdauth_test.py | Python | apache-2.0 | 1,526 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.