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
# maximum number of letters(ignoring spaces and duplicates) if tie choose alphabetical order. # import sys # text = "".join(sys.stdin.readlines()) # name_list = text.split("\n") inputList = ["kylan charles", "raymond strickland", "julissa shepard", "andrea meza", "destiny alvarado"] inputList2 = ["maria garcia", "smit...
saisankargochhayat/algo_quest
Company-Based/SAP/social_sabatical_name.py
Python
apache-2.0
938
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 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...
usc-isi/extra-specs
nova/console/manager.py
Python
apache-2.0
5,515
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This file is part of the TPOT library. TPOT was primarily developed at the University of Pennsylvania by: - Randal S. Olson (rso@randalolson.com) - Weixuan Fu (weixuanf@upenn.edu) - Daniel Angell (dpa34@drexel.edu) - and many more generous open source c...
weixuanfu/tpot
tpot/builtins/feature_set_selector.py
Python
lgpl-3.0
5,788
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1_metadata_service_create_artifact_sync.py
Python
apache-2.0
1,496
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
CiscoSystems/nova
nova/db/api.py
Python
apache-2.0
66,221
"""Module containing a preprocessor that executes the code cells and updates outputs""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os from textwrap import dedent try: from queue import Empty # Py 3 except ImportError: from Queue import Empty ...
lancezlin/ml_template_py
lib/python2.7/site-packages/nbconvert/preprocessors/execute.py
Python
mit
10,816
import Gnuplot class TreePlot: def __init__(self, filename, title = None, datatitle = None, debug = 0): self.gp = Gnuplot.Gnuplot(debug = debug) fp = open(filename, "r") line = fp.readline() while line: line = line.strip() if line.find('"') >...
emilydolson/forestcat
pyrobot/tools/cluster/treeplot.py
Python
agpl-3.0
1,148
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the duecredit package for the # copyright and license terms. # # ## ### ...
jgors/duecredit
duecredit/injections/mod_skimage.py
Python
bsd-2-clause
874
""" This is a test of using PilotManagerClient In order to run this test we need the following DBs installed: - PilotAgentsDB And the following services should also be on: - Pilots this is pytest! """ from DIRAC.Core.Base.Script import parseCommandLine parseCommandLine() from DIRAC import gLog...
andresailer/DIRAC
tests/Integration/WorkloadManagementSystem/Test_PilotsClient.py
Python
gpl-3.0
3,395
""" Django settings for example project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ from dist...
marcgibbons/drf_signed_auth
example/example/settings.py
Python
bsd-2-clause
4,062
from __future__ import absolute_import, unicode_literals from celery.canvas import chain as celery_chain from celery_growthmonitor import settings from celery_growthmonitor.models import JobHolder from celery_growthmonitor.tasks import remove_old_jobs, start, stop def pre(job_holder: JobHolder, *tasks): flow = ...
mbourqui/django-celery-growthmonitor
celery_growthmonitor/canvas.py
Python
gpl-3.0
1,153
#!/usr/bin/env python import mirheo as mir import numpy as np import argparse from mpi4py import MPI parser = argparse.ArgumentParser() parser.add_argument("--restart", action='store_true', default=False) parser.add_argument("--ranks", type=int, nargs=3) args = parser.parse_args() ranks = args.ranks domain = (4, 6...
dimaleks/uDeviceX
tests/restart/particle_vector.py
Python
gpl-3.0
1,775
from openerp.osv import fields, osv import openerp.addons.decimal_precision as dp from lxml import etree as ET class project_logical_framework_project(osv.Model): _inherit = 'project.project' _columns = { 'logical_framework': fields.one2many( 'project_logical_framework.logical_framework',...
stephane-/project_logical_framework
project_logical_framework.py
Python
mit
1,730
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
google-research/google-research
multi_resolution_rec/modules.py
Python
apache-2.0
19,899
#!/usr/bin/env python """Gets the IP for a given hostname.""" import sys import argparse import socket # ============================================================================== __version__ = "0.1" __copyright__ = "Copyright 2017, devops.center" __credits__ = ["Bob Lozano", "Gregg Jensen"] __license__ = ' \ ...
devopscenter/dcUtils
checkDNSforIP.py
Python
apache-2.0
2,325
# # Copyright (c) 2018 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # default_app_config = 'pdc.apps.unreleasedvariant.apps.UnreleasedVariantConfig'
release-engineering/product-definition-center
pdc/apps/unreleasedvariant/__init__.py
Python
mit
188
def func(): value = "not-none" # pylint: disable=unused-argument1 if value is not None: print("Not none") # pylint: disable=unused-argument2 else: print("None")
siosio/intellij-community
python/testData/intentions/PyInvertIfConditionIntentionTest/commentsPylintBoth_after.py
Python
apache-2.0
197
from .gmm_bayes import GMMBayes
astroML/astroML
astroML/classification/__init__.py
Python
bsd-2-clause
32
idade = 12 if idade < 4: preco = 0 elif idade < 18: preco = 5 elif idade < 65: preco = 10 else: preco = 5 print('Seu custo de admissão e R$' + str(preco) + '.') ''' Foi adicionado mais bloco de instrução elif para idades abaixo de 65. Se caso a idade for maior que 18 e menor que 65 o bloco e executado,...
zirou30/python_student
82.py
Python
gpl-3.0
387
# Notes on using python requests to post .NET forms: # http://stackoverflow.com/questions/24975955/sending-an-asp-net-post-with-pythons-requests import BeautifulSoup import re import requests NOT_FOUND_MESSAGE = 'No Voter Registration information could be found for the data provided.' URL = 'https://www.pavoterservic...
flibbertigibbet/pavoterservices-passthrough
scrape_voter_registration.py
Python
gpl-3.0
4,620
import os import tempfile import mimetypes import sys from hashlib import sha224 from .Ressource import Ressource, Metadata from .Document import Document from .Text import Text from .Video import Video from .Audio import Audio from .Image import Image from .Directory import Directory sys.setrecursionlimit( 10000 )...
athena-project/Hermes
src/RessourceFactory.py
Python
gpl-2.0
4,024
#!/usr/bin/env python # Copyright 2015, 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 o...
vsco/grpc
tools/run_tests/run_tests.py
Python
bsd-3-clause
56,812
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-21 06:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Pentagram', '0007_auto_20160720_0929'), ] operations = [ migrations.RenameMo...
danielburz/pentagram
practicap5/Pentagram/migrations/0008_auto_20160721_0946.py
Python
gpl-3.0
605
# -*- coding: iso-8859-1 -*- """ MoinMoin - mailtranslators script @copyright: 2004-2007 MoinMoin:ThomasWaldmann @license: GPL, see COPYING for details """ import sys from MoinMoin import i18n from MoinMoin.mail.sendmail import sendmail from MoinMoin.script import MoinScript class PluginScript(MoinScr...
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/script/maint/mailtranslators.py
Python
mit
2,609
# -*- coding: utf-8 -*- ? import sqlite3 class User: def login(self, email, password): db = sqlite3.connect("news.db") with db: cursor = db.cursor() cursor.execute("CREATE TABLE IF NOT EXISTS users(id INTEGER PRIMARY KEY,email TEXT, username TEXT, password TEXT, tags TEXT);...
alxmamaev/microblog
app/models.py
Python
mit
2,307
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google-coral/cts
coral_cts.py
Python
apache-2.0
12,056
from __future__ import print_function import json import matplotlib.pyplot as plt import numpy as np with open("../data/results/scores.json", 'r') as f: scores = json.load(f) with open("../data/results/distances.json", 'r') as f: distances = json.load(f) with open("../data/results/times.json", 'r') as f: t...
yarbroughw/JMDE
JMDE/scripts/graph.py
Python
mit
4,491
## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. ## ## Invenio 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...
lnielsen/invenio
invenio/legacy/bibdocfile/api.py
Python
gpl-2.0
205,836
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # # Copyright (c) 2011-2013, Regents of the University of California # Alexander Afanasyev # # GNU 3.0 license, See the LICENSE file for more information # # Author: Alexander Afanasyev <alexander.afanasyev@u...
chrismbarnes/ndnSIM
src/ndnSIM/PyNDN/Interest.py
Python
gpl-2.0
3,677
#!/usr/bin/env python # -*- coding: utf-8 -*- """Windows API functions.""" import ctypes import os import sys from ctypes import WinError, wintypes from colorise.win.winhandle import WinHandle # Create a separate WinDLL instance since the one from ctypes.windll.kernel32 # can be manipulated by other code that also ...
MisanthropicBit/colorise
src/colorise/win/win32_functions.py
Python
bsd-3-clause
10,715
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import tensorflow as tf class ImageRecognizer: def __init__(self, path, graph, labels, input_layer_name, output_layer_name, num_top_predictions): self.path = path ...
mmiranda96/chilaiquil-api
image_recognizer.py
Python
mit
2,347
import asposecellscloud from asposecellscloud.CellsApi import CellsApi from asposecellscloud.CellsApi import ApiException from asposecellscloud.models import PasswordRequest import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi apiKey = "XXXXX" #sepcify App Key appSid = "XXXXX" #sepcify App S...
asposecells/Aspose_Cells_Cloud
Examples/Python/Examples/SetModifyPassword.py
Python
mit
1,577
# excelExpr.py # # Copyright 2010, Paul McGuire # # A partial implementation of a parser of Excel formula expressions. # from pyparsingOD import (CaselessKeyword, Suppress, Word, alphas, alphanums, nums, Optional, Group, oneOf, Forward, Regex, operatorPrecedence, opAssoc, dblQuotedString, delimitedLis...
schlichtanders/pyparsing-2.0.3-OrderedDict
examples/excelExpr.py
Python
mit
2,327
# (c) 2016 Red Hat 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 # (at your option) any later version. # # Ansible is dis...
erjohnso/ansible
test/units/modules/network/vyos/test_vyos_static_route.py
Python
gpl-3.0
1,966
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. from iptest.assert_util import * add_clr_assemblies("loadorder_2") # namespace First { # public class...
IronLanguages/ironpython3
Tests/interop/net/loadorder/t2c.py
Python
apache-2.0
1,097
# This challenge could, in theory, be solved in multiple ways. However, for the # sake of learning how to simulate an alternate filesystem, please solve this # challenge according to structure provided below. As a challenge, once you have # an initial solution, try solving this in an alternate way. # # Problem descript...
thomashaw/SecGen
modules/utilities/unix/ctf/metactf/files/repository/src_angr/dist/scaffold07.py
Python
gpl-3.0
5,656
# 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...
alfasin/st2
st2common/st2common/constants/api.py
Python
apache-2.0
885
# Copyright (C) 2017 Xavier Lucas # # 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 ...
xlucas/confluence-python-cli
confluenceclient/plugins/credentials/keyring/plugin.py
Python
gpl-3.0
1,553
import os import time import sys import random import multiprocessing import argparse from itertools import islice from pysmt.shortcuts import reset_env, read_smtlib def get_all_smt_files(target_dir=None): if target_dir == None: target_dir = "./" assert os.path.exists(target_dir) for root, _, f...
pysmt/pysmt
SMT-LIB/parse_all.py
Python
apache-2.0
2,268
# -*- coding: utf-8 -*- from __future__ import (absolute_import, print_function) import sys import os from ansible import constants as C from ansible.constants import mk_boolean try: from ansible.plugins.callback import CallbackBase parent = CallbackBase except ImportError: parent = object VAR_IDEMPOT...
ansiblebit/pip
tests/plugins/callback/idempotence.py
Python
bsd-3-clause
1,482
from datetime import datetime from listenbrainz.model import db from listenbrainz.webserver.admin import AdminModelView class User(db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key=True) created = db.Column(db.DateTime(timezone=True), default=datetime.utcnow) musicbrainz_id = d...
Freso/listenbrainz-server
listenbrainz/model/user.py
Python
gpl-2.0
1,376
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Glue" prefix = "glue" class Action(BaseAction): def __init__(self, action: str = None) -> None: super().__...
cloudtools/awacs
awacs/glue.py
Python
bsd-2-clause
8,796
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2007 Async Open Source ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public License ## as published by the Free Software Foundation; either version 2 ## of the License, or...
andrebellafronte/stoq
stoqlib/importers/__init__.py
Python
gpl-2.0
892
# Copyright (C) 2008 One Laptop Per Child # # 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 distribu...
nemesiscodex/JukyOS-sugar
extensions/cpsection/aboutme/model.py
Python
gpl-2.0
4,022
from pycp2k.inputsection import InputSection class _each143(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
SINGROUP/pycp2k
pycp2k/classes/_each143.py
Python
lgpl-3.0
1,114
# -*- coding: utf-8 -*- from message import Message, except_f1 import C1, C2 class A3(Message): """Classe que implementa A3.""" @property def sollicitud(self): """Retorna l'objecte Sollicitud""" return C1.Sollicitud(self.obj.PasoMRAMLConCambiosRestoTarifa.\ ...
Som-Energia/switching
switching/input/messages/A3.py
Python
gpl-3.0
2,810
"""Lowest Common Ancestor of a Binary Search Tree Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the BST. According to the [definition of LCA on Wikipedia](https://en.wikipedia.org/wiki/Lowest_common_ancestor): "The lowest common ancestor is defined between two nodes p and q as the lo...
aiden0z/snippets
leetcode/236_lowest_common_ancestor_of_binary_tree.py
Python
mit
4,596
#!/usr/bin/env python # -*- coding: utf-8 -*- # source: https://gist.github.com/1709069 # author/owner: nyergler github gist """ Frédéric Grosshans, 19 January 2012 Nathan R. Yergler, 6 June 2010 This file does not contain sufficient creative expression to invoke assertion of copyright. No warranty is expressed or imp...
michal-ruzicka/archivematica
src/archivematicaCommon/lib/externals/maildirToMbox.py
Python
agpl-3.0
2,430
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2012-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
goddardl/gaffer
python/GafferImageTest/OpenColorIOTest.py
Python
bsd-3-clause
5,537
#!/usr/local/bin/python # -*- coding: iso-8859-1 -*- # $Id$ # Copyright (c) 2004 Kungliga Tekniska Högskolan # (Royal Institute of Technology, Stockholm, Sweden). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
zarboz/XBMC-PVR-mac
tools/darwin/depends/samba/samba-3.6.6/source4/heimdal/lib/wind/rfc3454.py
Python
gpl-2.0
2,296
import sys, csv, xlwt, os cmdargs = str(sys.argv) def write_row(ws,rowx,row_array): """ Writes the values as either a float or a string, instead of just assuming everything is a string. """ for colx, value in enumerate(row_array): try: float(value) type_to_write="Flo...
tamarisk51/kampfmitexcel
chi_csvs2xls.py
Python
mit
2,797
#---------------------------------------------------------------------- # Name: wx.lib.stattext # Purpose: A generic wxGenStaticText class. Using this should # eliminate some of the platform differences in wxStaticText, # such as background colours and mouse sensitivity. # # Author...
ezequielpereira/Time-Line
libs64/wx/lib/stattext.py
Python
gpl-3.0
5,824
# -*- coding: utf-8 -*- from django.template import Library from tmitter.mvc.models import * from tmitter.settings import * register = Library() def in_list(val,lst): """ summary: 检查只时候在列表中 author: Jason Lee """ return val in lst register.filter("in_list", in_list)
rsj217/dmblog
dmblog/mblog/templatetags/common_tags.py
Python
mit
322
######################################################################## # # University of Southampton IT Innovation Centre, 2011 # # Copyright in this library belongs to the University of Southampton # University Road, Highfield, Southampton, UK, SO17 1BJ # # This software may not be used, sold, licensed, transferred,...
mmcardle/MServe
django-mserve/dataservice/middleware.py
Python
lgpl-2.1
2,906
from setuptools import setup, find_packages setup(name='userprofile', version='0.6', description='Django pluggable user profile zone', author='David Rubert', packages=find_packages(), classifiers=['Development Status :: 4 - Beta', 'Environment :: Web Environment', ...
tualatrix/django-profile
setup.py
Python
bsd-2-clause
620
''' Plan ----- for each 2013 bill, if id starts with "H " or "S ", ''' import pymongo from billy.core import db def action2tuple(action): ac = map(action.get, ['action', 'actor', 'date']) ac.append('-'.join(action['type'])) return tuple(ac) def main(): spec = dict(state='fl', session='2014') ...
showerst/openstates
scripts/fl/2014_dupes.py
Python
gpl-3.0
1,816
# -*- coding: utf-8 -*- from django.test import TestCase from django.contrib.auth.models import User from djangobb_forum.models import Post from djangobb_forum.templatetags.forum_extras import profile_link, link, mobile_link class TestLinkTags(TestCase): fixtures = ['test_forum.json'] def setUp(self): ...
tjvr/s2forums
djangobb_forum/tests/test_templatetags.py
Python
bsd-3-clause
829
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from collections import OrderedDict from django.core.urlresolvers import reverse from django.db import models from django.db.transaction import atomic from django.template.defaultfilters import slugify from django.utils.crypto import get_rand...
wangjiaxi/django-dynamic-forms
dynamic_forms/models.py
Python
bsd-3-clause
8,474
# encoding: utf-8 import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, determine_ext, ) class DaumIE(InfoExtractor): _VALID_URL = r'https?://tvpot\.daum\.net/.*?clipid=(?P<id>\d+)' IE_NAME = u'daum.net' _TEST = { u'url': u'http://tvpot.daum.net/clip/Clip...
nilsonmorales/Puppyes-nightrc
usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/daum.py
Python
gpl-3.0
2,601
import os import sys import logging import xml.etree.ElementTree as ET from urlparse import urlparse from namenode import Namenode log = logging.getLogger(__name__) class HDFSConfig(object): use_trash = False @classmethod def get_config_from_env(cls): '''Gets configuration out of environment. ...
dgoldin/snakebite
snakebite/config.py
Python
apache-2.0
4,037
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0008_project_created_by'), ] operations = [ migrations.AlterModelOptions( name='comment', ...
GETLIMS/LIMS-Backend
lims/projects/migrations/0009_auto_20160722_0918.py
Python
mit
571
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_recipiemeicineDialog.ui' # # Created: Sun Apr 21 16:21:54 2013 # by: PyQt4 UI code generator 4.9.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf...
mape90/VetApp
uipy/ui_recipiemeicineDialog.py
Python
gpl-3.0
2,723
# Copyright 2014-2018 The PySCF Developers. 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 appl...
gkc1000/pyscf
pyscf/nao/m_rsphar_libnao.py
Python
apache-2.0
3,454
# -*- coding: utf-8 -*- from django.db import models from projetos.models import ProjetoDeGraduacao SEMESTRE = ( ('1','1o Semestre'), ('2','2o Semestre'), ) # class DatasMonografia(models.Model): # grupo_de_disciplinas = models.ForeignKey(GrupoDisciplina, unique= True, verbose...
agendaTCC/AgendaTCC
tccweb/apps/monografias/models.py
Python
gpl-2.0
3,477
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from .sparse_gp import SparseGP from numpy.linalg.linalg import LinAlgError from ..inference.latent_function_inference.var_dtc_parallel import update_gradients, VarDTC_minibatch imp...
dhhjx880713/GPy
GPy/core/sparse_gp_mpi.py
Python
bsd-3-clause
5,130
#!/usr/bin/env python # coding: utf-8 """ This script supports publishing Pystache to PyPI. This docstring contains instructions to Pystache maintainers on how to release a new version of Pystache. (1) Prepare the release. Make sure the code is finalized and merged to master. Bump the version number in setup.py, u...
thiyaguelmails/pystache
setup.py
Python
mit
12,096
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0029_auto_20151017_1546'), ] operations = [ migrations.AlterField( model_name='mission', name...
XcomConvent/xcom40k-shades
xcom40k/app/migrations/0030_auto_20151017_1603.py
Python
apache-2.0
418
from setuptools import setup, find_packages setup(name='MODEL1110130001', version=20140916, description='MODEL1110130001 from BioModels', url='http://www.ebi.ac.uk/biomodels-main/MODEL1110130001', maintainer='Stanley Gu', maintainer_url='stanleygu@gmail.com', packages=find_packages(...
biomodels/MODEL1110130001
setup.py
Python
cc0-1.0
377
from collections import OrderedDict from django.contrib.postgres.search import SearchRank, SearchVector from django.db import DEFAULT_DB_ALIAS, NotSupportedError, connections, transaction from django.db.models import Count, F, Manager, Q, TextField, Value from django.db.models.constants import LOOKUP_SEP from django.d...
timorieber/wagtail
wagtail/contrib/postgres_search/backend.py
Python
bsd-3-clause
19,063
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Remove prohibitive foreign key constraints Revision ID: 32221e9f330c Revises: 235b7b9989be Create Date: 2014-08-04 20:34:36.697866 """ # revision identifiers, used by Alembic. revision = '32221e9f330c...
VinnieJohns/ggrc-core
src/ggrc_workflows/migrations/versions/20140804203436_32221e9f330c_remove_prohibitive_foreign_key_.py
Python
apache-2.0
942
#/usr/bin/env python import sys from setuptools import setup from duvet import VERSION try: readme = open('README.rst') long_description = str(readme.read()) finally: readme.close() required_pkgs = [ 'coverage', 'tkreadonly', ] if sys.version_info < (2, 7): required_pkgs.append('argparse') s...
pybee/duvet
setup.py
Python
bsd-3-clause
1,155
# -*- coding: utf-8 -*- __messages = { 'abstract_method': '{method} is abstract and must be overridden.', 'incompatible_type_argument': 'Incompatible type of the argument "{name}". Expected type "{type}".', 'invalid_argument_value': 'Invalid argument value "{name}".', 'invalid_units': 'Invalid units - ...
kyzima-spb/screen-god
screen_god/messages.py
Python
apache-2.0
699
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
yasharmaster/scancode-toolkit
tests/packagedcode/test_phpcomposer.py
Python
apache-2.0
4,232
""" Clio Mnemosyne Client Library ThreatStream 2014 """ import pymongo from dateutil.parser import parse as parse_date from collections import Counter from bson import ObjectId, son import json import datetime class Clio(): """ Main interface for Clio - Mnemosyne Client Library - Usage: clio = Clio...
Antelox/mhn
server/mhn/common/clio.py
Python
lgpl-2.1
16,259
import json import tornado.websocket import threading import json_api from article_helpers import * from base_handler import * from user_account_helpers import * first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])') # Seconds between heartbeat messages for long running web-socke...
neelsomani/brainspell-neo
brainspell/websockets.py
Python
mit
4,768
# -*- test-case-name: twext.enterprise.dal.test.test_record -*- ## # Copyright (c) 2015 Apple 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.o...
red-hood/calendarserver
txdav/common/datastore/sql_util.py
Python
apache-2.0
30,699
# Copyright (c) 2012 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. import glob import logging import os from pylib import android_commands from pylib import constants from pylib import perf_tests_helper from pylib.andro...
loopCM/chromium
build/android/pylib/gtest/test_runner.py
Python
bsd-3-clause
15,719
#trun based rpg import random import time class role: name="" lv=1 exp=0 nextLv=1000 hp=100 mp=30 stra=5 inte=5 spd=5 defe=5 rest=5 void=5 dropItems=[None] dropPrecent=[100] command=['attack','void','def','fireball'] def __init__(self,name,lv): sel...
alucardlockon/LearnCode
01PythonTest/05_trunBasedRpg.py
Python
gpl-3.0
5,415
import apt import datetime import os import subprocess import time import unittest from gi.repository import GLib from tests.utils import ( DATA_DIR, do_events, setup_test_env, ) setup_test_env() from softwarecenter.db.history_impl.apthistory import AptHistory from softwarecenter.utils import ExecutionTim...
ceibal-tatu/software-center
tests/test_apthistory.py
Python
lgpl-3.0
3,358
""" <Program Name> testportfiller.py <Started> November 13, 2008 <Author> Brent Couvrette <Purpose> This module is used to fill in the port numbers in the repy unit tests. Because the unit tests can be run on any random node you have access to, hardcoding in a port or even a small set of ports is a...
SeattleTestbed/dist
testportfiller.py
Python
mit
4,233
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-12-12 17:12 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("studies", "0040_add_scheduled_jobs")] operations = [ migrations.AddField( mo...
CenterForOpenScience/lookit-api
studies/migrations/0041_add_built_field.py
Python
apache-2.0
409
#!/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 ...
jasondunsmore/heat
heat/cmd/api.py
Python
apache-2.0
2,024
import socket sockt = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sockt.connect(('127.0.0.1', 17102)) sockt.send(b's') sockt.close()
haoozi/visulguide
dummytest.py
Python
gpl-2.0
139
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # 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 __...
rosmo/ansible
lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py
Python
gpl-3.0
15,582
from __future__ import print_function, division, absolute_import import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import os import sys __all__ = ['InceptionResNetV2', 'inceptionresnetv2'] pretrained_settings = { 'inceptionresnetv2': { 'imagenet': { 'url': 'http://da...
Cadene/pretrained-models.pytorch
pretrainedmodels/models/inceptionresnetv2.py
Python
bsd-3-clause
12,055
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test example app.""" import os import signal import subprocess import time from o...
tiborsimko/invenio-records
tests/test_example_app.py
Python
mit
2,263
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Ircam # Copyright (c) 2016-2017 Guillaume Pellerin # Copyright (c) 2016-2017 Emilie Zawadzki # This file is part of mezzanine-organization. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Ircam-Web/mezzanine-organization
organization/job/test/tests.py
Python
agpl-3.0
10,376
# Copyright (c) 2014 Evalf # # 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 limitation the rights # to use, copy, modify, merge, publish, distribute, s...
joostvanzwieten/nutils
nutils/solver.py
Python
mit
40,683
#!/usr/bin/env python3 import logging import socket import sys from zeroconf import ServiceInfo, Zeroconf, __version__ if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) if len(sys.argv) > 1: assert sys.argv[1:] == ['--debug'] logging.getLogger('zeroconf').setLevel(logging.DE...
jstasiak/python-zeroconf
examples/self_test.py
Python
lgpl-2.1
1,785
#!/usr/bin/python # # Copyright 2008 Google Inc. All Rights Reserved. """Tests for action_common.""" import unittest, os, sys, StringIO, copy import common from autotest_lib.cli import cli_mock, topic_common, action_common, rpc from autotest_lib.frontend.afe.json_rpc import proxy # # List action # class atest_list_...
yochow/autotest
cli/action_common_unittest.py
Python
gpl-2.0
23,200
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import os import subprocess from pex.interpreter import PythonInterpreter from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest from pants.util.collec...
tdyas/pants
src/python/pants/python/pex_build_util_test_integration.py
Python
apache-2.0
2,074
"""bigint Revision ID: 4d9c223a796d Revises: ca7b124852b1 Create Date: 2019-06-21 20:35:48.936858 """ # revision identifiers, used by Alembic. revision = "4d9c223a796d" down_revision = "ca7b124852b1" from alembic import op import sqlalchemy as sa def upgrade(): # ### commands auto generated by Alembic - pleas...
DBeath/flask-feedrsub
migrations/versions/4d9c223a796d_bigint.py
Python
mit
13,907
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import datetime import re from ..model import ModelView, ModelSQL, fields from ..report import Report from ..wizard import Wizard, StateView, StateAction, Button from ..transacti...
mediafactory/tryton_core_daemon
trytond/ir/model.py
Python
gpl-3.0
26,062
import requests from requests.utils import quote import re import json from articledownloader import scrapers from autologging import logged, traced from csv import reader from time import sleep @logged class ArticleDownloader: def __init__(self, els_api_key=None, sleep_sec=1, timeout_sec=30): ''' Initializ...
olivettigroup/article-downloader
articledownloader/articledownloader.py
Python
mit
23,239
from __future__ import absolute_import from django.utils import timezone from sentry.app import tsdb from sentry.testutils.cases import RuleTestCase from sentry.rules.conditions.event_frequency import EventFrequencyCondition, Interval class EventFrequencyConditionTest(RuleTestCase): rule_cls = EventFrequencyCon...
wong2/sentry
tests/sentry/rules/conditions/test_event_frequency.py
Python
bsd-3-clause
2,228
# todo: use minibatch size BATCH_SIZE=250 import time import tensorflow as tf from tensorlog import simple import bigexpt def setup_tlog(maxD,factFile,trainFile,testFile): tlog = simple.Compiler(db=factFile,prog="grid.ppr") tlog.prog.db.markAsParameter('edge',2) tlog.prog.maxDepth = maxD trainData = tlog.lo...
TeamCohen/TensorLog
datasets/grid/bigtfexpt.py
Python
apache-2.0
3,109
# coding=utf-8 __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import os import Queue import threading import datetime import yaml import time import logging import octoprint.util as util import octoprint.util.gcodeInterpreter as gcode...
StealthMicro/OctoPi-Makerbot
octoprint/gcodefiles.py
Python
agpl-3.0
11,658
""" test utils module """ import os from glob import glob import hvc.utils this_file_with_path = __file__ this_file_just_path = os.path.split(this_file_with_path)[0] def test_fetch(tmp_output_dir): hvc.utils.fetch( dataset_str="sober.repo1.gy6or6.032612", # one of the smaller .gz, ~31 MB destin...
NickleDave/hybrid-vocal-classifier
tests/unit_test/test_utils.py
Python
bsd-3-clause
703
import time import urllib import simplejson as json from httplib2 import Http from urlparse import urljoin try: from urlparse import parse_qs, parse_qsl except ImportError: from cgi import parse_qs, parse_qsl API_VERSION = '1' class Agency(object): debug = False endpoints = { 'agency': 'agenc...
dewski/clientend-python
clientend/__init__.py
Python
mit
4,864
#!/usr/bin/python #Client side code from p2p.client import client from p2p.super_client import super_client from p2p.server import server from p2p.super_server import super_server from p2p.peer_client import peer_client from threading import Thread import time import signal import sys from conf.params import * def si...
cloudbansal/p2p_health
setup.py
Python
mit
2,149