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
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # 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 2 # of th...
Lysxia/dissemin
backend/testoai.py
Python
agpl-3.0
8,574
# -*- coding: utf-8 -*- """ API for submitting background tasks by an instructor for a course. Also includes methods for getting information about tasks that have already been submitted, filtered either by running state or input arguments. """ from ga_instructor_task.tasks import ( generate_score_detail_report, ...
nttks/edx-platform
lms/djangoapps/ga_instructor_task/api.py
Python
agpl-3.0
1,136
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 TaPo-IT (http://tapo-it.at) All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the ...
tapo-it/odoo-addons-worktrail
addons_worktrail/tapoit_hr_project/wizard/tapoit_hr_project_sign_in_out.py
Python
agpl-3.0
10,543
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, 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. from __future__ import unicode_literals from django.db.models import Count ...
taedori81/shoop
shoop/admin/modules/contacts/views/list.py
Python
agpl-3.0
2,134
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015. Tšili Lauri Johannes # # 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 ...
tsili/datpy
datpy/time_operations.py
Python
agpl-3.0
4,806
# -*- coding: utf-8 -*- # # Copyright (c) 2014-2015 Harvard, edX & OpenCraft # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) as published by the Free # Software Foundation (FSF), e...
proversity-org/problem-builder
problem_builder/step.py
Python
agpl-3.0
9,949
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import logging from datetime import datetime, timedelta from collections import defaultdict from odoo import api, fields, models, _ from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT, float_compare, float...
rven/odoo
addons/sale_stock/models/sale_order.py
Python
agpl-3.0
33,492
# -*- coding: utf-8 -*- # Copyright 2016 Vauxoo - https://www.vauxoo.com/ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_webhook_post
ovnicraft/server-tools
webhook/tests/__init__.py
Python
agpl-3.0
171
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Serendi documentation build configuration file, created by # sphinx-quickstart on Sun Jun 14 10:26:42 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
serendi-app/serendi-server
docs/conf.py
Python
agpl-3.0
9,191
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
xorpaul/shinken
shinken/dispatcher.py
Python
agpl-3.0
29,613
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2013 Camptocamp (<http://www.camptocamp.com>) # Authors: Ferdinand Gasauer, Joel Grand-Guillaume # # This program is free software: you can...
rschnapka/purchase-workflow
purchase_landed_costs/purchase.py
Python
agpl-3.0
27,418
# Copyright <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests.common import HttpCase, TransactionCase class SomethingCase(TransactionCase): def setUp(self, *args, **kwargs): super(SomethingCase, self).setUp(*args, **kwargs) # TODO Replace this...
Yajo/maintainer-tools
template/module/tests/test_something.py
Python
agpl-3.0
1,454
from south.db import db from django.db import models from procrasdonate.models import * class Migration: def forwards(self, orm): # Adding field 'Recipient.is_sponsored' db.add_column('procrasdonate_recipient', 'is_sponsored', orm['procrasdonate.Recipient:is_sponsored']) ...
diN0bot/ProcrasDonate
procrasdonate/migrations/0002_is_sponsored.py
Python
agpl-3.0
28,500
#!/usr/bin/env python3.6 from datetime import timedelta from collections import namedtuple Entry = namedtuple('Entry', ('time', 'title')) TIMETABLE = [ Entry(60, 'Dalyvių registracija.'), Entry(10, 'Konrefencijos pradžia, renginio atidarymas.'), Entry(30, 'Endrew Svetlov'), Entry(25, 'Mantas Zimnic...
sirex/pycon.lt
scripts/timetable.py
Python
agpl-3.0
1,014
#!/usr/bin/python #-*- coding: utf-8 -*- ########################################################### # © 2011 Daniel 'grindhold' Brendle and Team # # This file is part of Skarphed. # # Skarphed is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as ...
skarphed/skarphed
admin/src/skarphedadmin/gui/__init__.py
Python
agpl-3.0
1,295
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from e...
ancafarcas/superdesk-core
apps/publish/content/kill.py
Python
agpl-3.0
8,067
# -*- coding: utf-8 -*- from __future__ import unicode_literals import StringIO from datetime import datetime from flask import url_for from udata.frontend import csv from udata.models import Badge, Site, PUBLIC_SERVICE from udata.core.dataset.factories import DatasetFactory, ResourceFactory from udata.core.organi...
davidbgk/udata
udata/tests/site/test_site_views.py
Python
agpl-3.0
13,615
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import date...
sivakuna-aap/superdesk-core
superdesk/io/feed_parsers/wenn_parser.py
Python
agpl-3.0
3,652
from . import sim from . import res_partner from . import stock from . import claim
Comunitea/CMNT_004_15
project-addons/sim_manager/models/__init__.py
Python
agpl-3.0
85
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
ddurieux/alignak
alignak/objects/servicegroup.py
Python
agpl-3.0
7,989
# Copyright 2018 Tecnativa - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Stock Picking Procure Method', 'summary': 'Allows to force the procurement method from the picking', 'version': '12.0.1.0.0', 'category': 'Warehouse', 'author': 'Tecnativa,' ...
Vauxoo/stock-logistics-warehouse
stock_picking_procure_method/__manifest__.py
Python
agpl-3.0
587
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitati...
deerwalk/voltdb
tests/sqlcoverage/normalizer/not-a-normalizer.py
Python
agpl-3.0
2,364
""" Models for the bug tracker app. """ from django.db import models from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from apps.tools.models import Mode...
TamiaLab/carnetdumaker
apps/bugtracker/models.py
Python
agpl-3.0
27,771
from django.core.management.base import BaseCommand from django.conf import settings from django.utils import timezone #from http://jamesmckay.net/2009/03/django-custom-managepy-commands-not-committing-transactions/ #Fix issue where db data in manage.py commands is not refreshed at all once they start running from dja...
edx/edx-ora
controller/management/commands/import_graded_essays.py
Python
agpl-3.0
5,420
#!/usr/bin/env python # Mininet Automatic Testing Tool (Prototype) # Copyright (C) 2013 Jesse J. Cook # 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, o...
CrashenX/auto-grader
src/auto-grade.py
Python
agpl-3.0
9,526
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, _ from openerp.ex...
jobiols/odoo-argentina
l10n_ar_afipws_fe/models/res_currency.py
Python
agpl-3.0
3,043
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility an...
datanel/navitia
source/jormungandr/jormungandr/interfaces/v1/Schedules.py
Python
agpl-3.0
13,275
import pytest from radar.utils import round_age @pytest.mark.parametrize(['months', 'expected'], [ (3, 3), # 3 months (60, 60), # 5 years (61, 60), # 5 years, 1 month ]) def test(months, expected): assert round_age(months) == expected
renalreg/radar
tests/test_round_age.py
Python
agpl-3.0
257
# python # This file is generated by a program (mib2py). import HP_SN_POS_GROUP_MIB OIDMAP = { '1.3.6.1.4.1.11.2.3.7.11.12.2.14.1': HP_SN_POS_GROUP_MIB.snPOSInfo, '1.3.6.1.4.1.11.2.3.7.11.12.2.14.1.1.1.1': HP_SN_POS_GROUP_MIB.snPOSInfoPortNum, '1.3.6.1.4.1.11.2.3.7.11.12.2.14.1.1.1.2': HP_SN_POS_GROUP_MIB.snPOSIfInd...
xiangke/pycopia
mibs/pycopia/mibs/HP_SN_POS_GROUP_MIB_OID.py
Python
lgpl-2.1
2,839
############################################################################## # 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/texlive/package.py
Python
lgpl-2.1
3,446
import mock from pdcupdater.tests.handler_tests import BaseHandlerTest, mock_pdc import pdcupdater.services import pdcupdater.handlers.retirement from pdcupdater.handlers.retirement import RetireComponentHandler class TestRetiredComponents(BaseHandlerTest): handler_path = 'pdcupdater.handlers.retirement:RetireCo...
fedora-infra/pdc-updater
pdcupdater/tests/handler_tests/test_retirement.py
Python
lgpl-2.1
11,525
#!/usr/bin/env python # Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
youfoh/webkit-efl
Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
Python
lgpl-2.1
8,511
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPygobject(PythonPackage): """bindings for the GLib, and GObject, to be used in Py...
rspavel/spack
var/spack/repos/builtin/packages/py-pygobject/package.py
Python
lgpl-2.1
2,511
# Authors: # Trevor Perrin # Dave Baggett (Arcode Corporation) - Added TLSUnsupportedError. # # See the LICENSE file for legal information regarding use of this file. """Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationErr...
ioef/tlslite-ng
tlslite/errors.py
Python
lgpl-2.1
7,749
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/MeshPresentation/F1.py
Python
lgpl-2.1
1,515
# Higgins - A multi-media server # Copyright (c) 2007-2009 Michael Frank <msfrank@syntaxjockey.com> # # This program is free software; for license information see # the COPYING file. import sys, pwd, grp, os, signal from django.core.management import call_command as django_admin_command from twisted.internet import r...
msfrank/Higgins
higgins/server.py
Python
lgpl-2.1
8,312
# python # This file is generated by a program (mib2py). import HPR_IP_MIB OIDMAP = { '1.3.6.1.2.1.34.6.1.5': HPR_IP_MIB.hprIp, '1.3.6.1.2.1.34.6.1.5.1.1.1': HPR_IP_MIB.hprIpActiveLsLsName, '1.3.6.1.2.1.34.6.1.5.1.1.2': HPR_IP_MIB.hprIpActiveLsAppnTrafficType, '1.3.6.1.2.1.34.6.1.5.1.1.3': HPR_IP_MIB.hprIpActiveLsUd...
xiangke/pycopia
mibs/pycopia/mibs/HPR_IP_MIB_OID.py
Python
lgpl-2.1
1,140
#!/usr/bin/env python # vim: sts=4 sw=4 et # This is a component of EMC # probe.py Copyright 2010 Michael Haberler # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either versi...
araisrobo/linuxcnc
configs/gladevcp/probe/probe.py
Python
lgpl-2.1
7,589
#!/usr/bin/env python3 import sys import re from math import log, sqrt try: from collections.abc import Iterable except ImportError: from collections import Iterable RE_FP = r"[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?" CAP_FP = "(%s)" % RE_FP REGEXES = {"cap_fp" : CAP_FP} PATTERN_SIEVE_SQ = re.compile(r"# Sieving...
mancoast/cado-nfs
scripts/opal-test/report.py
Python
lgpl-2.1
8,520
# -*- coding: iso-8859-1 -*- # Copyright (C) 2011-2014 EDF R&D # # 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 versio...
FedoraScientific/salome-smesh
src/Tools/padder/unittests/usecase_spadderPluginTester.py
Python
lgpl-2.1
1,856
from django.core.exceptions import ValidationError from pyparsing import ParseBaseException from django.core.validators import MaxLengthValidator class ParamValidator(object): def __init__(self, file_support=False): self._file_support = file_support def __call__(self, value): # Impor...
secnot/django-param-field
param_field/validators.py
Python
lgpl-3.0
1,141
#-*-coding:utf-8-*- """ @package bsemantic.tests.test_generators @brief tests for bsemantic.generators @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ from __future__ import unicode_literals from butility.future import str __all__ = [] # W0614 unused ...
Byron/bcore
src/python/bsemantic/tests/test_generators.py
Python
lgpl-3.0
4,860
from __future__ import print_function from contextlib import contextmanager from distutils.util import convert_path import os from shutil import copyfile import sys import textwrap from setuptools import setup, Command from setuptools.command.develop import develop as develop_cmd from setuptools.command.build_py impo...
dkillick/iris
setup.py
Python
lgpl-3.0
8,908
################################################################################### # # Copyright (c) 2017-2019 MuK IT GmbH. # # This file is part of MuK Documents Access # (see https://mukit.at). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Le...
muk-it/muk_dms
muk_dms_access/tests/test_directory.py
Python
lgpl-3.0
8,467
import CommonConf import CommonViz import re from collections import OrderedDict import numpy as np import random import sys import matplotlib.pyplot as pp import pylab EXPERIMENT_NAME = "TotalThroughputVsIterations" X_LABEL = "TM" Y_LABEL = "Throughput (fraction of total demand)" random.seed() def ...
merlin-lang/kulfi
simulate/viz/TotalThroughputVsIterations.py
Python
lgpl-3.0
2,403
# # Copyright (C) University College London, 2007-2012, all rights reserved. # # This file is part of HemeLB and is provided to you under the terms of # the GNU LGPL. Please see LICENSE in the top level directory for full # details. # from vtk import vtkSTLReader, vtkCutter, vtkPlane, \ vtkPolyDataConnectivityF...
jenshnielsen/hemelb
Tools/setuptool/InletProcessing/SurfaceIntersectionFinder.py
Python
lgpl-3.0
2,707
# -*- coding: utf-8 -*- """ Created on Wed May 10 23:08:27 2017 """ import time import weakref s1 = {1, 2, 3} s2 = s1 def bye(): print('Gone with the wind...') ender = weakref.finalize(s1, bye) print ender.alive def s1 print ender.alive s2 = 'spam' print ender.alive
wuqize/FluentPython
chapter8/_weakref.py
Python
lgpl-3.0
277
#!/usr/bin/env python # -*- coding: utf-8 -*- # Software License Agreement (Lesser GPL) # # Copyright (C) 2009-2012 Rosen Diankov <rosen.diankov@gmail.com> # # ikfast 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...
vitan/openrave
python/ikfast_generator_cpp.py
Python
lgpl-3.0
127,669
from django.contrib import admin from django.db import transaction from django.core import urlresolvers from django.utils.translation import ugettext as _ from django import shortcuts from django.contrib import messages from annoying.decorators import render_to from nmadb_registration import forms, models @admin.sit...
vakaras/nmadb-registration
src/nmadb_registration/views.py
Python
lgpl-3.0
4,119
#!/usr/bin/env python import os import random import types import uuid import msgpack import MySQLdb #from MySQLdb.cursors import DictCursor #from MySQLdb.cursors import Cursor from warnings import filterwarnings from cocaine.worker import Worker from cocaine.logging import Logger #Suppressing warnings filterwarnin...
kartvep/Combaine
plugins/datagrid/mysqldg.py
Python
lgpl-3.0
5,281
#{# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK core. # # REDHAWK core 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 Fre...
RedhawkSDR/framework-codegen
redhawk/codegen/jinja/python/ports/templates/generic.provides.py
Python
lgpl-3.0
1,314
""" fields - Lists the variables stored in the file, a default value, and a description """ from . import _fileutils as fu import warnings # List of file data variables, default values, and documentation # This is used in both reader and writer fields = [ ( "tsaisq", 0.0, "total chi2 fr...
bendudson/freegs
freegs/_aeqdsk.py
Python
lgpl-3.0
12,250
""" Django settings for modserver project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
ruler501/modserver
modserver/settings.py
Python
lgpl-3.0
3,033
#!/usr/bin/env python """ Python SCSS parser. """ import operator from . import compat VERSION_INFO = (0, 8, 73) __project__ = "scss" __version__ = "0.8.73" __author__ = "Kirill Klenov <horneds@gmail.com>" __license__ = "GNU LGPL" CONV = { 'size': { 'em': 13.0, 'px': 1.0}, 'length': { ...
klen/python-scss
scss/__init__.py
Python
lgpl-3.0
9,536
""" Helper functions for working with the underlying system. These are mostly os dependent, only working on linux, osx, and bsd. In almost all cases they're best-effort, providing **None** if the lookup fails. **Module Overview:** :: is_windows - checks if we're running on windows is_mac - checks if we're runnin...
abcdef123/stem
stem/util/system.py
Python
lgpl-3.0
19,948
# age/descriptor.py # pyAGE - A Python implementation of the Analog Genetic Encoding # Copyright (C) 2010 Janosch Gräf # # 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 ...
jgraef/pyAGE
age/descriptor.py
Python
lgpl-3.0
4,547
ANSI_ESCAPE_CODES = { "reset": 0, "bold": 1, "faint": 2, "italic": 3, "underline": 4, "blink-slow": 5, "blink-fast": 6, "inverse": 7, "conceal": 8, "strike-through": 9, "font-default": 10, "font-1": 11, "font-2": 12, "font-3": 13, "font-4": 14, "font-5": 1...
brownhead/different-logger
dlogger/_ansify.py
Python
unlicense
2,079
from __future__ import print_function,division # duner. using numbers and sample. """ q +-----+ r +-----+ ---->| C |---->| D |--> s ^ +-----+ +-+---+ | | +-----------------+ C = stock of clean diapers D = stock of dirty diapers q = inflow of clean diapers r = flow of clean diapers...
txt/evil
diapers1.py
Python
unlicense
1,288
#-*- coding: utf-8 -*- import pygame.key from pygame.font import Font from lib.base_screen import BaseScreen, ChangeScreenException from pygame.locals import K_SPACE as SPACE class MenuScreen(BaseScreen): def init_entities_before(self, surface): self.font = Font(None, 30) self.textImg = self.fon...
Bobbyshow/Avoid
screen/menu.py
Python
unlicense
923
import time from roboclaw import Roboclaw #Windows comport name rc = Roboclaw("COM11",115200) #Linux comport name #rc = Roboclaw("/dev/ttyACM0",115200) rc.Open() address = 0x80 while(1): rc.ForwardM1(address,32) #1/4 power forward rc.BackwardM2(address,32) #1/4 power backward time.sleep(2) rc.B...
hopkira/k9-chess-angular
python/roboclaw_simplepwm.py
Python
unlicense
963
import unittest import utils class WordDictionary: def __init__(self): """ Initialize your data structure here. """ self.root = {} def addWord(self, word: str) -> None: curr = self.root for ch in word: child = curr.get(ch) if not chil...
chrisxue815/leetcode_python
problems/test_0211.py
Python
unlicense
1,179
""" Tools for handling trade data, candle data, and simulating trades. """ from __future__ import division import os import csv import time from datetime import datetime, timedelta import itertools import traceback from decimal import Decimal, getcontext getcontext().prec = 8 from utilities import (TRADES, CANDLES, u...
AdamStone/cryptrade
cryptrade/trading.py
Python
unlicense
30,686
import tensorflow as tf m1 = tf.constant([[1., 2.]]) m2 = tf.constant([[1], [2]]) m3 = tf.constant([ [[1,2], [3,4], [5,6]], [[7,8], [9,10], [11,12]] ]) print(m1) print(m2) print(m3) # 500 x 500 tensor print(tf.o...
saramic/learning
data/tensorflow/src/2_4_creating_tensors.py
Python
unlicense
405
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import platform import re import sys import subprocess from distutils.sysconfig import get_python_lib from setuptools import setup, find_packages from voiceplay import (__title__, __version__, __description_...
tb0hdan/voiceplay
setup.py
Python
unlicense
3,908
#from . import sslTests
lwahlmeier/python-litesockets
tests/__init__.py
Python
unlicense
24
""" compiler.py ---------------------------------------- This module contains the implementation of the Scheme compiler for Schemey. It takes in one or more expressions(a list of Pair objects), and generates a code object ready for serialization and/or direct execution by the virtual machine. """ from .bytecode impo...
algerbrex/Schemey
src/compiler.py
Python
unlicense
9,756
# # crowbar - a geometry manipulation program # Copyright (C) 2020 Dylan Scott Grafmyre # # 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, ...
thorsummoner/crowbar
crowbar/ext/status_bar/__init__.py
Python
unlicense
1,075
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2017-07-21 18:15:11 import os import tensorflow as tf import numpy as np x_data=np.float32(np.random.rand(2,100)) y_data=np.dot([0.100,0.200],x_data)+0.300 b=tf.Variable()
nwcrazysword/reversalcode
src/test.py
Python
apache-2.0
233
"""The tests for the REST sensor platform.""" import unittest from pytest import raises from unittest.mock import patch, Mock import requests from requests.exceptions import Timeout, MissingSchema, RequestException import requests_mock from homeassistant.exceptions import PlatformNotReady from homeassistant.setup imp...
PetePriority/home-assistant
tests/components/sensor/test_rest.py
Python
apache-2.0
12,509
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beekeepers', '0012_add_new_survey_fields'), ] operations = [ migrations.AlterField( model_name='monthlysurvey', ...
project-icp/bee-pollinator-app
src/icp/apps/beekeepers/migrations/0013_update_queen_source_options.py
Python
apache-2.0
778
# ==================================================================== # 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 re...
romanchyla/pylucene-trunk
test/test_PerFieldAnalyzerWrapper.py
Python
apache-2.0
1,917
from IPython.display import display from matplotlib import animation, rc import abc class IPythonChartAnimation(object): __metaclass__ = abc.ABCMeta VIDEO_TAG = """<video controls> <source src="data:video/x-m4v;base64,{0}" type="video/mp4"> Your browser does not support the...
quantwizard-com/pythonbacktest
pythonbacktest/animation/ipythonchartanimation.py
Python
apache-2.0
1,578
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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 ...
strubell/Parser
lib/rnn_cells/gru_cell.py
Python
apache-2.0
2,289
# 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 agreed to in writing, ...
google/objax
objax/optimizer/lars.py
Python
apache-2.0
2,914
""" Django settings for finders_keepers project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bu...
rowanv/finders_keepers
finders_keepers/settings.py
Python
apache-2.0
2,931
# Copyright 2019 TWO SIGMA OPEN SOURCE, 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 agre...
twosigma/beaker-notebook
beakerx_tabledisplay/beakerx_tabledisplay/__init__.py
Python
apache-2.0
1,170
# from __future__ import absolute_import # from base import * import unittest import os import tempfile import glob import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)) + "/../../")) import cache __version__ = 1.0 __author__ = 'weldpua2008@gmail.com' tmp_files=[] class TestR...
theadviceio/executer
tests/cache/test_cache.py
Python
apache-2.0
6,321
""" Copyright 2012, 2013 UW Information Technology, University of Washington 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 r...
uw-it-aca/spacescout_web
spacescout_web/views/share.py
Python
apache-2.0
8,038
import threading import time, cPickle, math from Queue import * from RubikGui import main_gui as Gui from RubikSolver import rubik_solver as Solver from SimonSays import simon_says as Simon from GearRatios import gear_ratios as Gears from . import utils from . import queue_common from event import * import sounds Com...
RoboErik/RUBIK
Rubik/state_controller.py
Python
apache-2.0
16,887
import logging try: create_external('xml2', build_helper = 'xml2-config', version_query = '--version', version_parser = lambda x: 'invalid') except Exception: logging.critical('external version parsing') try: tools['c'].std = 'latest' except Exception: logging.critical('std setting') try: shared_library('x', ...
pyrate-build/pyrate-build
examples/test03.py
Python
apache-2.0
489
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 SINA Corporation # 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.or...
kickstandproject/ripcord
ripcord/openstack/common/config/generator.py
Python
apache-2.0
8,281
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
DataONEorg/d1_python
gmn/src/d1_gmn/tests/test_scimeta.py
Python
apache-2.0
7,205
import os TOP_STORIES_KEY = b'top_30' TITLE = 'title' URL = 'url' BODY = 'body' SENTENCES = 'sentences' HACKER_NEWS_ID = 'hn_id' TEXT = 'text' DATE_FOUND = 'date_found' AYLIEN_ID = 'AYLIENID' AYLIEN_KEY = 'AYLIENKEY' REDIS_HOST = 'REDIS_HOST' REDIS_PORT = 'REDIS_PORT' REDIS_PASS = 'REDIS_PASS' def get_environment():...
Bachmann1234/hn-tldr
constants.py
Python
apache-2.0
586
# VS SIMULATE from shared_functions import * from net_designs import * import pandas as ps import json import numpy as np import pickle import networkx as nx import scipy.stats as sct from scipy import stats as sc import random import h5py import os from copy import deepcopy from scipy import stats as sc def...
sisl/CustomerSim
src/vs_simulate.py
Python
apache-2.0
8,125
# Copyright 2016-2021 IBM Corp. 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...
zhmcclient/python-zhmcclient
tests/unit/zhmcclient/test_activation_profile.py
Python
apache-2.0
11,882
__author__ = 'PC-LiNing' from bigchaindb import Bigchain b=Bigchain() testuser1_pub='3EQyWna5Gniok73MXdT8m9kgSx6DuRYWUbmehCe4cmXU' testuser1_priv='EZYk1RJtMkySRwNtpiY7AeGQyYLaeu5XsrJHzzVBL3wn' testuser2_pub='9ooi6zKXdLVmM2ZyUZjRTWcW3TXt2CtnHSbVZnXLxHJM' testuser2_priv='AZQ1Y4odynAuYEkSQhVKGqNKU4Zp5QidoLwmkfZCjYqL' ...
charitychain/Charitychain
Simplechaindb/test/transfer.py
Python
apache-2.0
1,664
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com import random from tests.ggrc import TestCase from freezegun import freeze_time ...
uskudnik/ggrc-core
src/tests/ggrc_workflows/notifications/test_enable_disable_notifications.py
Python
apache-2.0
7,378
#!/usr/bin/env python # 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 # di...
pongem/python-bot-project
monitoring/api/v3/api-client/custom_metric_test.py
Python
apache-2.0
3,125
from mongoengine import * class FeatureReference(EmbeddedDocument): id = ObjectIdField() name = StringField()
slickqa/slickqaweb
slickqaweb/model/featureReference.py
Python
apache-2.0
120
from setuptools import setup with open("README.md", "r") as f: readme = f.read() setup( name='LatvianStemmer', version='1.0.2', description='Light stemmer for Latvian.', py_modules=['LatvianStemmer'], author='Rihards Krišlauks', author_email='rihizs@gmail.com', url='https://github.com/...
rihardsk/LatvianStemmer
setup.py
Python
apache-2.0
1,010
"""Provide functionality to interact with Cast devices on the network.""" from __future__ import annotations import asyncio from contextlib import suppress from datetime import datetime, timedelta import functools as ft import json import logging from urllib.parse import quote import pychromecast from pychromecast.co...
lukas-hetzenecker/home-assistant
homeassistant/components/cast/media_player.py
Python
apache-2.0
31,771
import os from hanziconv import HanziConv # 简繁转换 from app.ResultParse import ResultParse from app.statistics import analysis from interface.api import LookUp, Search, Association from tools.parse_and_filter import parse_sentence from tools.translate import Translate class Query: def __init__(self, debug=False)...
zhouhoo/conceptNet_55_client
app/query.py
Python
apache-2.0
5,682
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
SmartDeveloperHub/sdh-metrics
setup.py
Python
apache-2.0
1,913
from datetime import datetime, timedelta import numpy as np import pytest import pytz from pandas._libs.tslibs import iNaT import pandas.compat as compat from pandas import ( DatetimeIndex, Index, NaT, Period, Series, Timedelta, TimedeltaIndex, Timestamp, isna, ) from pandas.core....
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/scalar/test_nat.py
Python
apache-2.0
12,259
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nachi Ueno, NTT MCL, 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...
rickerc/neutron_audit
neutron/tests/unit/metaplugin/test_metaplugin.py
Python
apache-2.0
13,882
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012-2013 Red Hat, 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....
DirectXMan12/nova-hacking
nova/openstack/common/rpc/proxy.py
Python
apache-2.0
9,391
from setuptools import setup setup( name='bdranalytics', version='0.3', license='Apache License 2.0', author='bigdatarepublic', author_email='info@bigdatarepublic.nl', url='http://www.bigdatarepublic.nl', long_description="README.md", packages=['bdranalytics', 'bdranalytic...
BigDataRepublic/bdr-analytics-py
setup.py
Python
apache-2.0
932
# Copyright 2013 Mirantis, 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 b...
CingHu/neutron-ustack
neutron/services/loadbalancer/constants.py
Python
apache-2.0
4,424
#!/usr/bin/env python """Client actions related to administrating the client and its configuration.""" import logging import os import platform import socket import traceback import cryptography from cryptography.hazmat.backends import openssl import pkg_resources import psutil import pytsk3 import yara from grr_res...
google/grr
grr/client/grr_response_client/client_actions/admin.py
Python
apache-2.0
11,600
# 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...
lakshmi-kannan/st2
st2api/tests/unit/controllers/v1/test_packs.py
Python
apache-2.0
10,101