code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'your_key' DEBUG = True ALLOWED_HOSTS = ["*"] # Add new languages here and create with # 'python3 manage.py makemessages --locale {your language code}' # translation file in civdj/pbspy/locale/... LANGUAGES = ( ("en", ("English")), ...
Zulan/PBStats
civdj/civdj/settings_local.example.py
Python
gpl-2.0
887
from mu import Mu from utils import vect import sys def nice(tup): return "(" + ", ".join(map(lambda t:f"{t:6.3f}", tup)) + ")" class Transform: def __init__(self, loc, rot, scale, parent=None): rot = rot[0],rot[1:4] self.loc = loc self.rot = rot self.scale = scale self...
taniwha/io_object_mu
hierarchy.py
Python
gpl-2.0
2,837
from django.core.cache import cache from django.db import models from django.db.models.signals import post_save from campaigns.managers import CampaignManager class Variant(models.Model): """ Model representing a presentational variant of the IDL message being broadcast. Implementors are able to choose w...
jwyterlin/idl-members
internetdefense/apps/campaigns/models.py
Python
gpl-2.0
2,233
# -*- coding: utf-8 -*- from flask.ext.script import Manager from flask.ext.migrate import MigrateCommand from app import create_app from app.exts import db # create app app = create_app() manager = Manager(app) # add manager scripts manager.add_command('db', MigrateCommand) from scripts import * if __name__ == '__...
sys3175/config.berlin.freifunk.net
manage.py
Python
gpl-2.0
347
#!/usr/bin/env python # # import common import os, shutil, filecmp from atoslib import utils TEST_CASE = "ATOS atos-build invocation" log = "debug.log" args = common.atos_setup_args(ATOS_DEBUG_FILE=log, ATOS_PREFIX=common.ROOT) sha1dir = os.path.join(common.SRCDIR, 'examples', 'sha1-c') status = utils.invoque( ...
knochelh/atos-utils
tests/test058.py
Python
gpl-2.0
3,763
# -*- coding: utf-8 -*- """This module contains tests that exercise the canned VMware Automate stuff.""" from textwrap import dedent import fauxfactory import pytest from widgetastic_patternfly import Dropdown from widgetastic.widget import View from cfme import test_requirements from cfme.automate.explorer.domain im...
akarol/cfme_tests
cfme/tests/automate/test_vmware_methods.py
Python
gpl-2.0
5,051
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from baseline import Baseline class PullTravelDataAfterFullTmRun(Baseline): def __init__(self): config = Baseline() config_changes = { 'description':'run...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/psrc_parcel/configs/pull_travel_data_after_full_tm_run.py
Python
gpl-2.0
1,594
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 ve...
N6UDP/cslbot
cslbot/helpers/control.py
Python
gpl-2.0
17,583
# This file is part of Spacetime. # # Copyright 2010-2014 Leiden University. # Written by Sander Roobol. # # Spacetime 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 2 of the License, or # (at ...
Onderwaater/spacetime
lib/spacetime/modules/generic/gui.py
Python
gpl-2.0
48,607
#!/usr/bin/env python # Copyright (c) 2017 Kurt Jacobson # <kurtcjacobson@gmail.com> # # This file is part of Hazzy. # # Hazzy 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 2 o...
TurBoss/hazzy
hazzy/widget_factory/pref_widgets.py
Python
gpl-2.0
5,894
# -*- coding: utf-8 -*- from os import path as os_path, mkdir, rmdir, system, walk, stat as os_stat, listdir, readlink, makedirs, error as os_error, symlink, access, F_OK, R_OK, W_OK from stat import S_IMODE from re import compile try: from os import chmod have_chmod = True except: have_chmod = False try: from o...
kakunbsc/enigma2.4
lib/python/Tools/Directories.py
Python
gpl-2.0
6,675
##################################################################### # # WaveReader class copied with permission: # # Copyright (c) 2015, Eran Egozy # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### import numpy as np from ...
antiface/dspy-2
dspy/sampler.py
Python
gpl-2.0
3,191
# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution ...
pmoravec/sos
tests/vendor_tests/redhat/rhbz2018033.py
Python
gpl-2.0
1,281
#! /usr/bin/env python #-*- encoding:utf-8 -*- #import gi #gi.require_version('Gtk', '3.0') #from gi.repository import Gtk #import pygtk #pygtk.require('2.0') import gtk class base: #destroy信号的回调函数 def destroy(self,widget,data=None): gtk.main_quit() #clicked信号的回调函数 def hello(self,wid...
qzxx-syzz/study
python/PyGtk/pygtk.py
Python
gpl-3.0
2,812
#! /usr/bin/python # -*- coding=utf-8 -*- from Cinnabot.BasePlugin import BasePlugin DRINKS = [ ("coffee", "cup", "pours"), ("tea", "cup", "pours"), ("beer", "pint", "serves"), ("martini", "glass", "serves"), ("whisky", "glass", "serves"), ("wine", "glass", "serves") ] class DrinksPlugin(Base...
glebihan/cinnabot
Cinnabot/plugins/Drinks.py
Python
gpl-3.0
1,170
""" in pitch_in s n=2 d=0.5 in depth_in s n=2 d=1.0 in height_in s n=2 d=4.0 in radius_in s n=2 d=1.0 out solid_out So """ from sverchok.dependencies import FreeCAD if FreeCAD is None: raise Exception("FreeCAD libraries are not available") from FreeCAD import Base import Part solid_out = [] solid = Part.makeThr...
DolphinDream/sverchok
node_scripts/SNLite_templates/utils/thread_solid.py
Python
gpl-3.0
391
# -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.abspath('.')) extensions = ['sphinx.ext.autodoc', 'waeup.sphinx.autodoc'] master_doc = 'contents' source_suffix = ['.txt', '.rst'] project = 'WAeUP Sphinx Extensions <Tests>' copyright = '2015, WAeUP Germany' version = '0.1' release = '0.1.alpha1'...
WAeUP/waeup.sphinx.autodoc
tests/sample/conf.py
Python
gpl-3.0
402
# industrialBonusDroneDamage # # Used by: # Ships from group: Blockade Runner (4 of 4) # Ships from group: Deep Space Transport (4 of 4) # Ships from group: Exhumer (3 of 3) # Ships from group: Industrial (17 of 17) # Ships from group: Industrial Command Ship (2 of 2) # Ships from group: Mining Barge (3 of 3) # Variati...
Ebag333/Pyfa
eos/effects/industrialbonusdronedamage.py
Python
gpl-3.0
641
#! /usr/bin/env python """A brute force test using `sink` to create and write samples to a stereo file, then `source` to check the correct content is read from the files.""" import os.path import unittest import aubio import numpy as np from numpy.testing import assert_equal from utils import get_tmp_sink_path class...
aubio/aubio
python/tests/test_source_channels.py
Python
gpl-3.0
3,153
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('phase1', '0010_task2'), ] operations = [ migrations.CreateModel( name='Task3', fields=[ ...
jadhavhninad/-CSE_515_MWD_Analytics-
Phase 2/DEMO/Phase 2 submissions/Phase 2 Submission/Code/MWDBProject/mwd_proj/mwd_proj/phase1/migrations/0011_task3.py
Python
gpl-3.0
638
"""Predictors take a model and will transform the Dataframe by adding a prediction column.""" ## BEGIN Imports. ############################################################## import numpy as np from pyspark.mllib.linalg import DenseVector from distkeras.utils import serialize_keras_model from distkeras.utils import...
JoeriHermans/dist-keras
distkeras/predictors.py
Python
gpl-3.0
2,399
from ImageScripter import * from elan.functions import Get_Device_List_Simple,Diff from elan import * Past_List = ['Furman F1000', 'Furman F1500', 'Furman F1500 (CV2)', 'Panamax M4320', 'Panamax MB1000', 'Panamax MB1500', 'Panamax MB1500 (CV2)', 'PanamaxM-4000', 'PanamaxSm3-PRO', 'PanamaxVT4315'] One = Configurat...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/elan/Pools/AddRemove/9_Count_UPS_Power_Supplies.py
Python
gpl-3.0
1,124
# # Get environment variable # def getmpirun( default="mpirun -np" ): """ getmpirun: return environment variable named MPIRUN, if it exists else return a default mpirun command """ from os import getenv MPIRUN = getenv("MPIRUN") if MPIRUN == None: MPIRUN = default print "getmpirun:...
bendudson/BOUT
tools/pylib/boututils/getmpirun.py
Python
gpl-3.0
370
# Copyright (C) 2012,2013,2015 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms...
capoe/espressopp.soap
src/VerletListAdress.py
Python
gpl-3.0
6,900
class Roc(): def __init__(self): self.fpr = None self.tpr = None self.auc = 0.0 def get_fpr(self): return self.fpr def set_fpr(self,value): self.fpr = value def get_tpr(self): return self.tpr def set_tpr(self,value): self.tpr = value def get_auc(self): return self.auc def set_auc(self,val...
eriksonJAguiar/TCC-UENP-Codigos
My_codes/module_sentiment/class_roc.py
Python
gpl-3.0
344
from adsputils import get_date from aip import tasks, app as app_module from aip.models import Base, Records from collections import OrderedDict from mock import patch from tests.stubdata import ADSRECORDS, mergerdata import mock, copy import os import sys import unittest from adsmsg import BibRecord class TestWorker...
aaccomazzi/ADSimportpipeline
tests/classic/test_tasks.py
Python
gpl-3.0
3,831
class Grain_Structure: """Class which contains the grains structure that will be analyzed""" def __init__(self): self.grains = None self.grains_reverse = None self.areas = None self.grains_ids = None self.num_grains = None self.num_junctions = None self.nu...
privong/pythonclub
sessions/03-matplotlib_aplpy/GrainStructure.py
Python
gpl-3.0
1,088
# Copyright Cloudinary import base64 import copy import hashlib import json import random import re import string import struct import time import zlib from collections import OrderedDict from datetime import datetime, date from fractions import Fraction import six.moves.urllib.parse from six import iteritems import ...
drzoidberg33/plexpy
lib/cloudinary/utils.py
Python
gpl-3.0
33,200
#!/usr/bin/env python # Python bindings to the Google search engine # Copyright (c) 2009-2016, Mario Vilas # 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...
Hadesy2k/sqliv
lib/google.py
Python
gpl-3.0
12,111
import numpy as np from pylab import * x = np.linspace(-np.pi, np.pi, 2001) sines = np.sin(x) hist(np.arctanh(np.clip(sines, -0.999, 0.999)), bins=40) show()
moonbury/notebooks
github/Numpy/Chapter5/trigonometry.py
Python
gpl-3.0
159
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.9 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
estnltk/pfe
pypfe/pfe.py
Python
gpl-3.0
81,691
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 version 2 # of the License, or (at your option) any later version. # # This program is distrib...
nortikin/sverchok
nodes/modifier_change/flip_normals.py
Python
gpl-3.0
4,625
# This file is part of the Waymarked Trails Map Project # Copyright (C) 2015 Sarah Hoffmann # # This 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 2 # of the License, or any later version. # #...
hholzgra/waymarked-trails-site
db/tables/styles.py
Python
gpl-3.0
4,487
# -*- coding: utf-8 -*- # enable true divison import sympy as sp import symbtools as st x1, x2 = sp.symbols("x1, x2") vec_x = sp.Matrix([x1,x2]) vec_xdot = st.time_deriv(vec_x, vec_x) xdot1, xdot2 = vec_xdot F_eq = sp.Matrix([ [xdot1 + x1 + xdot2*x1**2] ]) #P1i = sp.Matrix([ [1,0,0,0,0],[0,1,0,0,0],[0,0,1,0,0] ])...
klim-/franke_algorithm
examples/dreiecks_system.py
Python
gpl-3.0
385
from base64 import b64encode from couchpotato.core.downloaders.base import Downloader, StatusList from couchpotato.core.helpers.encoding import isInt from couchpotato.core.logger import CPLog from couchpotato.environment import Env from datetime import timedelta import httplib import json import os.path import re impor...
nabsboss/CouchPotatoServer
couchpotato/core/downloaders/transmission/main.py
Python
gpl-3.0
10,630
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Código Sur Sociedad Civil. # All rights reserved. # # This file is part of Cyclope. # # Cyclope 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 Foundat...
MauHernandez/cyclope
cyclope/sitemaps.py
Python
gpl-3.0
1,674
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. try: from unittest.mock import patch except ImportError: from mock import patch from odoo.tests.common import HttpCase, TransactionCase ''' /!\/!\ Calling `get_pricelist_available` after setting `property_product...
t3dev/odoo
addons/website_sale/tests/test_website_sale_pricelist.py
Python
gpl-3.0
21,831
import wx class CostumesPane(wx.ListCtrl): def __init__(self, parent, resources, events): wx.ListCtrl.__init__(self, parent, size=(100, 400), style=wx.LC_ICON) self.events = events self.resources = resources self.il = wx.ImageList(30, 30, True) self.AssignImageList(self.il...
ProgrammaBol/wiggler
wiggler/ui/costumespane.py
Python
gpl-3.0
1,442
import datetime from django.conf import settings from django.test import TestCase from suit.templatetags.suit_tags import suit_conf, suit_date, suit_time, \ admin_url, field_contents_foreign_linked from django.db import models from django.contrib import admin from django.contrib.admin.helpers import AdminReadonlyFi...
hzlf/openbroadcast
website/tools/suit/tests/templatetags/suit_tags.py
Python
gpl-3.0
2,659
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
veger/ansible
lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py
Python
gpl-3.0
9,063
# 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): # Adding model 'SshPublicKey' db.create_table('apply_sshpublickey', ( ('key_type', self.gf...
irregulator/ganetimgr
apply/migrations/0002_add_ssh_public_key_model.py
Python
gpl-3.0
8,650
from math import pi from helpers import compute_volume import pygmsh def test(): with pygmsh.occ.Geometry() as geom: geom.add_ellipsoid([1.0, 1.0, 1.0], [1.0, 2.0, 3.0], mesh_size=0.1) mesh = geom.generate_mesh() ref = 8.0 * pi assert abs(compute_volume(mesh) - ref) < 1.0e-2 * ref r...
nschloe/pygmsh
tests/occ/test_opencascade_ellipsoid.py
Python
gpl-3.0
398
import pandas as pd import os import sys import nibabel as nib import numpy as np import matplotlib.pyplot as plt from scipy import stats import csv import shutil Contrast = sys.argv[1] ConDir = sys.argv[2] OutDir = sys.argv[3] FslDir = os.environ.get('FSLDIR') Masks={ "MOTOR":[["Precentral Gyrus",1,os.path.join(...
DVS-Lab/PPI_ES
EffectSize.py
Python
gpl-3.0
3,480
../../../../../share/pyshared/simplejson/tests/test_decode.py
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/dist-packages/simplejson/tests/test_decode.py
Python
gpl-3.0
61
from django.contrib.auth.models import User from django.test import Client from app.models import Project from .classes import BootTestCase class TestWelcome(BootTestCase): def setUp(self): Project.objects.all().delete() # Start with no users User.objects.all().delete() def tearDow...
pierotofy/WebODM
app/tests/test_welcome.py
Python
mpl-2.0
2,821
import argparse import sys import textwrap from argparse import ArgumentDefaultsHelpFormatter class RunTestParser(object): def __init__(self): self.parser = argparse.ArgumentParser(description='Test Runner for Gaiatest/MTBF by TWQA', formatter_class=ArgumentDefaultsHelpFormatter, ...
zapion/combo-runner
combo_runner/argument_parser.py
Python
mpl-2.0
866
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
eneldoserrata/marcos_openerp
marcos_addons/resource_planning/__init__.py
Python
agpl-3.0
1,035
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # @author: Théo Nikles <theo.nikles@gmail.com> # # The licence is in the file __manifest__.py # ########################################################################...
CompassionCH/compassion-switzerland
website_compassion/models/mail_activity.py
Python
agpl-3.0
496
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-16 17:36 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Config'...
Pr0jectX/challenge
core/migrations/0001_initial.py
Python
agpl-3.0
773
from .models import Volunteer, VolunteerTask, VolunteerTalk, TaskCategory, TaskTemplate, Task, Track, \ Talk, Edition from .forms import EditProfileForm, SignupForm, EventSignupForm from django.contrib import messages from django.http import HttpResponse from django.views.generic.list import ListView from django.c...
jrial/fosdem-volunteers
volunteers/views.py
Python
agpl-3.0
23,867
############################################################################## # # Copyright (C) 2021 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 # #####################...
eicher31/compassion-switzerland
partner_communication_switzerland/wizards/communication_test_cases_wizard.py
Python
agpl-3.0
3,538
""" Tests that the generate_course_overview management command actually generates course overviews. """ from __future__ import absolute_import import six from django.core.management.base import CommandError from mock import patch from openedx.core.djangoapps.content.course_overviews.management.commands import generat...
ESOedX/edx-platform
openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_generate_course_overview.py
Python
agpl-3.0
4,880
""" Django models related to course groups functionality. """ import json import logging from django.contrib.auth.models import User from django.db import models, transaction, IntegrityError from django.core.exceptions import ValidationError from xmodule_django.models import CourseKeyField log = logging.getLogger(__...
hamzehd/edx-platform
openedx/core/djangoapps/course_groups/models.py
Python
agpl-3.0
8,226
# -*- coding: utf-8 -*- ######################################################################### # # # Copyright (C) 2015 Agile Business Group # # # ...
raycarnes/manufacture
mrp_calendar_view/__openerp__.py
Python
agpl-3.0
1,760
#!/usr/bin/env python # 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 F...
wbsavage/shinken
test/test_notifway.py
Python
agpl-3.0
4,716
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: David Coninckx # # The licence is in the file __openerp__.py # #######...
Secheron/compassion-switzerland
child_sync_typo3/model/project_compassion.py
Python
agpl-3.0
3,738
# Copyright (C) 2013 Steve Milner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
ashcrow/smizmar
test/__init__.py
Python
agpl-3.0
823
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from odoo.addons.account.tests.account_test_classes import AccountingTestCase from odoo.exceptions import ValidationError from odoo.tests import tagged @tagged('post_install', '-at_install') class ISRTest(...
maxive/erp
addons/l10n_ch/tests/test_l10n_ch_isr.py
Python
agpl-3.0
5,139
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import logging from cStringIO import StringIO import subprocess import shutil import tempfile import os import json from django.test.client import RequestFactory from django.test.runne...
clever-crow-consulting/otm-core
opentreemap/treemap/tests/__init__.py
Python
agpl-3.0
13,794
from __future__ import division import numpy as np from math import atan2 #from rawADCPclass import rawADCP from datetime import datetime from datetime import timedelta import scipy.io as sio import scipy.interpolate as sip import matplotlib.pyplot as plt def date2py(matlab_datenum): python_datetime = datetime.fro...
TheKingInYellow/PySeidon
pyseidon/utilities/BP_tools.py
Python
agpl-3.0
11,817
# -*- coding: utf-8 -*- # pylint: disable=E1101 # pylint: disable=W0212 import copy import mock import shutil from datetime import timedelta from fs.osfs import OSFS from json import loads from path import path from tempdir import mkdtemp_clean from textwrap import dedent from uuid import uuid4 from django.conf impo...
TangXT/edx-platform
cms/djangoapps/contentstore/tests/test_contentstore.py
Python
agpl-3.0
74,389
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/osis
education_group/views/training/general_information_read.py
Python
agpl-3.0
4,452
import io import zipfile from lxml import etree from . import ( Mimetype, Preferences, Styles, Tags, Story, StoryTable, StoryList, Spread, Designmap, Graphic ) class Converter: """ IDML Converter. Format items to `IDML <https://fileinfo.com/extension/idml>` ""...
mdhaman/superdesk-core
superdesk/publish/formatters/idml_formatter/package/converter.py
Python
agpl-3.0
11,760
from ...utils.tests import BaseTestCase from ..utils import get_gravatar_url class UtilsTestCase(BaseTestCase): def test_get_gravatar_url_should_return_gravatar_url_for_email(self): """ Tests that get_gravatar_url should return a Gravatar URL for a given email. """ gravatar...
jessamynsmith/boards-backend
blimp_boards/users/tests/test_utils.py
Python
agpl-3.0
543
from openpathsampling.netcdfplus import StorableNamedObject from openpathsampling.engines.dynamics_engine import DynamicsEngine from openpathsampling.engines.snapshot import BaseSnapshot, SnapshotDescriptor from openpathsampling.engines.toy import ToySnapshot import numpy as np import os import logging import psutil ...
choderalab/openpathsampling
openpathsampling/engines/external_engine.py
Python
lgpl-2.1
11,610
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 3100-3102 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
aricaldeira/PySPED
pysped/nfe/leiaute/conssitnfe_400.py
Python
lgpl-2.1
4,578
# 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 * import spack.hooks.sbang as sbang class Phist(CMakePackage): """The Pipelined, Hybrid-parallel ...
iulian787/spack
var/spack/repos/builtin/packages/phist/package.py
Python
lgpl-2.1
8,581
""" WSGI config for PersonalWebsite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJAN...
necessary129/PersonalWebsite
PersonalWebsite/PersonalWebsite/wsgi.py
Python
lgpl-3.0
407
# -*- coding: utf-8 -*- # # Baron documentation build configuration file, created by # sphinx-quickstart on Sat May 10 02:16:20 2014. # # 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 # autogenerated file. # # All c...
PyCQA/baron
docs/conf.py
Python
lgpl-3.0
9,121
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
jturney/psi4
psi4/driver/qcdb/libmintsbasissetparser.py
Python
lgpl-3.0
18,352
""" Example plugins for cutplace. """ from cutplace import checks from cutplace import errors from cutplace import fields from cutplace import ranges class ColorFieldFormat(fields.AbstractFieldFormat): """ Field format representing colors as their names. """ def __init__(self, field_name, is_allowed_t...
butterhirsch/newcutplace
examples/plugins.py
Python
lgpl-3.0
1,866
import wizard_import_accounting_lines import wizard_set_category_to_lines
nicoraynaud/odoo-personal-finances
wizard/__init__.py
Python
lgpl-3.0
73
import os import sys import time import setup_util import subprocess import multiprocessing def get_env_for_database(args): if args.database == 'MySQL': driver = 'mysql' option = "host=" + args.database_host + " user=benchmarkdbuser password=benchmarkdbpass character-set=utf8 dbname=hello_world" elif arg...
indraj/ULib
tests/examples/benchmark/FrameworkBenchmarks/ULib/setup.py
Python
lgpl-3.0
1,943
import pymysql import sys from dbsettings import connection_properties class DB: conn = None def connect(self): try: self.conn = pymysql.connect(**connection_properties) return self.conn except pymysql.err.OperationalError: sys.exit("Invalid Input: Wrong us...
Gurkengewuerz/prestashop-bot
webinterface/db.py
Python
unlicense
834
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack LLC. # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not ...
maoy/zknova
nova/objectstore/s3server.py
Python
apache-2.0
13,104
# -*- coding: 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): # Adding field 'MonthlyBills.trans_id' db.add_column(u'bill_monthlybills', 'trans_id', ...
neumerance/deploy
bill/migrations/0005_auto__add_field_monthlybills_trans_id__add_field_monthlybills_billing_.py
Python
apache-2.0
3,405
# Copyright 2016 Netherlands eScience Center # # 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 t...
3D-e-Chem/kripodb
kripodb/frozen.py
Python
apache-2.0
15,233
"""Some helper functions""" from flask import abort, session, request, make_response, Response from maproulette.models import Challenge, Task, TaskGeometry from maproulette.challengetypes import challenge_types from functools import wraps import json from maproulette import app from shapely.geometry import MultiPoint, ...
mvexel/maproulette
maproulette/helpers.py
Python
apache-2.0
12,876
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
cxxgtxy/tensorflow
tensorflow/python/tpu/tpu_outside_compilation_test.py
Python
apache-2.0
22,688
from datetime import datetime import json import os import time import logging import shutil from graphite.render.hashing import ConsistentHashRing, hashRequest, hashData import whisper from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpRequest, QueryDict from dj...
cosm0s/graphite-web
webapp/tests/test_render.py
Python
apache-2.0
16,147
# 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...
mahak/neutron
neutron/objects/tag.py
Python
apache-2.0
4,391
# swift_build_support/products/swiftpm.py -----------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
karwa/swift
utils/swift_build_support/swift_build_support/products/swiftpm.py
Python
apache-2.0
2,466
from cassandra import ConsistencyLevel, OperationTimedOut, ReadTimeout from cassandra.query import SimpleStatement from dtest import Tester, debug from tools import since class TestSchemaChanges(Tester): @since('2.0') def test_friendly_unrecognized_table_handling(self): """ After upgrading o...
mambocab/cassandra-dtest
mixed_version_test.py
Python
apache-2.0
3,171
#!/usr/bin/env python # tdnn or RNN with 'jesus layer' # inputs to jesus layer: # - for each spliced version of the previous layer the output (of dim --jesus-forward-output-dim) # outputs of jesus layer: # for all layers: # --jesus-forward-output-dim # we're using python 3.x style print but want ...
keighrim/kaldi-yesno-tutorial
steps/nnet3/make_jesus_configs.py
Python
apache-2.0
28,751
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
idaholab/raven
framework/CodeInterfaces.py
Python
apache-2.0
2,489
# 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...
dmlc/tvm
tests/python/contrib/test_ethosu/test_type_inference.py
Python
apache-2.0
14,532
from django.conf import settings from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from markupfield.fields import MarkupField from tastypie.models import create_api_key from .managers import UserManager DEF...
demvher/pythondotorg
users/models.py
Python
apache-2.0
2,897
# Copyright (c) 2011 OpenStack, LLC. # 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 requi...
blueboxgroup/keystone
keystone/policy/backends/rules.py
Python
apache-2.0
3,619
''' New Integration Test for migrate between clusters @author: Legion ''' import os import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib test_obj_dict = test_state.TestStateDict() test_stub = test_lib.lib_get_test_stub() data_mi...
zstackio/zstack-woodpecker
integrationtest/vm/multiclusters/data_migration/test_migrate_image.py
Python
apache-2.0
826
"""Support for Wireless Sensor Tags.""" import logging from requests.exceptions import ConnectTimeout, HTTPError import voluptuous as vol from wirelesstagpy import WirelessTags from wirelesstagpy.exceptions import WirelessTagsException from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_VOLTAGE, CO...
jawilson/home-assistant
homeassistant/components/wirelesstag/__init__.py
Python
apache-2.0
7,180
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-03-20 14:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beeswax', '0001_initial'), ] operations = [ migrations.AlterField( ...
cloudera/hue
apps/beeswax/src/beeswax/migrations/0002_auto_20200320_0746.py
Python
apache-2.0
600
import builtins import os import select import socket import unittest import errno from errno import EEXIST class SubOSError(OSError): pass class SubOSErrorWithInit(OSError): def __init__(self, message, bar): self.bar = bar super().__init__(message) class SubOSErrorWithNew(OSError): def ...
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_exception_hierarchy.py
Python
apache-2.0
7,610
# Dataset created from this: # Elements of Statistical Learning 2nd Ed.; Hastie, Tibshirani, Friedman; Feb 2011 # example 10.2 page 357 # Ten features, standard independent Gaussian. Target y is: # y[i] = 1 if sum(X[i]) > .34 else -1 # 9.34 is the median of a chi-squared random variable with 10 degrees of freedom # ...
woobe/h2o
py/testdir_single_jvm/test_GLM2_hastie_shuffle.py
Python
apache-2.0
4,276
# Copyright 2015-2016 ARM Limited # # 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 w...
ARM-software/bart
tests/test_sched_assert.py
Python
apache-2.0
4,193
# -*- coding: utf-8 -*- ''' Beacon to monitor network adapter setting changes on Linux .. versionadded:: 2016.3.0 ''' from __future__ import absolute_import # Import third party libs try: from pyroute2.ipdb import IPDB IP = IPDB() HAS_PYROUTE2 = True except ImportError: HAS_PYROUTE2 = False import as...
stephane-martin/salt-debian-packaging
salt-2016.3.3/salt/beacons/network_settings.py
Python
apache-2.0
5,828
from django.db import models, migrations def create_psf_membership_flag(apps, schema_editor): Flag = apps.get_model('waffle', 'Flag') Flag.objects.create( name='psf_membership', testing=True, note='This flag is used to show the PSF Basic and Advanced member registration process.' )...
manhhomienbienthuy/pythondotorg
users/migrations/0007_auto_20150604_1555.py
Python
apache-2.0
556
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param new_svrconn: {"description": "Server conn made", "format": "counter", "type": "number", "oid": "24", "optional": true, "size": "8"} :param svrsel_fa...
amwelch/a10sdk-python
a10sdk/core/slb/slb_http_proxy_stats.py
Python
apache-2.0
5,308
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jendap/tensorflow
tensorflow/python/ops/ragged/ragged_batch_gather_with_default_op.py
Python
apache-2.0
8,054
from __future__ import unicode_literals import uuid import boto3 import six from moto.core import BaseBackend from moto.core.exceptions import RESTError from moto.s3 import s3_backends from moto.ec2 import ec2_backends from moto.elb import elb_backends from moto.elbv2 import elbv2_backends from moto.kinesis import kin...
Affirm/moto
moto/resourcegroupstaggingapi/models.py
Python
apache-2.0
18,536
# 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 use ...
apache/libcloud
libcloud/compute/drivers/ovh.py
Python
apache-2.0
19,540