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
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Employee', '0011_auto_20151027_0021'), ] operations = [ migrations.AlterField( model_name='userprofile', ...
pkyad/libreERP-old
Employee/migrations/0012_auto_20151027_2247.py
Python
gpl-2.0
627
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
CraigHarris/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/transaction_management/skip_checkpoint_abort_transaction/test_skip_checkpoint_abort_transaction.py
Python
apache-2.0
3,466
#encoding:utf-8 subreddit = 'BaPCSalesEurope' t_channel = '@r_BaPCSalesEurope' def send_post(submission, r2t): return r2t.send_simple(submission)
Fillll/reddit2telegram
reddit2telegram/channels/~inactive/r_bapcsaleseurope/app.py
Python
mit
153
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import kinow_client from kinow_client.rest import A...
kinow-io/kinow-python-sdk
test/test_payment_details.py
Python
apache-2.0
763
# Script to generate CaseConvert.cxx from Python's Unicode data # Should be run rarely when a Python with a new version of Unicode data is available. # Requires Python 3.3 or later # Should not be run with old versions of Python. # Current best approach divides case conversions into two cases: # simple symmetric and c...
yangbowen/ECLDbg
scintilla/scripts/GenerateCaseConvert.py
Python
mit
4,553
__author__ = 'ysahn' import logging import json import os import glob import collections from mako.lookup import TemplateLookup from mako.template import Template from taskmator.task.core import Task class TransformTask(Task): """ Class that transform a json into code using a template Uses mako as temp...
altenia/taskmator
taskmator/task/text.py
Python
mit
4,755
import mock from datetime import datetime, timedelta from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import UserFactory from scripts.triggered_mails import main, find_inactive_users_with_no_inactivity_email_sent_or_queued from website import mails class TestTriggeredMails(OsfT...
ticklemepierce/osf.io
scripts/tests/test_triggered_mails.py
Python
apache-2.0
2,280
#!/bin/python3 # coding: utf-8 """Bolditalic test file.""" from sphinx_testing import TestApp as MakeApp # rename to prevent warning htmlfile = "index.html" result = '<span class="bolditalic">there should be some bolditalic</span>' cssresult = '<link rel="stylesheet" type="text/css" href="_static/bolditalic.css" />'...
kallimachos/chios
tests/test_bolditalic.py
Python
gpl-3.0
792
import autograd as ag import click import copy import numpy as np import logging import pickle from sklearn.model_selection import train_test_split from sklearn.metrics import roc_auc_score from sklearn.preprocessing import RobustScaler from sklearn.utils import check_random_state from recnn.preprocessing import rewr...
glouppe/recnn
train.py
Python
bsd-3-clause
5,250
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
wavefrontHQ/python-client
test/test_gcp_billing_configuration.py
Python
apache-2.0
1,356
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
DavidAndreev/indico
indico/web/forms/util.py
Python
gpl-3.0
2,632
from __future__ import unicode_literals from math import ceil from django.db import models, IntegrityError, connection from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature from django.utils.six.moves import range from .models import...
doismellburning/django
tests/delete/tests.py
Python
bsd-3-clause
15,685
from django.conf.urls import url, include from rest_framework import routers from article.views import (ArticleUpdate, ArticleDelete,ArticleDetailView, ArticleEditView,ArticleListView,ArticlePublishView, IndexView,About,Book,Sitemap,TalksView,ArticleAPI,CommentAPI) ...
stffer/yunshu
blog/urls.py
Python
mit
1,893
""" This module is designed to be used as follows:: from future.builtins.iterators import * And then, for example:: for i in range(10**15): pass for (a, b) in zip(range(10**15), range(-10**15, 0)): pass Note that this is standard Python 3 code, plus some imports that do nothing on Pytho...
noam09/deluge-telegramer
telegramer/include/future/builtins/iterators.py
Python
gpl-3.0
1,396
from account.forms import SignupForm from captcha.fields import CaptchaField class SignupFormWithCaptcha(SignupForm): captcha = CaptchaField()
acamposruiz/quecoins
test/example_thirdparty/forms.py
Python
bsd-2-clause
148
#!/usr/bin/env python # -*- coding: utf-8 -*- TARGETS = [ 'InfoDirectory.py', ] PACKAGE = { 'title': 'infohierarchy', 'desc': 'infohierarchy example', } def setup(targets): '''Setup example for translation, MUST call util.setup(targets).''' util.setup(targets) def translate(): '''Transla...
spaceone/pyjs
examples/infohierarchy/__main__.py
Python
apache-2.0
1,063
#!/usr/bin/env python # _*_ coding:utf-8 _* """ @author: Rubén Hortas Astariz <http://rubenhortas.blogspot.com> @contact: rubenhortas at gmail.com @github: http://github.com/rubenhortas @license: @status: @version: @file: setup.py """ from setuptools import setup setup(name='', version='', d...
rubenhortas/pySkeleton
setup.py
Python
unlicense
547
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page ...
twilio/twilio-python
twilio/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.py
Python
mit
11,153
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-06 08:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webChat_models', '0003_auto_20160406_1645'), ] operations = [ migrations.Alt...
willre/homework
day21-22/webChat/webChat_models/migrations/0004_auto_20160406_1646.py
Python
gpl-2.0
753
# -*- coding: utf-8 -*- import os import numpy as np # example from scipy.org NumPy tutorial def f(x, y): return 10 * x + y a = np.fromfunction(f, (5, 4), dtype=int) print(a) print(a[0:2, 0:2]) print(a[:, 1]) print(a.flatten()) for row in a: # iteration is done over fiest axis print(row) for ele...
NicovincX2/Python-3.5
Environnement Python/Modules/Numpy/numpy-slicing.py
Python
gpl-3.0
375
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Beat and tempo ============== .. autosummary:: :toctree: generated/ beat_track estimate_tempo """ import numpy as np import scipy from . import cache from . import core from . import onset from . import util from .util.exceptions import ParameterError __all...
craffel/librosa
librosa/beat.py
Python
isc
13,258
from django.apps import AppConfig class MailerConfig(AppConfig): name = 'mailer'
Zahajamaan/Fudulbank
mailer/apps.py
Python
agpl-3.0
87
from office365.runtime.client_value import ClientValue from office365.runtime.client_value_collection import ClientValueCollection from office365.search.search_hits_container import SearchHitsContainer class SearchResponse(ClientValue): """Represents results from a search query, and the terms used for the query."...
vgrem/Office365-REST-Python-Client
office365/search/search_response.py
Python
mit
656
#!/usr/bin/env python3 import sys import subprocess import urllib.request import copy def main(argv): cookie = urllib.request.HTTPCookieProcessor() oc = copy.deepcopy(cookie) if __name__ == '__main__': sys.exit(main(sys.argv))
munhyunsu/Hobby
Pickle/pickle_example.py
Python
gpl-3.0
242
# # This file is part of the fiwse project. # # Copyright (C) 2014 Stephen M Buben <smbuben@gmail.com> # # fiwse 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...
smbuben/fiwse
controllers/about.py
Python
agpl-3.0
890
def getDataModel(): return { 'prefix':'ou', 'version':201611301215, 'types':( ('ou:org',{'subof':'guid','doc':'A GUID for a human organization such as a company or military unit'}), ('ou:host',{'subof':'guid','doc':'A GUID for a host within an organization'}), ...
williballenthin/synapse
synapse/models/orgs.py
Python
apache-2.0
1,156
# Pango markup pylint module # # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
bcl/pocketlint
pocketlint/checkers/markup.py
Python
gpl-2.0
8,595
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, int_or_none, remove_end, ) class NFLIE(InfoExtractor): IE_NAME = 'nfl.com' _VALID_URL = r'''(?x) ...
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/nfl.py
Python
gpl-3.0
7,859
""" The :mod:`sklearn.metrics.pairwise` submodule implements utilities to evaluate pairwise distances or affinity of sets of samples. This module contains both distance metrics and kernels. A brief summary is given on the two here. Distance metrics are a function d(a, b) such that d(a, b) < d(a, c) if objects a and b...
lucidfrontier45/scikit-learn
sklearn/metrics/pairwise.py
Python
bsd-3-clause
28,399
# Copyright 2020 Peppy Player peppy.player@gmail.com # # This file is part of Peppy Player. # # Peppy Player 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 optio...
project-owner/Peppy
ui/menu/collectionmenu.py
Python
gpl-3.0
5,144
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # # plot 2D planes # x = np.linspace(0, 3, 100) # plt.figure() # plt.plot(x, np.sin(x)) # plt.show() # # plot 3D planes and dots fig = plt.figure() ax = Axes3D(fig) x = np.arange(-1, 1, 0.1) y = np.arange(-1, 1, 0.1) x, y = np....
kevinhikali/ml_kevin
py_demo/plot.py
Python
gpl-3.0
490
################################################################################# # # The MIT License (MIT) # # Copyright (c) 2015 Dmitry Sovetov # # https://github.com/dmsovetov # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "...
dmsovetov/pygling
Pygling/Generator/Xcode/PBX/Group.py
Python
mit
2,360
# # 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...
kevin-zhaoshuai/zun
zun/tests/tempest/base.py
Python
apache-2.0
1,018
import Vec import Mat44 def isVector(testVec): return isinstance(testVec, Vec.Vec) def ensureVector(x, y=0, z=0, w=0): if isVector(x): return x else: return Vec.Vec(x, y, z, w) # TODO: add to test_helpers.py with isMatrix and ensureMatrix # Ensure testMat is a Mat44 matrix (4 row Vec4s) def isMatrix(testMat...
IngenuityEngine/arkMath
arkMath/helpers.py
Python
mit
1,040
# coding: utf-8 from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.forms import Field, TextInput from pyuploadcare.client import Uploadcare from pyuploadcare.dj import conf as dj_conf from pyuploadcare.dj.client import get_uploadcare_client from pyuploadcare.excepti...
uploadcare/pyuploadcare
pyuploadcare/dj/forms.py
Python
mit
3,611
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Stéphane Travassac <stravassac@gmail.com> # 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 = { 'metad...
alxgu/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py
Python
gpl-3.0
20,406
# -*- coding: utf-8 -*- ''' Classification and clustering Tier 2 colony. ''' # This file is part of colony. # Distributed under the terms of the last AGPL License. # The full license is in the file LICENCE, distributed as part of this software. __author__ = 'Team Machine' # Check out our research, service...
iofun/colony
server.py
Python
agpl-3.0
15,383
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script tests the installer with test cases specified in the config file. For each test case, it checks that the machine states after the execution o...
mogoweb/chromium-crosswalk
chrome/test/mini_installer/test_installer.py
Python
bsd-3-clause
9,485
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.models import User from models import UserAdmin from django.shortcuts import render_to_response from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.views.dec...
XDSETeamA/XD_SE_TeamA
team9/1/Sharing/UserAdmin/views.py
Python
mit
3,306
#!/usr/bin/env python import sys from ConiteDB import ConiteDB def printUsage(): print "Usage: %s <ciname1> <ciname2> ..." % sys.argv[0] sys.exit(1) def getArgs(): if len(sys.argv) <= 1: printUsage() cinames = [] for arg in sys.argv[1:]: if "=" in arg: print "Queries ...
leighmaddock/ConiteDB
conitedb_remove.py
Python
apache-2.0
712
import json import sys from popcoder import Popcoder def main(): popcoder = Popcoder() data = None with open('popcorn.json', 'r') as f: data = json.loads(f.read()) popcoder.process_json(data['data'], data['background']) if __name__ == '__main__': sys.exit(main() or 0)
Nolski/popcoder
popcoder/main.py
Python
mpl-2.0
303
''' Created on Jan 23, 2016 @author: David Zwicker <dzwicker@seas.harvard.edu> ''' from __future__ import division import logging import numpy as np import yaml from ..files import open_filename class AffineTransformation(object): """ class that represents an affine coordinate transformation """ ...
david-zwicker/py-utils
utils/geometry/transformation.py
Python
mit
6,647
#!/usr/bin/env python import os import sys from optparse import OptionParser from os import close, unlink from tempfile import mkstemp from ModestMaps import mapByExtentZoom from ModestMaps.Geo import Location from ModestMaps.Providers import TemplatedMercatorProvider from raven import Client from cairoutils import...
fieldpapers/fp-legacy
decoder/create_index.py
Python
gpl-2.0
5,030
# script to test transport of particles in a veolicty field # the particles (properties) are loaded from binary python files # Simen Mikkelsen, 2016-11-15 # example to run: """ mpiexec -n 1 python transport_of_particles.py """ # where 1 is the number of processes import numpy as np from mpi4py import MPI import os ...
nordam/PyPPT
python_scripts/exchange_of_particles/transport_of_particles.py
Python
mit
6,606
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Greg Mulholland # Description: This script extracts the queue depth of a VSAN Storage Controller if found in the VSAN HCL (offline list) #import pvVim from pyVim.connect import SmartConnect, Disconnect import sys import ssl import atexit import argparse import ge...
gmul/randomscripts
vsanapi_vc_overallhealth.py
Python
gpl-3.0
3,868
# -*- 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. """User profiles module for Invenio.""" from __future__ import absolute_import, prin...
inveniosoftware/invenio-userprofiles
invenio_userprofiles/__init__.py
Python
mit
616
# Copyright (c) 2016 Orange. # 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 a...
openstack/networking-bgpvpn
bgpvpn_dashboard/dashboards/admin/bgpvpn/forms.py
Python
apache-2.0
4,428
import datetime import os.path from ert.ecl import EclGrid, EclFile, EclSum from ert.test import ExtendedTestCase from ert.util.ctime import CTime from ert.well import WellInfo, WellConnection, WellTypeEnum, WellConnectionDirectionEnum, WellSegment class EclWellTest3(ExtendedTestCase): grid = None def test_...
Ensembles/ert
python/tests/core/well/test_ecl_well3.py
Python
gpl-3.0
2,703
import os, sys, argparse import serial, string, sys, struct, datetime, time from transitions import Machine, State from transitions.extensions.states import add_state_features, Timeout #from transitions import Machine #from transitions.extensions.states import add_state_features, Timeout, State import random, copy imp...
alexgonzl/TreeMaze
PythonControl/MazeHeader_PyCMD.py
Python
mit
58,541
#!/usr/bin/env python3 """ Extract full sequences""" import sys tag = 0 branch = "" file_in = open(sys.argv[1], "r") while 1: line = file_in.readline() if line == "": break line = line.rstrip() if "Overall accuracy of the 195 ancestral sequences" in line: tag = 0 if tag == 1 and l...
romainstuder/evosite3d
extract_full_sequences.py
Python
gpl-3.0
875
#!/usr/bin/env python from distutils.core import setup setup( name="HyTra", version="0.1.0", author="Carsten Haubold", author_email="carsten.haubold@iwr.uni-heidelberg.com", description=("Tracking pipeline of the IAL lab at the University of Heidelberg"), license="BSD", keywords="cell trac...
chaubold/hytra
setup.py
Python
mit
753
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for generate_delta_sysroot.""" from __future__ import print_function import os from chromite.lib import cros_build_lib from chromite.l...
guorendong/iridium-browser-ubuntu
third_party/chromite/scripts/generate_delta_sysroot_unittest.py
Python
bsd-3-clause
2,069
from pyomo.environ import * def create_model(): model = ConcreteModel() return model def initialize_buses(model, bus_names=None, ): model.Buses = Set(ordered=True, initialize=bus_names) def initialize_time_periods(model, time_periods=None ...
power-system-simulation-toolbox/psst
psst/model/model.py
Python
mit
4,435
import sys import os import subprocess import socket try: import json except ImportError: import simplejson as json try: config_file = file('/etc/yanoama.conf').read() config = json.loads(config_file) except Exception, e: print "There was an error in your configuration file (/etc/yanoama.conf)" ...
guthemberg/yanoama
yanoama/amen/defaults.py
Python
bsd-3-clause
1,559
try: import kerberos except ImportError: import kerberos_sspi as kerberos import re import logging from requests.auth import AuthBase from requests.models import Response from requests.compat import urlparse, StringIO from requests.structures import CaseInsensitiveDict from requests.cookies import cookiejar_fr...
AbsoluteMSTR/requests-kerberos
requests_kerberos/kerberos_.py
Python
isc
11,049
import unittest from .authentication import AuthenticationTest def run(): suite = unittest.TestLoader().loadTestsFromTestCase(AuthenticationTest) unittest.TextTestRunner(verbosity=2).run(suite)
koslab/kinmu.backend
src/kinmu/backend/tests/main.py
Python
agpl-3.0
203
#!flask/bin/python """filter-o-matic flas app Copyright (c) 2016 office(ish).com https://github.com/benavram/filter-o-matic This file is part of filter-o-matic. filter-o-matic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
benavram/filter-o-matic
app.py
Python
gpl-3.0
4,609
import json class sagittariusRVDsTest: def __init__(self, session, srvurl): self.session = session self.url = srvurl def test(self): ## CREATE LAN RVD APP6969 RVD 11 containerParams = {'primaryAdminURL':'http://app6969rvd11.lab01.dev.dekatonshivr.echinopsii.net:7580', 'primary...
echinopsii/net.echinopsii.ariane.community.cli.python3
tests/acceptance/mapping/scenarios/sagittariusRVDs.py
Python
agpl-3.0
46,829
# -*- coding: utf-8 -*- import numpy as np import pytest from pandas import Index, MultiIndex @pytest.fixture def idx(): # a MultiIndex used to test the general functionality of the # general functionality of this object major_axis = Index(['foo', 'bar', 'baz', 'qux']) minor_axis = Index(['one', 'two...
cython-testbed/pandas
pandas/tests/indexes/multi/conftest.py
Python
bsd-3-clause
1,577
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' This is a tool for file iterate @Author : Jasonwbw@yahoo.com ''' import numpy from itertools import izip import sys reload(sys) sys.setdefaultencoding('utf-8') def to_unicode(text, encoding='utf8', errors='strict'): """Convert a string (bytestr...
jasonwbw/jason_putils
putils/io/file_iter.py
Python
apache-2.0
1,029
#!/usr/bin/env python ''' NOTE: This script is for the most part same as the original ec2.py by Ansible. But, this has been changed to work for our use case. For e.g. this script currently won't work with ec2.ini - it works only off of environment vars. EC2 external inventory script =================================...
aivaturi/aws-terraform-ansible
ansible/ec2_ap.py
Python
mit
57,989
""" jGEM ("j"unction and coverage based Gene and exon Extractor and Merger) """ # Always prefer setuptools over distutils from setuptools import setup, find_packages, Extension # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long descri...
kensugino/jGEM
setup.py
Python
mit
5,387
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) 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 program is distributed in the hope that it will ...
marcellodesales/svnedge-console
svn-server/lib/suds/bindings/multiref.py
Python
agpl-3.0
4,181
# # This file is part of Scalable COncurrent Operations in Python (SCOOP). # # SCOOP 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 o...
IGITUGraz/scoop
scoop/_comm/scooptcp.py
Python
lgpl-3.0
15,141
# Copyright 2014 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 optparse import os import platform import shutil import subprocess import sys import tempfile import unittest import zipfile from telemetry.util impo...
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/util/find_dependencies_unittest.py
Python
bsd-3-clause
2,648
from urllib import urlencode from cgi import escape from Page import Page from Header import Header from Tags import Link, Input, Div, Span, H2, H4, A, Br, Strong, Script, Img, P, Noscript, Table, Td, Tr from Note_tree_area import Note_tree_area from Link_area import Link_area from Toolbar import Toolbar from Json impo...
osborne6/luminotes
view/Main_page.py
Python
gpl-3.0
13,549
class Solution(object): def isPalindrome(self, s): """ :type s: str :rtype: bool """ i = 0 j = len(s) - 1 while i <= j: if not (s[i].isalpha() or s[i].isdigit()): i += 1 elif not (s[j].isalpha() or s[j].isdigit()): ...
scream7/leetcode
algorithms/python/125.py
Python
apache-2.0
534
#!/usr/bin/env python # This Python file uses the following encoding: utf-8 import sys import os import fileHandle import platform import resultHandle workingDir = sys.argv[1] folds = 10 # read and create files (if not exists) # return an array with all lines positivos = fileHandle.convertToBinarySequence(workingD...
cart-pucminas/HPC-Bioinformatics-Kmodes
bin/executar.py
Python
gpl-3.0
1,777
#!/usr/bin/env python # * coding: utf8 * ''' LocatorPallet.py A module that contains a pallet definition for data to support the web api locator services and methods to keep them current. Pre-requisites - The `secrets.py` file has been populated from the template file - The locators in `self.services` have bee...
agrc/warehouse
mapserv/LocatorsPallet.py
Python
mit
17,434
# Copyright 2017 - Tilman 't.animal' Adler # 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...
kontza/sigal
sigal/plugins/nomedia.py
Python
mit
5,162
#!/usr/bin/python3 """ n0run.py -- a unit test runner. n0run runs 0unit based tests programs and then does wierd things far beyond the power of 0unit. We use n0run when we want to make sure that things fail when and "how" they are supposed to, even if the "how" means the error propagates all the way to the ...
adrianratnapala/elm0
n0run.py
Python
isc
10,558
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from thumbor.ext.filters import _sharpen from thumbor.filters import...
gi11es/thumbor
thumbor/filters/sharpen.py
Python
mit
793
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # ...
parpg/parpg
tools/map_editor/scripts/gui/mapeditor.py
Python
gpl-3.0
22,416
# -*- coding: utf-8 -*- import os import unittest from django.conf import settings from transifex.txcommon.tests.base import BaseTestCase from transifex.languages.models import Language from transifex.resources.models import * from transifex.resources.formats.dtd import DTDHandler, DTDParseError class TestDTDHandler(...
rvanlaar/easy-transifex
src/transifex/transifex/resources/tests/lib/dtd/__init__.py
Python
bsd-2-clause
4,837
# -*- coding: utf-8 -*- """ A PDF matplotlib backend Author: Jouni K Seppänen <jks@iki.fi> """ from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import codecs import os import re import struct import sys import time impor...
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py
Python
mit
95,987
# encoding: utf-8 # module samba.dcerpc.drsuapi # from /usr/lib/python2.7/dist-packages/samba/dcerpc/drsuapi.so # by generator 1.135 """ drsuapi DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class DsReplicaModRequest1(__talloc.Object): # no doc def __init__(self, *args, **kwargs):...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/drsuapi/DsReplicaModRequest1.py
Python
gpl-2.0
1,298
import json import logging import sys from redash.models import DataSourceTable, DataSourceColumn from redash.query_runner import * from redash.utils import JSONEncoder try: import cx_Oracle TYPES_MAP = { cx_Oracle.DATETIME: TYPE_DATETIME, cx_Oracle.CLOB: TYPE_STRING, cx_Oracle.LOB: T...
hudl/redash
redash/query_runner/oracle.py
Python
bsd-2-clause
6,413
"""Common HDL patterns.""" from ..abshdl.seq import HDLSequentialBlock from ..abshdl.ifelse import HDLIfElse, HDLIfExp from ..abshdl.sens import HDLSensitivityDescriptor, HDLSensitivityList from ..abshdl.scope import HDLScope from ..abshdl.module import HDLModule from ..abshdl.port import HDLModulePort from ..abshdl.s...
brunosmmm/hdltools
hdltools/hdllib/patterns.py
Python
mit
6,441
import os from app import create_app, db, commands app = create_app(os.getenv('FLASK_CONFIG') or 'default') commands.register(app) @app.shell_context_processor def make_shell_context(): return dict(app=app, db=db)
Meisterschueler/ogn-python
ogn_python.py
Python
agpl-3.0
221
#!/usr/bin/sage -python #from sage.rings.arith import * from sage.all import * to = 1.647 oo = 1.487 offense_home = 1.04287505917001 defense_home = 0.958887635874489 to = to*defense_home oo = oo*offense_home r = to/oo p = r/(1+r) q = 1-p #print p w25 = 0.0 for i in xrange(0, 24): w25 = w25 + binomial(24+i,...
octonion/volleyball-m
ncaa_pbp/sage/match.py
Python
mit
1,105
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
hradec/gaffer
python/GafferSceneUI/StandardAttributesUI.py
Python
bsd-3-clause
6,880
import numbers class IndexSet(object): def __init__(self): return def __getitem__(self, t): if t in self: return t else: raise KeyError("Time %.2f not in index set." % t) def __contains__(self, value): return False def __eq__(self, other): ...
dlsun/symbulate
symbulate/index_sets.py
Python
mit
1,353
import os import simplejson as json import datetime from utils.common import PageType, DbEngine from app.models import Base, SubredditPage, FrontPage def construct_rank_vectors(pages): rank_vectors = {} # {pid: {time: rank}} for page in pages: posts = json.loads(page.page_data) for i,post ...
c4fcm/CivilServant
app/time_on_page_script.py
Python
mit
3,564
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2016 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/pagesizes.py """This module defines a few common page sizes in points (1/72 inch). To be expanded to include things like l...
EduPepperPDTesting/pepper2013-testing
lms/djangoapps/reportlab/lib/pagesizes.py
Python
agpl-3.0
1,331
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import copy import locale import os from os.path import abspath, dirname, join from sys import platform from pelican.settings import (DEFAULT_CONFIG, DEFAULT_THEME, _printf_s_to_format_field, ...
iKevinY/pelican
pelican/tests/test_settings.py
Python
agpl-3.0
12,995
#!/usr/bin/python import time import threading class MovieWatcher(threading.Thread): def __init__ (self, frame_buffer, movie_length): self.last_time = self.current_milli_time() self.current_frame = 0 self.frame_buffer = frame_buffer self.movie_length = movie_length ...
meggers/pyflix
client/MovieWatcher.py
Python
mit
1,839
"""SCons.Tool.rpcgen Tool-specific initialization for RPCGEN tools. Three normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Found...
xifle/greensc
tools/scons/scons-local-2.0.1/SCons/Tool/rpcgen.py
Python
gpl-3.0
2,884
import ast import copy from datetime import datetime, timedelta import mock import os import shutil import util try: import unittest2 as unittest except ImportError: import unittest try: from itertools import ifilter as filter except ImportError: pass from testrail.api import API from testrail.helper...
travispavek/testrail-python
tests/test_api.py
Python
mit
31,201
""" This is the (unofficial) Python API for Yatedo.com Website. Using this code, you can manage to retrieve employees from a specific company """ import requests from bs4 import BeautifulSoup import re class YatedoAPI(object): """ YatedoAPI Main Handler """ _instance = None _verbose = False...
PaulSec/API-Yatedo
yatedoAPI.py
Python
mit
2,867
__author__ = 'jeff' from .list import ListPlugin Plugin = ListPlugin()
jeff-99/toolbox
toolbox/contrib/list/__init__.py
Python
isc
72
######################################################################## # Author: Stuart Paterson # eMail : Stuart.Paterson@cern.ch ######################################################################## """ The Watchdog class is used by the Job Wrapper to resolve and monitor the system CPU and memory consumed...
hgiemza/DIRAC
WorkloadManagementSystem/JobWrapper/WatchdogLinux.py
Python
gpl-3.0
4,153
# -*- coding: utf-8 -*- import json from django.conf import settings from django.http import HttpRequest, JsonResponse from catmaid.control.dvid.models import DVIDProjectStacks def projects(request:HttpRequest) -> JsonResponse: """ Returns a list of project objects that are visible for the requesting user an...
catmaid/CATMAID
django/applications/catmaid/control/dvid/project.py
Python
gpl-3.0
1,295
#!/usr/bin/env python import sys import rospy from ieee2015_end_effector_servos.srv import EE def mode_up_client(): rospy.wait_for_service('mode_up') try: mode_UP = rospy.ServiceProxy('mode_up', EE) resp1 = mode_UP() return resp1 print resp1 except rospy.ServiceException, e...
ufieeehw/IEEE2015
ros/ieee2015_servo_controller/ieee2015_end_effector_servos/nodes/client_up.py
Python
gpl-2.0
431
def merge(dbag, data): dbag[data['public_ip']] = data return dbag
MissionCriticalCloud/cosmic
cosmic-core/systemvm/patches/centos7/opt/cosmic/router/bin/databag/cs_public_ip_acl.py
Python
apache-2.0
74
from __future__ import absolute_import import six import pytest import base64 from sentry.utils.compat import mock from exam import fixture from six.moves.urllib.parse import urlencode, urlparse, parse_qs from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from ...
beeftornado/sentry
tests/sentry/web/frontend/test_auth_saml2.py
Python
bsd-3-clause
6,945
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class FshareVn(Account): __name__ = "FshareVn" __type__ = "account" __version__ = "0.14" __status__ = "testing" __description__ = """Fshare.vn account plugin""" __license__ = "GPLv3"...
joberreiter/pyload
module/plugins/accounts/FshareVn.py
Python
gpl-3.0
2,225
# -*- coding:utf8 -*- # File : _migrate.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 02/24/17 # # This file is part of TensorArtist. from .helper import wrap_varnode_func as _wrap_varnode_func from functools import wraps as _wraps import tensorflow as _tf def migrate_opr(name, tf_func): ...
vacancy/TensorArtist
tartist/nn/opr/migrate.py
Python
mit
4,991
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
nkhare/rockstor-core
src/rockstor/storageadmin/views/support.py
Python
gpl-3.0
4,633
#!/usr/bin/env python from argparse import ArgumentParser from salt_nanny import SaltNanny def get_args(): parser = ArgumentParser() parser.add_argument('host', type=str, help='Redis Host that stores salt returns.') parser.add_argument('minions', type=str, nargs='+', help='List of Highstated Minions') ...
vmadura/salt-nanny
saltnanny/salt_nanny_tool.py
Python
gpl-3.0
1,837
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-25 19:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20171125_1708'), ] operations = ...
gabrielnaoto/man_check_control
check/core/migrations/0006_auto_20171125_1744.py
Python
mit
641