repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
iamarf/terminal-quest | linux_story/story/challenges/challenge_20.py | 1 | 5241 | #!/usr/bin/env python
# coding: utf-8
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU Gpl v2
#
# A chapter of the story
from linux_story.step_helper_functions import (
unblock_commands_with_mkdir_hint, unblock_cd_commands
)
from linux_story.story.terminals.te... | gpl-2.0 |
chosen1/namebench | nb_third_party/dns/rdtypes/ANY/NSEC3PARAM.py | 248 | 3161 | # Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
pgdr/ert | python/tests/gui/ide/test_ert_keywords.py | 1 | 13738 | from ert_gui.ide.keywords.definitions import IntegerArgument, StringArgument, BoolArgument, PathArgument, FloatArgument , PercentArgument
from ert_gui.ide.keywords import ErtKeywords
from ert_gui.ide.keywords.definitions.proper_name_argument import ProperNameArgument
from ert_gui.ide.keywords.definitions.proper_name_fo... | gpl-3.0 |
SerialShadow/SickRage | lib/imdb/utils.py | 47 | 62277 | """
utils module (imdb package).
This module provides basic utilities for the imdb package.
Copyright 2004-2013 Davide Alberani <da@erlug.linux.it>
2009 H. Turgut Uyar <uyar@tekir.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | gpl-3.0 |
mitchelljkotler/django | django/contrib/gis/db/backends/spatialite/models.py | 510 | 2946 | """
The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.
"""
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin
from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper
from django.db import connection, models
from django.db.backends.signals import connectio... | bsd-3-clause |
avian2/unidecode | unidecode/x055.py | 1 | 4595 | data = (
'You ', # 0x00
'Yan ', # 0x01
'Gu ', # 0x02
'Gu ', # 0x03
'Bai ', # 0x04
'Han ', # 0x05
'Suo ', # 0x06
'Chun ', # 0x07
'Yi ', # 0x08
'Ai ', # 0x09
'Jia ', # 0x0a
'Tu ', # 0x0b
'Xian ', # 0x0c
'Huan ', # 0x0d
'Li ', # 0x0e
'Xi ', # 0x0f
'Tang ', # 0x10
'Zuo ', ... | gpl-2.0 |
davidmarin/scrape-campaigns | scrapers/hope4congo.py | 1 | 5323 | # Copyright 2014 SpendRight, 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 agree... | apache-2.0 |
pongem/python-bot-project | appengine/standard/ndb/transactions/main_test.py | 9 | 1363 | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
danieljaouen/ansible | lib/ansible/modules/network/f5/bigip_device_group.py | 6 | 17422 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
Pexego/odoo | addons/mrp/stock.py | 12 | 15977 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
cedricschaff/lockfile-p3k | doc/conf.py | 15 | 5675 | # -*- coding: utf-8 -*-
#
# lockfile documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 13 17:54:17 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickle... | mit |
Ensembles/ert | python/python/ert/enkf/enkf_state.py | 2 | 3487 | # Copyright (C) 2012 Statoil ASA, Norway.
#
# The file 'enkf_state.py' is part of ERT - Ensemble based Reservoir Tool.
#
# ERT 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 o... | gpl-3.0 |
tangledhelix/SublimeLinter-for-ST2 | sublimelinter/modules/ruby-lint.py | 9 | 1257 | import re
from base_linter import BaseLinter, INPUT_METHOD_TEMP_FILE
CONFIG = {
'language': 'ruby-lint',
'executable': 'ruby-lint',
'lint_args': '{filename}',
'input_method': INPUT_METHOD_TEMP_FILE
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnderlines, violatio... | mit |
cevaris/pants | src/python/pants/base/worker_pool.py | 11 | 8562 | # 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 multiprocessi... | apache-2.0 |
derekjchow/models | research/object_detection/dataset_tools/oid_tfrecord_creation_test.py | 3 | 7258 | # Copyright 2017 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... | apache-2.0 |
BlindHunter/django | tests/from_db_value/tests.py | 399 | 1075 | from django.db import connection
from django.db.models import Max
from django.test import TestCase
from .models import Cash, CashModel
class FromDBValueTest(TestCase):
def setUp(self):
CashModel.objects.create(cash='12.50')
def test_simple_load(self):
instance = CashModel.objects.get()
... | bsd-3-clause |
Yingmin-Li/pyspider | tests/test_bench.py | 73 | 1272 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2014-12-10 01:34:09
import os
import sys
import time
import click
import shutil
import inspect
import unittest2 as unittest
from pyspider import run
fro... | apache-2.0 |
geneyeung/linux-3.10.17 | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
cpollard1001/FreeCAD_sf_master | src/Mod/Path/PathScripts/PathProfile.py | 16 | 15164 | # -*- coding: utf-8 -*-
#***************************************************************************
#* *
#* Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
#* ... | lgpl-2.1 |
40223135/40223135- | static/Brython3.1.0-20150301-090019/Lib/ui/slider.py | 603 | 2394 | from . import widget
from browser import doc,html
class Slider(widget.Widget):
def __init__(self, id=None, label=False):
self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all")
widget.Widget.__init__(self, self._div_shell, 'slider', id)
self._h... | gpl-3.0 |
jirikuncar/invenio | invenio/legacy/miscutil/solrutils_bibindex_searcher.py | 13 | 3946 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 |
lionell/laboratories | nlp/fp.py | 2 | 2944 | #!/usr/bin/env python3
import argparse
import re
def read_file(filename):
with open(filename) as f:
lines = f.readlines()
text = ''.join(map(lambda l: re.sub('//.*', '', l), lines))
return process(text)
def process(text):
text = remove_whitespaces(text)
text = re.sub('/\*.*\*/', '', text)... | mit |
charany1/Bookie | bookie/tests/test_api/test_base_api.py | 6 | 48497 | """Test that we're meeting delicious API specifications"""
# Need to create a new renderer that wraps the jsonp renderer and adds these
# heads to all responses. Then the api needs to be adjusted to use this new
# renderer type vs jsonp.
import json
import logging
import os
import transaction
import unittest
from pyram... | agpl-3.0 |
bioidiap/bob.db.avspoof | bob/db/avspoof/models.py | 1 | 8397 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pavel Korshunov <pavel.korshunov@idiap.ch>
# Wed 19 Aug 13:43:50 2015
"""Table models and functionality for the AVSpoof DB.
"""
import os
from sqlalchemy import Table, Column, Integer, String, ForeignKey
from bob.db.base.sqlalchemy_migration import Enum, relatio... | bsd-3-clause |
codez266/codez266.github.io | markdown_generator/talks.py | 2 | 4111 |
# coding: utf-8
# # Talks markdown generator for academicpages
#
# Takes a TSV of talks with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/w... | mit |
sssllliang/silverberry | lib/google/protobuf/internal/well_known_types_test.py | 42 | 28037 | #! /usr/bin/env python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | apache-2.0 |
googleads/google-ads-python | google/ads/googleads/v6/enums/types/click_type.py | 1 | 2991 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
jordigh/mercurial-crew | tests/test-ui-config.py | 7 | 3619 | from mercurial import ui, dispatch, error
testui = ui.ui()
parsed = dispatch._parseconfig(testui, [
'values.string=string value',
'values.bool1=true',
'values.bool2=false',
'values.boolinvalid=foo',
'values.int1=42',
'values.int2=-42',
'values.intinvalid=foo',
'lists.list1=foo',
'li... | gpl-2.0 |
Neamar/django | django/conf/project_template/project_name/settings.py | 271 | 3288 | """
Django settings for {{ project_name }} project.
Generated by 'django-admin startproject' using Django {{ django_version }}.
For more information on this file, see
https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.c... | bsd-3-clause |
Pwex/comunity | assets/bower_components/jvectormap/converter/simplifier.py | 234 | 5985 | import argparse
import sys
import os
from osgeo import ogr
from osgeo import osr
import anyjson
import shapely.geometry
import shapely.ops
import codecs
import time
format = '%.8f %.8f'
tolerance = 0.01
infile = '/Users/kirilllebedev/Maps/50m-admin-0-countries/ne_50m_admin_0_countries.shp'
outfile = 'map.shp'
# Open... | mit |
gemmaan/moviesenal | Hasil/Lib/site-packages/pip/basecommand.py | 341 | 11910 | """Base Command class, and related routines"""
from __future__ import absolute_import
import logging
import os
import sys
import optparse
import warnings
from pip import cmdoptions
from pip.index import PackageFinder
from pip.locations import running_under_virtualenv
from pip.download import PipSession
from pip.excep... | mit |
Sir-Henry-Curtis/Ironworks | lib/flask/templating.py | 19 | 4417 | # -*- coding: utf-8 -*-
"""
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import posixpath
from jinja2 import BaseLoader, Environment as BaseEnvironment, \
TemplateNotFound
from .glo... | mit |
matiasb/django | django/core/exceptions.py | 486 | 5276 | """
Global Django exception and warning classes.
"""
from django.utils import six
from django.utils.encoding import force_text
class FieldDoesNotExist(Exception):
"""The requested model field does not exist"""
pass
class DjangoRuntimeWarning(RuntimeWarning):
pass
class AppRegistryNotReady(Exception):
... | bsd-3-clause |
jackey-qiu/genx | lib/Simplex.py | 3 | 9921 | #!/usr/bin/env python
#
# -*- Mode: python -*-
#
# $Id: Simplex.py,v 1.2 2004/05/31 14:01:06 vivake Exp $
#
# Copyright (c) 2002-2004 Vivake Gupta (vivakeATlab49.com). All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License ... | gpl-3.0 |
zrhans/pythonanywhere | .virtualenvs/django19/lib/python3.4/site-packages/cycler.py | 2 | 8289 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from itertools import product
from six.moves import zip, reduce
from operator import mul, add
import copy
__version__ = '0.9.0'
def _process_keys(left, right):
"""
Helper function to compo... | apache-2.0 |
miguelgrinberg/Flask-Bouncer | example/app.py | 1 | 2958 | import os
from flask import Flask, render_template
from flask.ext.bootstrap import Bootstrap
from flask.ext.bouncer import Bouncer, UserAuthMixin, current_user, login_required, fresh_login_required
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SECRET_KEY'] = 'the quick brown fox jumps o... | mit |
ppiotr/Invenio | modules/webmessage/lib/webmessage_dblayer.py | 31 | 22911 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of t... | gpl-2.0 |
LinusU/ansible | lib/ansible/inventory/dir.py | 24 | 12561 | # (c) 2013, Daniel Hokka Zakrisson <daniel@hozac.com>
# (c) 2014, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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, ... | gpl-3.0 |
qedi-r/home-assistant | homeassistant/components/tahoma/switch.py | 5 | 3421 | """Support for Tahoma switches."""
import logging
from homeassistant.components.switch import SwitchDevice
from homeassistant.const import STATE_OFF, STATE_ON
from . import DOMAIN as TAHOMA_DOMAIN, TahomaDevice
_LOGGER = logging.getLogger(__name__)
ATTR_RSSI_LEVEL = "rssi_level"
def setup_platform(hass, config, a... | apache-2.0 |
hfp/libxsmm | scripts/libxsmm_specialized.py | 1 | 7745 | #!/usr/bin/env python3
###############################################################################
# Copyright (c) Intel Corporation - All rights reserved. #
# This file is part of the LIBXSMM library. #
# ... | bsd-3-clause |
lbishal/scikit-learn | examples/neighbors/plot_digits_kde_sampling.py | 108 | 2026 | """
=========================
Kernel Density Estimation
=========================
This example shows how kernel density estimation (KDE), a powerful
non-parametric density estimation technique, can be used to learn
a generative model for a dataset. With this generative model in place,
new samples can be drawn. These... | bsd-3-clause |
ihidalgo/uip-prog3 | Parciales/practicas/kivy-designer-master/designer/select_class.py | 6 | 2417 | from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.popup import Popup
from kivy.uix.listview import ListView, ListItemButton
from kivy.properties import ObjectProperty
from kivy.adapters.listadapter import ListAdapter
from functools import partial
class SelectClass(BoxLayout):
... | mit |
danielshahaf/offlineimap | offlineimap/folder/LocalStatus.py | 5 | 5029 | # Local status cache virtual folder
# Copyright (C) 2002 - 2011 John Goerzen & contributors
#
# 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
# (a... | gpl-2.0 |
hpfem/agros2d | resources/python/logilab/astng/brain/py2stdlib.py | 25 | 4228 | """ASTNG hooks for the Python 2 standard library.
Currently help understanding of :
* hashlib.md5 and hashlib.sha1
"""
from logilab.astng import MANAGER
from logilab.astng.builder import ASTNGBuilder
MODULE_TRANSFORMS = {}
def hashlib_transform(module):
fake = ASTNGBuilder(MANAGER).string_build('''
class md5(... | gpl-2.0 |
wfxiang08/ansible | v1/ansible/runner/action_plugins/fail.py | 161 | 1472 | # Copyright 2012, Dag Wieers <dag@wieers.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versi... | gpl-3.0 |
pinaky/utilities | hangoutswordcount/hangoutswordcount.py | 1 | 2775 | # This program reads in a Google Hangouts JSON file and produces a wordcount
# Author: Pinaky Bhattacharyya
import json # JSON to handle Google's format
import re # regular expressions
# CHANGE THIS. For linux/mac, use '/home/user/restofpath/'
basepath = 'C:\\Users\\Pinaky\\Desktop\\cesmd\\gmail_han... | mit |
Royal-Society-of-New-Zealand/NZ-ORCID-Hub | orcid_api_v3/models/funding_group_v30_rc1.py | 1 | 5385 | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | mit |
openstack/sahara | sahara/db/migration/alembic_migrations/versions/023_add_use_autoconfig.py | 7 | 1321 | # Copyright 2015 OpenStack Foundation.
#
# 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 ... | apache-2.0 |
jonyroda97/redbot-amigosprovaveis | lib/future/types/newdict.py | 70 | 3108 | """
A dict subclass for Python 2 that behaves like Python 3's dict
Example use:
>>> from builtins import dict
>>> d1 = dict() # instead of {} for an empty dict
>>> d2 = dict(key1='value1', key2='value2')
The keys, values and items methods now return iterators on Python 2.x
(with set-like behaviour on Python 2.7).... | gpl-3.0 |
gtko/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/udemy.py | 18 | 5783 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
compat_urllib_parse,
compat_urllib_request,
ExtractorError,
)
class UdemyIE(InfoExtractor):
IE_NAME = 'udemy'
_VALID_URL = r'https?://www\.udemy\.com/(?:[^#]+#/lecture/|lecture/view/?\?lectu... | gpl-3.0 |
JanDintel/ansible | test/units/executor/test_play_iterator.py | 58 | 4067 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
JsNoNo/scikit-learn | sklearn/manifold/mds.py | 257 | 15138 | """
Multi-dimensional Scaling (MDS)
"""
# author: Nelle Varoquaux <nelle.varoquaux@gmail.com>
# Licence: BSD
import numpy as np
import warnings
from ..base import BaseEstimator
from ..metrics import euclidean_distances
from ..utils import check_random_state, check_array, check_symmetric
from ..externals.joblib impo... | bsd-3-clause |
amandersillinois/landlab | tests/grid/test_raster_grid/test_nodes.py | 3 | 4165 | import numpy as np
import pytest
from numpy.testing import assert_array_equal
from landlab import RasterModelGrid
def test_nodes_at_left_edge():
"""Test nodes at left edge of raster grid."""
grid = RasterModelGrid((3, 4))
assert_array_equal(grid.nodes_at_left_edge, np.array([0, 4, 8], dtype=np.int))
... | mit |
DataONEorg/d1_python | test_utilities/src/d1_test/stress_tester/projects/_unit_test_bases_for_stress_tests/tier_1_mn_core_ping.py | 1 | 1258 | #!/usr/bin/env python
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 |
kubeflow/pipelines | samples/core/resource_spec/resource_spec.py | 1 | 1625 | # Copyright 2020-2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 |
sankha93/servo | tests/wpt/web-platform-tests/tools/pytest/testing/test_tmpdir.py | 173 | 6017 | import sys
import py
import pytest
from _pytest.tmpdir import tmpdir
def test_funcarg(testdir):
testdir.makepyfile("""
def pytest_generate_tests(metafunc):
metafunc.addcall(id='a')
metafunc.addcall(id='b')
def test_func(tmpdir): pass
""")
from _pytes... | mpl-2.0 |
inirudebwoy/flask-tuts | app.py | 1 | 3159 | from flask import Flask, jsonify, abort, make_response, request, url_for
from flask.ext.httpauth import HTTPBasicAuth
auth = HTTPBasicAuth()
app = Flask(__name__)
tasks = [
{
'id': 1,
'title': u'Buy groceries',
'description': u'Milk, Cheese, Pizza, Fruit, Tylenol',
'done': False
... | gpl-2.0 |
hryamzik/ansible | lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py | 7 | 35940 | #!/usr/bin/python
#
# Copyright (c) 2016 Sertac Ozercan, <seozerca@microsoft.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 = {'metadata_version': '1.1',
... | gpl-3.0 |
fxfitz/ansible | lib/ansible/modules/cloud/google/gcp_compute_global_address.py | 8 | 10847 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 |
kyvinh/home-assistant | homeassistant/components/notify/twilio_sms.py | 6 | 1936 | """
Twilio SMS platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.twilio_sms/
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.notify import... | apache-2.0 |
dylanlesko/youtube-dl | test/test_InfoExtractor.py | 104 | 2243 | #!/usr/bin/env python
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL
from youtube_dl.extractor.common import InfoExtractor
from youtube_dl.extractor i... | unlicense |
superberny70/plugin.video.pelisalacarta-3-9X | servers/watchfreeinhd.py | 44 | 1983 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para watchfreeinhd
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core... | gpl-3.0 |
jmr0/servo | tests/wpt/css-tests/tools/html5lib/html5lib/html5parser.py | 423 | 117297 | from __future__ import absolute_import, division, unicode_literals
from six import with_metaclass
import types
from . import inputstream
from . import tokenizer
from . import treebuilders
from .treebuilders._base import Marker
from . import utils
from . import constants
from .constants import spaceCharacters, ascii... | mpl-2.0 |
drbild/boto | boto/manage/server.py | 153 | 21863 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010 Chris Moyer http://coredumped.org/
#
# 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, incl... | mit |
qistoph/thug | hpfeeds/hpfeeds.py | 3 | 5079 | #!/usr/bin/env python
#
# hpfeeds.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | gpl-2.0 |
songmonit/CTTMSONLINE | addons/hr_contract/hr_contract.py | 302 | 5377 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
crazyleen/linux-source-3.2 | tools/perf/scripts/python/syscall-counts.py | 11181 | 1522 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
meletakis/collato | lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/tests/test_sandbox.py | 204 | 1724 | """develop tests
"""
import sys
import os
import shutil
import unittest
import tempfile
from setuptools.sandbox import DirectorySandbox, SandboxViolation
def has_win32com():
"""
Run this to determine if the local machine has win32com, and if it
does, include additional tests.
"""
if not sys.platfo... | gpl-2.0 |
EmpireProject/Empire | lib/modules/python/privesc/multi/bashdoor.py | 12 | 4019 | class Module:
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'bashdoor',
# list of one or more authors for the module
... | bsd-3-clause |
groovecoder/kuma | vendor/packages/logilab/common/optik_ext.py | 86 | 13451 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | mpl-2.0 |
cesargtz/YecoraOdoo | openerp/report/__init__.py | 380 | 1513 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
rob-metalinkage/django-gazetteer | gazetteer/fixtures/mapstory_nameevents_config.py | 1 | 2040 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
# do this when > 1.6!!!
# from django.db import migrations, models
from gazetteer.models import GazSource,GazSourceConfig,LocationTypeField,CodeFieldConfig,NameFieldConfig
from skosxl.models import Concept, Scheme, MapRelation
from gazetteer.settings imp... | cc0-1.0 |
sharifulgeo/networkx | networkx/algorithms/flow/tests/test_maxflow_large_graph.py | 49 | 4628 | # -*- coding: utf-8 -*-
"""Maximum flow algorithms test suite on large graphs.
"""
__author__ = """Loïc Séguin-C. <loicseguin@gmail.com>"""
# Copyright (C) 2010 Loïc Séguin-C. <loicseguin@gmail.com>
# All rights reserved.
# BSD license.
import os
from nose.tools import *
import networkx as nx
from networkx.algorithms... | bsd-3-clause |
bovenyan/hsa | hsa-python/config_parser/graph_xml_parser.py | 6 | 3156 | '''
Created on Jul 25, 2012
@author: Peyman Kazemian
'''
from xml.etree.ElementTree import ElementTree
from StringIO import StringIO
from HTMLParser import HTMLParser
from config_parser.cisco_router_parser import cisco_router
class graph_xml(object):
def __init__(self):
self.graph_xml_namespace = "http://gr... | gpl-2.0 |
underbluewaters/marinemap | lingcod/spacing/models.py | 3 | 17201 | from django.contrib.gis.db import models
from django.contrib.gis import geos
from django.contrib.gis.measure import *
from django.core.files import File
from django.db import connection
from django.conf import settings
from lingcod.unit_converter.models import length_in_display_units, area_in_display_units
from ... | bsd-3-clause |
sidin/phishsense | api_emulator/OffloadedTasks.py | 1 | 1614 | import os
import pprint
import socket
import api_localsettings
class OffloadedTasks(object):
def __init__(self):
self.final_response = {}
self.uid = None
self.sha = None
self.analysis_url = None
self.download_path = None
self.analysis_stage = None
self.featu... | bsd-3-clause |
dignan/control | plugins/im-status/im-status/__init__.py | 2 | 10279 | # coding: utf-8
# vim: set et sw=2:
#
# Copyright (C) 2007-2008 - Vincent Untz
#
# 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, or (at your option)
# any later version.
#
# T... | gpl-2.0 |
MenZil/kuma | kuma/wiki/events.py | 4 | 2674 | import logging
from tower import ugettext as _
from kuma.core.email_utils import emails_with_users_and_watches
from kuma.core.helpers import add_utm
from kuma.core.urlresolvers import reverse
from tidings.events import InstanceEvent
from .helpers import revisions_unified_diff
from .models import Document
log = log... | mpl-2.0 |
pombredanne/invenio-old | modules/elmsubmit/lib/elmsubmit_html2txt.py | 4 | 5739 | # -*- coding: utf-8 -*-
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either versio... | gpl-2.0 |
petecummings/django | django/contrib/auth/tests/custom_user.py | 463 | 3662 | from django.contrib.auth.models import (
AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission,
PermissionsMixin, UserManager,
)
from django.db import models
# The custom User uses email as the unique identifier, and requires
# that every user provide a date of birth. This lets us test
# changes ... | bsd-3-clause |
DaniilLeksin/gc | wx/tools/Editra/src/syntax/_django.py | 3 | 4930 | ###############################################################################
# Name: django.py #
# Purpose: Define Django syntax for highlighting and other features #
# Author: Cody Precord <cprecord@editra.org> #
... | apache-2.0 |
robk5uj/invenio | modules/webstat/lib/webstat_engine.py | 3 | 92963 | ## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later ... | gpl-2.0 |
ChrisGoedhart/Uforia | source/django/contrib/gis/tests/geoapp/tests.py | 91 | 35402 | from __future__ import absolute_import
import re
from django.db import connection
from django.db.utils import DatabaseError
from django.contrib.gis import gdal
from django.contrib.gis.geos import (fromstr, GEOSGeometry,
Point, LineString, LinearRing, Polygon, GeometryCollection)
from django.contrib.gis.tests.util... | gpl-2.0 |
courtarro/gnuradio-wg-grc | gr-digital/python/digital/qa_mpsk_snr_est.py | 46 | 4077 | #!/usr/bin/env python
#
# Copyright 2011-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your optio... | gpl-3.0 |
nich/smart_sample_apps | direct_apps/lib/markdown2.py | 3 | 89591 | #!/usr/bin/env python
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
r"""A fast and complete Python implementation of Markdown.
[from http://daringfireball.net/projects/markdown/]
> Markdown is a text-to-HTML filter; it translates an easy-to-read /
> ea... | apache-2.0 |
jni/networkx | networkx/algorithms/centrality/eigenvector.py | 2 | 6958 | # coding=utf8
"""
Eigenvector centrality.
"""
# Copyright (C) 2004-2014 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = "\n".join(['Aric Hagberg (aric.hagberg@gmail.com)',
... | bsd-3-clause |
laperry1/android_external_chromium_org | tools/metrics/actions/PRESUBMIT.py | 55 | 1183 | # 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.
"""Presubmit script for actions.xml.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built... | bsd-3-clause |
dllsf/odootest | openerp/tools/float_utils.py | 151 | 9267 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
thirdwing/mxnet | example/rcnn/rcnn/symbol/proposal_target.py | 25 | 4760 | # 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
# "License"); you may not u... | apache-2.0 |
elkingtonmcb/sympy | sympy/simplify/trigsimp.py | 45 | 44003 | from __future__ import print_function, division
from collections import defaultdict
from sympy.core.cache import cacheit
from sympy.core import (sympify, Basic, S, Expr, expand_mul, factor_terms,
Mul, Dummy, igcd, FunctionClass, Add, symbols, Wild, expand)
from sympy.core.compatibility import ordered, reduce, ite... | bsd-3-clause |
tectronics/mythbox | resources/lib/simplejson/simplejson/tests/test_unicode.py | 123 | 2327 | from unittest import TestCase
import simplejson as json
class TestUnicode(TestCase):
def test_encoding1(self):
encoder = json.JSONEncoder(encoding='utf-8')
u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
s = u.encode('utf-8')
ju = encoder.encode(u)
js = en... | gpl-2.0 |
thor/django-localflavor | localflavor/generic/countries/sepa.py | 10 | 1214 | # -*- coding: utf-8 -*-
#: European Payments Council list of SEPA scheme countries as of 2 Sep 2015.
#: http://www.europeanpaymentscouncil.eu/index.cfm/knowledge-bank/epc-documents/epc-list-of-sepa-scheme-countries/
IBAN_SEPA_COUNTRIES = (
'AT', # Austria
'BE', # Belgium
'BG', # Bulgaria
'CH', # Sw... | bsd-3-clause |
xindus40223115/w16b_test | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/colordict.py | 621 | 24077 | ## pygame - Python Game Library
## Copyright (C) 2000-2003 Pete Shinners
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Library General Public
## License as published by the Free Software Foundation; either
## version 2 of the License, or (... | gpl-3.0 |
Insality/pyrox | src/scenes/game/camera.py | 1 | 1440 | # coding: utf-8
__author__ = 'Insality'
from src.constants import *
import cocos
from src.log import log
class Camera(cocos.layer.Layer):
is_event_handler = True
def __init__(self, position, obj=None):
super(Camera, self).__init__()
log("Initialize Camera object")
self.position = posi... | gpl-2.0 |
dkillick/iris | lib/iris/tests/test_ff.py | 5 | 8435 | # (C) British Crown Copyright 2010 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | lgpl-3.0 |
vrenaville/hr | __unported__/hr_wage_increment/__openerp__.py | 26 | 1798 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# 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... | agpl-3.0 |
ernesto-g/micropython | tests/run-tests-exp.py | 57 | 2697 | #
# This is minimal MicroPython variant of run-tests script, which uses
# .exp files as generated by run-tests --write-exp. It is useful to run
# testsuite on systems which have neither CPython3 nor unix shell.
# This script is intended to be run by the same interpreter executable
# which is to be tested, so should use... | mit |
niboshi/chainer | tests/chainer_tests/dataset_tests/tabular_tests/dummy_dataset.py | 5 | 1382 | import numpy as np
import chainer
from chainer import testing
class DummyDataset(chainer.dataset.TabularDataset):
def __init__(
self, size=10, keys=('a', 'b', 'c'), mode=tuple,
return_array=False, callback=None, convert=False):
if mode is None:
keys = keys[0],
... | mit |
katrid/django | django/core/exceptions.py | 486 | 5276 | """
Global Django exception and warning classes.
"""
from django.utils import six
from django.utils.encoding import force_text
class FieldDoesNotExist(Exception):
"""The requested model field does not exist"""
pass
class DjangoRuntimeWarning(RuntimeWarning):
pass
class AppRegistryNotReady(Exception):
... | bsd-3-clause |
photoninger/ansible | test/sanity/validate-modules/schema.py | 8 | 5641 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Matt Martz <matt@sivel.net>
# Copyright (C) 2015 Rackspace US, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.