repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
jzoldak/edx-platform | common/lib/xmodule/xmodule/error_module.py | 27 | 7612 | """
Modules that get shown to the users when an error has occurred while
loading or rendering other modules
"""
import hashlib
import logging
import json
import sys
from lxml import etree
from xmodule.x_module import XModule, XModuleDescriptor
from xmodule.errortracker import exc_info_to_str
from xblock.fields import... | agpl-3.0 |
halostatue/ansible | lib/ansible/plugins/connection/libvirt_lxc.py | 20 | 5220 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | gpl-3.0 |
erdc-cm/air-water-vv | 2d/benchmarks/flatPlate_wallFunctions/moveMesh_n.py | 11 | 1890 | from proteus.default_n import *
from proteus import (FemTools,
Quadrature,
TimeIntegration,
NumericalFlux,
NonlinearSolvers,
LinearSolvers)
import moveMesh_p as physics
from proteus import Context
ct = Context.get()... | mit |
huang4fstudio/django | tests/field_deconstruction/tests.py | 61 | 17839 | from __future__ import unicode_literals
from django.db import models
from django.test import SimpleTestCase, override_settings
from django.utils import six
class FieldDeconstructionTests(SimpleTestCase):
"""
Tests the deconstruct() method on all core fields.
"""
def test_name(self):
"""
... | bsd-3-clause |
rboyes/KerasScripts | CSVTrainer.py | 1 | 5321 | import os
import datetime
import sys
import time
import string
import random
import pandas as pd
import numpy as np
import gc
if(len(sys.argv) < 2):
print('Usage: CSVTrainer.py train.csv validation.csv model.h5 log.txt')
sys.exit(1)
trainingName = sys.argv[1]
validationName = sys.argv[2]
modelName = sys.... | apache-2.0 |
djabber/Dashboard | bottle/dash/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py | 744 | 6831 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
joshuahoman/vivisect | vivisect/analysis/crypto/constants.py | 5 | 2752 | import envi
from vivisect.const import *
"""Locate the basic use of known crypto constants"""
dh_group1 = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF".decode("hex")
dh... | apache-2.0 |
GoogleCloudPlatform/python-docs-samples | monitoring/api/v3/api-client/custom_metric_test.py | 1 | 3859 | #!/usr/bin/env python
# Copyright 2021 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 or ... | apache-2.0 |
gnychis/grforwarder | grc/base/Element.py | 34 | 3040 | """
Copyright 2008, 2009 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 ... | gpl-3.0 |
sighingnow/Spider-Utils | get-bing-pic/get_bing_pic.py | 1 | 1193 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'He Tao'
'''
This script is used to fetch the picture of bing's mainpage.
Author: He Tao, hetao@mail.com
Date: December 13, 2014
'''
import http.client
import re
from datetime import date
def get_bing_pic():
conn = http.client.HTTP... | mit |
akshatharaj/django | django/contrib/flatpages/models.py | 318 | 1556 | from __future__ import unicode_literals
from django.contrib.sites.models import Site
from django.core.urlresolvers import get_script_prefix
from django.db import models
from django.utils.encoding import iri_to_uri, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_... | bsd-3-clause |
richardcs/ansible | lib/ansible/modules/storage/emc/emc_vnx_sg_member.py | 27 | 4976 | #!/usr/bin/python
#
# Copyright (c) 2018, Luca 'remix_tj' Lorenzetto <lorenzetto.luca@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 = {
'metadata... | gpl-3.0 |
cngo-github/nupic | examples/opf/experiments/multistep/hotgym_best_tp_16K/description.py | 32 | 2789 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
Drooids/exercises-in-programming-style | 25-persistent-tables/tf-25.py | 17 | 2407 | #!/usr/bin/env python
import sys, re, string, sqlite3, os.path
#
# The relational database of this problem consists of 3 tables:
# documents, words, characters
#
def create_db_schema(connection):
c = connection.cursor()
c.execute('''CREATE TABLE documents (id INTEGER PRIMARY KEY AUTOINCREMENT, name)''')
c.... | mit |
pschmitt/home-assistant | homeassistant/components/concord232/binary_sensor.py | 6 | 4407 | """Support for exposing Concord232 elements as sensors."""
import datetime
import logging
from concord232 import client as concord232_client
import requests
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES,
PLATFORM_SCHEMA,
BinarySensorEntity,
)
from homeassista... | apache-2.0 |
hzlf/openbroadcast | website/filer/management/commands/import_files.py | 23 | 5493 | #-*- coding: utf-8 -*-
from django.core.files import File as DjangoFile
from django.core.management.base import BaseCommand, NoArgsCommand
from filer.models.filemodels import File
from filer.models.foldermodels import Folder
from filer.models.imagemodels import Image
from filer.settings import FILER_IS_PUBLIC_DEFAULT
f... | gpl-3.0 |
clemkoa/scikit-learn | sklearn/decomposition/sparse_pca.py | 22 | 10587 | """Matrix factorization with Sparse PCA"""
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
# License: BSD 3 clause
import warnings
import numpy as np
from ..utils import check_random_state, check_array
from ..utils.validation import check_is_fitted
from ..linear_model import ridge_regression
from ..base i... | bsd-3-clause |
kleientertainment/ds_mod_tools | pkg/win32/Python27/Lib/email/__init__.py | 61 | 2979 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""A package for parsing, handling, and generating email messages."""
__version__ = '4.0.3'
__all__ = [
# Old names
'base64MIME',
'Charset',
'Encoders',
'Errors',
'Generat... | mit |
DonBeo/statsmodels | statsmodels/graphics/tests/test_gofplots.py | 27 | 6814 | import numpy as np
from numpy.testing import dec
import statsmodels.api as sm
from statsmodels.graphics.gofplots import qqplot, qqline, ProbPlot
from scipy import stats
try:
import matplotlib.pyplot as plt
import matplotlib
have_matplotlib = True
except ImportError:
have_matplotlib = False
class Ba... | bsd-3-clause |
dreispt/todo_app | TodoClientApp/todo_odoorpc.py | 1 | 1127 | from odoorpc import ODOO
class TodoAPI():
def __init__(self, srv, port, db, user, pwd):
self.api = ODOO(srv, port=port)
self.api.login(db, user, pwd)
self.uid = self.api.env.uid
self.model = 'todo.task'
self.Model = self.api.env[self.model]
def execute(self, method, a... | agpl-3.0 |
cy/react-native-talk | node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py | 2710 | 5094 | # Copyright (c) 2012 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.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... | mit |
stianrh/askbot-nordic | askbot/migrations/0115_auto__chg_field_post_thread.py | 18 | 25846 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Post.thread'
db.alter_column('askbot_post', 'thread_id', self.gf('django.db.models.fields... | gpl-3.0 |
factorlibre/OCB | addons/mrp/wizard/mrp_workcenter_load.py | 381 | 2222 | # -*- 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 |
mgax/babel | babel/support.py | 1 | 22610 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause |
wilkeraziz/notebooks | MoL_June15/parser.py | 1 | 3853 | from cfg import read_grammar_rules, WCFG
from rule import Rule
from symbol import is_terminal, is_nonterminal, make_symbol
from collections import defaultdict
from item import Item
from agenda import Agenda
def cky_axioms(cfg, sentence):
"""
Axioms for CKY.
Inference rule:
--------------------... | apache-2.0 |
yochow/autotest | client/tests/cpu_hotplug/cpu_hotplug.py | 7 | 1474 | import time, os
from autotest_lib.client.bin import test, utils
from autotest_lib.client.common_lib import error
class cpu_hotplug(test.test):
version = 2
# http://developer.osdl.org/dev/hotplug/tests/lhcs_regression-1.6.tgz
def setup(self, tarball = 'lhcs_regression-1.6.tgz'):
tarball = utils.unm... | gpl-2.0 |
huijunwu/heron | heron/tools/admin/src/python/main.py | 1 | 5233 | # 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... | apache-2.0 |
HPPTECH/hpp_IOSTressTest | Refer/IOST_OLD_SRC/IOST_0.11/IOST_WMain_USB.py | 1 | 6648 | #!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST_WMain_USB.py
# Date : Oct 20, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copyright : 2016
# ... | mit |
Limags/MissionPlanner | Lib/smtplib.py | 50 | 31551 | #! /usr/bin/env python
'''SMTP/ESMTP client class.
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).
Notes:
Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords ... | gpl-3.0 |
xsixing/blaze | blaze/io/server/app.py | 10 | 6092 | from __future__ import absolute_import, division, print_function
import sys
import os
import flask
from flask import request, Response
import blaze
import datashape
from dynd import nd, ndt
from blaze.catalog.array_provider import json_array_provider
from blaze.catalog.blaze_url import (split_array_base, add_indexer... | bsd-3-clause |
johanvdw/python-shapely | tests/test_affinity.py | 7 | 11312 | from . import unittest
from math import pi
from shapely import affinity
from shapely.wkt import loads as load_wkt
from shapely.geometry import Point
class AffineTestCase(unittest.TestCase):
def test_affine_params(self):
g = load_wkt('LINESTRING(2.4 4.1, 2.4 3, 3 3)')
self.assertRaises(
... | bsd-3-clause |
black9/Nyan-Tuna-JB | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
obiben/profitpy | profit/workbench/accountdisplay.py | 18 | 4727 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2007 Troy Melhase <troy@gci.net>
# Distributed under the terms of the GNU General Public License v2
from PyQt4.QtCore import QAbstractTableModel, QSize, QVariant, Qt
from PyQt4.QtGui import QFrame, QStandardItemModel, QStandardItem
from profit.lib import Basi... | gpl-2.0 |
gacomm/VELVEEVA | lib/readconfig.py | 2 | 1157 | #!/usr/bin/env python3
import activate_venv
import json, sys, os
from functools import reduce
from veevutils import CONFIG_FILENAME
def focus(acc, new_key):
try:
if type(acc) == list:
focused = acc[int(new_key)]
elif type(acc) == dict:
focused = acc[new_key]
else:
raise TypeError("Cannot get subkey va... | bsd-3-clause |
jolove/monmale | machineLearningLibrary.py | 1 | 14267 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sklearn.cross_validation import train_test_split
from sklearn import linear_model
from sklearn import mixture
from sklearn import metrics
import logging
import sys, traceback, os
import uuid
import psutil
import getpass
import usefulLibraryFiles # Libreria pr... | apache-2.0 |
NoneGG/aredis | aredis/commands/server.py | 1 | 11696 | import datetime
from aredis.exceptions import RedisError
from aredis.utils import (b, bool_ok,
nativestr, dict_merge,
string_keys_to_dict,
list_keys_to_dict,
pairs_to_dict,
NodeFlag)
def p... | mit |
squidsoup/snapcraft | snapcraft/tests/commands/test_update.py | 9 | 3639 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the h... | gpl-3.0 |
Unsettled/eve-wspace | evewspace/Map/tasks.py | 10 | 4215 | # Eve W-Space
# Copyright 2014 Andrew Austin and contributors
#
# 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 requi... | apache-2.0 |
tfgraph/tfgraph | tfgraph/graph/graph.py | 1 | 12058 | import numpy as np
import tensorflow as tf
from tfgraph.utils.callbacks.update_edge_notifier import UpdateEdgeNotifier
from tfgraph.utils.tensorflow_object import TensorFlowObject, TF_type
def __str__(self) -> str:
return str(self.run_tf(self.L_tf))
class Graph(TensorFlowObject, UpdateEdgeNotifier):
""" Graph ... | apache-2.0 |
jlegendary/pybrain | pybrain/tools/plotting/fitnesslandscapes.py | 31 | 3853 | # some utility code for nicely plotting 3D images of function fitness landscapes.
__author__ = 'Tom Schaul, tom@idsia.ch'
from scipy import zeros, r_, cos, sin, pi, array, dot, sqrt, diag
from scipy.linalg import svd
from pylab import figure, plot, show, meshgrid, contour, savefig, colorbar
from pybrain.rl.environmen... | bsd-3-clause |
ManiacTwister/dionaea | modules/python/scripts/test.py | 11 | 2040 | #********************************************************************************
#* Dionaea
#* - catches bugs -
#*
#*
#*
#* Copyright (C) 2009 Paul Baecher & Markus Koetter
#*
#* This program is free software; you can redistribute it and/or
#* modify it under t... | gpl-2.0 |
dongweiming/code | tests/docs/test_docs.py | 3 | 9129 | from vilya.models.project import CodeDoubanProject
from vilya.models.sphinx_docs import SphinxDocs
import nose
from tests.base import TestCase
from tests.utils import delete_project
base_yaml_conf_old = """
sphinx_docs:
dir: ""
"""
base_yaml_conf = """
docs:
docs:
dir: ""
builder: pickle
"""
... | bsd-3-clause |
nelmiux/CarnotKE | jyhton/lib-python/2.7/lib-tk/tkFont.py | 146 | 6104 | # Tkinter font wrapper
#
# written by Fredrik Lundh, February 1998
#
# FIXME: should add 'displayof' option where relevant (actual, families,
# measure, and metrics)
#
__version__ = "0.9"
import Tkinter
# weight/slant
NORMAL = "normal"
ROMAN = "roman"
BOLD = "bold"
ITALIC = "italic"
def nametofont(name):
... | apache-2.0 |
Arcanemagus/SickRage | lib/chardet/hebrewprober.py | 289 | 13838 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... | gpl-3.0 |
PDuckworth/strands_qsr_lib | qsr_lib/src/qsrlib_qsrs/__init__.py | 7 | 1298 | from qsr_rcc2 import QSR_RCC2
from qsr_rcc3_rectangle_bounding_boxes_2d import QSR_RCC3_Rectangle_Bounding_Boxes_2D
from qsr_rcc4 import QSR_RCC4
from qsr_rcc5 import QSR_RCC5
from qsr_rcc8 import QSR_RCC8
from qsr_cardinal_direction import QSR_Cardinal_Direction
from qsr_qtc_b_simplified import QSR_QTC_B_Simplified
fr... | mit |
dxmahata/TwitterSentimentAnalysis | bson/dbref.py | 17 | 4971 | # Copyright 2009-2014 MongoDB, 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 writin... | mit |
rodrigolucianocosta/ProjectParking | ProjectParking/Parking/django-localflavor-1.1/tests/test_generic.py | 1 | 12114 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ValidationError, ImproperlyConfigured
from django.test import SimpleTestCase, TestCase
from django.utils import formats
from localflavor.generic.models import BICField, IBANField
from localflavor.generic.validators impo... | mpl-2.0 |
noobcoderT/ryu-3.21 | ryu/app/ofctl/event.py | 37 | 1645 | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... | apache-2.0 |
nprapps/dailygraphics | fabfile/flat.py | 1 | 2586 | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
import copy
from fnmatch import fnmatch
import hashlib
import mimetypes
import os
from boto.s3.key import Key
import app_config
import utils
def deploy_file(src, dst, headers={}):
"""
Deploy a single file to S3, if the local version is different.
"""
bucke... | mit |
resmo/ansible | lib/ansible/modules/remote_management/ucs/ucs_ntp_server.py | 64 | 4688 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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': ['preview'],
... | gpl-3.0 |
Ziqi-Li/bknqgis | numpy/numpy/core/tests/test_ufunc.py | 8 | 55288 | from __future__ import division, absolute_import, print_function
import warnings
import itertools
import numpy as np
import numpy.core.umath_tests as umt
import numpy.core.operand_flag_tests as opflag_tests
from numpy.core.test_rational import rational, test_add, test_add_rationals
from numpy.testing import (
run... | gpl-2.0 |
justin-ho/passwd-mng | pycrypto-2.6.1/lib/Crypto/Protocol/KDF.py | 123 | 5071 | #
# KDF.py : a collection of Key Derivation Functions
#
# Part of the Python Cryptography Toolkit
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is... | gpl-3.0 |
ceci/pygments-hack | pygments/styles/tango.py | 75 | 7096 | # -*- coding: utf-8 -*-
"""
pygments.styles.tango
~~~~~~~~~~~~~~~~~~~~~
The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.
http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
Butter: #fce94f #edd400 #c4a000
Orange: #fcaf3e ... | bsd-2-clause |
lzw120/django | django/contrib/gis/tests/geo3d/models.py | 404 | 1835 | from django.contrib.gis.db import models
class City3D(models.Model):
name = models.CharField(max_length=30)
point = models.PointField(dim=3)
objects = models.GeoManager()
def __unicode__(self):
return self.name
class Interstate2D(models.Model):
name = models.CharField(max_length=30)
l... | bsd-3-clause |
twz915/django | django/core/checks/security/sessions.py | 134 | 2558 | from django.conf import settings
from .. import Tags, Warning, register
def add_session_cookie_message(message):
return message + (
" Using a secure-only session cookie makes it more difficult for "
"network traffic sniffers to hijack user sessions."
)
W010 = Warning(
add_session_cookie... | bsd-3-clause |
rbarbe/qBittorrent | src/searchengine/nova/engines/kickasstorrents.py | 7 | 3165 | #VERSION: 1.28
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
#CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
# 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... | gpl-2.0 |
industrydive/mezzanine | mezzanine/blog/management/commands/import_blogger.py | 8 | 4375 | from __future__ import unicode_literals
from datetime import datetime, timedelta
from optparse import make_option
from time import timezone
import re
from django.core.management.base import CommandError
from mezzanine.blog.management.base import BaseImporterCommand
# TODO: update this to use v3 of the blogger API.... | bsd-2-clause |
mathspace/django | django/utils/feedgenerator.py | 22 | 17939 | """
Syndication feed generation library -- used for generating RSS, etc.
Sample usage:
>>> from django.utils import feedgenerator
>>> feed = feedgenerator.Rss201rev2Feed(
... title="Poynter E-Media Tidbits",
... link="http://www.poynter.org/column.asp?id=31",
... description="A group Weblog by the sharpes... | bsd-3-clause |
DolphinDream/sverchok | nodes/CAD/merge_mesh_2d.py | 2 | 4660 | # This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
import bpy
from sverchok.node_tr... | gpl-3.0 |
alhashash/odoo | addons/google_calendar/google_calendar.py | 4 | 50219 | # -*- coding: utf-8 -*-
import operator
import simplejson
import urllib2
import openerp
from openerp import tools
from openerp import SUPERUSER_ID
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, exception_to_unicode
from openerp.tools.translate import _
from openerp.http import ... | agpl-3.0 |
zhaishaomin/LDS-prefetcher-research | gem5_src/arch/x86/isa/insts/simd128/floating_point/arithmetic/horizontal_subtraction.py | 91 | 2160 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | apache-2.0 |
pavelchristof/gomoku-ai | tensorflow/python/ops/parsing_ops.py | 2 | 49651 | # 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... | apache-2.0 |
prutseltje/ansible | lib/ansible/modules/cloud/amazon/ecs_task.py | 18 | 13622 | #!/usr/bin/python
# Copyright: Ansible Project
# 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': ['preview'],
... | gpl-3.0 |
nels83/android_kernel_common | tools/perf/util/setup.py | 4998 | 1330 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
tarc/gyp | tools/graphviz.py | 2679 | 2878 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets... | bsd-3-clause |
eneldoserrata/marcos_openerp | oemedical/oemedical_his/__init__.py | 10 | 1141 | # -*- coding: utf-8 -*-
#/#############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>)
# Special Credit and Thanks to Thymbra Latinoamericana S.A.
#
# This program is free sof... | agpl-3.0 |
jballanc/openmicroscopy | components/tools/OmeroPy/test/unit/tablestest/test_servants.py | 3 | 11478 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test of the Tables facility independent of Ice.
Copyright 2009 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
import pytest
import Ice
import omero, omero.tables
import omero_ext.uuid as uuid # see ti... | gpl-2.0 |
jcpowermac/ansible | lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py | 42 | 13461 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# 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
DOCUMENTATION = '''
---
module: proxysql_replication_hostg... | gpl-3.0 |
Diblo/Pikaptcha | pikaptcha/console.py | 1 | 9224 | import argparse
import sys
import pikaptcha
from pikaptcha.ptcexceptions import *
from pikaptcha.tos import *
from pikaptcha.gmailv import *
from pikaptcha.url import *
from pgoapi.exceptions import AuthException, ServerSideRequestThrottlingException, NotLoggedInException
import pprint
import threading
import getopt
... | gpl-3.0 |
csaez/mauto | mauto/tests/main_tests.py | 1 | 1059 | import mauto
from nose import with_setup
def setup():
return mauto.new_macro("testsuite")
def setup_in_memory():
return mauto.new_macro("testsuite", save=False)
def teardown():
mauto.remove_macro("testsuite")
@with_setup(setup, teardown)
def test_list_macros():
return len(mauto.list_macros()) >=... | mit |
40223151/2015cd_midterm | static/Brython3.1.0-20150301-090019/Lib/xml/dom/expatbuilder.py | 733 | 35733 | """Facility to use the Expat parser to load a minidom instance
from a string or file.
This avoids all the overhead of SAX and pulldom to gain performance.
"""
# Warning!
#
# This module is tightly bound to the implementation details of the
# minidom DOM and can't be used with other DOM implementations. This
# is due... | gpl-3.0 |
eviljeff/olympia | src/olympia/stats/migrations/0001_initial.py | 6 | 3759 | # Generated by Django 2.2.5 on 2019-09-12 13:50
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields.json
import olympia.amo.fields
import olympia.stats.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('addons', '... | bsd-3-clause |
ScottBuchanan/eden | modules/s3db/deploy.py | 1 | 114755 | # -*- coding: utf-8 -*-
""" Sahana Eden Deployments Model
@copyright: 2011-2015 (c) Sahana Software Foundation
@license: MIT
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 w... | mit |
jayme-github/CouchPotatoServer | libs/chardet/mbcssm.py | 215 | 18214 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | gpl-3.0 |
rjshaver/bitcoin | qa/rpc-tests/test_framework/blockstore.py | 95 | 4447 | # BlockStore: a helper class that keeps a map of blocks and implements
# helper functions for responding to getheaders and getdata,
# and for constructing a getheaders message
#
from mininode import *
import dbm
class BlockStore(object):
def __init__(self, datadir):
self.blockDB = ... | mit |
minesense/VisTrails | contrib/titan/vtkviewcell.py | 6 | 38658 | ############################################################################
##
## Copyright (C) 2006-2010 University of Utah. All rights reserved.
##
## This file is part of VisTrails.
##
## This file may be used under the terms of the GNU General Public
## License version 2.0 as published by the Free Software Foundat... | bsd-3-clause |
tarasane/h2o-3 | h2o-py/h2o/h2o_model_builder.py | 8 | 5491 | from connection import H2OConnection
from frame import H2OFrame
from job import H2OJob
from model.model_future import H2OModelFuture
from model.dim_reduction import H2ODimReductionModel
from model.autoencoder import H2OAutoEncoderModel
from model.multinomial import H2OMultinomialModel
from model.regression ... | apache-2.0 |
apporc/cinder | cinder/keymgr/conf_key_mgr.py | 4 | 4816 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | apache-2.0 |
naslanidis/ansible | lib/ansible/modules/database/misc/redis.py | 25 | 10872 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... | gpl-3.0 |
gymnasium/edx-platform | common/djangoapps/enrollment/data.py | 6 | 10977 | """
Data Aggregation Layer of the Enrollment API. Collects all enrollment specific data into a single
source to be used throughout the API.
"""
import logging
from django.contrib.auth.models import User
from django.db import transaction
from opaque_keys.edx.keys import CourseKey
from six import text_type
from enrollm... | agpl-3.0 |
fengshao0907/twemproxy | tests/test_system/test_reload.py | 36 | 4879 | #!/usr/bin/env python
#coding: utf-8
#file : test_reload.py
#author : ning
#date : 2014-09-03 12:28:16
import os
import sys
import redis
PWD = os.path.dirname(os.path.realpath(__file__))
WORKDIR = os.path.join(PWD,'../')
sys.path.append(os.path.join(WORKDIR,'lib/'))
sys.path.append(os.path.join(WORKDIR,'conf/'))
... | apache-2.0 |
ASCrookes/django | django/core/management/commands/loaddata.py | 294 | 12977 | from __future__ import unicode_literals
import glob
import gzip
import os
import warnings
import zipfile
from itertools import product
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.b... | bsd-3-clause |
SublimeText/Pywin32 | lib/x32/win32com/demos/eventsApartmentThreaded.py | 10 | 3752 | # A sample originally provided by Richard Bell, and modified by Mark Hammond.
# This sample demonstrates how to use COM events in an aparment-threaded
# world. In this world, COM itself ensures that all calls to and events
# from an object happen on the same thread that created the object, even
# if they originated f... | bsd-3-clause |
ryangallen/django | django/contrib/gis/db/models/fields.py | 310 | 17126 | from django.contrib.gis import forms
from django.contrib.gis.db.models.lookups import gis_lookups
from django.contrib.gis.db.models.proxy import SpatialProxy
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geometry.backend import Geometry, GeometryException
from django.core.exceptions import Improp... | bsd-3-clause |
laborautonomo/poedit | deps/boost/tools/build/v2/test/conditionals_multiple.py | 38 | 13574 | #!/usr/bin/python
# Copyright 2008 Jurko Gospodnetic
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Tests that properties conditioned on more than one other property work as
# expected.
import BoostBuild
###... | mit |
lkhomenk/integration_tests | cfme/automate/dialogs/dialog_box.py | 6 | 1921 | import attr
from navmazing import NavigateToAttribute
from cached_property import cached_property
from cfme.modeling.base import BaseCollection, BaseEntity, parent_of_type
from cfme.utils.appliance.implementations.ui import navigator, CFMENavigateStep, navigate_to
from . import AddBoxView, BoxForm
from .dialog_eleme... | gpl-2.0 |
mrquim/mrquimrepo | repo/plugin.video.salts/salts_lib/cloudflare.py | 7 | 6746 |
#
# Copyright (C) 2015 tknorris (Derived from Mikey1234's & Lambda's)
#
# 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.
#
# ... | gpl-2.0 |
cesarmarinhorj/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/port/builders_unittest.py | 124 | 1909 | # Copyright (C) 2011 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 of conditions and the f... | bsd-3-clause |
KyoungRan/Django_React_ex | Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/django/core/checks/security/base.py | 45 | 6645 | from django.conf import settings
from .. import Tags, Warning, register
from ..utils import patch_middleware_message
SECRET_KEY_MIN_LENGTH = 50
SECRET_KEY_MIN_UNIQUE_CHARACTERS = 5
W001 = Warning(
"You do not have 'django.middleware.security.SecurityMiddleware' "
"in your MIDDLEWARE so the SECURE_HSTS_SECOND... | mit |
mantl/mantl | roles/collectd/files/zookeeper-collectd-plugin.py | 36 | 4447 | #! /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
# "... | apache-2.0 |
DavidNorman/tensorflow | tensorflow/python/ops/parallel_for/array_test.py | 1 | 11942 | # Copyright 2018 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 |
elsigh/browserscope | third_party/appengine_tools/devappserver2/start_response_utils_test.py | 10 | 2159 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
h3biomed/ansible | lib/ansible/plugins/action/raw.py | 152 | 1823 | # (c) 2012, 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) any lat... | gpl-3.0 |
kevclarx/ansible | lib/ansible/plugins/connection/paramiko_ssh.py | 11 | 18902 | # (c) 2012, 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) any lat... | gpl-3.0 |
rbaindourov/v8-inspector | Source/chrome/v8/tools/release/auto_roll.py | 22 | 4282 | #!/usr/bin/env python
# Copyright 2014 the V8 project 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 argparse
import json
import os
import sys
import urllib
from common_includes import *
import chromium_roll
class CheckActiv... | bsd-3-clause |
highco-groupe/odoo | addons/membership/wizard/__init__.py | 432 | 1071 | # -*- 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 |
mtfelix/ClusType | candidate_generation/FrequentPhraseMining/BitVector.py | 3 | 146371 | #!/usr/bin/env python
__version__ = '3.3.2'
__author__ = "Avinash Kak (kak@purdue.edu)"
__date__ = '2014-March-12'
__url__ = 'https://engineering.purdue.edu/kak/dist/BitVector-3.3.2.html'
__copyright__ = "(C) 2014 Avinash Kak. Python Software Foundation."
__doc__ = '''
BitVector.py
Version: ''' + __... | gpl-3.0 |
ip-tools/ip-navigator | patzilla/util/web/uwsgi/uwsgidecorators.py | 1 | 9668 | # https://github.com/unbit/uwsgi/blob/master/uwsgidecorators.py
from functools import partial
import sys
from threading import Thread
try:
import cPickle as pickle
except:
import pickle
import uwsgi
if uwsgi.masterpid() == 0:
raise Exception(
"you have to enable the uWSGI master process to use th... | agpl-3.0 |
r3tard/BartusBot | lib/Crypto/SelfTest/Protocol/test_rfc1751.py | 132 | 2208 | #
# Test script for Crypto.Util.RFC1751.
#
# Part of the Python Cryptography Toolkit
#
# Written by Andrew Kuchling and others
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is ... | apache-2.0 |
ericzundel/pants | tests/python/pants_test/backend/graph_info/tasks/test_list_owners.py | 15 | 3524 | # coding=utf-8
# Copyright 2015 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)
from textwrap import... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.