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
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2016, F5 Networks Inc. # 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', ...
veger/ansible
lib/ansible/modules/network/f5/bigip_routedomain.py
Python
gpl-3.0
22,327
from __future__ import unicode_literals from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions from django.contrib.auth import get_user_model from . impo...
focode/buddy2
src/profiles/forms.py
Python
mit
1,321
# Copyright 2013 VMware, 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 ap...
paninetworks/neutron
neutron/tests/unit/services/test_provider_configuration.py
Python
apache-2.0
8,876
#!/usr/bin/python # -* encoding: utf-8 *- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import re import sys from distutils.core import setup from setupto...
gopythongo/gopythongo
setup.py
Python
mpl-2.0
2,451
from flask import Flask from flask_sqlalchemy import SQLAlchemy from collections import OrderedDict import datetime from app import app db = SQLAlchemy(app) class CommonFuncs(object): def _asdict(self): result = OrderedDict() for key in self.__mapper__.c.keys(): attr = getattr(self,ke...
agilman/flask-template
app/models.py
Python
mit
1,788
import sys import networkx as nx import cPickle as pickle import re class Structure(object): def __init__(self, structure, root): self.structure = structure self.root = root def getStructure(self): nodes = [] for n in nx.dfs_preorder_nodes(self.structure, self.root): ...
yhalpern/anchorExplorer
Structures.py
Python
bsd-2-clause
1,065
#from django.contrib import admin from django.contrib.gis import admin from modeltranslation.admin import TranslationAdmin, TranslationTabularInline from django.contrib.contenttypes.generic import GenericTabularInline from cigno.mdtools.models import Connection from django.utils.translation import ugettext_lazy as _ fr...
CIGNo-project/CIGNo
cigno/metadata/admin.py
Python
gpl-3.0
16,379
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. import visvis as vv def title(text, axes=None): """ title(text, axes=None) Show title above axes. Remove title by suplying an emp...
chiluf/visvis.dev
functions/title.py
Python
bsd-3-clause
1,001
""" flask-urls ---------- A collection of URL-related functions for Flask applications. Links ````` * `documentation <http://sjl.bitbucket.org/flask-urls/>`_ * `development version <http://bitbucket.org/sjl/flask-urls/get/tip.gz#egg=flask-urls-dev`_ """ from setuptools import setup setup( name='flask-urls'...
sjl/flask-urls
setup.py
Python
mit
1,159
import unittest from python_template import python_template class Test(unittest.TestCase): def test_returns_true(self): self.assertEquals(True, python_template.returns_true()) self.assertTrue(python_template.returns_true()) def test_will_pass(self): self.assertTrue(True)
VDBWRAIR/python_template
tests/test_example.py
Python
gpl-2.0
310
"""Configuration options for the web_theme app""" from django.utils.translation import ugettext_lazy as _ from smart_settings.api import register_settings register_settings( namespace=u'web_theme', module=u'web_theme.settings', settings=[ {'name': u'THEME', 'global_name': u'WEB_THEME_THEME', 'defa...
rosarior/rua
rua/apps/web_theme/settings.py
Python
gpl-3.0
812
import requests from pyfibot import pyfibot from pyfibot import botcore class BotMock(botcore.CoreCommands): config = {} def __init__(self, config={}, network=None): self.config = config if network: self.network = network self.nickname = self.network.nickname ...
EArmour/pyfibot
tests/bot_mock.py
Python
bsd-3-clause
2,165
# This file is part of the Minecraft Overviewer. # # Minecraft Overviewer 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...
overviewer/Minecraft-Overviewer
overviewer_core/cache.py
Python
gpl-3.0
4,522
# Wake-On-LAN import socket, ping, os, sys, time import xbmc, xbmcgui, xbmcaddon def main(isAutostart=False): print 'script.advanced.wol: Starting WOL script' ####### Read Settings settings = xbmcaddon.Addon( id="script.advanced.wol" ) language = settings.getLocalizedString # basic settings macAddress = se...
mandark/xbmc-script.advanced.wol
default.py
Python
gpl-2.0
7,465
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RElemstatlearn(RPackage): """ElemStatLearn: Data Sets, Functions and Examples from the Boo...
LLNL/spack
var/spack/repos/builtin/packages/r-elemstatlearn/package.py
Python
lgpl-2.1
883
# -*- coding: cp1252 -*- ## # <p> Portions copyright © 2005-2012 Stephen John Machin, Lingfo Pty Ltd</p> # <p>This module is part of the xlrd package, which is released under a BSD-style licence.</p> ## # 2010-04-25 SJM fix zoom factors cooking logic # 2010-04-15 CW r4253 fix zoom factors cooking logic # 2010-04-09 ...
femmerling/DirMaker
box/lib/python2.7/site-packages/xlrd/sheet.py
Python
mit
106,931
""" This file supports the XBlock service that returns data about users. """ from __future__ import absolute_import, division, print_function, unicode_literals from xblock.reference.plugins import Service class UserService(Service): """ UserService returns information about users. Initially only data about...
mitodl/XBlock
xblock/reference/user_service.py
Python
apache-2.0
3,093
# -*- coding: utf-8 -*- from pylab import * from lammpsreader import * from sys import argv from generators import * fileName = argv[1] lammps_header = zeros(1, dtype=lammps_header_dtype) Lx,Ly,Lz = 50.,18.,18. lammps_header["bounds"][0][0] = 0 lammps_header["bounds"][0][1] = Lx lammps_header["bounds"][0][2] = 0 l...
ComputationalPhysics/molecules
tools/wallcrash.py
Python
gpl-3.0
1,556
from __future__ import absolute_import from pprint import pprint # pylint: disable=import-error from twisted.internet import defer, threads, reactor from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver @defer.inlineCallbacks def create_node(name): node = yield threads.de...
StackPointCloud/libcloud
docs/examples/misc/twisted_create_node.py
Python
apache-2.0
898
import sys from eventlet import greenio from eventlet import greenthread from eventlet import greenpool from eventlet.green import socket from eventlet.support import greenlets as greenlet def connect(addr, family=socket.AF_INET, bind=None): """Convenience function for opening client sockets. :param addr: Ad...
vimmaniac/iemfbl
eventlet/convenience.py
Python
lgpl-3.0
5,751
import subprocess class RpmInstaller: def __init__(self, packages, cache): self._packages = packages self._cache = cache def install_packages(self): installed_packages = [] for p in self._packages: if self._cache.is_package_installed(p['name'], p['version']): ...
nitehawck/dem
dem/dependency/yum.py
Python
mit
1,040
# # Copyright 2015-2019, Institute for Systems Biology # # 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 ...
isb-cgc/ISB-CGC-Webapp
bq_data_access/v1/mirna_data.py
Python
apache-2.0
8,089
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2006-2019 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license """ system/elf.py ============= The system elf module implements Elf classes for both 32/64bits executable format. """ from amoco.system.core import BinFormat from amoco.sy...
bdcht/amoco
amoco/system/elf.py
Python
gpl-2.0
33,586
from bs4 import BeautifulSoup import requests import re import urllib2 import os import cookielib import json def main(): i = 0 total = len(os.listdir('car_photos')) for d in os.listdir('car_photos'): if d == '.DS_Store': continue td = 'car_photos/' + d kw = d #p...
gioGats/FGIC
yang_et_al/misc/image_search.py
Python
gpl-3.0
2,356
class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ if num != 0 and num % 9 == 0: return 9 else: return num % 9
Mlieou/leetcode_python
leetcode/python/ex_258.py
Python
mit
221
# Import submodules so that we can expose their __all__ from mongoengine import connection from mongoengine import document from mongoengine import errors from mongoengine import fields from mongoengine import queryset from mongoengine import signals # Import everything from each submodule so that it can be accessed v...
Pablo126/SSBW
Entrega1/lib/python3.5/site-packages/mongoengine/__init__.py
Python
gpl-3.0
1,127
from time import time t= time() def spiral(n,a,gid): s=0 for i in range(1,gid//2): a+=8 n+=a s+=n return s # bottom right n = 1001 br = spiral(3,2,n) #bottom left bl = spiral(5,4,n) #top right tr = spiral(9,8,n) #top left tl = spiral(7,6,n) s= br+bl+tl+tr + 1 + 3 + 5 + 7 + 9 t = time()-t print(s) print("{0...
potato16/pythonl
projecteuler/p028.py
Python
apache-2.0
350
from django import forms from models import UserVote class UserVoteForm(forms.ModelForm): class Meta: model = UserVote exclude = ('user', 'date')
django-stars/dash2011
presence/apps/vote/forms.py
Python
bsd-3-clause
169
import pandas as pd from larray.core.array import Array from larray.inout.pandas import from_frame __all__ = ['read_stata'] def read_stata(filepath_or_buffer, index_col=None, sort_rows=False, sort_columns=False, **kwargs) -> Array: r""" Reads Stata .dta file and returns an Array with the contents Param...
gdementen/larray
larray/inout/stata.py
Python
gpl-3.0
1,657
from __future__ import with_statement from itertools import chain import datetime import sys import warnings import time import threading import time as mod_time from redis._compat import (b, basestring, bytes, imap, iteritems, iterkeys, itervalues, izip, long, nativestr, unicode, ...
fengsp/redis-py
redis/client.py
Python
mit
101,789
#!/usr/bin/env python """ No app built with Seshat does much without controllers. This module provides a base controller class which can be used right away in its current state, or can be inherited from to create more advanced or custom controllers. Basic use is like so:: from seshat.controller import BaseControl...
JoshAshby/seshat
seshat/controller.py
Python
gpl-3.0
4,488
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, Wild,...
grevutiu-gabriel/sympy
sympy/printing/tests/test_str.py
Python
bsd-3-clause
22,751
import pprint from yum_metadata_diff.metadata import MetadataItem from yum_metadata_diff.diff_objects import PackageDiff class Package(MetadataItem): DIFF_CLASS = PackageDiff DIFF_ATTR = ('checksum') NONE_AND_EMPTY_ARE_SAME = ("location_base", "vendor", ...
Tojaj/yum-metadata-diff
yum_metadata_diff/package.py
Python
lgpl-2.1
1,204
import math import time R_0 = 100 a = 3.9083 * (10**(-3)) b = -5.775 * (10**(-7)) def space(): print() print() def main(): space() R = float(input("R = ")) space() t = ((((-R_0)*a) + math.sqrt((R_0 ** 2) * (a ** 2) - 4 * R_0 * b * (R_0 - R))) / (2 * R_0 * b)) space() if(t == -0.0): ...
Tekbear99/MetInstitutt
Server/calc.py
Python
mit
552
def prepare_dataset(dataset_path): ''' Read a comma separated text file where - the first field is a ID number - the second field is a class label 'B' or 'M' - the remaining fields are real-valued Return two numpy arrays X and y where - X is two dimensional. X[i,:] is the ith example - y is one dimens...
Dishcreate/MachineLearning
performance.py
Python
apache-2.0
5,608
r""" Logging objects (:mod: `qiita_db.logger`) ==================================== ..currentmodule:: qiita_db.logger This module provides objects for recording log information Classes ------- ..autosummary:: :toctree: generated/ LogEntry """ # -------------------------------------------------------------...
adamrp/qiita
qiita_db/logger.py
Python
bsd-3-clause
5,700
import json import webapp2 import time import model import server.seed import logging logging.info('Main') def AsDict(aire): return {'id': aire.key.id(), 'timestamp' : str(aire.timestamp), 'parameter' : aire.parameter, 'tecnic' : aire.tecnic, 'period' : aire.period, 'value' : aire.value, 'ce01' : aire.c...
emarinizquierdo/breathe-better
main.py
Python
apache-2.0
2,019
"""Demo of several ways to work with Amara's Atom tools Some configurations can be changed in akara.conf. The default settings are: class atomtools: entries = "/path/to/entry/files/*.atom" feed_envelope = '''<feed xmlns="http://www.w3.org/2005/Atom"> <title>This is my feed</title><id>http://example.com/my_fee...
uogbuji/akara
lib/demo/atomtools.py
Python
apache-2.0
6,737
# -*- coding: ascii -*- # $Id$ # # Author: vvlachoudis@gmail.com # Date: 18-Jun-2015 __author__ = "Vasilis Vlachoudis" __email__ = "vvlachoudis@gmail.com" try: from Tkinter import * except ImportError: from tkinter import * import tkExtra import Utils import Ribbon import CNCList import CNCRibbon from CNCCanvas...
carlosgs/bCNC
EditorPage.py
Python
gpl-2.0
17,227
import os from imgurpython import ImgurClient import markov import keys import image_maker class ImageMakerGlue(): def __init__(self, file): self.m = markov.Markov(2, file) print "Loaded corpus" self.client = ImgurClient(keys.imgur_client_id, keys.imgur_client_secret) print "Connected to Imgur" d...
BenjaminFair/hackohio2015
image_maker_glue.py
Python
gpl-2.0
732
from main import normaliseAndScale, readData, binariseLabels, getTrueLabels, buildDataMatrix, removePacketsAfterChange, printMetrics from voting import Voting import pickle from sklearn import metrics from matplotlib import pyplot as plt import matplotlib2tikz # models = { # "boost": dict(), # "logistic": dict...
kahvel/MAProject
src/test_models.py
Python
mit
3,209
#!/usr/bin/python3 import json import logger import os.path DATA_FILE_NAME = 'users.json' def save_to_file(data): """Saves python data to JSON file named :py:const:`DATA_FILE_NAME`. Args: data (dict): Python dict to save """ f = open(DATA_FILE_NAME, 'w') json.dump(data, f) f.close()...
TCP-Joker-BOT/TCPJoker
extensions/users.py
Python
mit
3,380
import sys path = sys.argv[1] file = open(path,'r') for line in file: #strip our line from everything that is not an integer #we know the content of the line so it doesn't actually strip everything, but just the needed chars j = line.translate(None,'abcehisourVZHWmpt,:') k = j.strip() #turn what's left to a lis...
Da5hes/CodeEvalChallenges
Trick-or-Treat/Solution.py
Python
gpl-2.0
597
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
uasys/swift
utils/build_swift/driver_arguments.py
Python
apache-2.0
50,012
#!/usr/bin/env python3 """ A usage example for lecs. """ from lecs import ECS, Entity, Component, System __author__ = 'Mads H. Jakobsen (ragerin)' __email__ = 'ragerin@gmail.com' __version__ = '2.0.0' __status__ = 'beta' __license__ = 'MIT' # Create a simple component class MooComponent(Component): """Data ...
ragerin/lecs
examples/cattle.py
Python
mit
1,425
# Tutorial 17: Neuron Models # Nengo supports multiple different types of neurons. The default is the # "Leaky Integrate-and-Fire" or LIF neuron. Other supported ones are shown # here. The LIFRate neuron acts like the LIF neuron, but does not have spikes. # The Sigmoid is a standard model used in machine learning. ...
tcstewar/nengo_assignments
groningen_2018/sig_test.py
Python
gpl-3.0
1,691
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud 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, p...
wavycloud/pyboto3
pyboto3/cloudhsm.py
Python
mit
37,780
"""Minorization-maximization inference algorithms.""" import itertools import numpy as np from .convergence import NormOfDifferenceTest from .utils import log_transform, exp_transform def _mm(n_items, data, initial_params, alpha, max_iter, tol, mm_fun): """ Iteratively refine MM estimates until convergence....
lucasmaystre/choix
choix/mm.py
Python
mit
8,450
# Copyright 2015 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. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class KeyDesktopMoveCasesPage(page_m...
SaschaMester/delicium
tools/perf/page_sets/key_desktop_move_cases.py
Python
bsd-3-clause
5,009
# Python side of the support for xmethods. # Copyright (C) 2013-2014 Free Software Foundation, Inc. # 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 you...
ExploreEmbedded/Tit-Windows
tools/share/gdb/python/gdb/xmethod.py
Python
bsd-3-clause
10,448
from viper.lexer import ( NEWLINE as NL, INDENT as IND, DEDENT as DED, PERIOD, COMMA, COLON, OPEN_PAREN as OP, CLOSE_PAREN as CP, R_ARROW, EQUALS as EQ, ENDMARKER as EM, Int, Name as N, ReservedName as RN, Class as C, Operator as Op, ) lexemes = [ RN('interface'), C('Shape'), COLON, NL...
pdarragh/Viper
tests/lexeme_files/interfaces.py
Python
apache-2.0
1,857
# -*- coding: utf-8 -*- """ # Copyright Copyright (C) 2012 by Victor victor@caern.de # License This file is part of SoulCreator. SoulCreator 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, eithe...
GoliathLeviathan/SoulCreator
src/Calc/Calc.py
Python
gpl-3.0
3,452
import pytest class TestWget: @pytest.mark.complete("wget ") def test_1(self, completion): assert not completion @pytest.mark.complete("wget --s", require_cmd=True) def test_2(self, completion): assert completion
scop/bash-completion
test/t/test_wget.py
Python
gpl-2.0
248
# -*- coding: utf-8 -*- """ ProgramEnrollments Application Configuration """ from django.apps import AppConfig from openedx.core.djangoapps.plugins.constants import PluginURLs, ProjectType class ProgramEnrollmentsConfig(AppConfig): """ Application configuration for ProgramEnrollment """ name = 'lms...
appsembler/edx-platform
lms/djangoapps/program_enrollments/apps.py
Python
agpl-3.0
848
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2005-2007 Carabos Coop. V. All rights reserved # Copyright (C) 2008-2019 Vicent Mas. All rights reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
uvemas/ViTables
vitables/vttables/datasheet.py
Python
gpl-3.0
5,873
#!/usr/bin/env python3 import rospy from interactivespaces_msgs.msg import GenericMessage P_SANDIEGO = '1ZPwYtCwgW6bu7gi7n3B4Q' P_TEST = 'RJd2HuqmShMAAAQfCa3ulg' P_PHOTOSPHERE = 'F:-gVtvWrACv2k/Vnh0Vg8Z8YI/AAAAAAABLWA/a-AT4Wb8MD8' PANOID = P_SANDIEGO DIRECTOR_MESSAGE = """ { "description": "bogus", "duration": 0, ...
EndPointCorp/lg_ros_nodes
lg_sv/test/test_scene.py
Python
apache-2.0
2,444
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. import os import unittest import p...
pholanda/pymonetdb
test/test_unicode.py
Python
mpl-2.0
1,442
PERMISSIONS_BY_HAND = { "SEND_SMS" : { "android.telephony.SmsManager" : [ [ "F", "getDefault()", "static SmsManager" ], [ "F", "sendDataMessage(java.lang.String, java.lang.String, short, byte[], PendingIntent, PendingIntent)", "void" ], # [ "F",...
Ramble01/androguard
tools/api/permissions_by_hand.py
Python
apache-2.0
1,718
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('goals', '0142_auto_20160428_1858'), ] operations = [ migrations.AlterModelOptions( name='useraction', ...
izzyalonso/tndata_backend
tndata_backend/goals/migrations/0143_auto_20160509_1721.py
Python
mit
472
# Generated by Django 1.11.2 on 2017-08-08 02:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("letters", "0005_letter_note")] operations = [ migrations.AlterField( model_name="letter", name="eml", field=models.F...
watchdogpolska/feder
feder/letters/migrations/0006_auto_20170808_0252.py
Python
mit
501
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu """ :Author: Ronan Delacroix :Copyright: (c) 2018 Ronan Delacroix """ import mongoengine import jobmanager.common class DockerImage(jobmanager.common.NamedDocument): meta = { 'queryset_class': jobmanager.common.SerializableQuery...
ronhanson/python-jobmanager-common
jobmanager/common/docker.py
Python
mit
964
from . import queues from . import stacks from . import lists from . import arrays
OctavianLee/Bauhinia
bauhinia/__init__.py
Python
mit
83
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## Modified by Maxence Tury <maxence.tury@ssi.gouv.fr> ## This program is published under a GPLv2 license """ ASN.1 (Abstract Syntax Notation One) """ import random from d...
mytliulei/Scapy
scapy/asn1/asn1.py
Python
apache-2.0
12,094
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import numpy as np from numpy import (abs, arctan2, asarray, cos, exp, floor, log, log10, arange, pi, prod, roll, sign, sin, sqrt, sum, where, zeros, tan, tanh, dot) try: from scipy.specia...
gfyoung/scipy
benchmarks/benchmarks/go_benchmark_functions/go_funcs_M.py
Python
bsd-3-clause
21,101
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as InternetProvider class Provider(InternetProvider): safe_email_tlds = ('com', 'net', 'eu', 'it', 'it', 'it') free_email_domains = ( 'libero.it', 'libero.it', 'libero.it', 'tim.it', 'tin.it', 'alice...
deanishe/alfred-fakeum
src/libs/faker/providers/internet/it_IT/__init__.py
Python
mit
819
######################################################### # Name: Asmit De # # ID: aud311 # # Date: 09/07/2016 # # Assignment: Homework 1, Problem 7 # # Description: Program to conver...
asmitde/TA-PSU-CMPSC101
Fall 2016/Homeworks/HW1/Solution/problem7.py
Python
apache-2.0
680
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
jcftang/ansible
lib/ansible/playbook/block.py
Python
gpl-3.0
14,413
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') a...
ggravlingen/pytradfri
setup.py
Python
mit
1,147
#!/usr/bin/env python """ Functions for sending email from cipres cron jobs. Note that caller will get exceptions if there's a problem talking to the smtp server or the email is badly formed, but not if the mail can't be delivered. If mail can't be delivered to one or more of the recipients the froma...
leschzinerlab/COSMIC-CryoEM-Gateway
gateway_config/sdk/scripts/mailer.py
Python
gpl-3.0
3,160
from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameterHandler import cOutputParameterHandler from resources.lib.handler.requestHandler import cRequestHandler fro...
mino60/venom-xbmc-addons-beta
plugin.video.vstream/resources/sites/trash/burning_series_org.py
Python
gpl-2.0
7,633
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
Hellowlol/PyTunes
libs/guessit/__init__.py
Python
gpl-3.0
7,831
# Copyright (c) 2017 pandas-gbq Authors All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Helper methods for BigQuery schemas""" import copy # API may return data types as legacy SQL, so maintain a mapping of aliases # from standard SQL to ...
pydata/pandas-gbq
pandas_gbq/schema.py
Python
bsd-3-clause
5,518
# 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 # distributed under t...
openstack/keystone
keystone/common/provider_api.py
Python
apache-2.0
4,553
from kivy.uix.bubble import Bubble from kivy.properties import BooleanProperty class NewSwitchRename(Bubble): newbranch_disabled = BooleanProperty(False) rename_disabled = BooleanProperty(False) switch_disabled = BooleanProperty(False) delete_disabled = BooleanProperty(False) def __del__(self, *a...
RedXBeard/gitwatcher-ui
bubbles.py
Python
mit
349
# -*- coding: utf-8 -*- __author__ = 'Marco Milanesi' __email__ = 'kpanic@gmail.com' __version__ = '0.1.0'
kpanic/pollicino
pollicino/__init__.py
Python
gpl-3.0
108
#!/usr/bin/python3 # -*- coding: utf-8 -* """ @author Simon Wu <swprojects@runbox.com> Copyright (c) 2018 by Simon Wu <Advanced Action Scheduler> Released subject to the GNU Public License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
swprojects/Advanced-Action-Scheduler
advancedactionscheduler/advancedactionscheduler.py
Python
gpl-2.0
97,156
''' A pseudo MSO neuron, with two dendrites and one axon (fake geometry). ''' import os import matplotlib matplotlib.use('Agg') from brian2 import * name = os.path.basename(__file__).replace('.py', '') codefolder = os.path.join('code', name) print('runing example {}'.format(name)) print('compiling model in {}'.format...
brian-team/brian2cuda
examples/compartmental/bipolar_cell_cpp.py
Python
gpl-2.0
1,976
#! /usr/bin/python # convert fastq to fasta # by gjr; Oct 4, 11 """ Convert fastq to fasta % python fq2fa.py <file.fastq> <file.fasta> """ import sys, os import screed def main(): if len(sys.argv) != 3: print >> sys.stderr, 'Usage: python %s <file.fastq> <file.fasta>'\ %(...
jiarong/SSUsearch
scripts/fq2fa.py
Python
bsd-3-clause
691
""" Functions for parameterizing strings useful for code generation. So far only used by `label` """ import numpy as np def coord_name(dim): return "coords_{}".format(dim) def coord_dim_names(ndim): return ', '.join([coord_name(i) for i in range(ndim)]) def indent_block(string, n=1, indentation=" ", ...
mvsaha/blahb
blahb/strgen.py
Python
mit
3,006
import unittest import os import sys import shutil import string from optparse import OptionParser import ConfigParser import logging sys.dont_write_bytecode = True sys.path.insert(0, os.path.abspath("..")) sys.path.insert(0, os.path.abspath(os.path.join("..", "coshsh"))) import coshsh from coshsh.generator import G...
lausser/coshsh
tests/test_logging.py
Python
agpl-3.0
4,032
import subprocess class Process(): """Methodes for Process managment""" @staticmethod def execShell( command=None ): """Return the python interpreter.""" '@parameter string command Command shell.' subprocess.call( command ) @staticmethod def launchSoftware( softwarePath, arg=None ): if arg: if not ...
Black-Cog/Forge
core/Process.py
Python
bsd-3-clause
1,660
import datetime import os import tempfile from io import StringIO from wsgiref.util import FileWrapper from django import forms from django.contrib import admin from django.contrib.admin import BooleanFieldListFilter from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import GroupAdmi...
nesdis/djongo
tests/django_tests/tests/v22/tests/admin_views/admin.py
Python
agpl-3.0
34,509
#!/usr/bin/env python3 ############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contrac...
CSD-Public/stonix
src/tests/rules/unit_tests/zzzTestRuleDisableCamera.py
Python
gpl-2.0
5,618
#!/usr/bin/env python3 # -*- coding: utf-8 -* # # 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 dist...
Andreasdahlberg/sillycat
scripts/mockgen/mockgen.py
Python
gpl-3.0
4,321
# Copyright 2016 Tesora, 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 ...
openstack/trove
trove/tests/unittests/flavor/test_flavor_views.py
Python
apache-2.0
3,188
"""This pipeline is intended to make the classification of ADC modality features.""" from __future__ import division import os import numpy as np from sklearn.externals import joblib from sklearn.preprocessing import label_binarize from sklearn.feature_selection import SelectPercentile from sklearn.feature_selection ...
I2Cvb/mp-mri-prostate
pipeline/feature-classification/exp-3/selection-extraction/anova/pipeline_classifier_adc.py
Python
mit
6,570
try: from unicodedata import * except ImportError: def category(ch): """ ASCII only implementation """ if type(ch) is not unicode: raise TypeError if len(ch) != 1: raise TypeError return _categories.get(ord(ch), 'Co') # "Other, private use...
jedie/pypyjs-standalone
website/js/pypy.js-0.3.0/lib/modules/pyrepl/unicodedata_.py
Python
mit
3,391
""""ML-ENSEMBLE Testing suite for Layer and Transformer """ from mlens.testing import Data, EstimatorContainer, get_layer, run_layer def test_fit(): """[Parallel | Layer | Multiprocessing | Temporal | No Proba | No Prep] test fit""" args = get_layer('fit', 'multiprocessing', 'temporal', False, False, window=...
flennerhag/mlens
mlens/parallel/tests/test_b3_layer_temporal.py
Python
mit
3,745
#!/usr/bin/env python3 """Functions for reading and processing estimator files. Examples are temperatures, populations, and heating/cooling rates. """ # import math import argparse import math import multiprocessing import os # import re import sys from collections import namedtuple from functools import lru_cache, pa...
lukeshingles/artistools
artistools/estimators/estimators.py
Python
mit
15,906
#!/usr/bin/env python """ Node managment WORK IN PROGRESS Some command may not work yet """ __author__ = "Peter Shipley" import ISY # from ISY.IsyExceptionClass import IsyError class cmdException(Exception): def __init__(self, msg): Exception.__init__(self, msg) verbose=0 commands_help...
evilpete/ISYlib-python
bin/isy_manage_node.py
Python
bsd-2-clause
12,400
from prospector.suppression import get_suppressions def filter_messages(relative_filepaths, root, messages): """ This method post-processes all messages output by all tools, in order to filter out any based on the overall output. The main aim currently is to use information about messages suppressed ...
pahaz/prospector
prospector/postfilter.py
Python
gpl-2.0
2,021
# hunspell.py -- a wrapper class for hunspell # # (c) 2013 Juergen Weigert jw@suse.de # Distribute under GPL-2.0 or ask # # 2013-01-31, V0.1 jw - initial draught: word by word I/O # 2013-02-01, V0.1 jw - added own _readline() to use buffering. Pythons readline() # does single byte read()s, which i...
jnweiger/pdfcompare
hunspell.py
Python
gpl-2.0
6,973
# -*- coding: utf-8 -*- from pyfr.backends.cuda.base import CUDABackend
BrianVermeire/PyFR
pyfr/backends/cuda/__init__.py
Python
bsd-3-clause
73
# third party # local Django from pom.pages.basePage import BasePage from pom.locators.administratorReportPageLocators import \ AdministratorReportPageLocators from pom.pages.homePage import HomePage from pom.pageUrls import PageUrls class AdministratorReportPage(BasePage): administrator_report_page = PageUr...
systers/vms
vms/pom/pages/administratorReportPage.py
Python
gpl-2.0
1,622
from pyexcel_ods3 import get_data def aEntero(s): try: return int(s) except ValueError: return s def limpiar(data): #data = get_data("AmesHousing.ods") datos = {} for elem in (data['AmesHousing']): #print(elem) #Elimiar Order y PID elem = elem[2:] n = len(elem) - 1 for i in ra...
dougtc1/IA2-GradientDescent
prueba.py
Python
gpl-3.0
682
# Copyright (C) 2003-2005 Peter J. Verveer # # 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 the following d...
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/scipy/ndimage/filters.py
Python
mit
42,327
""" Django settings for learn_django project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build...
z-yz/DjangoDyExample_learn
chap_2_blog/learn_django/settings.py
Python
mit
2,869
#!/usr/bin/env python from ..common import * from .universal import * __all__ = ['kakao_download'] def kakao_download(url, output_dir='.', info_only=False, **kwargs): json_request_url = 'https://videofarm.daum.net/controller/api/closed/v1_2/IntegratedMovieData.json?vid={}' # in this implementation playlis...
xyuanmu/you-get
src/you_get/extractors/kakao.py
Python
mit
1,771
# Copyright (c) 2010 ActiveState Software Inc. All rights reserved. # This module is deprecated from appdirs import * #---- self test code if __name__ == "__main__": print("applib: user data dir: %s" % user_data_dir("Komodo", "ActiveState")) print("applib: site data dir: %s" % site_data_dir("Komodo", "Acti...
igemsoftware/SYSU-Software2013
project/Python27_32/Lib/site-packages/pypm/external/applib/location.py
Python
mit
414
import Gears as gears from .. import * import traceback import inspect from .Base import * class Generic(Base) : def __init__(self, **args): super().__init__(**args) def boot( self, *, name : 'Pass name to display in sequence overview plot.' ...
szecsi/Gears
GearsPy/Project/Components/Pass/Generic.py
Python
gpl-2.0
2,781