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
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
google/clif
clif/python/postconv.py
Python
apache-2.0
2,878
from sys import argv #Author : Satheesh Gopalan # LIST TO TAKE IN ALL ARGUMENT INTO THE LIST 'S' s = [] s = argv # PRINT THE NUMBER OF ARGUMENTS print 'Number of arugment were : ' + str(len(s)) # PRINT THE ARGUMENTS for i in range(len(s)): print "Arg [" + str(i) + "]: " + str(s[i])
satheeshgopalan/python
take_arg_print_arg.py
Python
mit
287
# coding=utf-8 # Copyright (C) Duncan Macleod (2015) # # This file is part of the GW DetChar python package. # # GW DetChar 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 #...
lscsoft/gwdetchar
gwdetchar/io/datafind.py
Python
gpl-3.0
7,423
# -*- coding: UTF-8 -*- SSSA_LOG = "/var/log/sssa.log" CONFIG_INI = '/etc/sssa.conf' CONFIG_DEFAUTLS = {'host': 'localhost', 'port': '8125', # 'prefix': 'sssa', 'group': 'servers', 'hostname': '____', 'pe...
mariodebian/server-stats-system-agent
sssa/__init__.py
Python
gpl-2.0
382
# -*- coding: utf-8 -*- """ @file @brief quelques fonctions à propos de la première séance """ def commentaire_accentues(): """ L'aide de cette fonction contient assuréments des accents. @FAQ(Python n'accepte pas les accents) Le langage Python a été conçu en langage anglais. Dès qu'on on ajoute un ...
sdpython/pyquickhelper
_unittests/ut_sphinxext/data/session1.py
Python
mit
1,282
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Donald N. Allingham # Copyright (C) 2013-2014 Vassilii Khachaturov # # 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; eit...
SNoiraud/gramps
gramps/gen/lib/test/date_test.py
Python
gpl-2.0
22,594
from direct.directnotify import DirectNotifyGlobal from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.task import Task import random from toontown.fishing import BingoCardCell from toontown.fishing import BingoGlobals from toontown.fishing import FishBase from toontown.fishing import FishG...
ksmit799/Toontown-Source
toontown/fishing/BingoCardGui.py
Python
mit
17,376
''' Illustration of upper and lower limit symbols on errorbars ''' from math import pi from numpy import array, arange, sin import pylab as P fig = P.figure() x = arange(10.0) y = sin(arange(10.0)/20.0*pi) P.errorbar(x,y,yerr=0.1,capsize=3) y = sin(arange(10.0)/20.0*pi) + 1 P.errorbar(x,y,yerr=0.1, uplims=True) y ...
sniemi/SamPy
sandbox/src1/examples/errorbar_limits.py
Python
bsd-2-clause
784
#!/usr/bin/env python # 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: # # * Redistributions of source code must retain the above copyright # notice, this lis...
multitheftauto/mtasa-blue
vendor/google-breakpad/src/tools/python/tests/filter_syms_unittest.py
Python
gpl-3.0
4,454
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: [email protected] ## ## This file is part of VisTrails. ## ## ...
minesense/VisTrails
vistrails/db/versions/v1_0_5/translate/__init__.py
Python
bsd-3-clause
1,965
# Copyright 2017 datawire. 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 agr...
sipplified/forge
forge/jinja2.py
Python
apache-2.0
4,507
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2014 David Vavra ([email protected]) 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 Lice...
david-vavra/pyrage
pyrage/modules/dns.py
Python
gpl-2.0
1,216
import logging import multiprocessing import os import pprint import random import socket import string import subprocess import sys import threading import unittest try: import queue except ImportError: import Queue as queue import mongobox import requests import hello LOG = logging.getLogger(__name__) ...
samstav/hello-bottle
test_hello.py
Python
apache-2.0
6,762
# DO NOT EDIT THIS FILE! # # Python module CosPersistencePID generated by omniidl import omniORB omniORB.updateModule("CosPersistencePID") # ** 1. Stub files contributing to this module import CosPersistencePID_idl # ** 2. Sub-modules # ** 3. End
amonmoce/corba_examples
omniORBpy-4.2.1/build/python/COS/CosPersistencePID/__init__.py
Python
mit
251
# -*- coding: utf-8 -*- """Tests of dataset utility functions.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import os.path as op from itertools import product import numpy as np from numpy...
nsteinme/phy
phy/utils/tests/test_datasets.py
Python
bsd-3-clause
5,446
from pydojo import * # CREATE GAME DISPLAY screen(1600, 900) turtle = Actor() turtle.hide() turtles = [] time = 0 # MAIN LOOP while True: clear() if ticks() - time > 100: t = clone(turtle) t.point(random.randint(-180, 180)) t.tag('turtle') t.speed = random.randint(1, 10) ...
sprintingkiwi/PYDOJO
example_random_art.py
Python
mit
705
from poloniex import Poloniex as Client from .Config import Config from .Logger import Logger from .ExchangeException import ExchangeException class Poloniex: def __init__(self, key, secret): self.logger = Logger(__name__) try: self.client = Client(key, secret) except Excepti...
msantl/cryptofolio
cryptofolio/api/Poloniex.py
Python
gpl-3.0
913
import unittest.mock as mock from django.conf import settings from django.test.utils import override_settings from test_plus import TestCase from badges.models import Badge from .factories import UserFactory, GroupFactory @override_settings(MINIMUM_YEAR_FOR_PIONNEER_BADGE=1) class TestPionneerBadge(TestCase): ...
moas/sketchbadges
exo/studio/users/tests/test_pionneer_badge.py
Python
mit
2,298
#!/usr/bin/python # # (c) 2017 Apstra Inc, <[email protected]> # # 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 opt...
kbrebanov/ansible
lib/ansible/modules/network/aos/aos_rack_type.py
Python
gpl-3.0
7,629
# reload seems to work for Python 2.3 but not 2.2. import time, os, sys import test_pyximport # debugging the 2.2 problem if 1: from distutils import sysconfig try: sysconfig.set_python_build() except AttributeError: pass import pyxbuild print pyxbuild.distutils.sysconfig == syscon...
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/cython/src/pyximport/test/test_reload.py
Python
mit
934
from __future__ import division, print_function, unicode_literals # important: set cocos_utest=1 in the environment before run. # that simplifies the pyglet mockup needed # remember to erase or set to zero for normal runs import os assert os.environ['cocos_utest'] # set the desired pyglet mockup import sys sys.path.i...
vyscond/cocos
utest/test_p_ba_operands_different_classes.py
Python
bsd-3-clause
2,493
import sys import os import pandas as pd import multiprocessing as mp import csv # this code is written for the merged file with combined pval & fdr. although it could have been written for the file without comb fisher and fdr, # it is easier to have the output with the comb pval and fdr and use what we need rather t...
richrr/scripts
python/merging-python-script.py
Python
gpl-3.0
5,595
# encoding=utf-8 from __future__ import division import os import sys import chardet import jieba import jieba.posseg as pseg import jieba.analyse import HTMLParser reload(sys) sys.setdefaultencoding('utf-8') html_parser = HTMLParser.HTMLParser() jieba.analyse.set_stop_words("./stop_words.txt") corpus_file_name =...
yuyunliuhen/automatic-text-categorization
gensim_sims.py
Python
mit
2,959
import re from django.core.validators import EmailValidator, URLValidator from django.db.models.loading import get_model from django.forms import ValidationError from tower import ugettext as _ def validate_twitter(username): """Return a twitter username given '@' or http(s) strings.""" if username: ...
chirilo/mozillians
mozillians/phonebook/validators.py
Python
bsd-3-clause
2,774
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0012_auto_20150508_0958'), ] operations = [ migrations.RemoveField( model_name='generalledgeraccount', ...
AjabWorld/ajabsacco
ajabsacco/core/migrations/0013_auto_20150508_1143.py
Python
apache-2.0
474
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.l...
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.py
Python
mit
11,519
from django.db.models import Q from django.shortcuts import get_object_or_404, redirect from itertools import chain from trix.trix_core.models import Course from trix.trix_course.views import base class CourseAdminView(base.TrixCourseBaseView): model = Course template_name = "trix_course/course_admin.django....
devilry/trix2
trix/trix_course/views/administer.py
Python
bsd-3-clause
1,137
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import urllib2 import os import time from xml.dom.minidom import parseString def ox(resultText): return u'○' if resultText == 'Passed System Test' else u'×' def getData(row, tagName, text=''): cnode = row.getElementsByTagName(tagName)[0].childNodes return ...
nise-nabe/SRMResultGetter
srm_result.py
Python
bsd-2-clause
2,302
# -*- coding: utf-8 -*- # # This file is part of the VecNet OpenMalaria Portal. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/om # # This Source Code Form is subject to the terms of t...
vecnet/om
website/apps/ts_om/tests/models/test_Scenario.py
Python
mpl-2.0
1,702
#!/usr/bin/python # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Installs and runs (a subset of) the gcc toolchain test suite against various nacl and non-nacl toolchains ''' import glob imp...
cohortfsllc/cohort-cocl2-sandbox
tools/toolchain_tester/torture_test.py
Python
bsd-3-clause
5,564
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <[email protected]> # # 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 # th...
f0rki/cb-multios
original-challenges/electronictrading/poller/for-release/machine.py
Python
mit
5,603
match x<caret>:
jwren/intellij-community
python/testData/codeInsight/smartEnter/firstClauseAfterEmptyMatchStatementWithSubjectAndColon.py
Python
apache-2.0
15
# Class definition: # RunJob # This is the main RunJob class; RunJobEvent etc will inherit from this class # Note: at the moment, this class is essentially the old runJob module turned object oriented. # The class will later become RunJobNormal, ie responible for running normal PanDA jobs. # At th...
RRCKI/pilot
RunJob.py
Python
apache-2.0
69,493
from StringIO import StringIO from django.test import TestCase from django.test.client import Client from corehq.apps.app_manager.models import Application, APP_V1, Module from corehq.apps.app_manager.success_message import SuccessMessage from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.mod...
gmimano/commcaretest
corehq/apps/app_manager/tests/test_success_message.py
Python
bsd-3-clause
3,754
# -*- coding: utf-8 -*- # Natural Language Toolkit: Probability and Statistics # # Copyright (C) 2001-2015 NLTK Project # Author: Edward Loper <[email protected]> # Steven Bird <[email protected]> (additions) # Trevor Cohn <[email protected]> (additions) # Peter Ljunglöf <peter.ljunglof@hea...
Reagankm/KnockKnock
venv/lib/python3.4/site-packages/nltk/probability.py
Python
gpl-2.0
83,570
# The Hazard Library # Copyright (C) 2012 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Th...
ROB-Seismology/oq-hazardlib
openquake/hazardlib/gsim/chiou_youngs_2008.py
Python
agpl-3.0
14,566
#!/usr/bin/env python3 # Copyright (c) 2014-2021, Linus Östberg and contributors # 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 copyrig...
talavis/kimenu
backend/main.py
Python
bsd-3-clause
6,810
# Copyright 2009-2010 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
couchbaselabs/litmus
lib/bson/errors.py
Python
apache-2.0
1,154
## Copyright 2003-2009 Luc Saffre ## This file is part of the TimTools project. ## TimTools 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 la...
lsaffre/timtools
timtools/scripts/mailtomoz.py
Python
bsd-2-clause
2,745
from django.contrib import admin from rcs.wiki.models import WikiPage, WikiAttachment admin.site.register(WikiPage) admin.site.register(WikiAttachment)
ShuffleBox/django-rcsfield
rcs/wiki/admin.py
Python
bsd-3-clause
152
import logging import os import sys import threading from scapy.all import * from core.utils import shutdown mitmf_logger = logging.getLogger('mitmf') class ARPWatch: def __init__(self, gatewayip, myip, interface): self.gatewayip = gatewayip self.gatewaymac = None self.myip = myip...
0x27/MITMf
core/poisoners/arp/ARPWatch.py
Python
gpl-3.0
3,878
#!/usr/bin/env python # This example script was ported from Perl Spreadsheet::WriteExcel module. # The author of the Spreadsheet::WriteExcel module is John McNamara # <[email protected]> __revision__ = """$Id: cgi.py,v 1.1 2004/01/31 18:57:53 fufff Exp $""" ###########################################################...
evgenybf/pyXLWriter
examples/cgi.py
Python
lgpl-2.1
1,436
# coding: utf-8 from __future__ import unicode_literals import Queue import threading class BaseProducer(threading.Thread): def __init__(self, q, name='BasePro', pages=1): super(BaseProducer, self).__init__() self.q = q self.name = name self.pages = pages self.offset = 1 ...
bluedazzle/django-angularjs-blog
app/blog_lab/new_proxy/ProxyProducer.py
Python
bsd-2-clause
2,085
import numpy as np import argparse import glob import cv2 import io import picamera from Twitter import Twitter import onlineCoffee import time def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged = cv2.Canny(image,...
ciauri/CoffeeRobot
MeasureCoffee.py
Python
mit
4,323
""" Class for mass-univariate classification """ from numpy import in1d, zeros, array, size, float64, asarray from thunder.rdds.series import Series class MassUnivariateClassifier(object): """ Base class for performing classification. Assumes a Series with array data such that each entry belongs to one...
oliverhuangchao/thunder
thunder/decoding/uniclassify.py
Python
apache-2.0
7,078
# Bloom Framework # # John Boxall # Copyright 2008 Handi Mobility # www.handimobility.ca
kevintom/django-bloom
bloom/image/templatetags/__init__.py
Python
gpl-3.0
89
#!/usr/bin/env python __author__ = 'Andreas M. Wahl' import sys import os import random class SimulatorMock: def __init__(self, runDirectory, uuid): self.runDirectory = runDirectory self.uuid = uuid def writeOutput(self): strings = ['scalar SimpleUnderlayNetwork.globalObserver.globa...
ClockworkOrigins/m2etis
configurator/autosim/mock/SimulatorMock.py
Python
apache-2.0
2,146
""" Generate coulomb matrices for molecules. See Montavon et al., _New Journal of Physics_ __15__ (2013) 095003. """ import numpy as np import deepchem as dc from deepchem.feat.base_classes import MolecularFeaturizer from deepchem.utils import pad_array from deepchem.feat.atomic_coordinates import AtomicCoordinates ...
miaecle/deepchem
deepchem/feat/coulomb_matrices.py
Python
mit
10,564
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006 Lukáš Lalinský # # 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...
lalinsky/picard-debian
picard/ui/options/__init__.py
Python
gpl-2.0
1,569
import itertools from pathlib import Path import numpy as np import tensorflow as tf from model import SequenceClassifier, ThalNetCell, GRUCell,MLPClassifier from util import timestamp from tensorflow.examples.tutorials.mnist import input_data import argparse from plot import plot_learning_curve def plot_image(imag...
JuliusKunze/thalnet
main.py
Python
mit
4,277
import os from collections import OrderedDict import sys fil = open('energy.xvg').readlines() GMX_dat = [float(f)/4.184 for f in fil[-1].split()[1:-1]] nfil = open('LOG_NAMD').readlines() for line in nfil: if 'ENERGY: 200' in line: NAMD_DAT = [float(f) for f in line.split()[2:12]] #print(NAMD_DAT) ...
leelasd/OPLS-AAM_for_Gromacs
GMX_TEST/GXG/RN/NAMD_GMX_DIFF.py
Python
mit
1,063
# Copyright (c) 2014 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
nikesh-mahalka/nova
nova/tests/unit/virt/vmwareapi/test_ds_util.py
Python
apache-2.0
20,458
import sys from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import List, Optional, Sequence # Shim to wrap setup.py invocation with setuptools # # We set sys.argv[0] to the path to the underlying setup.py file so # setuptools / distutils don't take the path to the setu...
xavfernandez/pip
src/pip/_internal/utils/setuptools_build.py
Python
mit
5,070
# Allow the use of / operator for division to yield floats instead of integers: # http://docs.python.org/whatsnew/2.2.html#pep-238-changing-the-division-operator from __future__ import division # Imports from standard libraries from datetime import date, timedelta import hashlib import os import urllib2 # I...
albatrossandco/brubeck_cms
brubeck/articles/models.py
Python
bsd-3-clause
11,291
import six.moves.cPickle as pickle import os import shutil import tempfile import unittest import numpy import theano from theano.compile.io import In def test_function_dump(): v = theano.tensor.vector() fct1 = theano.function([v], v + 1) try: tmpdir = tempfile.mkdtemp() fname = os.path...
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/Theano-0.7.0-py3.4.egg/theano/compile/tests/test_function.py
Python
gpl-2.0
7,048
#!/usr/bin/env python3 import orjson import os from wsgiref.handlers import CGIHandler from philologic.runtime.DB import DB from philologic.runtime.HitWrapper import ObjectWrapper from philologic.runtime import generate_text_object import sys sys.path.append("..") import custom_functions try: from custom_funct...
ARTFL-Project/PhiloLogic4
www/scripts/get_text_object.py
Python
gpl-3.0
1,243
# 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 Xdotool(MakefilePackage): """fake keyboard/mouse input, window management, and more""" ...
LLNL/spack
var/spack/repos/builtin/packages/xdotool/package.py
Python
lgpl-2.1
1,385
# Copyright (c) 2014 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...
leeseuljeong/leeseulstack_neutron
neutron/db/migration/models/head.py
Python
apache-2.0
3,827
__author__ = 'jtromo' #Developed at : SEFCOM Labs by James Romo from bluetooth import * from Crypto.Cipher import AES import threading import time import base64 import os import uuid # ///////////////////////////////////////////////////////////////////////////// # Configuration # ////////...
jtromo/ASU-Thesis-RaspberryPiSmartKey
RaspberryPiSmartKey/.sync/Archive/RaspberryPiService/SmartKeyService.9.py
Python
apache-2.0
8,829
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AuthoredData.processing_id' db.add_column(u'dingos_authoring_authoreddata', 'processing_id',...
siemens/django-dingos-authoring
dingos_authoring/south_migrations/0003_auto__add_field_authoreddata_processing_id.py
Python
gpl-2.0
16,713
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
zozo123/buildbot
slave/buildslave/test/unit/test_commands_shell.py
Python
gpl-3.0
1,818
#!/usr/bin/env python import os import sys import time # When the parent dies we are seeing continual newlines, so we only access so many before stopping counter = 1 # sleep a little bit or we will never see the asm in the configuration file # and the message received just before we go to the established loop will b...
benagricola/exabgp
qa/self/operational/operational-send.py
Python
bsd-3-clause
1,319
# -*- coding: utf-8 -*- """ (c) 2014 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <[email protected]> """ from anitya.lib.backends import ( BaseBackend, get_versions_by_regex_for_text, REGEX) from anitya.lib.exceptions import AnityaPluginException import six DEFAULT_REGEX = 'href="([0-9][0-9.]*)/...
pombredanne/anitya
anitya/lib/backends/folder.py
Python
gpl-2.0
2,702
"""File for Azure Event Hub models.""" from __future__ import annotations from dataclasses import dataclass import logging from azure.eventhub.aio import EventHubProducerClient, EventHubSharedKeyCredential from .const import ADDITIONAL_ARGS, CONF_EVENT_HUB_CON_STRING _LOGGER = logging.getLogger(__name__) @datacla...
rohitranjan1991/home-assistant
homeassistant/components/azure_event_hub/client.py
Python
mit
2,254
# IMAP utility module # Copyright (C) 2002 John Goerzen # <[email protected]> # # 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 opt...
rayners/offlineimap
offlineimap/imaputil.py
Python
gpl-2.0
8,280
#!/usr/bin/env python from markovLatex.markov import TextGenerator from markovLatex.tex import Document as doc from random import randint import argparse, sys def main(args): parser = argparse.ArgumentParser(description="Access the Will of the Gods from the command line.") parser.add_argument('files', type=str, na...
SeanMcGrath/MarkovLatex
biblegen.py
Python
mit
1,204
#!/usr/bin/env python3 """Unit tests run as PYTHONPATH=../../.. python3 ./test_valve.py.""" # pylint: disable=too-many-lines # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); #...
REANNZ/faucet
tests/unit/faucet/test_valve_config.py
Python
apache-2.0
36,835
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/data/Public/qt-learning/ui/widgets/integer3Attr.ui' # # Created: Tue Nov 14 18:49:58 2017 # by: PyQt4 UI code generator 4.6.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Widget(ob...
david-cattermole/qt-learning
python/qtLearn/widgets/ui_integer3Attr.py
Python
bsd-3-clause
1,747
raise "not used" ## Copyright 2003-2005 Luc Saffre ## This file is part of the Lino project. ## Lino 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...
MaxTyutyunnikov/lino
obsolete/src/lino/formsold/wx/main.py
Python
gpl-3.0
7,865
import os import torch from torch.autograd import Variable USE_CUDA = torch.cuda.is_available() FLOAT = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor def prRed(prt): print("\033[91m {}\033[00m" .format(prt)) def prGreen(prt): print("\033[92m {}\033[00m" .format(prt)) def prYellow(prt): print("\033[93m {}...
ghliu/pytorch-ddpg
util.py
Python
apache-2.0
2,518
from common_fixtures import * # NOQA LB_IMAGE_UUID = "docker:sangeetha/lbtest:latest" CONTAINER_HOST_NAMES = ["container1", "container2", "container3"] containers_in_host = [] logger = logging.getLogger(__name__) @pytest.fixture(scope='session', autouse=True) def lb_targets(request, client): hosts = client.l...
sonchang/validation-tests
tests/validation/cattlevalidationtest/core/test_lb.py
Python
apache-2.0
39,502
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at you...
qspin/qtaste
demo/pywinauto-0.3.8/pywinauto/tests/miscvalues.py
Python
lgpl-3.0
3,745
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Margins in Sales Orders', 'version':'1.0', 'category': 'Sales', 'description': """ This module adds the 'Margin' on sales order. ============================================= This gives the pr...
chienlieu2017/it_management
odoo/addons/sale_margin/__manifest__.py
Python
gpl-3.0
552
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-08 13:14 from __future__ import unicode_literals import core.validators from django.db import migrations, models import django.db.models.deletion import django_date_extensions.fields class Migration(migrations.Migration): replaces = [('organize', '...
patjouk/djangogirls
organize/migrations/0001_squashed_0004_remove_eventapplication_rejection_reason.py
Python
bsd-3-clause
3,612
import urlparse from oauth10a import signing_requests from tests import test_oauth10a class TestCase(test_oauth10a.TestCase): def test_trivial(self): self.assertTrue(signing_requests) def test_request_url(self): url = 'HTTP://Example.com:80/resource?id=123' request_url = signing_req...
dolph/python-oauth10a
tests/test_signing_requests.py
Python
apache-2.0
5,074
import sys, os from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_d...
italolelis/wunderlist
docs/conf.py
Python
mit
839
class User(object): def __init__(self, username=None, password=None, email=None): self.username = username self.password = password self.email = email @classmethod def admin(cls): return cls(username="admin", password="admin") #random values for username and password ...
ArtemVavilov88/php4dvd_tests
php4dvd/model/user.py
Python
apache-2.0
512
from vcms.simpleblogs.tests.test_page_build import * from vcms.simpleblogs.tests.test_blog_page_controller import *
francisl/vcms
modules/vcms/simpleblogs/tests/__init__.py
Python
bsd-3-clause
116
#!/usr/bin/env python from .util import create_url, get_or_else, parse_date class ScheduleAPI: """Access to Schedule API This class is inherited by :class:`tdclient.api.API`. """ def create_schedule(self, name, params=None): """Create a new scheduled query with the specified name. A...
treasure-data/td-client-python
tdclient/schedule_api.py
Python
apache-2.0
9,750
# test for wasanbon/core/plugins/admin/environment_plugin/setup/path.py import unittest from unittest import mock from unittest.mock import Mock, call import os from wasanbon.core.plugins.admin.environment_plugin.setup import path class TestPlugin(unittest.TestCase): @mock.patch('sys.stdout.write')...
sugarsweetrobotics/wasanbon
test/test_admin_environment_plugin/test_setup/test_path.py
Python
gpl-3.0
8,743
# Copyright 2020 by Kurt Rathjen. All Rights Reserved. # # This library is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. This ...
krathjen/studiolibrary
src/mutils/tests/run.py
Python
lgpl-3.0
1,998
#!/usr/bin/python import itertools import random #import sys class ShufXRange(object): def __init__(self, *args): if len(args) == 1: self.min = 0 self.max = args[0] else: self.min = args[0] self.max = args[1] self.int_tuple = tuple(range(se...
hammerhorn/hammerhorn-jive
igo/cjh/shuf_range.py
Python
gpl-2.0
2,051
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram.hoverlabel.font", **kwargs ): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, par...
plotly/python-api
packages/python/plotly/plotly/validators/histogram/hoverlabel/font/_colorsrc.py
Python
mit
473
from __future__ import absolute_import, division, unicode_literals import re from xml.sax.saxutils import escape, unescape from pip._vendor.six.moves import urllib_parse as urlparse from . import base from ..constants import namespaces, prefixes __all__ = ["Filter"] allowed_elements = frozenset(( (namespaces[...
tstieven/amiunique
website/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py
Python
mit
25,114
"""Tests for tensorflow.ops.io_ops.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import time import tensorflow.python.platform import tensorflow as tf import numpy as np from tensorflow.python.platform import gfile class SaverTest(t...
brodyh/tensorflow
tensorflow/python/training/saver_test.py
Python
apache-2.0
21,676
import json import re from attest import Tests, assert_hook from werkzeug.test import Client from werkzeug.wrappers import Response from plastic.app import BaseApp from plastic.rendering import render RenderingTestApp = BaseApp.clone() RenderingTestApp.associate_mimetypes(html='text/html', xml='text/xml') @Render...
dahlia/plastic
plastictests/rendering.py
Python
mit
1,548
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # tvdb # ------------------------------------------------------------ # Scraper para el site thetvdb.com usando API v2.1 # Utilizado para obtener datos de series para la videoteca # del addon y también Kodi. # -----------------------...
pitunti/alfaPitunti
plugin.video.alfa/core/tvdb.py
Python
gpl-3.0
40,140
from falconswagger.swagger_api import SwaggerAPI from falconswagger.models.http import ModelHttpMeta
dutradda/falcon-swagger
falconswagger/__init__.py
Python
mit
100
"""RSS moar columns Revision ID: 1dc0fe0d793f Revises: 3389071120cb Create Date: 2017-02-28 06:49:26.443860 """ # revision identifiers, used by Alembic. revision = '1dc0fe0d793f' down_revision = '3389071120cb' branch_labels = None depends_on = None # Patch in knowledge of the citext type, so it reflects properly. ...
fake-name/ReadableWebProxy
alembic/versions/00039_1dc0fe0d793f_rss_moar_columns.py
Python
bsd-3-clause
2,769
from __future__ import division import numpy as np from numpy.linalg import inv from numpy.core.umath_tests import inner1d def initialize_gpu(): from cudamat import cudamat as cm global cm # this class wraps matrix operations so that you can switch between numpy # and cuda operations ...
apdjustino/urbansim
urbansim/urbanchoice/pmat.py
Python
bsd-3-clause
8,585
import sys import Pyro5 sys.path.extend(['..', '../..']) import logging log = logging.getLogger() import threading import mupif as mp threading.current_thread().setName('ex10-main') @Pyro5.api.expose class Workflow10(mp.workflow.Workflow): def __init__(self, metadata={}): MD = { "ClassName":...
mupif/mupif
examples/Example10-jobMan-distrib-PBS/main.py
Python
lgpl-3.0
4,352
from django.test import TestCase from unittest import mock from .. import keys from . import data import os.path class PublicKeyTest(TestCase): def test_load_pem_rsa(self): exc, key = keys.PublicKey.load_serialized_public_key(data.PEM_PUBLIC_RSA) self.assertIsNone(exc) self.assertIsInstanc...
crgwbr/asymmetric_jwt_auth
src/asymmetric_jwt_auth/tests/test_keys.py
Python
isc
5,861
from os.path import dirname, join from pkg_resources import parse_version from setuptools import setup, find_packages, __version__ as setuptools_version with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f: version = f.read().decode('ascii').strip() def has_environment_marker_platform_impl_support():...
starrify/scrapy
setup.py
Python
bsd-3-clause
3,363
from unittest import TestCase
samratashok87/Rammbock
utest/test_templates/__init__.py
Python
apache-2.0
30
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
openstack/aodh
aodh/api/__init__.py
Python
apache-2.0
960
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
tejal29/pants
src/python/pants/backend/jvm/tasks/jvm_run.py
Python
apache-2.0
4,234
# -*- encoding: utf-8 -*- # Module iainfgen from numpy import * def iainfgen(f, Iab): from iaunion import iaunion from iadil import iadil from ianeg import ianeg A, Bc = Iab y = iaunion( iadil(f, A), iadil( ianeg(f), Bc)) return y
mariecpereira/IA369Z
deliver/ia870/iainfgen.py
Python
mit
261
#!/usr/bin/python # # 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 distribut...
hyperized/ansible
lib/ansible/modules/network/check_point/checkpoint_access_rule.py
Python
gpl-3.0
8,285
# 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/. # If we add unicode_literals, Python 2.6.1 (required for OS X 10.6) breaks. from __future__ import print_function impor...
cstipkovic/spidermonkey-research
python/mozboot/mozboot/bootstrap.py
Python
mpl-2.0
14,641
from django.db import models from ckeditor.fields import RichTextField from solo.models import SingletonModel from phonenumber_field import modelfields as phonenumber_models from foti.models import Foto from opere.models import Opera from scritti.models import Scritto class Profile(SingletonModel): name = mod...
mhotwagner/backstage
facade/models.py
Python
mit
2,837