repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
jaskaye17/nomadpad | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_asybuiltins.py | 369 | # -*- coding: utf-8 -*-
"""
pygments.lexers._asybuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the asy-function names and asy-variable names of
Asymptote.
Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand.
TODO: perl/python script in Asymptote SVN similar to asy-list.pl but onl... |
hoosteeno/mozillians | refs/heads/master | vendor-local/lib/python/unidecode/x06a.py | 252 | data = (
'Di ', # 0x00
'Zhuang ', # 0x01
'Le ', # 0x02
'Lang ', # 0x03
'Chen ', # 0x04
'Cong ', # 0x05
'Li ', # 0x06
'Xiu ', # 0x07
'Qing ', # 0x08
'Shuang ', # 0x09
'Fan ', # 0x0a
'Tong ', # 0x0b
'Guan ', # 0x0c
'Ji ', # 0x0d
'Suo ', # 0x0e
'Lei ', # 0x0f
'Lu ', # 0x1... |
NolanBecker/aima-python | refs/heads/master | submissions/Anderson/puzzle-submissions.py | 19 | import agents as ag
# import envgui as gui
import importlib
import traceback
import search
from utils import(isnumber, memoize)
from math import(inf)
class MyException(Exception):
pass
roster = ['Anderson', 'Ban','Becker','Blue','Capps','Conklin','Dickenson',
'Fritz','Haller','Hawley','Hess','Johnson','... |
keithhamilton/blackmaas | refs/heads/master | lib/python2.7/site-packages/jinja2/lexer.py | 635 | # -*- coding: utf-8 -*-
"""
jinja2.lexer
~~~~~~~~~~~~
This module implements a Jinja / Python combination lexer. The
`Lexer` class provided by this module is used to do some preprocessing
for Jinja.
On the one hand it filters out invalid operators like the bitshift
operators we don't allow... |
llvmpy/llvmpy | refs/heads/master | llvmpy/src/GlobalVariable.py | 1 | from binding import *
from .namespace import llvm
from .GlobalValue import GlobalValue
GlobalVariable = llvm.Class(GlobalValue)
from .Module import Module
from .Type import Type
from .ADT.StringRef import StringRef
from .Value import Value, User, Constant
@GlobalVariable
class GlobalVariable:
_downcast_ = Value,... |
VagrantApe/flaskMicroblog | refs/heads/master | venv/lib/python2.7/site-packages/migrate/tests/versioning/test_version.py | 32 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from migrate.exceptions import *
from migrate.versioning.version import *
from migrate.tests import fixture
class TestVerNum(fixture.Base):
def test_invalid(self):
"""Disallow invalid version numbers"""
versions = ('-1', -1, 'Thirteen', '')
f... |
tumbl3w33d/ansible | refs/heads/devel | lib/ansible/module_utils/k8s/common.py | 15 | # Copyright 2018 Red Hat | Ansible
#
# 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.
#
# Ans... |
infowantstobeseen/pyglet-darwincore | refs/heads/master | pyglet/image/codecs/quartz.py | 33 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/refactoring/rename/renameGlobalWithoutToplevel_after.py | 62 | def f1():
global bar
bar = [1, 2, 3]
def f2(x):
global bar
bar = bar + [x]
if 1 in bar:
return bar
def f3(x):
return foo + [x]
def f4(x):
global bar
return bar + [x]
def f5(foo):
return foo |
sanchezz93/Giga-Compiler | refs/heads/master | Entrega 6/closure-library/closure/bin/labs/code/generate_jsdoc_test.py | 212 | #!/usr/bin/env python
#
# Copyright 2013 The Closure Library 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
... |
renyi533/tensorflow | refs/heads/master | tensorflow/python/framework/graph_building_benchmark.py | 17 | # Copyright 2019 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 applicab... |
LukasBoersma/readthedocs.org | refs/heads/master | readthedocs/rtd_tests/tests/test_canonical.py | 23 | from django.test import TestCase
from readthedocs.projects.models import Project
class TestCanonical(TestCase):
def setUp(self):
self.p = Project(
name='foo',
repo='http://github.com/ericholscher/django-kong',
)
self.p.save()
def test_canonical_clean(self... |
edxnercel/edx-platform | refs/heads/master | common/djangoapps/student/tests/test_bulk_email_settings.py | 113 | """
Unit tests for email feature flag in student dashboard. Additionally tests
that bulk email is always disabled for non-Mongo backed courses, regardless
of email feature flag, and that the view is conditionally available when
Course Auth is turned on.
"""
import unittest
from django.conf import settings
from django.... |
robhaverkort/clanmanager | refs/heads/master | vendor/twitter/bootstrap/test-infra/s3_cache.py | 2166 | #!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, chdir, remove as _delete_file
from os.path import dirname, basename, abspath, realpath, expandvars
from hashlib import sha256
from subpr... |
nicolasnoble/grpc | refs/heads/master | src/python/grpcio/grpc/beta/_server_adaptations.py | 15 | # Copyright 2016 gRPC 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 to in writing... |
smsisko/Voodoo-Mock | refs/heads/master | voodoo/voodoomultiplexeriterator.py | 2 | from voodooiterator import VoodooIterator
from voodooexpectiterator import VoodooExpectIterator
import iterateapi
from voodoodbiterator import VoodooDBIterator
class VoodooMultiplexerIterator( iterateapi.IterateAPI ):
def __init__( self, perFileSettings, dbFilename ):
self._iter = VoodooIterator( perFileSe... |
wenderen/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/example/internal_error_wsh.py | 465 | # Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
rosenvladimirov/addons | refs/heads/8.0 | l10n_bg/__init__.py | 1 | # -*- encoding: utf-8 -*-
##############################################################################
#
# @author - Rosen Vladimirov <vladimirov.rosen@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free ... |
goodwinnk/intellij-community | refs/heads/master | python/helpers/pydev/stubs/_get_tips.py | 88 | import os.path
import inspect
import sys
# completion types.
TYPE_IMPORT = '0'
TYPE_CLASS = '1'
TYPE_FUNCTION = '2'
TYPE_ATTR = '3'
TYPE_BUILTIN = '4'
TYPE_PARAM = '5'
def _imp(name, log=None):
try:
return __import__(name)
except:
if '.' in name:
sub = name[0:name.rfind('.')]
... |
elmerdpadilla/iv | refs/heads/8.0 | addons/crm/calendar_event.py | 375 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
noironetworks/nova | refs/heads/master | nova/tests/unit/virt/xenapi/client/test_objects.py | 80 | # Copyright (c) 2014 Rackspace Hosting
# 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 req... |
FDio/vpp | refs/heads/master | test/test_neighbor.py | 2 | #!/usr/bin/env python3
import unittest
import os
from socket import AF_INET, AF_INET6, inet_pton
from framework import tag_fixme_vpp_workers
from framework import VppTestCase, VppTestRunner
from vpp_neighbor import VppNeighbor, find_nbr
from vpp_ip_route import VppIpRoute, VppRoutePath, find_route, \
VppIpTable, ... |
myralabs/pymyra | refs/heads/master | tutorial/tutorial.py | 1 | from __future__ import print_function
from __future__ import absolute_import
from os.path import expanduser, join
from pymyra.api import client
# Create the API config object from a configuration object
config = {
"account_id": "",
"account_secret": ""
}
# Get from the Myra dashboard
INTENT_MODEL_ID = "94103... |
prokls/cnf-hash-py | refs/heads/master | cnfhash/run.py | 1 | #!/usr/bin/env python3
"""
run.py
======
Script for executable module.
Compute a hash value for the given DIMACS file.
* Ignores comments 'c' and '%' lines
* Order of clauses matters
* Order of literals matters
A more formal specification is provided at
`cnfhash project homepage... |
clovett/MissionPlanner | refs/heads/master | Lib/site-packages/numpy/core/tests/test_dtype.py | 53 | import numpy as np
from numpy.testing import *
def assert_dtype_equal(a, b):
assert_equal(a, b)
assert_equal(hash(a), hash(b),
"two equivalent types do not hash to the same value !")
def assert_dtype_not_equal(a, b):
assert_(a != b)
assert_(hash(a) != hash(b),
"two differe... |
johniek/meteor-rock | refs/heads/master | examples/golo_rockstar.py | 2 |
from RockStar import RockStar
golo_code = """"module hello.world
function main = |args| {
println('Hello world')
}"""
rock_it_bro = RockStar(days=400, file_name='golo.golo', code=golo_code)
rock_it_bro.make_me_a_rockstar()
|
mistifyio/buildroot | refs/heads/master | support/scripts/kconfiglib.py | 87 | # This is Kconfiglib, a Python library for scripting, debugging, and extracting
# information from Kconfig-based configuration systems. To view the
# documentation, run
#
# $ pydoc kconfiglib
#
# or, if you prefer HTML,
#
# $ pydoc -w kconfiglib
#
# The examples/ subdirectory contains examples, to be run with e.g.
#
... |
sebrandon1/nova | refs/heads/master | nova/tests/functional/api_sample_tests/test_suspend_server.py | 15 | # Copyright 2013 IBM Corp.
#
# 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 t... |
carhaas/cdec-semparse | refs/heads/master | realtime/rt/util.py | 5 | import os
import Queue
import subprocess
import sys
import threading
SA_INI_FILES = set((
'f_sa_file',
'e_file',
'a_file',
'lex_file',
'precompute_file',
'bilex_file',
))
class FIFOLock:
'''Lock that preserves FIFO order of blocking threads'''
def __init__(self):
self.q = ... |
modlinltd/django-advanced-filters | refs/heads/develop | advanced_filters/tests/test_usage.py | 1 | import pytest
from django.contrib.auth.models import Permission
from django.db.models import Q
from tests.factories import ClientFactory, SalesRepFactory
from ..admin import AdvancedListFilters
from ..models import AdvancedFilter
from .factories import AdvancedFilterFactory
try:
from django.urls import reverse
ex... |
ebukoz/thrive | refs/heads/develop | erpnext/education/doctype/quiz/quiz.py | 6 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
class Quiz(Document):
def validate(self):
if self.pass... |
florian-dacosta/OCB | refs/heads/8.0 | openerp/addons/base/tests/test_basecase.py | 379 | # -*- coding: utf-8 -*-
import unittest2
from openerp.tests import common
class test_single_transaction_case(common.SingleTransactionCase):
"""
Check the whole-class transaction behavior of SingleTransactionCase.
"""
def test_00(self):
"""Create a partner."""
cr, uid = self.cr, self.u... |
mbauskar/helpdesk-erpnext | refs/heads/master | erpnext/utilities/doctype/address/test_address.py | 72 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Address')
import unittest
import frappe
from erpnext.utilities.doctype.address.address import g... |
alhashash/odoomrp-wip | refs/heads/8.0 | sale_documents_comments/models/sale.py | 11 | # -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class SaleOrde... |
eXcomm/MozDef | refs/heads/master | lib/cefTail2Mozdef.py | 12 | #!/usr/bin/env python
# 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/.
# Copyright (c) 2014 Mozilla Corporation
#
# Contributors:
# Jeff Bryner jbryner@mozilla.com
impo... |
fidomason/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/distutils/tests/test_build_ext.py | 71 | import sys
import os
from io import StringIO
import textwrap
from distutils.core import Distribution
from distutils.command.build_ext import build_ext
from distutils import sysconfig
from distutils.tests.support import (TempdirManager, LoggingSilencer,
copy_xxmodule_c, fixup_build_... |
sinkuri256/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/distutils/command/check.py | 49 | """distutils.command.check
Implements the Distutils 'check' command.
"""
from distutils.core import Command
from distutils.errors import DistutilsSetupError
try:
# docutils is installed
from docutils.utils import Reporter
from docutils.parsers.rst import Parser
from docutils import frontend
from d... |
40223246/0622cdb-Final-TEST2-1 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/ui/widget.py | 706 | import random
from browser import doc
def getMousePosition(e):
if e is None:
e=win.event
if e.pageX or e.pageY:
return {'x': e.pageX, 'y': e.pageY}
if e.clientX or e.clientY:
_posx=e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft;
_posy=e.clientY + doc.body.scr... |
geekboxzone/lollipop_external_chromium_org | refs/heads/geekbox | third_party/closure_compiler/processor_test.py | 33 | #!/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.
"""Test resources processing, i.e. <if> and <include> tag handling."""
import unittest
from processor import FileCache, Processor, Lin... |
David-Haim/swtoolkit | refs/heads/master | test/sdl_test.py | 18 | #!/usr/bin/python2.4
# Copyright 2009, 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... |
FHannes/intellij-community | refs/heads/master | python/testData/formatter/fromImportTrailingCommaWithParentheses_after.py | 30 | from module import foo
from module import foo, bar
from module import foo, bar,
# | margin
from module import (foo, bar,
baz, )
from module import (foo,
bar, )
from module import (foo,
bar, )
from module import (foo,
... |
Fiedzia/Django-facebook | refs/heads/master | docs/docs_env/Lib/encodings/hp_roman8.py | 647 | """ Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py.
Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen)
Original source: LaserJet IIP Printer User's Manual HP part no
33471-90901, Hewlet-Packard, June 1989.
"""#"
import codecs
### Codec APIs
class ... |
apehua/pilas | refs/heads/master | pilasengine/ejemplos/musica.py | 3 | # http://en.wikipedia.org/wiki/File:Rayman_2_music_sample.ogg
# Permite que este ejemplo funcion incluso si no has instalado pilas.
import sys
sys.path.insert(0, "..")
sys.path.insert(0, "../..")
sys.path.insert(0, ".")
import pilasengine
pilas = pilasengine.iniciar()
try:
sonido_wav = pilas.musica.cargar("ra... |
berrange/nova | refs/heads/master | nova/tests/objects/test_instance.py | 4 | # Copyright 2013 IBM Corp.
#
# 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... |
QANSEE/partner-contact | refs/heads/8.0 | base_location/models/partner.py | 1 | # -*- coding: utf-8 -*-
#
#
# Author: Nicolas Bessi. Copyright Camptocamp SA
# Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>
# Ignacio Ibeas <ignacio@acysos.com>
# Alejandro Santana <alejandrosantana@anubia.es>
#
# This program is free software: you can redist... |
skaasj/reweighted-ws | refs/heads/master | show-param-trajectory.py | 6 | #!/usr/bin/env python2
from __future__ import division, print_function
import logging
import h5py
import numpy as np
import tsne
import pylab
#x2 = tsne.bh_sne(x)
if __name__ == "__main__":
import sys
import argparse
logger = logging.getLogger(__name__)
parser = argparse.ArgumentParser()
par... |
bbenko/shinkicker | refs/heads/master | django/utils/itercompat.py | 294 | """
Providing iterator functions that are not in all version of Python we support.
Where possible, we try to use the system-native version and only fall back to
these implementations if necessary.
"""
import itertools
# Fallback for Python 2.4, Python 2.5
def product(*args, **kwds):
"""
Taken from http://docs... |
Balannen/LSMASOMM | refs/heads/master | atom3/Kernel/GraphicEditor/Scripting.py | 1 | """
Scripting.py
The AToM3 constraints placed on a graphical appearence file are really just
scripts :D
This file stores & retrieves the contraint list & run-time-change flag.
Created Summer 2004, Denis Dube
"""
class Scripting:
def __init__(self, runTimeChange = False, constraintList = [] ):
... |
meets2tarun/meilix | refs/heads/master | mail-scripts/mail-fail.py | 3 | #! /usr/bin/env python3
import http.client
import os
import datetime
import base64
#attachment encoding
with open('../log.txt','rb') as f:
data = f.read()
f.close()
attachment = base64.b64encode(data)
conn = http.client.HTTPSConnection("api.sendgrid.com")
print (os.environ["email"])
payload = "{\"personaliz... |
saghul/aiohttp | refs/heads/master | tests/test_helpers.py | 2 | import unittest
import unittest.mock
from aiohttp import helpers
from aiohttp import MultiDict
class HelpersTests(unittest.TestCase):
def test_parse_mimetype(self):
self.assertEqual(
helpers.parse_mimetype(''), ('', '', '', {}))
self.assertEqual(
helpers.parse_mimetype('... |
catapult-project/catapult | refs/heads/master | third_party/coverage/coverage/misc.py | 27 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Miscellaneous stuff for coverage.py."""
import errno
import hashlib
import inspect
import locale
import os
import sys
import types
from coverage import env
fro... |
fengsp/batpod | refs/heads/master | exts/serving.py | 1 | # -*- coding: utf-8 -*-
"""
batpod.serving
~~~~~~~~~~~~~~
A simple WSGI server with reloader.
:copyright: (c) 2013 by fsp.
:license: BSD, see LICENSE for more details.
"""
import os, sys, time
from wsgiref.simple_server import make_server
def _iter_module_files():
for module in sys.modules... |
cprov/snapcraft | refs/heads/master | snapcraft/cli/store.py | 2 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2016-2017 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 ... |
li-ma/homework | refs/heads/master | python/test-delete-file.py | 1 | import os
# Target Func
def rm(filename):
os.remove(filename)
tmpfilepath = "/tmp/tmpfile"
def setUp():
with open(tmpfilepath, "wb") as f:
f.write("delete me")
def test_rm():
rm(tmpfilepath)
assert not os.path.isfile(tmpfilepath)
|
podemos-info/odoo | refs/heads/6.1 | addons/sale_journal/__openerp__.py | 9 | # -*- 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... |
dgeorgievd/ovirtctl | refs/heads/master | ovirtctl.py | 1 | #!/usr/bin/env python2.7
import argparse
import json
from time import sleep
from ovirtsdk.api import API
from ovirtsdk.xml import params
VERSION = params.Version(major='3', minor='6')
#
# define Parser for the cli arguments
#
parser = argparse.ArgumentParser(description='ovirt opensource management tool')
parser.ad... |
remynguyen96/webpack-layout | refs/heads/master | Son/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 960 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... |
germn/python-for-android | refs/heads/master | pythonforandroid/recipes/python3/__init__.py | 3 | import glob
import sh
import subprocess
from multiprocessing import cpu_count
from os import environ
from os.path import dirname, exists, join
from pathlib import Path
from shutil import copy2
from pythonforandroid.logger import info, warning, shprint
from pythonforandroid.patching import version_starts_with, is_vers... |
s20121035/rk3288_android5.1_repo | refs/heads/master | external/chromium_org/chrome/test/mini_installer/chrome_helper.py | 79 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Common helper module for working with Chrome's processes and windows."""
import psutil
import re
import win32gui
import win32process
def GetProcessIDAn... |
FHannes/intellij-community | refs/heads/master | python/testData/editing/firstParamMetaSimple.after.py | 83 | class A(type):
def f(cls):
|
alanjw/GreenOpenERP-Win-X86 | refs/heads/7.0 | openerp/addons/l10n_et/__openerp__.py | 51 | #-*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2012 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 G... |
adieu/django-nonrel | refs/heads/master | django/contrib/gis/geos/libgeos.py | 154 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import os, re, sys
from ctypes import c_char_p, Structur... |
vijaysbhat/incubator-airflow | refs/heads/master | airflow/example_dags/docker_copy_data.py | 22 | # -*- 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
... |
jnewland/home-assistant | refs/heads/ci | homeassistant/components/workday/__init__.py | 36 | """Sensor to indicate whether the current day is a workday."""
|
chetan51/NAB | refs/heads/master | nab/lib/scoring.py | 1 | # ----------------------------------------------------------------------
# Copyright (C) 2014, 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 program is free software: you can redistribute it and/or mo... |
f0rki/cb-multios | refs/heads/master | original-challenges/CNMP/poller/for-release/machine.py | 1 | #!/usr/bin/env python
#
# Copyright (C) 2014 Narf Industries <info@narfindustries.com>
#
# 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
# th... |
URJCDataScience/sistemas-dist | refs/heads/master | sistemas-dist/code/mapReduce/rathbone/simple/reducer.py | 3 | #! /usr/bin/env python
import sys
last_turf = None
turf_count = 0
# Example input (notice how they're IN ORDER):
# FALSE 1
# FALSE 1
# FALSE 1
# FALSE 1
# TRUE 1
# TRUE 1
# UNKNOWN 1
# UNKNOWN 1
# keys come grouped together
# so we need to keep track of state a little bit
# thus when the key changes (turf), we need... |
mdavid/horizon | refs/heads/master | openstack_dashboard/dashboards/project/dashboard.py | 2 | # Copyright 2012 Nebula, 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... |
jmartinm/invenio | refs/heads/master | modules/websubmit/lib/functions/Move_From_Pending.py | 35 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 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 ... |
mith1979/ansible_automation | refs/heads/master | applied_python/applied_python/lib/python2.7/site-packages/pip/vcs/__init__.py | 87 | """Handles all VCS (version control) support"""
from __future__ import absolute_import
import logging
import os
import shutil
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip.exceptions import BadCommand
from pip.utils import (display_path, backup_dir, find_command,
rmtr... |
JPJPJPOPOP/zulip | refs/heads/master | zerver/management/commands/export_single_user.py | 41 | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from django.core.management.base import BaseCommand, CommandError
from django.core.exceptions import ValidationError
import os
import shutil
import subprocess
import tempfile
import... |
SpaceKatt/CSPLN | refs/heads/master | apps/scaffolding/win/web2py/gluon/contrib/login_methods/cas_auth.py | 24 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: LGPL v3
Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
"""
from gluon import current, redirect, URL
class CasAuth(... |
paddywwoof/pi3d_scenery | refs/heads/master | Scenery.py | 1 | #!/usr/bin/python
from __future__ import absolute_import, division, print_function, unicode_literals
""" As per ForestWalk but showing use of the String.quick_change() method
for rapidly changing text
"""
import math,random
import demo
import pi3d
import pickle
import time
print('''
Really you should have hall effe... |
EmadMokhtar/Django | refs/heads/master | django/conf/locale/fa/formats.py | 70 | # This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'G:i'
DATETIME_FORMAT = 'j F Y، ساعت G:i'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_... |
dmvieira/sync-nosql-dbs | refs/heads/master | src/dbs/cassandra.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from base import BaseDB
import pycassa
class CassandraDB(BaseDB):
""" Class to implements BaseDB 'interface' for Cassandra DBs. """
pass |
spennihana/h2o-3 | refs/heads/master | h2o-py/h2o/estimators/glrm.py | 1 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# This file is auto-generated by h2o-3/h2o-bindings/bin/gen_python.py
# Copyright 2016 H2O.ai; Apache License Version 2.0 (see LICENSE for details)
#
from __future__ import absolute_import, division, print_function, unicode_literals
from h2o.estimators.estimator_base ... |
devoid/nova | refs/heads/sheepdog-nova-support | nova/tests/network/test_api.py | 5 | # Copyright 2012 Red Hat, 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... |
maojrs/riemann_book | refs/heads/master | exact_solvers/burgers_demos.py | 2 | """
Additional functions and demos for Burgers' equation.
"""
import sys, os
from clawpack import pyclaw
from clawpack import riemann
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import animation
from IPython.display import HTML
import numpy as np
from utils import riemann_tools
from . import burge... |
PrestigeDox/Watashi-SelfBot | refs/heads/master | launcher.py | 1 | import sys
from watashi import Watashi
if __name__ == "__main__":
try:
config_path = sys.argv[1]
except:
config_path = 'config.json'
bot = Watashi(config_path)
bot.run()
|
JJones131/steam-engage-monitor | refs/heads/master | lib/flask/app.py | 345 | # -*- coding: utf-8 -*-
"""
flask.app
~~~~~~~~~
This module implements the central WSGI application object.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from threading import Lock
from datetime import timedelta
from itertools import... |
xiaolonginfo/decode-Django | refs/heads/master | Django-1.5.1/tests/regressiontests/urlpatterns_reverse/tests.py | 25 | """
Unit tests for reverse URL lookups.
"""
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
from django.core.urlresolvers import (reverse, resolve, get_callabl... |
akshayharidas/fosswebsite | refs/heads/master | workshop/views.py | 3 | # created by Chirath R, chirath.02@gmail.com
# -*- coding: utf-8 -*-
import datetime
from django.contrib.auth.models import User
from django import forms
from django.contrib.sites.shortcuts import get_current_site
from django.forms.utils import ErrorList
from django.shortcuts import redirect
from django.urls import rev... |
miloszz/DIRAC | refs/heads/integration | ResourceStatusSystem/Policy/DowntimePolicy.py | 8 | # $HeadURL: $
''' DowntimePolicy module
'''
from DIRAC import S_OK
from DIRAC.ResourceStatusSystem.PolicySystem.PolicyBase import PolicyBase
__RCSID__ = '$Id: $'
class DowntimePolicy( PolicyBase ):
'''
The DowntimePolicy checks for downtimes, scheduled or ongoing,... |
pauldeng/nilmtk | refs/heads/master | nilmtk/preprocessing/__init__.py | 8 | from .clip import Clip
from .apply import Apply
|
shakamunyi/sahara | refs/heads/master | sahara/plugins/hdp/versions/version_2_0_6/services.py | 1 | # Copyright (c) 2014 Hortonworks, 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 ... |
jimkmc/micropython | refs/heads/master | tests/basics/subclass_native2_tuple.py | 102 | class Base1:
def __init__(self, *args):
print("Base1.__init__", args)
class Ctuple1(Base1, tuple):
pass
a = Ctuple1()
print(len(a))
a = Ctuple1([1, 2, 3])
print(len(a))
print("---")
class Ctuple2(tuple, Base1):
pass
a = Ctuple2()
print(len(a))
a = Ctuple2([1, 2, 3])
print(len(a))
|
hollow/nepal | refs/heads/master | nepal/contrib/forms/__init__.py | 1 | from django.forms import *
from django.utils.translation import ugettext_lazy as _
from nepal.contrib import password
from nepal.contrib.forms.fields import *
from nepal.contrib.forms.forms import *
from nepal.contrib.forms.layout import *
from nepal.contrib.forms.widgets import *
class PasswordForm(object):
def _... |
heivi/fMBT | refs/heads/master | utils/setup.py | 5 | #!/usr/bin/env python2
from distutils.core import setup, Extension
import os
import subprocess
import sys
def pkg_config(package):
if os.name == "nt":
if package == "MagickCore":
# pkg-config cannot be used, try to find needed libraries from the filesystem
import fnmatch
... |
machawk1/pywb | refs/heads/master | pywb/perms/perms_filter.py | 3 | from pywb.utils.wbexception import AccessException
#=================================================================
def make_perms_cdx_filter(perms_policy, wbrequest):
"""
Called internally to convert a perms_policy and a request
to a filter which can be applied on the cdx
"""
perms_checker = pe... |
ClearCorp-dev/odoo-clearcorp | refs/heads/9.0 | TODO-8.0/account_invoice_pricelist/wizard/sale_order_line_make_invoice.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Original Module by SIESA (<http://www.siesacr.com>)
# Refactored by CLEARCORP S.A. (<http://clearcorp.co.cr>)
#
# This program is free software: you can redis... |
pipermerriam/django | refs/heads/master | tests/invalid_models_tests/test_deprecated_fields.py | 299 | from django.core import checks
from django.db import models
from .base import IsolatedModelsTestCase
class DeprecatedFieldssTests(IsolatedModelsTestCase):
def test_IPAddressField_deprecated(self):
class IPAddressModel(models.Model):
ip = models.IPAddressField()
model = IPAddressModel... |
agry/NGECore2 | refs/heads/master | scripts/object/draft_schematic/weapon/lance_obsidian.py | 85615 | import sys
def setup(core, object):
return |
yehzhang/RapidTest | refs/heads/master | examples/solutions/find_all_duplicates_in_an_array.py | 1 | class Solution(object):
def findDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
res = []
for num in nums or []:
num = abs(num)
i = num - 1
if nums[i] < 0:
res.append(num)
else:
... |
dukhlov/oslo.messaging | refs/heads/master | oslo_messaging/tests/drivers/zmq/test_pub_sub.py | 1 | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
kkaarreell/ci-dnf-stack | refs/heads/master | dnf-behave-tests/features/steps/file.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import behave
import glob
import re
import os
from common import *
def prepend_installroot(context, path):
path = path.format(context=context)
root = '/'
if not path.startswith('//'):
root = cont... |
numpy/datetime | refs/heads/main | doc/sphinxext/traitsdoc.py | 66 | """
=========
traitsdoc
=========
Sphinx extension that handles docstrings in the Numpy standard format, [1]
and support Traits [2].
This extension can be used as a replacement for ``numpydoc`` when support
for Traits is required.
.. [1] http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines#docstring-standard
.... |
laperry1/android_external_chromium_org | refs/heads/cm-12.1 | native_client_sdk/src/tools/tests/create_html_test.py | 108 | #!/usr/bin/env python
# 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.
import os
import unittest
import shutil
import sys
import tempfile
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_D... |
plotly/plotly.py | refs/heads/master | packages/python/plotly/plotly/validators/cone/_colorscale.py | 1 | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(self, plotly_name="colorscale", parent_name="cone", **kwargs):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
mohammad-suliman/visualStudioAddon | refs/heads/master | addon/appModules/devenv.py | 1 | # appModule for visual studio
#author: mohammad suliman (mohmad.s93@gmail.com)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2016 Mohammad Suliman
import appModuleHandler
import addonHandler
from NVDAObjects.UIA import UIA, WpfTextView
try:
from NVDAOb... |
cpcloud/arrow | refs/heads/master | python/pyarrow/tests/test_table.py | 1 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.