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 (c) SAS Institute 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 w...
fedora-conary/conary
config/components/base/devellib.py
Python
apache-2.0
1,053
class Message: def __init__(self, x, y): self.x = x self.y = y self.messages = []
zb89/pyrogue
message.py
Python
unlicense
96
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from distutils.version import LooseVersion import django # These means "less than or equal to DJANGO_FOO_BAR" DJANGO_1_5 = LooseVersion(django.get_version()) < LooseVersion('1.6') DJANGO_1_6 = LooseVersion(django.get_version()) < LooseVersion('1.7') DJANGO_1_7 = Loos...
saeedsq/django-fancy-cronfield
fancy_cronfield/utils/compat/__init__.py
Python
bsd-3-clause
513
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
HaebinShin/tensorflow
tensorflow/python/kernel_tests/sparse_ops_test.py
Python
apache-2.0
27,450
from twisted.internet import reactor from twisted.internet import task from twisted.internet.defer import DeferredList from twisted.application import service import createmsg import sendmsg import time import urllib import logging import json import random class PitcherConfig(object): def __init__(self, filename)...
bobbynewmark/py-smtploadtest
smtploadtest/twistedPitcher.py
Python
gpl-2.0
4,482
#!/usr/bin/env python #!-*-coding:utf8 -*- import os import time import serial ser = serial.Serial('/dev/ttyUSB3',9600,8,'N',2,timeout = 1) #ser.write("1234") tx = [0]*201 rx = [0]*30 dd = [0]*28 save_data_sec4 = [] A = [0x0A for i in range(0,64)] B = [0x0A for i in range(0,64)] C = [0x0A for i in range(0,64)] D = [0x...
tanbotao5/Byte
byte_write/flash.py
Python
apache-2.0
33,303
# 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 # d...
jiahaoliang/group-based-policy
gbpservice/tests/contrib/nfp_service/reference_configurator/scripts/configure_fw_rules.py
Python
apache-2.0
3,922
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/pyre/pyre/idd/IDDService.py
Python
gpl-2.0
5,136
''' Backend independent higher level interfaces, common exceptions. ''' import decimal class JSONError(Exception): ''' Base exception for all parsing errors. ''' pass class IncompleteJSONError(JSONError): ''' Raised when the parser can't read expected data from a stream. ''' pass d...
catapult-project/catapult
third_party/ijson/ijson/common.py
Python
bsd-3-clause
4,589
"""Base classes for all plug-ins""" import os import imp import re from vb2py.utils import modulePath from vb2py.config import VB2PYConfig Config = VB2PYConfig() from vb2py import logger log = logger.getLogger("PlugInLoader") def loadAllPlugins(): """Load all plug-ins from the plug-in directory and return a l...
mvz/vb2py
vb2py/extensions.py
Python
bsd-3-clause
6,526
import urllib2 from HTMLParser import HTMLParser from traceback import print_exc from sys import stderr class _DeHTMLParser(HTMLParser): ''' 利用HTMLParse来解析网页元素 ''' def __init__(self): HTMLParser.__init__(self) self.img_links = [] def handle_starttag(self, tag, attrs): if tag == 'img': # print(attrs) ...
luoxufeiyan/python
burness/0013/get_photos.py
Python
mit
1,039
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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', 'status': ['prev...
le9i0nx/ansible
lib/ansible/modules/cloud/centurylink/clc_loadbalancer.py
Python
gpl-3.0
34,965
import syntax import re def icmp(expressionString, code): condition = re.findall("(?<=icmp)\s+" + icmpConditionsRegex().pattern, expressionString)[0]; # print expressionString # print "(?<=icmp)\s+" + icmpConditionsRegex().pattern; operations = compareOperations(); ...
purisc-group/purisc-python-compiler
control.py
Python
gpl-2.0
8,896
#!/usr/bin/env python ############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is par...
hjanime/VisTrails
scripts/convert_files/fix_file.py
Python
bsd-3-clause
2,386
# 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. from gpu_tests.gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class ScreenshotSyncExpectations(Gpu...
js0701/chromium-crosswalk
content/test/gpu/gpu_tests/screenshot_sync_expectations.py
Python
bsd-3-clause
547
#!/usr/bin/env python from setuptools import setup, find_packages TEST_REQUIRES = [ 'flexmock>=0.9.7', 'nose', 'coverage' ] INSTALL_REQUIRES = [ 'requests>=1.0.0', 'pycrypto>=2.5', 'python-dateutil>=1.5' ] setup( name='uber.py', version='1.0.3', author='Tal Shiri', author_ema...
xasos/text-a-ride
uber.py-master/setup.py
Python
mit
1,101
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/learn/python/learn/estimators/svm.py
Python
apache-2.0
8,847
from django.conf.urls import patterns, include, url from shortener import views urlpatterns = patterns('', url(r'^(?P<lid>[a-zA-Z0-9]+)$', views.redirect, name='link'), )
zorchenhimer/shorturl
shortener/urls_link.py
Python
bsd-2-clause
176
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The config file for importing Lund data into a database. Go to http://vamdc.tmy.se/doc/importing.html for understanding what happens below. """ import string from imptools.linefuncs import merge_cols_by_sep, constant # reading helper functions def get_bibtex(lineda...
cpe/VAMDC-VALD
nodes/lund/mapping_lund.py
Python
gpl-3.0
12,503
# Copyright (c) 2015 Mirantis 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, so...
japaniel/CloudFerry
cloudferrylib/scheduler/signal_handler.py
Python
apache-2.0
1,884
# -*- coding: utf-8 -*- from django.test import TestCase from djorm_expressions.base import SqlExpression, RawExpression, SqlFunction, AND, OR from djorm_pggeom.expressions import GeoExpression from djorm_pggeom.objects import Point, Circle, Box from .models import SomeObject, CircleObjectModel, BoxObjectModel clas...
niwinz/djorm-ext-pggeom
testing/pg_geometric/tests.py
Python
bsd-3-clause
6,042
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
petrvanblokland/Xierpa3
xierpa3/contributions/filibuster/content/event.py
Python
mit
4,687
from .postgresql import postgresqlToCSV from .plotutils import makeBarPlot from .plotutils import makeLinePlot
hamdikavak/python-data-utilities
datautils/__init__.py
Python
mit
110
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from peer import * class Dialog(Peer): Show = Pillow.In Hide = Pillow.In def __init__(self, room, dialog): Peer.__init__(self, room) self._dialog = dialog self._catch(Dialog.In.Show, self._show) ...
FreshXOpenSource/wallaby-base
wallaby/pf/peer/dialog.py
Python
bsd-2-clause
506
''' Created on 1 Dec 2016 @author: Jeremy Gooch Skeleton script. Execute script with -h parameter for usage ''' # --- LIBRARIES -------------------------------------------------------------- import argparse import logging import datetime import sys # --- FUNCTIONS ----------------------------------------...
goochjs/utilities
skeletons/skeleton.py
Python
bsd-3-clause
2,203
"""generated file, don't modify or your data will be lost""" try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: pass
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/logilab/__init__.py
Python
agpl-3.0
155
#!/usr/bin/env python import argparse import pwd import grp import sys import subprocess import json import os __author__ = "Anoop P Alias" __copyright__ = "Copyright Anoop P Alias" __license__ = "GPL" __email__ = "anoopalias01@gmail.com" installation_path = "/opt/nDeploy" # Absolute Installation Path if __nam...
AnoopAlias/XtendWeb
scripts/fix_domain_data_permission.py
Python
gpl-3.0
2,299
""" Serializer for user API """ from rest_framework import serializers from rest_framework.reverse import reverse from django.template import defaultfilters from courseware.access import has_access from student.models import CourseEnrollment, User from certificates.models import certificate_status_for_student, Certif...
jamiefolsom/edx-platform
lms/djangoapps/mobile_api/users/serializers.py
Python
agpl-3.0
4,109
from __future__ import unicode_literals from .responses import Route53 url_bases = ["https?://route53(.*).amazonaws.com"] def tag_response1(*args, **kwargs): return Route53().list_or_change_tags_for_resource_request(*args, **kwargs) def tag_response2(*args, **kwargs): return Route53().list_or_change_tags_f...
william-richard/moto
moto/route53/urls.py
Python
apache-2.0
1,227
#!/usr/bin/env python # -*- encoding: utf-8 -*- import math import random class matematica(object): # Iniciador def __init__(self): # \o/ encherLinguica = True # Angulos def sen(self, angulo): """ Desc: Retorna o seno de um ângulo em GRAUS numero = Fl...
SrMouraSilva/Academic-Projects
Técnico/P3/Introdução à programação/CidadeBela/cidadeBela.py/cidadeBela/matematica.py
Python
mit
2,972
from typing import List, Dict from collections import OrderedDict import os import json import subprocess import re from django.core.management.base import BaseCommand from FRS.config._cfg import ConfigValue from FRS.config.api import names as resnames from FRS.config import base from tastypie.resources import Resou...
FRC-RS/FRS
api/management/commands/generate_resource_interfaces.py
Python
mit
13,359
#!/usr/bin/env python # # Copyright 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 list...
youtube/cobalt
third_party/web_platform_tests/tools/pywebsocket/src/test/test_extensions.py
Python
bsd-3-clause
16,128
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2018 Smartsheet.com, 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....
smartsheet-platform/smartsheet-python-sdk
smartsheet/models/enums/operator.py
Python
apache-2.0
1,605
# Your postgres SQL database credentials for the deduper. # the PSQL_USER must have write access to the database PSQL_DB_NAME PSQL_IP = "server IP" PSQL_PASS = "password" PSQL_USER = "deduper" PSQL_DB_NAME = "deduper_db" # Directories to preload the hashes for in the BK tree. PRELOAD_DIRECTORIES = [] ma...
fake-name/IntraArchiveDeduplicator
settings.base.py
Python
bsd-3-clause
367
from django.shortcuts import render, get_object_or_404 from django.views.decorators.csrf import csrf_exempt import math @csrf_exempt def show(request): error = False if request.method == "POST": father_name = request.POST['father_name'] father_year = int(request.POST['father_year']) ...
ayeletdn/WordWiki
fatherson/views.py
Python
mit
867
# Scrapy settings BOT_NAME = 'favorites' FEED_EXPORTERS = { 'html': 'habra_favorites.exporters.HtmlItemExporter', } ITEM_PIPELINES = { 'habra_favorites.pipelines.FavoriteItemPipeline': 100, } SPIDER_MODULES = ['habra_favorites.spiders'] # Project settings HABRA_FAVORITES_DOMAINS = ['habrahabr.ru', 'geektime...
ykalchevskiy/habra-favorites
habra_favorites/settings.py
Python
mit
327
#!/usr/bin/python2.7 # Copyright 2010 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 l...
groschovskiy/personfinder
app/confirm_enable_notes.py
Python
apache-2.0
4,171
# -*- coding: utf-8 -*- # # Wyrm documentation build configuration file, created by # sphinx-quickstart on Fri Jun 28 11:37:55 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
venthur/wyrm
doc/conf.py
Python
mit
8,496
# Definition for binary tree with next pointer. # class TreeLinkNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: # @param root, a tree link node # @return nothing def connect(self, root): tail...
zqfan/leetcode
algorithms/117. Populating Next Right Pointers in Each Node II/solution.py
Python
gpl-3.0
627
# Copyright (c) Mathias Kaerlev 2011-2012. # This file is part of pyspades. # pyspades 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...
NateShoffner/PySnip
feature_server/run.py
Python
gpl-3.0
39,080
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
talon-one/talon_one.py
test/test_effect.py
Python
mit
2,317
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
sidzan/netforce
netforce_marketing/netforce_marketing/models/__init__.py
Python
mit
1,200
from datetime import datetime, timedelta from dateutil import parser as date_parser from decimal import Decimal import json from nose.tools import eq_, ok_, assert_raises import random as r import pytz from unittest import TestCase import warnings from tinymodel import( TinyModel, FieldDef, ) from tinymodel.u...
buzzfeed/tinymodel
test/model_internals_test.py
Python
mit
26,074
# 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 PyFnPy(PythonPackage): """Functional programming in Python: implementation of missing feat...
LLNL/spack
var/spack/repos/builtin/packages/py-fn-py/package.py
Python
lgpl-2.1
606
import os import sys import tempfile from fabric.api import run, sudo, env, local, hide, settings from fabric.contrib.files import append, exists from fabric.operations import put from fabric.tasks import Task from fab_deploy.functions import random_password from fab_deploy.base import postgres as base_postgres cla...
ff0000/red-fab-deploy
fab_deploy/ubuntu/postgres.py
Python
mit
4,676
#!/usr/bin/env python # coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help u...
is06/navitia
source/jormungandr/jormungandr/api.py
Python
agpl-3.0
3,491
from django.conf import settings from django.db.backends.postgresql.creation import DatabaseCreation class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_opts = 'GIST_GEOMETRY_OPS' def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for ...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.3/django/contrib/gis/db/backends/postgis/creation.py
Python
bsd-3-clause
2,845
# encoding: utf-8 from montague.structs import LoadableConfig from montague.vendor import reify from jinja2 import Environment from jinja2 import StrictUndefined import yaml import os import re import logging import sys logger = logging.getLogger(__name__) config_keys_re = re.compile(r'\{\{(?P<name>[\w\d\s]*)\}\}', ...
matthewnorman/pyramid_cli
pyramid_cli/config/yaml.py
Python
mit
3,941
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
nawawi/wkhtmltopdf
webkit/Source/ThirdParty/gyp/test/subdirectory/gyptest-SYMROOT-all.py
Python
lgpl-3.0
1,269
import logging import subprocess commands = { 'table': 'sudo pfctl -t %(table)s -T %(command)s %(ip)s', } class PFCtl(object): ## key: name, value: name of PF table ip_proxy_types = { 'tor': 'rdr_tor', 'squid': 'rdr_squid', } @classmethod def set_ip_proxy(cls, ip, proxy)...
procool/mygw
globals/libs/pfctl.py
Python
bsd-2-clause
773
from diamond.plugins import register_plugin, cb_decorator def plugin_applies(xpath): if xpath == "/my_root_element": return True else: return False @cb_decorator def handle_click(xml, xpath): print "xpath == ", xpath print "xml[0:80] == ", xml[0:80] print "Hello, world!" register_plugin(plugin_app...
FluidityProject/multifluids
libspud/diamond/plugins/test.py
Python
lgpl-2.1
348
# protoc plugin to map from FileDescriptorProtos to Envoy doc style RST. # See https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto # for the underlying protos mentioned in this file. See # https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html for Sphinx RST syntax. fro...
lyft/envoy
tools/protodoc/protodoc.py
Python
apache-2.0
30,836
from django.forms import widgets from rest_framework import serializers from epl.models import Teams, Stats, Teamrecord, Players, Games class TeamsSerializer(serializers.ModelSerializer): class Meta: model = Teams fields = '__all__' class TeamRecordSerializer(serializers.ModelSerializer): cla...
TeamEmily/Emily_server
epl/serializers.py
Python
mit
1,228
# 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...
briancurtin/python-openstacksdk
openstack/tests/unit/identity/v3/test_domain.py
Python
apache-2.0
1,693
#!/usr/bin/python # -*- coding: utf-8 -*- # # igorc - Copyright (C) 2013 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version ...
fabiand/igor
igor/common.py
Python
lgpl-2.1
2,998
# -*- coding: utf-8 -*- """ Tests the utilities for the Video Abstraction Layer """ from django.core.files.base import ContentFile from django.test import TestCase from edxval.utils import generate_file_content_hash, is_duplicate_file class UtilityTests(TestCase): """ Tests utility methods """ def te...
edx/edx-val
edxval/tests/test_utils.py
Python
agpl-3.0
1,681
#mistakes were made: #0. I hold "left-[0]" and "right[-1]" which is a bad idea. after adding left and right, #you can't know we should shrink left or right. #1. Alright, we don't know where to shrink, so I tried with a recursive way. Well, #obviously, this takes O(2^n) #http://www.cnblogs.com/zuoyuan/p/3699159.html <--...
lsingal/leetcode
python/array/3Sum.py
Python
mit
2,032
# -*- coding: utf-8 -*- """ Created on Mon Aug 10 11:10:38 2015 @author: boland """ from obspy import read import numpy as np import itertools import os import datetime import sqlite3 as lite from seissuite.misc.path_search import paths import pickle from pyseis.modules.rdreftekc import rdreftek, reftek2stream def ...
boland1992/SeisSuite
build/lib/seissuite/database/create_database.py
Python
gpl-3.0
13,267
# -*- coding: utf8 -*- # # Copyright (C) 2016 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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 # Licen...
ndp-systemes/odoo-addons
purchase_reception_by_order_line/__init__.py
Python
agpl-3.0
855
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. # --------- # General constants used in Cura # --------- DEFAULT_CURA_APP_NAME = "cura" DEFAULT_CURA_DISPLAY_NAME = "Ultimaker Cura" DEFAULT_CURA_VERSION = "master" DEFAULT_CURA_BUILD_TYPE = "" DEFAULT_CURA_DEBUG_MODE = Fal...
thopiekar/Cura
cura/ApplicationMetadata.py
Python
lgpl-3.0
1,990
""" Dialog to show final reduced data. """ #pylint: disable=bare-except from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np from PyQt5 import QtCore, QtWidgets import reflectivity_ui.interfaces.generated.ui_result_viewer import reflectivity_ui.interfac...
mdoucet/reflectivity_ui
reflectivity_ui/interfaces/result_viewer.py
Python
apache-2.0
6,512
#!/usr/bin/python # coding: utf-8 # Filename: smartplug-example.py # Description: Communicate with Hive/AlertMe devices via a XBee # Author: James Saunders [james@saunders-family.net] # Copyright: Copyright (C) 2017 James Saunders # License: MIT import serial import logging import time import sys sys.pa...
jamesleesaunders/PyAlertMe
scripts/smartplug-example.py
Python
mit
1,879
#!/usr/bin/env python # File created on 29 May 2011 from __future__ import division __author__ = "Jesse Stombaugh" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Jesse Stombaugh"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Jesse Stombaugh" __email__ = "jesse.stombaugh@colorado...
wasade/qiime
scripts/summarize_taxa_through_plots.py
Python
gpl-2.0
6,033
import argparse import ui.output def help_format_cloudcredgrab(prog): kwargs = dict() kwargs['width'] = ui.output.columns() kwargs['max_help_position'] = 34 format = argparse.HelpFormatter(prog, **kwargs) return (format) def parse(args): parser = argparse.ArgumentParser(prog="cloudcredgrab", ...
nil0x42/phpsploit
plugins/credentials/cloudcredgrab/plugin_args.py
Python
gpl-3.0
596
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # 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 Lice...
sonaht/ansible
lib/ansible/modules/net_tools/exoscale/exo_dns_domain.py
Python
gpl-3.0
7,820
#!/usr/bin/python #------------------------------------------------------------------------------ # # Copyright (C) 2016 Cisco Systems, 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 Fou...
ios-xr/iosxr-ansible
local/library/iosxr_get_facts.py
Python
gpl-3.0
2,737
# distromatch - Match binary package names across distributions # # Copyright (C) 2011 Enrico Zini <enrico@enricozini.org> # # 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 ...
spanezz/distromatch
dmatch/distro.py
Python
gpl-3.0
8,901
import sys import re import json import pickle import netrc import logging import requests from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC __all__ = ['Session', 'get_sess...
tubaman/google-analytics-scraper
gascrape.py
Python
mit
4,492
from django.template import Library from ...core.utils import get_country_name_by_code register = Library() @register.simple_tag def get_formset_form(formset, index): return formset.forms[index] @register.simple_tag def get_country_by_code(country_code): return get_country_name_by_code(country_code)
UITools/saleor
saleor/core/templatetags/dashboard.py
Python
bsd-3-clause
315
from __future__ import division from builtins import zip from builtins import next from builtins import range from past.builtins import basestring from builtins import object from itertools import chain import sympy from sympy.parsing.sympy_parser import ( parse_expr as sympy_parse, standard_transformations, conver...
INCF/lib9ML
nineml/abstraction/expressions/parser.py
Python
bsd-3-clause
16,465
from django.apps import AppConfig class WeixinConfig(AppConfig): name = 'weixin'
zhaogp/oxygen
weixin/apps.py
Python
mit
87
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2012 Canonical # # 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; version 3. # # This program is distributed in the hope that it will be useful, but...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/ubuntu-sso-client/ubuntu_sso/keyring/linux.py
Python
mit
5,583
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement from tornado.escape import utf8, _unicode from tornado import gen from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy from tornado import httputil from tornado.http1connection...
tao12345666333/tornado-zh
tornado/simple_httpclient.py
Python
mit
23,983
from django.http import HttpResponse from django.middleware.csrf import get_token from django.template import Context, RequestContext, Template from django.template.context_processors import csrf from django.views.decorators.csrf import ensure_csrf_cookie def post_form_view(request): """Return a POST form (withou...
wkschwartz/django
tests/csrf_tests/views.py
Python
bsd-3-clause
1,236
# Copyright 2009-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
jhajek/euca2ools
euca2ools/commands/bundle/downloadbundle.py
Python
bsd-2-clause
3,655
from mpi4py import MPI from pySDC.helpers.stats_helper import filter_stats, sort_stats from pySDC.implementations.controller_classes.controller_MPI import controller_MPI from pySDC.implementations.collocation_classes.gauss_radau_right import CollGaussRadau_Right from pySDC.implementations.problem_classes.HeatEquation_...
Parallel-in-Time/pySDC
pySDC/playgrounds/compression/run_parallel_Heat_NumPy.py
Python
bsd-2-clause
4,544
# -*- coding: utf-8 -*- """Some shared utility functions for manipulating group data.""" from __future__ import unicode_literals import re GROUPID_PATTERN = r"^group:([a-zA-Z0-9._\-+!~*()']{1,1024})@(.*)$" def split_groupid(groupid): """Return the ``authority_provided_id`` and ``authority`` from a ``groupid`` ...
tgbugs/hypush
hyputils/memex/util/group.py
Python
mit
985
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
sparkslabs/kamaelia
Sketches/MH/Timer/Ticker.py
Python
apache-2.0
16,177
#!/usr/bin/python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de> # # 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 y...
odahoda/noisicaa
noisidev/uitest.py
Python
gpl-2.0
17,659
from itertools import izip, chain, repeat from grid.models import Grid def grouper(n, iterable, padvalue=None): "grouper(3, 'abcdefg', 'x') --> ('a','b','c'), ('d','e','f'), ('g','x','x')" return izip(*[chain(iterable, repeat(padvalue, n-1))]*n) def grid_headers(request): grid_headers = list(Grid.objec...
miketheman/opencomparison
grid/context_processors.py
Python
mit
430
########################################################################## # # Copyright (c) 2015, 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...
lucienfostier/gaffer
python/GafferUI/LazyMethod.py
Python
bsd-3-clause
5,330
import unittest, time, sys, random, math, json sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_hosts, h2o_import as h2i, h2o_common import socket print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" DO_KMEANS = True # assumes ...
woobe/h2o
py/testdir_release/c5/test_c5_KMeans_sphere_26GB.py
Python
apache-2.0
6,840
""" Interprocess SYS V message queue implementation. """ from .serializers import PickleSerializer try: import Queue as queue except ImportError: import queue from ipcqueue._sysvmq import ffi, lib __all__ = ['QueueError', 'Queue'] class QueueError(Exception): """ Indicates Queue error. Contains ad...
seifert/ipcqueue
ipcqueue/sysvmq.py
Python
bsd-3-clause
6,678
import os import sys import codecs import setuptools VERSION = open('VERSION').read().strip() packages = ['cancat','cancat/vstruct'] mods = [] pkgdata = {} scripts = ['CanCat', 'J1939Cat', 'canmap', 'cancat2candump', 'cancat2pcap', 'candump2cancat'] dirn = os.path.abspath(os.path.dirname(__file__)) with open(os.path....
atlas0fd00m/CanCat
setup.py
Python
bsd-2-clause
2,149
import django from django.utils.translation import ugettext_lazy as _ from django.db import models from cms.models import CMSPlugin from cms.models.fields import PageField from filer.fields.image import FilerImageField from filer.utils.compatibility import python_2_unicode_compatible from .conf import settings from cms...
Venturi/oldcms
env/lib/python2.7/site-packages/cmsplugin_filer_teaser/models.py
Python
apache-2.0
2,447
import Image import json south = 51.416; north = 51.623; west = -0.415; east = 0.179; if __name__ == "__main__": x = Image.fromstring("RGBA", (2668,1494), open("output_pixel_data").read()) x.save("lit-map.png", "PNG")
samphippen/london
render.py
Python
mit
232
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-01-31 03:12 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0006_auto_20170131_0257'), ] operations = [ migrations.AddField( ...
skylifewww/pangolin-fog
content/migrations/0007_slide_ishorizont.py
Python
mit
478
from attrdict import AttrDict config = AttrDict({ 'camera_info': { 'focal_length_x':0.97428, 'focal_length_y':1.73205, 'image_width': 800, 'image_height': 600 }, 'light_positions': [ (1148.56, 1184.65), (1559.2, 1158.43), (2122.14, 1526.79), (2175.237...
shernshiou/CarND
Term3/03-CarND-Capstone/ros/src/tl_detector/traffic_light_config.py
Python
mit
448
#!/usr/bin/env python import crfsuite import sys def instances(fi): xseq = crfsuite.ItemSequence() for line in fi: line = line.strip('\n') if not line: # An empty line presents an end of a sequence. yield xseq xseq = crfsuite.ItemSequence() con...
arne-cl/rst_discourse_parser
tools/crfsuite/crfsuite-0.12/swig/python/sample_tag.py
Python
bsd-2-clause
1,487
import itertools import os import re from midx.brokers import get_broker from midx.scanner import Scanner, parse_path from midx.sequence import Sequence class Index(object): def __init__(self, url): self.broker = get_broker(url) def scan(self, root): root = os.path.abspath(root) key...
mikeboers/midx
midx/index.py
Python
bsd-3-clause
867
from datetime import datetime import os from pyramid.config import Configurator from pyramid.decorator import reify from pyramid.request import Request from pyramid.security import ( Allow, Authenticated, ) from pyramid.authorization import ACLAuthorizationPolicy from sqlalchemy import engine_from_config impo...
ChatNode/PerpetualFailure
perpetualfailure/__init__.py
Python
gpl-2.0
4,653
from tehbot.plugins import * import threading import time class PrivPlugin(StandardCommand): def __init__(self, db): StandardCommand.__init__(self, db) self.parser.add_argument("-p", "--password", nargs=1) def commands(self): return "priv" def execute_parsed(self, connection, even...
tehron/tehbot
tehbot/plugins/core.py
Python
mit
3,427
#!/usr/bin/env python # -*- coding: utf-8 -*- """ gateway tests - Testing speed of using Blitz gateway for various queries particularly checking whether lazy loading can hurt performance vv loading graphs. Copyright (C) 2012 University of Dundee & Open Microscopy Environmen...
bramalingam/openmicroscopy
components/tools/OmeroPy/test/gatewaytest/test_performance.py
Python
gpl-2.0
3,594
#!/usr/bin/env python # # Copyright 2007 Doug Hellmann. # # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and tha...
qilicun/python
python2/PyMOTW-1.132/PyMOTW/os/os_stat.py
Python
gpl-3.0
1,516
import os def root_dir(): """ :return: root folder path """ return os.path.dirname(os.path.abspath(__file__)) def db_path(db_name): if db_name == 'forecast': return os.path.join(root_dir(), "data", "forecast.sqlite") else: return None
JavierGarciaD/banking
definitions.py
Python
mit
279
# # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
sparkslabs/kamaelia_
Sketches/MPS/BugReports/FixTests/Axon/Axon/Microprocess.py
Python
apache-2.0
23,428
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
ted-ross/octo-nemesis
agent/agent.py
Python
apache-2.0
11,686
""" Django settings for <%= projectNameSnake %> project. Generated by 'yo kirigami-wagtail'. """ import os import sys import environ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) BASE_DIR = os.path.dirname(PROJECT_DIR) env = environ...
kirigamico/generator-kirigami-wagtail
generators/app/templates/project_name/settings.py
Python
mit
4,899
"""elasticache base URL and path.""" from .responses import ElastiCacheResponse url_bases = [ r"https?://elasticache\.(.+)\.amazonaws\.com", ] url_paths = { "{0}/$": ElastiCacheResponse.dispatch, }
spulec/moto
moto/elasticache/urls.py
Python
apache-2.0
209
""" Django settings for taggy project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import logging ...
michel-cf/Propeller-WebIDE
webide/settings.py
Python
lgpl-3.0
7,042