repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
SergiosKar/Deep-Learning-models | Double_Deep_Q_Netowrk.py | 1 | 4525 | import random
import gym
import numpy as np
from collections import deque
from tensorflow.contrib.keras.python.keras.models import Sequential
from tensorflow.contrib.keras.python.keras.layers import Dense
from tensorflow.contrib.keras.python.keras.optimizers import Adam
from tensorflow.contrib.keras.python.keras... | mit |
MarcosCommunity/odoo | addons/note/tests/__init__.py | 260 | 1076 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
mattesno1/CouchPotatoServer | libs/caper/helpers.py | 81 | 2210 | # Copyright 2013 Dean Gardiner <gardiner91@gmail.com>
#
# 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... | gpl-3.0 |
nmayorov/scipy | scipy/optimize/_linprog.py | 3 | 23457 | """
A top-level linear programming interface. Currently this interface solves
linear programming problems via the Simplex and Interior-Point methods.
.. versionadded:: 0.15.0
Functions
---------
.. autosummary::
:toctree: generated/
linprog
linprog_verbose_callback
linprog_terse_callback
"""
import ... | bsd-3-clause |
mdeemer/XlsxWriter | xlsxwriter/test/comparison/test_textbox02.py | 8 | 1108 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause |
cbporch/perceptron | adaline.py | 1 | 1193 | import numpy as np
from perceptron import Perceptron
class Adaline(Perceptron):
"""
Implementation of an Adaptive Linear Neuron, that can be abstracted to
various input sizes or dimensions. Displays using pyplot.
"""
ETA = 1
def __init__(self, grph, eta, max_t):
Perceptron.__init__(se... | mit |
Jortolsa/l10n-spain | l10n_es_aeat_mod340/models/account_invoice.py | 9 | 1455 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2012 Acysos S.L. (http://acysos.com)
# Ignacio Ibeas <ignacio@acysos.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
bdang2012/taiga-back-casting | taiga/projects/milestones/services.py | 1 | 1452 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 |
FoxerLee/iOS_sitp | Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/mac/gyptest-xctest.py | 221 | 1196 | #!/usr/bin/env python
# Copyright (c) 2013 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 that xctest targets are correctly configured.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
test = TestGyp.Te... | mit |
guillermo-carrasco/bcbio-nextgen | bcbio/structural/__init__.py | 1 | 5772 | """Detect structural variation in genomes using high-throughput sequencing data.
"""
import collections
import copy
import operator
import toolz as tz
from bcbio.pipeline import datadict as dd
from bcbio.structural import (battenberg, cn_mops, cnvkit, delly,
lumpy, manta, metasv, plot, v... | mit |
openmv/openmv | scripts/examples/OpenMV/03-Drawing/text_drawing.py | 3 | 1127 | # Text Drawing
#
# This example shows off drawing text on the OpenMV Cam.
import sensor, image, time, pyb
sensor.reset()
sensor.set_pixformat(sensor.RGB565) # or GRAYSCALE...
sensor.set_framesize(sensor.QVGA) # or QQVGA...
sensor.skip_frames(time = 2000)
clock = time.clock()
while(True):
clock.tick()
img = ... | mit |
etingof/pyasn1 | tests/type/test_constraint.py | 2 | 11339 | #
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
import sys
import unittest
from tests.base import BaseTestCase
from pyasn1.type import constraint
from pyasn1.type import error
class SingleValueConstraintTest... | bsd-2-clause |
maartenq/ansible | lib/ansible/modules/packaging/os/package.py | 18 | 1929 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, 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',
... | gpl-3.0 |
blacklin/kbengine | kbe/src/lib/python/Lib/heapq.py | 208 | 17997 | """Heap queue algorithm (a.k.a. priority queue).
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
all k, counting elements from 0. For the sake of comparison,
non-existing elements are considered to be infinite. The interesting
property of a heap is that a[0] is always its smallest element.
Usag... | lgpl-3.0 |
jagguli/intellij-community | python/lib/Lib/site-packages/django/middleware/gzip.py | 321 | 1455 | import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
re_accepts_gzip = re.compile(r'\bgzip\b')
class GZipMiddleware(object):
"""
This middleware compresses content if the browser allows gzip compression.
It sets the Vary header accordingly, so that cac... | apache-2.0 |
ghickman/django | tests/template_tests/filter_tests/test_wordwrap.py | 21 | 2026 | from django.template.defaultfilters import wordwrap
from django.test import SimpleTestCase
from django.utils.functional import lazystr
from django.utils.safestring import mark_safe
from ..utils import setup
class WordwrapTests(SimpleTestCase):
@setup({'wordwrap01':
'{% autoescape off %}{{ a|wordwrap:"3"... | bsd-3-clause |
repotvsupertuga/tvsupertuga.repository | script.module.streamtvsupertuga/lib/resources/lib/modules/pyaes/util.py | 124 | 2032 | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# 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, mod... | gpl-2.0 |
UOMx/edx-platform | lms/djangoapps/mobile_api/video_outlines/views.py | 121 | 4888 | """
Video Outlines
We only provide the listing view for a video outline, and video outlines are
only displayed at the course level. This is because it makes it a lot easier to
optimize and reason about, and it avoids having to tackle the bigger problem of
general XBlock representation in this rather specialized format... | agpl-3.0 |
cosenal/osf.io | website/addons/badges/model/badges.py | 35 | 5589 | # -*- coding: utf-8 -*-
import calendar
from bson import ObjectId
from datetime import datetime
from modularodm import fields, Q
from framework.mongo import StoredObject
from framework.guid.model import GuidStoredObject
from website.settings import DOMAIN
from website.util import web_url_for, api_url_for
from websi... | apache-2.0 |
CWVanderReyden/originalMyHomeNet | Lib/encodings/mac_croatian.py | 593 | 13889 | """ Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,inp... | gpl-3.0 |
idea4bsd/idea4bsd | python/helpers/pydev/third_party/pep8/autopep8.py | 34 | 125587 | #!/usr/bin/env python
#
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
# Copyright (C) 2013-2015 Hideo Hattori, Steven Myint, Bill Wendling
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation file... | apache-2.0 |
AppliedMicro/ENGLinuxLatest | tools/perf/scripts/python/sched-migration.py | 1910 | 11965 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
zhangziang/django-allauth | allauth/socialaccount/app_settings.py | 61 | 2394 | class AppSettings(object):
def __init__(self, prefix):
self.prefix = prefix
def _setting(self, name, dflt):
from django.conf import settings
getter = getattr(settings,
'ALLAUTH_SETTING_GETTER',
lambda name, dflt: getattr(settings, name,... | mit |
Guneet-Dhillon/mxnet | tests/python/unittest/test_symbol.py | 7 | 9547 | # 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 |
kopchik/qtile | libqtile/widget/crashme.py | 10 | 2352 | # Copyright (c) 2012 Florian Mounier
# Copyright (c) 2012 roger
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2013 Craig Barnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Adi Sieker
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentatio... | mit |
pquentin/django | django/core/handlers/wsgi.py | 82 | 9759 | from __future__ import unicode_literals
import cgi
import codecs
import logging
import sys
import warnings
from io import BytesIO
from threading import Lock
from django import http
from django.conf import settings
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers impo... | bsd-3-clause |
otherness-space/myProject002 | my_project_002/lib/python2.7/site-packages/django/core/management/commands/diffsettings.py | 114 | 1264 | from django.core.management.base import NoArgsCommand
def module_to_dict(module, omittable=lambda k: k.startswith('_')):
"Converts a module namespace to a Python dictionary. Used by get_settings_diff."
return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)])
class Command(NoArgsComm... | mit |
parthea/pydatalab | solutionbox/image_classification/mltoolbox/image/classification/task.py | 6 | 2644 | # Copyright 2017 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 |
pekkosk/hotbit | hotbit/io/__init__.py | 1 | 2274 | """
Input module. Contains functions to read element, Slater-Koster and repulsion
data.
"""
def read_element(filename, symbol, format=None):
"""
Read element data from files.
Parameters:
-----------
fileobj: filename of file-object to read from
symbol: chemical symbol of the element
"... | gpl-2.0 |
PatKayongo/patkayongo.github.io | node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_openedgebuiltins.py | 370 | 40661 | # -*- coding: utf-8 -*-
"""
pygments.lexers._openedgebuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the OpenEdgeLexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
OPENEDGEKEYWORDS = [
'ABSOLUTE', 'ABS', 'ABSO', 'A... | mit |
ktan2020/legacy-automation | win/Lib/site-packages/requests/packages/charade/latin1prober.py | 50 | 5387 | ######################## 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.... | mit |
pschmitt/home-assistant | homeassistant/components/water_heater/reproduce_state.py | 16 | 3681 | """Reproduce an Water heater state."""
import asyncio
import logging
from typing import Any, Dict, Iterable, Optional
from homeassistant.const import (
ATTR_ENTITY_ID,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
STATE_OFF,
STATE_ON,
)
from homeassistant.core import Context, State
from homeassistant.helpers.... | apache-2.0 |
wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/numpy/testing/noseclasses.py | 76 | 14350 | # These classes implement a doctest runner plugin for nose, a "known failure"
# error class, and a customized TestProgram for NumPy.
# Because this module imports nose directly, it should not
# be used except by nosetester.py to avoid a general NumPy
# dependency on nose.
from __future__ import division, absolute_impo... | mit |
darius/mccarthy-to-bryant | problems.py | 2 | 1351 | """
Use BDDs to solve SAT problems from DIMACS files.
TODO: try the tableau method too
"""
import bddsat
import dimacs
import sat
# Some problems from http://toughsat.appspot.com/
filenames = ['problems/trivial.dimacs',
'problems/factoring6.dimacs',
'problems/factoring2.dimacs',
... | gpl-3.0 |
Volcanoscar/omim | 3party/protobuf/python/google/protobuf/message.py | 78 | 10275 | # 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 are
# met:
#
# * Redi... | apache-2.0 |
Darthkpo/xtt | openpyxl/xml/tests/test_incremental_xmlfile.py | 1 | 11428 | from __future__ import absolute_import
"""
Tests for the incremental XML serialisation API.
From lxml
"""
from io import BytesIO
import unittest
import tempfile, os, sys
from .common_imports import etree, HelperTestCase, skipIf
from .. import xmlfile as etree
import pytest
from openpyxl.tests.helper import compar... | mit |
fujunwei/chromium-crosswalk | build/android/pylib/instrumentation/test_package.py | 71 | 1334 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Class representing instrumentation test apk and jar."""
import os
from pylib.instrumentation import test_jar
from pylib.utils import apk_helper
cl... | bsd-3-clause |
ghedsouza/django | tests/forms_tests/field_tests/test_base.py | 131 | 1455 | from django.forms import ChoiceField, Field, Form, Select
from django.test import SimpleTestCase
class BasicFieldsTests(SimpleTestCase):
def test_field_sets_widget_is_required(self):
self.assertTrue(Field(required=True).widget.is_required)
self.assertFalse(Field(required=False).widget.is_required... | bsd-3-clause |
clione/django-kanban | src/core/userena/tests/commands.py | 7 | 4703 | from django.test import TestCase
from django.core.management import call_command
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from userena.models import UserenaSignup
from userena.managers import ASSIGNED_PERMISSIONS
from userena import settings as useren... | mit |
flh/odoo | addons/hr_holidays/report/__init__.py | 442 | 1129 | # -*- 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 |
IssamLaradji/scikit-learn | examples/decomposition/plot_kernel_pca.py | 353 | 2011 | """
==========
Kernel PCA
==========
This example shows that Kernel PCA is able to find a projection of the data
that makes data linearly separable.
"""
print(__doc__)
# Authors: Mathieu Blondel
# Andreas Mueller
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomp... | bsd-3-clause |
splav/servo | components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py | 276 | 1371 | def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface IdentifierConflictAcrossMembers1 {
const byte thing1 = 1;
readonly attribute long thing1;
};
""")
results = parser.finish()
except:
threw = True... | mpl-2.0 |
looker/sentry | src/sentry/api/endpoints/broadcast_details.py | 2 | 3477 | from __future__ import absolute_import
import logging
from django.db import IntegrityError, transaction
from django.db.models import Q
from django.utils import timezone
from rest_framework.permissions import IsAuthenticated
from sentry.api.base import Endpoint
from sentry.api.exceptions import ResourceDoesNotExist
f... | bsd-3-clause |
mssurajkaiga/empathy | tools/glib-gtypes-generator.py | 12 | 12756 | #!/usr/bin/python
# Generate GLib GInterfaces from the Telepathy specification.
# The master copy of this program is in the telepathy-glib repository -
# please make any changes there.
#
# Copyright (C) 2006, 2007 Collabora Limited
#
# This library is free software; you can redistribute it and/or
# modify it under the... | gpl-2.0 |
readevalprint/mezzanine | mezzanine/utils/docs.py | 16 | 12232 | """
Utils called from project_root/docs/conf.py when Sphinx
documentation is generated.
"""
from __future__ import division, print_function, unicode_literals
from future.builtins import map, open, str
from collections import OrderedDict
from datetime import datetime
import os.path
from shutil import copyfile, move
fro... | bsd-2-clause |
geimer/easybuild-easyconfigs | test/easyconfigs/suite.py | 8 | 2616 | #!/usr/bin/python
##
# Copyright 2012-2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercul... | gpl-2.0 |
sdrdl/sdipylib | sdipylib/geo.py | 1 | 1843 | """Support functions for geographic operations"""
def aspect(df):
"""Return the aspect ratio of a Geopandas dataset"""
tb = df.total_bounds
return abs((tb[0] - tb[2]) / (tb[1] - tb[3]))
def scale(df, x):
"""Given an x dimension, return the x and y dimensions to maintain the dataframe aspect ratio"""... | bsd-2-clause |
samueldotj/TeeRISC-Simulator | util/stats/barchart.py | 90 | 12472 | # Copyright (c) 2005-2006 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
yjxtogo/horizon | openstack_dashboard/dashboards/project/stacks/urls.py | 56 | 1765 | # 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 th... | apache-2.0 |
splav/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_sauce.py | 11 | 6268 | import sys
import mock
import pytest
from os.path import join, dirname
sys.path.insert(0, join(dirname(__file__), "..", "..", ".."))
sauce = pytest.importorskip("wptrunner.browsers.sauce")
from wptserve.config import ConfigBuilder
def test_sauceconnect_success():
with mock.patch.object(sauce.SauceConnect, "u... | mpl-2.0 |
HPENetworking/HPEIMCUtils | PythonUtilities/Gather_IMC_Data/Gather_System_Device_Categories/gather_system_device_categories.py | 1 | 1524 |
#!/usr/bin/env python3
# author: @netmanchris
"""
Copyright 2016 Hewlett Packard Enterprise Development LP.
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 |
mhostetter/gnuradio | gr-audio/examples/python/noise.py | 58 | 1968 | #!/usr/bin/env python
#
# Copyright 2007 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 option)
# ... | gpl-3.0 |
trezorg/django | tests/regressiontests/select_related_regress/models.py | 92 | 2390 | from django.db import models
class Building(models.Model):
name = models.CharField(max_length=10)
def __unicode__(self):
return u"Building: %s" % self.name
class Device(models.Model):
building = models.ForeignKey('Building')
name = models.CharField(max_length=10)
def __unicode__(self):
... | bsd-3-clause |
synaptek/libchromiumcontent | tools/generate_filenames_gypi.py | 3 | 2342 | #!/usr/bin/env python
import glob
import os
import sys
TARGET_PLATFORM = {
'cygwin': 'win32',
'darwin': 'darwin',
'linux2': 'linux',
'win32': 'win32',
}[sys.platform]
SHARED_LIBRARY_SUFFIX = {
'darwin': 'dylib',
'linux': 'so',
'win32': 'dll',
}[TARGET_PLATFORM]
STATIC_LIBRARY_SUFFIX = {
'darwin': 'a... | mit |
boryszef/moltools-python | tests/test_trajectory_xyz.py | 1 | 9849 | import unittest
import tempfile
import random
import os
import stat
import numpy
import mdarray as mt
# Return random string of spaces and tabs
def rndb():
blanks = [' ', '\t']
l = [ random.choice(blanks) for i in range(random.randint(0, 5)) ]
random.shuffle(l)
return "".join(l)
atomicMasses = {
'... | gpl-3.0 |
inveniosoftware/invenio-upgrader | invenio_upgrader/upgrades/invenio_upgrader_2015_09_23_legacy_removal.py | 3 | 5314 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 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 |
Naeka/vosae-app | www/core/views.py | 1 | 4175 | # -*- coding:Utf-8 -*-
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext, loader
from django.views.generic import TemplateView
from django.utils.formats import get_format
from django.conf import settings
from django.http import (
HttpResponseRedirect,
HttpRes... | agpl-3.0 |
olituks/sentinella | frontend/library/web2py/applications/admin/languages/pt-br.py | 17 | 18517 | # -*- coding: utf-8 -*-
{
'!langcode!': 'pt-br',
'!langname!': 'Português Brasileiro',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um... | lgpl-2.1 |
PyEatingContest/crispy-node | node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py | 426 | 56534 | # 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.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import gyp.xcode_ninja
import errno
import os
import sys
import posixpath
import re
import shutil
import... | mit |
teonlamont/mne-python | mne/realtime/tests/test_stim_client_server.py | 2 | 2527 | import threading
import time
import pytest
from mne.realtime import StimServer, StimClient
from mne.externals.six.moves import queue
from mne.utils import requires_good_network, run_tests_if_main
_server = None
_have_put_in_trigger = False
_max_wait = 10.
@requires_good_network
def test_connection():
"""Test T... | bsd-3-clause |
pchaigno/grreat | gui/api_object_renderers.py | 2 | 11656 | #!/usr/bin/env python
"""This module contains RESTful API renderers for AFF4 objects and RDFValues."""
import itertools
import numbers
import re
from grr.lib import aff4
from grr.lib import rdfvalue
from grr.lib import registry
from grr.lib import utils
from grr.lib.rdfvalues import structs
class ApiObjectRendere... | apache-2.0 |
buntyke/Flask | microblog/flask/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_insert.py | 115 | 8132 | from .. import fixtures, config
from ..config import requirements
from .. import exclusions
from ..assertions import eq_
from .. import engines
from sqlalchemy import Integer, String, select, literal_column, literal
from ..schema import Table, Column
class LastrowidTest(fixtures.TablesTest):
run_deletes = 'each... | mit |
svn2github/google-protobuf | python/google/protobuf/internal/reflection_test.py | 23 | 120400 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following cond... | bsd-3-clause |
undoware/neutron-drive | google_appengine/google/appengine/_internal/django/core/servers/fastcgi.py | 23 | 6483 | """
FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol.
Uses the flup python package: http://www.saddi.com/software/flup/
This is a adaptation of the flup package to add FastCGI server support
to run Django apps from Web servers that support the FastCGI protocol.
This module can be run standalo... | bsd-3-clause |
eneldoserrata/marcos_openerp | addons/report_geraldo/lib/geraldo/site/newsite/site-geraldo/django/contrib/sessions/models.py | 25 | 2675 | import base64
import cPickle as pickle
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.utils.hashcompat import md5_constructor
class SessionManager(models.Manager):
def encode(self, session_dict):
"""
Returns the gi... | agpl-3.0 |
janocat/odoo | openerp/modules/loading.py | 131 | 21198 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 |
anryko/ansible | lib/ansible/modules/packaging/os/svr4pkg.py | 95 | 7684 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Boyd Adamson <boyd () boydadamson.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... | gpl-3.0 |
phlax/pootle | pootle/apps/pootle_app/views/admin/util.py | 7 | 6759 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django import forms
from django.forms.m... | gpl-3.0 |
emiprotechnologies/connector-magento | __unported__/magentoerpconnect_export_partner/connector.py | 32 | 1031 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 |
liyitest/rr | openstack_dashboard/usage/views.py | 19 | 3332 | # 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... | apache-2.0 |
NStep/android_kernel_motorola_msm8226_prev | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
mattclark/osf.io | osf/models/analytics.py | 1 | 8085 | import logging
from dateutil import parser
from django.db import models, transaction
from django.db.models import Sum
from django.db.models.expressions import RawSQL
from django.utils import timezone
from framework.sessions import session
from osf.models.base import BaseModel, Guid
from osf.models.files import BaseFi... | apache-2.0 |
rajrohith/blobstore | azure/storage/blob/appendblobservice.py | 1 | 27806 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | apache-2.0 |
SaschaMester/delicium | build/android/pylib/gtest/gtest_test_instance_test.py | 74 | 2367 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from pylib.gtest import gtest_test_instance
class GtestTestInstanceTests(unittest.TestCase):
def testParseGTestLi... | bsd-3-clause |
zhaowenxiang/chisch | chisch/local_settings.py | 1 | 2131 | # -*- coding: utf-8 -*-
"""
Django local_settings for chisch project.
import by 'setting.py.
"""
# Open malicious authentication
OPEN_MRP = False
OPEN_SSM = False
# The name of the certificate
ACCESS_TOKEN_NAME = 'Access-Token'
# universal verify code
UNIVERSAL_VERIFY_CODE = "888888"
ALIYUN_OSS = {
'BUCKET_NAM... | mit |
alivecor/tensorflow | tensorflow/contrib/framework/python/framework/__init__.py | 43 | 1458 | # 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 |
keelhaule/alfanous | conf.py | 5 | 8206 | # -*- coding: utf-8 -*-
#
# Alfanous Quranic Search Engine documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 8 07:42:48 2014.
#
# 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
# auto... | agpl-3.0 |
harmodio/poesiapueril | poesiapuerilbot.py | 1 | 3499 | #/usr/bin/env python3
# -*- coding: utf8 -*-
##
## Copyright (c) 2017 Jorge Harmodio
## poesiapuerilbot 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
## ... | gpl-3.0 |
stephane-martin/salt-debian-packaging | salt-2016.3.2/tests/unit/beacons/adb_beacon_test.py | 2 | 12498 | # coding: utf-8
# Python libs
from __future__ import absolute_import
# Salt libs
from salt.beacons import adb
# Salt testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch, Mock
# Globals
adb.__salt__ = {}
... | apache-2.0 |
NCAR/mizuRoute | manage_externals/test/doc/conf.py | 1 | 5279 | # -*- coding: utf-8 -*-
#
# Manage Externals documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 29 10:53:25 2017.
#
# 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 fi... | gpl-3.0 |
davgibbs/django | tests/get_object_or_404/models.py | 409 | 1133 | """
DB-API Shortcuts
``get_object_or_404()`` is a shortcut function to be used in view functions for
performing a ``get()`` lookup and raising a ``Http404`` exception if a
``DoesNotExist`` exception was raised during the ``get()`` call.
``get_list_or_404()`` is a shortcut function to be used in view functions for
per... | bsd-3-clause |
c7zero/chipsec | chipsec/modules/common/secureboot/variables.py | 9 | 7895 | #CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2015, Intel Corporation
#
#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 2.
#
#This program is distributed in the hope... | gpl-2.0 |
sebfung/yellowpillowcase | vendor/cache/gems/pygments.rb-0.6.3/vendor/pygments-main/setup.py | 36 | 2931 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Pygments
~~~~~~~~
Pygments is a syntax highlighting package written in Python.
It is a generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to prettify
source code. Hig... | mit |
munyirik/python | cpython/Lib/test/test_threading.py | 2 | 39155 | """
Tests for the threading module.
"""
import test.support
from test.support import verbose, strip_python_stderr, import_module, cpython_only
from test.support.script_helper import assert_python_ok, assert_python_failure
import random
import re
import sys
_thread = import_module('_thread')
threading = import_module(... | bsd-3-clause |
Dino0631/RedRain-Bot | lib/youtube_dl/extractor/alphaporno.py | 64 | 2724 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
parse_duration,
parse_filesize,
int_or_none,
)
class AlphaPornoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?alphaporno\.com/videos/(?P<id>[^/]+)'
_TEST = {
'url': 'ht... | gpl-3.0 |
Dino0631/RedRain-Bot | cogs/lib/youtube_dl/extractor/miomio.py | 61 | 5068 | # coding: utf-8
from __future__ import unicode_literals
import random
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
xpath_text,
int_or_none,
ExtractorError,
sanitized_Request,
)
class MioMioIE(InfoExtractor):
IE_NAME = 'miomio.tv'
_VALID_URL = r... | gpl-3.0 |
40123242/cdw11-bg3 | static/plugin/liquid_tags/diag.py | 270 | 4096 | """
Blockdiag Tag
---------
This tag implements a liquid style tag for blockdiag [1]. You can use different
diagram types like blockdiag, seqdiag, packetdiag etc. [1]
[1] http://blockdiag.com/en/blockdiag/
Syntax
------
{% blockdiag {
<diagramm type> {
<CODE>
}
}
%}
Examples
-------... | agpl-3.0 |
beezee/GAE-Django-site | django/contrib/gis/geos/tests/test_geos_mutation.py | 245 | 5464 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
import django.utils.copycompat as copy
from django.contrib.gis.geos import *
from django.contrib.gis.geos.error import GEOSIndexError
from djang... | bsd-3-clause |
notriddle/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_terminal.py | 30 | 40391 | """
terminal reporting of the full testing process.
"""
from __future__ import absolute_import, division, print_function
import collections
import sys
import pluggy
import _pytest._code
import py
import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.terminal import TerminalReporter, repr_pythonvers... | mpl-2.0 |
dago/ansible-modules-extras | notification/nexmo.py | 153 | 3819 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Matt Martz <matt@sivel.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 License, ... | gpl-3.0 |
camilonova/sentry | src/sentry/web/forms/__init__.py | 15 | 3194 | """
sentry.web.forms
~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django import forms
from django.utils.translation import ugettext_lazy as _
from sentry.constants import HTTP_... | bsd-3-clause |
mrgloom/DeepCL | cog-batteries/cog_fluent.py | 6 | 4556 | # Copyright Hugh Perkins 2014,2015 hughperkins at gmail
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
import cog
def go(classname, ints = [], floats = []):
c... | mpl-2.0 |
gmalmquist/pants | contrib/cpp/src/python/pants/contrib/cpp/targets/cpp_binary.py | 14 | 1101 | # 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 pants.base.payl... | apache-2.0 |
jhsenjaliya/incubator-airflow | airflow/api/common/experimental/trigger_dag.py | 9 | 1706 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 |
Pirata-Repository/Pirata | plugin.video.movie25/resources/libs/documentaries/documentary.py | 2 | 18086 | import urllib,urllib2,re,cookielib,urlresolver,sys,os
import xbmc, xbmcgui, xbmcaddon, xbmcplugin
from resources.libs import main
#Mash Up - by Mash2k3 2012.
from t0mm0.common.addon import Addon
from resources.universal import playbackengine, watchhistory
addon_id = 'plugin.video.movie25'
selfAddon = xbmcaddon.Addon(... | gpl-2.0 |
Polyconseil/tornado | tornado/test/template_test.py | 63 | 18390 | from __future__ import absolute_import, division, print_function, with_statement
import os
import sys
import traceback
from tornado.escape import utf8, native_str, to_unicode
from tornado.template import Template, DictLoader, ParseError, Loader
from tornado.test.util import unittest
from tornado.util import u, Object... | apache-2.0 |
fighterCui/L4ReFiascoOC | l4/pkg/python/contrib/Lib/test/test_startfile.py | 77 | 1201 | # Ridiculously simple test of the os.startfile function for Windows.
#
# empty.vbs is an empty file (except for a comment), which does
# nothing when run with cscript or wscript.
#
# A possible improvement would be to have empty.vbs do something that
# we can detect here, to make sure that not only the os.startfile()
#... | gpl-2.0 |
eLBati/odoo | addons/sale_journal/__init__.py | 443 | 1067 | # -*- 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 |
Plain-Andy-legacy/android_external_chromium_org | tools/telemetry/telemetry/web_components/web_components_project.py | 45 | 1359 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.core import util
from trace_viewer import trace_viewer_project
def _FindAllFilesRecursive(source_paths, pred):
all_filenames = ... | bsd-3-clause |
songmonit/CTTMSONLINE | addons/account/wizard/account_change_currency.py | 385 | 3751 | # -*- encoding: 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 G... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.