code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#EMAIL SERVER SETTINGS CWDPAGEEMAIL = 'cronwatchdog@yourdomain.com' #CWD SEND email address CWDDOMAIN = 'yourdomain.com' #SMTP SSL DOMAIN. SMTPSERVER = 'yoursmtpserver.com' #SMTP SERVER SMTPUSER = 'yoursmtpuser' #SMTP User if authentication/SSL is needed SMTPPORT = '123' #...
tmkdev/cwd
configuration_dist.py
Python
gpl-2.0
724
import os import glob import numpy import pyfits import warnings import select import logging import subprocess import time import SPARTATools import scipy import matplotlib.pyplot as pyplot class Derotator( object ): def __init__(self, parent): self.angle = 0.0 self.encoder = 0 self.parent...
soylentdeen/CIAO-commissioning-tools
VLTTools.py
Python
mit
30,270
import pytest from py.error import ENOENT import utils.browser from cfme.fixtures.pytest_selenium import ensure_browser_open, take_screenshot from fixtures.artifactor_plugin import fire_art_test_hook from utils.datafile import template_env from utils.path import log_path from utils import browser as browser_module, sa...
jdemon519/cfme_tests
fixtures/browser.py
Python
gpl-2.0
4,714
from functools import partial import pytest import sklearn.cluster import numpy as np from numpy.testing import assert_array_equal from dask_ml.datasets import make_blobs from dask_ml.cluster import SpectralClustering from dask_ml import metrics X, y = make_blobs(n_samples=200, chunks=100, random_state=0) X_ = X.co...
daniel-severo/dask-ml
tests/test_spectral_clustering.py
Python
bsd-3-clause
2,854
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2016 CERN. # # INSPIRE 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...
Panos512/inspire-next
tests/unit/search/test_search_query.py
Python
gpl-2.0
32,501
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
wasiqmukhtar/tcp-eval.wasiq
src/flow-monitor/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
441,417
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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...
aslab/rct
higgs/branches/ros-groovy/higgs_gazebo_simulation/rqt_robot_plugins/rqt_robot_monitor/src/rqt_robot_monitor/abst_status_widget.py
Python
gpl-3.0
2,584
s = f'{42:foo\{bar}baz\}'
smmribeiro/intellij-community
python/testData/psi/FStringSingleSlashesBeforeBracesInFormatPart.py
Python
apache-2.0
25
import unittest import client import utilities import datetime class TestSeriesFunctions(unittest.TestCase): def setUp(self): self.rs = client.RSSeriesClient() def test_get_identifier(self): identifier = self.rs.get_identifier('A1') self.assertEqual(identifier, 'A1') def test_ge...
wragge/recordsearch_tools
tests.py
Python
cc0-1.0
16,330
''' Calculation of [Total # of Contigs], [Total Length], [Total # of trimmed Contigs], [Trimmed Length], [GC content], [Min Contig Size [bp]], [Median Contig Size [bp]], [Mean Contig Size [bp]], [Max Contig Size [bp]], [N50[bp] [# of Contigs], [Total # of Contigs] This code creates an output.txt file w...
marbl/MetaCompass
bin/assembly_stats.py
Python
artistic-2.0
3,884
#!/bin/python import os, fnmatch from subprocess import call class RunPandoc(): def runPandoc(self, fileName): pandoc="C:\\Program Files (x86)\\Pandoc\\bin\\pandoc.exe" paramData={"fileName": fileName, "ext1":"md", "ext2":"html"} markdownName="%(fileName)s.%(ext1)s" % paramData htmlName="%(fileName)s.%(ext2...
donlee888/JsObjects
Python/PandocConvert/PandocConvert.py
Python
mit
1,118
# # Copyright 2014-2016, 2021 Lars Pastewka (U. Freiburg) # 2015-2016 Adrien Gola (KIT) # 2014 James Kermode (Warwick U.) # # matscipy - Materials science with Python at the atomic-scale # https://github.com/libAtoms/matscipy # # This program is free software: you can redistribute it and/or modify #...
libAtoms/matscipy
matscipy/io/__init__.py
Python
lgpl-2.1
948
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Name: yttools.py # Version: 0.2 # Purpose: 工具和自定义控件 # Author: Dormouse.Young # Created: 2016-05-03 # LastModify 2016-08-31 # Copyright: Dormouse.Young # Licen...
dormouse/read
yttools.py
Python
lgpl-3.0
7,188
# -*- coding: utf-8 -*- import logging import os import datetime import configparser from cosycar.constants import Constants from cosycar.read_email import ReadEmail from cosycar.create_events import CreateEvent log = logging.getLogger(__name__) class Events(): def __init__(self, config_file): self._co...
eragnms/cosycar
cosycar/events.py
Python
mit
4,065
#!/usr/bin/env python # Copyright (c) 2009, Willow Garage, 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 # n...
spaghetti-/rosdep
src/rosdep2/platforms/slackware.py
Python
bsd-3-clause
4,542
from __future__ import absolute_import from sentry.api.serializers import serialize, Serializer, register from sentry.app import env from sentry.auth.superuser import is_active_superuser from sentry.constants import SentryAppStatus from sentry.models import IntegrationFeature, SentryApp from sentry.models.sentryapp im...
beeftornado/sentry
src/sentry/api/serializers/models/sentry_app.py
Python
bsd-3-clause
2,133
""" Gitlab API: https://docs.gitlab.com/ee/api/merge_request_approvals.html """ import copy import pytest import responses import gitlab approval_rule_id = 1 approval_rule_name = "security" approvals_required = 3 user_ids = [5, 50] group_ids = [5] new_approval_rule_name = "new approval rule" new_approval_rule_user...
python-gitlab/python-gitlab
tests/unit/objects/test_project_merge_request_approvals.py
Python
lgpl-3.0
9,503
############################################################################### # Copyright 2006 to the present, Orbitz Worldwide, 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...
OrbitzWorldwide/droned
romeo/lib/romeo/context.py
Python
apache-2.0
3,267
#!/usr/bin/env python """ Gather all information about the software """ NAME = "Vitalus" URL = "https://github.com/sciunto/Vitalus" LICENSE = "GPLv3+" EMAIL = "fboulogne@sciunto.org" SHORT_DESCRIPTION = "Rsync wrapper for backups" AUHTORS = ["Francois Boulogne <fboulogne@sciunto.org>"]
sciunto/Vitalus
Vitalus/info.py
Python
gpl-3.0
292
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-04-06 18:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournament', '0182_auto_20180728_2344'), ] operat...
cyanfish/heltour
heltour/tournament/migrations/0183_playersetting.py
Python
mit
968
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
programa-stic/barf-project
barf/arch/arm/disassembler.py
Python
bsd-2-clause
16,224
#!/usr/bin/env python # encoding: utf-8 """Snippet representation after parsing.""" import re import vim import textwrap from UltiSnips import _vim from UltiSnips.compatibility import as_unicode from UltiSnips.indent_util import IndentUtil from UltiSnips.text import escape from UltiSnips.text_objects import Snippet...
yslin/tools-zodlin
ubuntu/vim/.vim/lang/all/ultisnips/pythonx/UltiSnips/snippet/definition/_base.py
Python
apache-2.0
15,191
#! /usr/bin/env python ''' Dumps in the stdout the IasValue published in the BSDB Created on Jun 12, 2018 @author: acaproni ''' import argparse from IasKafkaUtils.KafkaValueConsumer import IasValueListener, KafkaValueConsumer # The kafka consumer consumer = None # Signal that the user pressed CTRL+C terminated = F...
IntegratedAlarmSystem-Group/ias
KafkaUtils/src/main/python/iasValueDumper.py
Python
lgpl-3.0
3,031
import telnetlib import time import socket import sys TELNET_PORT = 23 TELNET_TIMEOUT = 6 def send_command(remote_conn, cmd): '''this lets us send our commands''' cmd = cmd.rstrip() remote_conn.write(cmd + '\n') time.sleep(1) return remote_conn.read_very_eager() def telnet_connect(ip_addr): t...
joeyb182/pynet_ansible
byers-paid/test_telnet_from_video.py
Python
apache-2.0
1,167
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # real.py - parser for real media files # ----------------------------------------------------------------------------- # $Id$ # # ----------------------------------------------------------------------------- # ...
jtackaberry/stagehand
external/metadata/video/real.py
Python
mit
4,964
from django.db.models import Manager class SnippetsManager(Manager): def optimized(self): queryset = self.get_queryset() return queryset.select_related('created_by') \ .prefetch_related('tags', 'created_by__following', 'created_by__followers', ...
pombredanne/snippit
snippit/apps/snippet/managers.py
Python
mit
674
import custom class ParameterSet: def __init__(self, campaign, scenarioID): self.campaign = campaign self.scenarioID = scenarioID self.params = {} def getParametersOfCampaign(campaign): p = custom.query("SELECT DISTINCT(parameter_name) FROM parameters WHERE campaign_id = %d" % campai...
openwns/wrowser
openwns/wrowser/simdb/api/parameters.py
Python
gpl-2.0
1,444
"""Contains utility functions, mainly to help with polygon creation""" from __future__ import division __docformat__ = "reStructuredText" from .vec2d import Vec2d from math import fabs, sqrt X, Y = 0, 1 try: from functools import partial except ImportError: # Python 2.4 support def partial(...
cullophid/Scienceman
pymunk/util.py
Python
lgpl-2.1
7,527
from copy import copy, deepcopy import pandas as pd from .exceptions import PlotnineError from .utils import array_kind, ninteraction from .utils import check_required_aesthetics, defaults from .mapping.aes import aes, NO_GROUP from .mapping.evaluation import stage, evaluate class Layers(list): """ List of ...
has2k1/plotnine
plotnine/layer.py
Python
gpl-2.0
14,062
import os import fnmatch import re # for htest import sys from Tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog from Tkinter import Tk, Text, Button, SEL, END # for htest from idlelib import SearchEngine import itertools from idlelib.SearchDialogBase import SearchDialogBase # Importing OutputWindow...
BartoszCichecki/onlinepython
onlinepython/pypy-2.4.0-win32/lib-python/2.7/idlelib/GrepDialog.py
Python
gpl-2.0
5,120
import json, os, time import logging import etcd import helpers.errors logger = logging.getLogger(__name__) class Etcd: def __init__(self, config): self.scope = config["scope"] self.host, self.port = config["host"].split(":") self.client = etcd.Client(host=self.host, port=int(self.port)) ...
Tapjoy/governor
helpers/keystore.py
Python
mit
4,071
import unittest2 import webtest import json import webapp2 from datetime import datetime from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.district_type import DistrictType from consts.event_type import EventType from controllers.api.api_event_controller import ApiEventContro...
1fish2/the-blue-alliance
tests/test_apiv2_event_controller.py
Python
mit
15,390
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # This file is part of Ansible # # Ansible 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 # ...
rcarrillocruz/ansible
lib/ansible/modules/network/f5/bigip_iapp_service.py
Python
gpl-3.0
14,587
#!/usr/bin/env python import os import re import sys from codecs import open try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = [ 'jarvy', 'jarvy.packages', ...
jarvy/jarvy
setup.py
Python
mit
1,566
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) cgstudiomap <cgstudiomap@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms o...
cgstudiomap/cgstudiomap
main/local_modules/frontend_base/tests/__init__.py
Python
agpl-3.0
1,050
import jobinfo __author__ = 'Masataka' class JobMaya(jobinfo.JobInfo): def __init__(self, param): jobinfo.JobInfo.__init__(self, param) class JobMayaSw(JobMaya): def __init__(self, param): JobMaya.__init__(self, param) class JobMayaMr(JobMaya): def __init__(self, param): JobMa...
plinecom/JobManager
job/_maya.py
Python
mit
444
from ethronsoft.gcspypi.package.package_manager import PackageManager from ethronsoft.gcspypi.utilities.console import Console from ethronsoft.gcspypi.parsers.commons import init_repository def handle_(config, data): with Console(verbose=config.get("verbose", False), exit_on_error=True) as c: repo = init_r...
ethronsoft/gcspypi
ethronsoft/gcspypi/parsers/search.py
Python
bsd-2-clause
960
""" A Cobbler System. Copyright 2006-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> 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 l...
ssalevan/cobbler
cobbler/item_system.py
Python
gpl-2.0
21,071
import ocl import pyocl import camvtk import time import datetime import vtk def main(filename="frame/f.png"): print ocl.revision() myscreen = camvtk.VTKScreen() myscreen.camera.SetPosition(-15, -8, 15) myscreen.camera.SetFocalPoint(5,5, 0) # axis arrows camvtk.drawArrows(m...
AlanZatarain/opencamlib
scripts/ocode/cutsim_test_4_octree2.py
Python
gpl-3.0
2,075
#!/usr/bin/env python """Test for depth estimation TODO: Render Baxter's hand at the goal position in Rviz, as well as the arm position that induced this goal position """ import rospy from geometry_msgs.msg import Pose, PoseArray, Point, Quaternion from visualization_msgs.msg import Marker, MarkerArray import visua...
osrf/baxter_demos
tests/estimate_depth_test.py
Python
apache-2.0
1,522
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize import sys # set profiling globally from Cython.Compiler.Options import directive_defaults directive_defaults['profile'] = False # extra compile flags extra_compile_args = ["-O0"] #sys.argv.append("build_ext...
gunny26/python-gcode
setup.py
Python
gpl-2.0
2,225
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import json from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from dace.util import getSite from dace.processinstance.core import DEFAUL...
ecreall/lagendacommun
lac/views/cinema_review_management/see_review.py
Python
agpl-3.0
3,952
# IMAPFS - Cloud storage via IMAP # Copyright (C) 2013 Wes Weber # # 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 3 of the License, or # (at your option) any later version. # # T...
waweber/imapfs
imapfs/directory.py
Python
gpl-3.0
2,645
from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin: @clas...
mattseymour/django
tests/flatpages_tests/test_views.py
Python
bsd-3-clause
6,752
from django import forms from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.base_user import BaseUserManager from django.core.exceptions import ObjectDoesNotExist, ValidationError from pyswot.pyswot import _domain_parts, _is_stoplisted from grandchallenge.core.form...
comic/comic-django
app/grandchallenge/verifications/forms.py
Python
apache-2.0
3,220
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Checkin.accepted_by' db.add_column('articletrack_checkin'...
jamilatta/scielo-manager
scielomanager/articletrack/migrations/0004_auto__add_field_checkin_accepted_by__add_field_checkin_accepted_at.py
Python
bsd-2-clause
23,300
# -*- encoding: utf-8 -*- import gi import regex gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gtk, Gdk from gcustom.replaceConfirmDialog import cReplaceConfirmDialog class cSearchReplaceDialog(Gtk.Window): def __init__(self, parent, treeView, subtitles_model, hist): ...
jtk1rk/xsubedit
gcustom/searchReplaceDialog.py
Python
gpl-3.0
6,940
def extra_eda(row): """King 2012 has extra 'random' systematic error added in quadrature.""" if row.sigflag == 3: extra = 9.05 elif row.sigflag == 2: extra = 17.43 else: extra = 0.0 return np.sqrt(row.eda ** 2.0 + extra ** 2.0) def assign_dipole(row): """Assign best-fit...
jbwhit/fine-structure-inference
src/create-full-parse-new.py
Python
mit
2,251
#!/usr/bin/python3 # # $Id:$ # # We test a bit of the atrshmlog here. # # This is for the first starter, so only the basic things. import sys import atrshmlog r = atrshmlog.attach() id = atrshmlog.get_clock_id() print('clock id : ' + str(id) + ' : ') oldid = atrshmlog.set_clock_id(2) print('clock id : ' + str(old...
atrsoftgmbh/atrshmlog
python/src/tests/t_clock_id.py
Python
apache-2.0
594
#!/usr/bin/env python3 # The following overwrites the module name, so other functions in # polyproject.py would also have to be imported here in future. from .polyproject import polyproject
praveenv253/polyproject
polyproject/__init__.py
Python
mit
191
#!/bin/env python3 import sys,os import random import functools p_sg = ['el', 'la'] p_pl = ['los', 'las'] # func to add prefix def with_prefix(name): if name[-1:] == 's': # plural return random.choice(p_pl) + ' ' + name else: return random.choice(p_sg) + ' ' + name # Find the path path = '.' if len(sys.arg...
MightyPork/los
los.py
Python
mit
1,353
import time from options.train_options import TrainOptions from data.data_loader import CreateDataLoader from models.models import create_model from util.visualizer import Visualizer opt = TrainOptions().parse() data_loader = CreateDataLoader(opt) dataset = data_loader.load_data() dataset_size = len(data_loader) datas...
MingwangLin/automatic-colorization-of-sketch
train.py
Python
apache-2.0
2,858
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Base class for linker-specific test cases. The custom dynamic linker can only be tested through a custom test case for various technical reasons: ...
CapOM/ChromiumGStreamerBackend
build/android/pylib/linker/test_case.py
Python
bsd-3-clause
8,228
import pkg_resources from google.appengine.ext import vendor path = 'lib' vendor.add(path) pkg_resources.working_set.add_entry(path) # https://stackoverflow.com/a/59334563 import six; reload(six)
phil-lopreiato/the-blue-alliance
appengine_config.py
Python
mit
198
#!/usr/bin/env python # encoding: utf-8 """ test_geomutils.py Created by Chris Waigl on 2015-04-21. """ from __future__ import division, print_function, absolute_import, unicode_literals import os from pygaarst import geomutils as gu def test_modapsclient_creation(): a = True assert a
chryss/pygaarst
tests/test_geomutils.py
Python
mit
298
# coding: utf-8 """ OAuth2 provider setup. It is based on the code from the example: https://github.com/lepture/example-oauth2-server More details are available here: * http://flask-oauthlib.readthedocs.org/en/latest/oauth2.html * http://lepture.com/en/2013/create-oauth-server """ from flask import Blueprint, reques...
millen1m/flask-restplus-server-example
app/modules/auth/views.py
Python
mit
4,794
# coding=utf-8 from mainTools import main def create_results(doc): yield { 'sentiment': str(doc['sentiment']) } def csv_header(): return ['sentiment'] if __name__ == '__main__': main('sentiment', csv_header(), create_results)
Geneea/keboola-connection
src/sentiment.py
Python
apache-2.0
254
#!/usr/bin/env python # -*- coding: utf-8 -*- """sloth dataView application ============================= """ import os import sys from silx.gui import qt import sloth from sloth.gui.deprecated.dataview import DataViewDockWidget class SlothDataViewMainWindow(qt.QMainWindow): def __init__(self, parent=None): ...
maurov/xraysloth
sloth/gui/deprecated/sloth_dataview.py
Python
bsd-3-clause
1,274
# Copyright (C) 2001-2007 Python Software Foundation # email package unit tests # The specific tests now live in Lib/email/test from email.test.test_email import suite from test import support def test_main(): support.run_unittest(suite()) if __name__ == '__main__': test_main()
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/test/test_email.py
Python
mit
290
# Python code for picture Watermarking, 03/03/2016 from PIL import Image, ImageDraw import glob import os import sys #Bellow is the path to the folder "Watermarked" #"Watermarked" is the folder with the photographs that I want to watermark indir = "/.../Watermarked/*.*" counter = 0 def getSize(fl): st = os.st...
Michael3con/Photographs_WaterMarking
WaterMarking.py
Python
mpl-2.0
1,524
"""Calibration of predicted probabilities.""" # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Balazs Kegl <balazs.kegl@gmail.com> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # Mathieu Blondel <mathieu@mblondel.org> # # License: BSD 3 clause import warnings from...
huzq/scikit-learn
sklearn/calibration.py
Python
bsd-3-clause
32,602
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/TestScript) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class TestScript(domainresource.DomainResource): """ Describes a set of tests. A structured set of...
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_3_0_0/models/testscript.py
Python
bsd-3-clause
50,708
# Copyright 2013 Red Hat, Inc. # Copyright 2015 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/LICEN...
rajalokan/glance
glance/db/registry/api.py
Python
apache-2.0
17,561
#! /usr/bin/python # -*- coding: utf-8 -*- def multiplica(multiplo1, multiplo2=2): print multiplo1 * multiplo2 multiplica(2) multiplica(5, 7.3) multiplica("7", 6) numero = 12.5 multiplica(numero, 11) multiplica()
Jzarecta/pythonjr
codigo/funcion_con_parametros.py
Python
gpl-2.0
220
# import the necessary packages from .mxalexnet import MxAlexNet from .mxvggnet import MxVGGNet from .mxgooglenet import MxGoogLeNet from .mxresnet import MxResNet from .mxsqueezenet import MxSqueezeNet from .mxagegendernet import MxAgeGenderNet
CyberLabs-BR/face_detect
pyimagesearch/nn/mxconv/__init__.py
Python
mit
245
#!/usr/bin/env python # -*- coding: utf-8 -*- # tester for Part.makeWireString import FreeCAD import Part import PartDesign print "testWire started" # test strings # if string contains funky characters, it has to be declared as Unicode or it # turns into the default encoding (usually utf8). FT2 doesn't do utf8. ...
yantrabuddhi/FreeCAD
src/Mod/Test/testmakeWireString.py
Python
lgpl-2.1
2,126
#!/usr/bin/env python3 # coding: utf-8 import BRT from collections import namedtuple import configparser import os import logging from os.path import expanduser import argparse parser = argparse.ArgumentParser() parser.add_argument('-s', '--submit', help='Execute the submission', action='store_true') parser.add_argu...
jochym/brt
submit_batch.py
Python
gpl-2.0
2,720
def find_longest_subsequence(integers): runs = defaultdict() for i in integers: if i-1 in runs.keys(): run = runs[i-1] run.append(i) if i+1 in runs.keys(): run = runs[i+1] run.append(i) print runs find_longest_subsequence([1,2,3,4,7,5,12,13])
mre/the-coding-interview
problems/longest-subsequence/find_longest_subsequence2.py
Python
mit
283
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-30 20:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hamask', '0006_auto_20170530_1415'), ] operations = [ migrations.AlterField...
rawenihcam/BER-SERKR
hamask/migrations/0007_auto_20170530_1638.py
Python
mit
605
#!/usr/bin/python import os, subprocess import textwrap, argparse import itertools from collections import OrderedDict if __name__ == '__main__': argument_parser = argparse.ArgumentParser( prog='mapps_blcs.py', formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap....
daniparera/MCR
BLC/analisys/mapps_blcs.py
Python
gpl-2.0
5,450
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sm.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
arashrasoulzadeh/codepackWEB
manage.py
Python
mit
800
# Copyright 2017 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 applicable ...
Xeralux/tensorflow
tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver_test.py
Python
apache-2.0
12,171
"""Testing facility for conkit.io.A3mIO""" __author__ = "Felix Simkovic" __date__ = "11 Sep 2016" import os import unittest from conkit.io.a3m import A3mParser from conkit.io._iotools import create_tmp_f class TestA3mParser(unittest.TestCase): def test_read_1(self): msa = """>d1a1x__ b.63.1.1 (-) p13-M...
fsimkovic/conkit
conkit/io/tests/test_a3m.py
Python
bsd-3-clause
21,377
# 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 a...
rarcotvmw/capirca
tests/lib/arista_test.py
Python
apache-2.0
5,777
result = {} for i in range(int(input())): x = int(input()) if x not in result.keys(): result[x] = f(x) print(result[x])
TheNovel/stepik-programming-on-python
week3/3.02 dict/step07 func.py
Python
mit
140
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the USBStor Windows Registry plugin.""" import unittest from plaso.lib import definitions from plaso.parsers.winreg_plugins import usbstor from tests.parsers.winreg_plugins import test_lib class USBStorPlugin(test_lib.RegistryPluginTestCase): """Tests f...
kiddinn/plaso
tests/parsers/winreg_plugins/usbstor.py
Python
apache-2.0
2,151
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """ ------- main.py ------- Main methods (views + routes) implemented in the API. .. moduleauthor:: Fabio Madeira :module_version: 1.0 :created_on: 28-02-2015 """ import webapp2 import logging import os import jinja2 import urllib from tools import * from google.appeng...
biomadeira/gae_pubmed2rss
main.py
Python
mit
5,320
# Need to import the plotting package: import matplotlib.pyplot as plt from pylab import * import numpy as np # Read the file. f2 = open('data.dat', 'r') # read the whole file into a single variable, # which is a list of every row of the file. lines = f2.readlines() f2.close() # initialize some variable to be lis...
VictorRodriguez/personal
GP_tutorial/homework3/file_plot.py
Python
apache-2.0
697
# Copyright 2017 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...
apark263/tensorflow
tensorflow/python/eager/backprop.py
Python
apache-2.0
42,517
from polyphony import module, pure from polyphony import testbench from polyphony import is_worker_running from polyphony.io import Port from polyphony.typing import int8 from polyphony.timing import clksleep, wait_value @module class Submodule: @pure def __init__(self, param): self.i = Port(int8, 'in...
ktok07b6/polyphony
tests/pure/nesting03.py
Python
mit
1,211
__author__ = "Can Ozbek" import pandas as pd import numpy as np import pylab import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix import ml_aux_functions as ml_aux #Read the files df = pd.read_pickle("/Users/ahmetcanozbek/Desktop/660Stuff/msd.pkl") df_train = pd.read_pickle("/Users/ahmetcanozb...
nishantnath/MusicPredictiveAnalysis_EE660_USCFall2015
Code/Machine_Learning_Algos/10k_Tests/ml_classification_adaboost_onemillion.py
Python
mit
908
from __future__ import unicode_literals from django.core.files.uploadedfile import SimpleUploadedFile from django.utils import six from djblets.features.testing import override_feature_check from djblets.webapi.errors import (INVALID_ATTRIBUTE, INVALID_FORM_DATA, PERMISSION_DENIED) f...
chipx86/reviewboard
reviewboard/webapi/tests/test_diff.py
Python
mit
21,247
# -*- coding: utf-8 -*- # Copyright 2015-2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import mock from odoo.addons.connector_carepoint.models import account_invoice_line from ..common import SetUpCarepointBase model = 'odoo.addons.connector_carepoint.models.account_invoice...
laslabs/odoo-connector-carepoint
connector_carepoint/tests/models/test_account_invoice_line.py
Python
agpl-3.0
19,528
# 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 (t...
apache/allura
Allura/allura/ext/admin/admin_main.py
Python
apache-2.0
50,637
""" 1. Converting markdown files into jupyter notebooks 2. Remove filename headers, such as from P01-C01-xx.ipynb to xx.ipynb """ import notedown import glob import pkg_resources import nbformat import re import shutil import os import time import tarfile from zipfile import ZipFile # timeout in second to evaluate a n...
libennext/gluon-tutorials-zh
sphinx_plugin.py
Python
apache-2.0
7,810
from sys import argv from pathlib import Path import matplotlib as mpl mpl.use('Agg') import seaborn as sns sns.set_style("darkgrid") import matplotlib.pyplot as plt import pandas as pd # python plot.py "$(ls -t log/* | head -n 1)" name # from keras.utils import plot_model # plot_model(model, to_file='model.png', sho...
amoshyc/tthl-code
plot.py
Python
apache-2.0
1,206
# # # Copyright (C) 2012 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
leshchevds/ganeti
lib/vcluster.py
Python
bsd-2-clause
8,507
import json from pcs_test.tools.command_env.mock_node_communicator import ( place_multinode_call, ) class StatusShortcuts: def __init__(self, calls): self.__calls = calls def get_full_cluster_status_plaintext( self, node_labels=None, communication_list=None, name=...
feist/pcs
pcs_test/tools/command_env/config_http_status.py
Python
gpl-2.0
2,031
#!/usr/bin/python # -*- coding: utf-8 -*- """ In this example, we connect a signal of a QSlider to a slot of a QLCDNumber. """ import sys from PySide.QtGui import * from PySide.QtCore import * class Example(QWidget): def __init__(self): super(Example, self).__init__() lcd = QLCDNumber() ...
madoodia/codeLab
pyside/signal_slot_tests/test_signal_slot.py
Python
mit
752
from __future__ import unicode_literals import os import paramiko from django.utils import six from djblets.testing.decorators import add_fixtures from reviewboard import scmtools from reviewboard.hostingsvcs.models import HostingServiceAccount from reviewboard.reviews.models import ReviewRequest from reviewboard.sc...
1tush/reviewboard
reviewboard/webapi/tests/test_repository.py
Python
mit
31,592
import json from .base import MyTestCase from privacyidea.lib.error import (ParameterError, ConfigAdminError) from privacyidea.lib.policy import PolicyClass from urllib import urlencode PWFILE = "tests/testdata/passwords" POLICYFILE = "tests/testdata/policy.cfg" POLICYEMPTY = "tests/testdata/policy_empty_file.cfg" cl...
woddx/privacyidea
tests/test_api_system.py
Python
agpl-3.0
40,077
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def forwards(apps, schema_editor): """Create Newsletter group.""" Group = apps.get_model('auth', 'Group') if not Group.objects.filter(name='Newsletter').exists(): Group.objects.create(name='Ne...
mozilla/remo
remo/profiles/migrations/0012_groups_new_newsletter_group.py
Python
bsd-3-clause
765
"""Capa's specialized use of codejail.safe_exec.""" from codejail.safe_exec import safe_exec as codejail_safe_exec from codejail.safe_exec import not_safe_exec as codejail_not_safe_exec from codejail.safe_exec import json_safe, SafeExecException from . import lazymod from statsd import statsd import hashlib # Establ...
EduPepperPD/pepper2013
common/lib/capa/capa/safe_exec/safe_exec.py
Python
agpl-3.0
4,572
data = ( 'Po ', # 0x00 'Feng ', # 0x01 'Zhuan ', # 0x02 'Fu ', # 0x03 'She ', # 0x04 'Ke ', # 0x05 'Jiang ', # 0x06 'Jiang ', # 0x07 'Zhuan ', # 0x08 'Wei ', # 0x09 'Zun ', # 0x0a 'Xun ', # 0x0b 'Shu ', # 0x0c 'Dui ', # 0x0d 'Dao ', # 0x0e 'Xiao ', # 0x0f ...
gquirozbogner/contentbox-master
third_party/unidecode/x05c.py
Python
apache-2.0
4,870
import os import torch import argparse import numpy as np import scipy.misc as misc from ptsemseg.models import get_model from ptsemseg.loader import get_loader from ptsemseg.utils import convert_state_dict try: import pydensecrf.densecrf as dcrf except: print( "Failed to import pydensecrf,\ ...
meetshah1995/pytorch-semseg
test.py
Python
mit
4,907
# -*- coding:utf-8 -*- # # Copyright (C) 2005 - 2007, TUBITAK/UEKAE # # 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. # ...
hknyldz/pisitools
pisilinux/pisilinux/cli/listcomponents.py
Python
gpl-3.0
2,017
''' Copyright (C) 2014 Travis DeWolf 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 3 of the License, or (at your option) any later version. This program is distributed in the hope t...
studywolf/control
studywolf_control/tasks/follow_mouse.py
Python
gpl-3.0
2,215
import os from setuptools import setup, find_packages README = os.path.join(os.path.dirname(__file__), 'README.rst') REQUIREMENTS = os.path.join(os.path.dirname(__file__), 'requirements.txt') REQUIREMENTS = open(REQUIREMENTS, 'r').read().splitlines() VERSION = os.path.join(os.path.dirname(__file__), 'VERSION') VERSI...
granoproject/grano
setup.py
Python
mit
1,993
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from test_framework.mininode import * from test_framework.test_fr...
jimmysong/bitcoin
test/functional/p2p-feefilter.py
Python
mit
4,157
# 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...
yanheven/neutron
neutron/agent/dhcp/agent.py
Python
apache-2.0
24,464