repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
40223103/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/highlight.py | 617 | import keyword
import _jsre as re
from browser import html
letters = 'abcdefghijklmnopqrstuvwxyz'
letters += letters.upper()+'_'
digits = '0123456789'
builtin_funcs = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
"eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +... |
j-a-m-l/.dot | refs/heads/master | vim/bundle/vim-orgmode/ftplugin/orgmode/plugins/Todo.py | 2 | # -*- coding: utf-8 -*-
import vim
from orgmode._vim import echom, ORGMODE, apply_count, repeat, realign_tags
from orgmode import settings
from orgmode.liborgmode.base import Direction
from orgmode.menu import Submenu, ActionEntry
from orgmode.keybinding import Keybinding, Plug
# temporary todo states for differnent... |
shakamunyi/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/check_ops_test.py | 56 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
petemounce/ansible | refs/heads/devel | lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_launch.py | 9 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# This module 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 opti... |
2013Commons/hue | refs/heads/master | desktop/libs/liboozie/src/liboozie/credentials.py | 2 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
live-clones/luatex | refs/heads/master | source/libs/harfbuzz/harfbuzz-src/src/gen-def.py | 6 | #!/usr/bin/env python
from __future__ import print_function, division, absolute_import
import io, os, re, sys
if len (sys.argv) < 3:
sys.exit("usage: gen-def.py harfbuzz.def hb.h [hb-blob.h hb-buffer.h ...]")
output_file = sys.argv[1]
header_paths = sys.argv[2:]
headers_content = []
for h in header_paths:
if h.e... |
dvliman/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.4/tests/modeltests/pagination/models.py | 133 | """
30. Object pagination
Django provides a framework for paginating a list of objects in a few lines
of code. This is often useful for dividing search results or long lists of
objects into easily readable pages.
"""
from django.db import models
class Article(models.Model):
headline = models.CharField(max_lengt... |
majidaldo/ansible | refs/heads/devel | v2/samples/multi.py | 210 | #!/usr/bin/env python
import time
import Queue
import traceback
from multiprocessing import Process, Manager, Pipe, RLock
from ansible.playbook.play import Play
from ansible.playbook.task import Task
from ansible.utils.debug import debug
NUM_WORKERS = 50
NUM_HOSTS = 2500
NUM_TASKS = 1
class Foo:
def __init__... |
anish/phatch | refs/heads/master | tests/doc_test.py | 3 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2008 www.stani.be
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... |
hzanoli/AliPhysics | refs/heads/master | PWGJE/EMCALJetTasks/Tracks/analysis/base/WeightHandler.py | 41 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... |
ngageoint/geoevents | refs/heads/master | geoevents/core/auth.py | 2 | # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.middleware import RemoteUserM... |
seann1/portfolio5 | refs/heads/master | .meteor/dev_bundle/python/Lib/Queue.py | 82 | """A multi-producer, multi-consumer queue."""
from time import time as _time
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
from collections import deque
import heapq
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
class Empty(Exception):
"... |
gkc1000/pyscf | refs/heads/master | pyscf/nao/test/test_0068_gw_f_atom.py | 1 | from __future__ import print_function, division
import unittest, numpy as np
from pyscf import gto, scf
from pyscf.nao import gw as gw_c
mol = gto.M( verbose = 1, atom = '''F 0.0 0.0 0.0''', basis = 'aug-cc-pvdz', spin = 1, )
gto_mf = scf.UHF(mol)
e_tot = gto_mf.kernel()
class KnowValues(unittest.TestCase):
def te... |
deved69/pelican-1 | refs/heads/master | docs/conf.py | 21 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys, os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
sys.path.append(os.path.abspath(os.pardir))
from pelican import __version__
# -- General configuration -----------------------------------------------------
templates_path = ['_templ... |
chaluemwut/fbserver | refs/heads/master | venv/lib/python2.7/site-packages/sklearn/externals/joblib/test/__init__.py | 3 | from . import test_memory
from . import test_hashing
|
edxnercel/edx-platform | refs/heads/master | common/djangoapps/student/tests/test_course_listing.py | 18 | """
Unit tests for getting the list of courses for a user through iterating all courses and
by reversing group name formats.
"""
import mock
from mock import patch, Mock
from student.tests.factories import UserFactory
from student.roles import GlobalStaff
from xmodule.modulestore import ModuleStoreEnum
from xmodule.mo... |
hj3938/panda3d | refs/heads/master | direct/src/task/MiniTask.py | 25 | """This module implements a minimum task manager. It is similar in
principle to the full-featured task manager implemented in Task.py,
but it has a sharply reduced feature set--completely bare-bones, in
fact--and it is designed to be a pure-python implementation that does
not require any C++ Panda support, so that it ... |
bhansa/fireball | refs/heads/master | pyvenv/Lib/encodings/cp862.py | 272 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.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_map)
def decode(self,input,errors='strict'):
... |
Smarsh/django | refs/heads/master | django/db/models/base.py | 8 | import types
import sys
import os
from itertools import izip
import django.db.models.manager # Imported to register signal handler.
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS
from django.core import validators
from django.db.models.f... |
ThiagoGarciaAlves/intellij-community | refs/heads/master | python/testData/quickFixes/PyAugmentAssignmentQuickFixTest/function.py | 83 | def retStr():
return ''
s1 = ''
<weak_warning descr="Assignment can be replaced with augmented assignment">s1 = s1 <caret>+ retStr()</weak_warning>
|
djw8605/htcondor | refs/heads/cached | src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/change_availability.py | 10 | #! /usr/bin/python
#
# Changes your Skype online status (availability).
#
# Usefull for adjusting the status from some script. For example, you can
# have a script that locks the screen and sets you to not available.
#
# (c) Copyright 2007, Vincent Oberle, vincent@oberle.org
#
# This software may be used and distribute... |
CMPUT404W16T01/CMPUT404-project-socialdistribution | refs/heads/master | settings/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
whitgroves/taskmap | refs/heads/master | .venvs/python3.6.0/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py | 2930 | ######################## 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... |
sunj1/my_pyforms | refs/heads/master | tutorials/4.MdiApplication/main.py | 1 | import pyforms
from Core.MainWindow import MainWindow
##################################################################################################################
##################################################################################################################
##################################... |
MadeiraCloud/salt | refs/heads/master | sources/salt/utils/master.py | 1 | # -*- coding: utf-8 -*-
'''
salt.utils.master
-----------------
Utilities that can only be used on a salt master.
'''
# Import python libs
import os
import logging
# Import salt libs
import salt.log
import salt.client
import salt.pillar
import salt.utils
import salt.payload
from salt.exceptions import S... |
SummerLW/Perf-Insight-Report | refs/heads/test | third_party/coverage/coverage/data.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
"""Coverage data for coverage.py."""
import glob
import json
import optparse
import os
import os.path
import random
import re
import socket
from coverage import e... |
wwj718/django-react-blog | refs/heads/master | src/core/settings/local.example.py | 1 | """
Local settings.
"""
from .dev import *
SECRET_KEY = ''
DATABASES['mysql']['PASSWORD'] = ''
|
antoniorohit/xbob.spkrec | refs/heads/master | config/tools/isv/isv_512g_u200.py | 1 | #!/usr/bin/env python
import xbob.spkrec
# 1/ The tool
tool = xbob.spkrec.tools.ISVTool
# 2/ GMM Training
n_gaussians = 512
iterk = 25
iterg_train = 25
end_acc = 0.0001
var_thd = 0.0001
update_weights = True
update_means = True
update_variances = True
norm_KMeans = True
# 3/ JFA Training
ru = 200 # The dimensionali... |
ctrlaltdylan/CouchPotato | refs/heads/master | app/config/__init__.py | 10 | DATADIR=None
|
ebukoz/thrive | refs/heads/develop | erpnext/crm/doctype/email_campaign/test_email_campaign.py | 8 | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestEmailCampaign(unittest.TestCase):
pass
|
vidbina/ansible | refs/heads/devel | contrib/inventory/libvirt_lxc.py | 91 | #!/usr/bin/env python
# (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 General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... |
mkjellman/cassandra | refs/heads/trunk | pylib/cqlshlib/test/test_cqlsh_commands.py | 32 | # 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... |
bellhops/django-crud-filters | refs/heads/master | CRUDFilters/__init__.py | 9 | # -*- coding: utf-8 -*-
"""
View and Model base classes used to control access permissions for CRUD requests.
"""
__version__ = '0.1' |
DaTrollMon/pyNES | refs/heads/0.1.x | pynes/tests/composer_test.py | 28 | # -*- coding: utf-8 -*-
from pynes.tests import ComposerTestCase
from pynes.game import Game, PPUSprite
from pynes.composer import compose
from pynes.nes_types import NesString
class ComposerTest(ComposerTestCase):
def test_sprite_assigned_128_to_x(self):
(self.assert_asm_from(
'from pynes... |
MenZil/kuma | refs/heads/master | vendor/packages/translate/lang/hy.py | 24 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007-2008, 2011 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 ver... |
thiagodasilva/swift | refs/heads/master | test/unit/cli/test_recon.py | 5 | # Copyright (c) 2013 Christian Schwede <christian.schwede@enovance.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 b... |
astropy/astropy | refs/heads/main | astropy/convolution/tests/test_convolve_speeds.py | 8 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import timeit
import numpy as np # pylint: disable=W0611
# largest image size to use for "linear" and fft convolutions
max_exponents_linear = {1: 15, 2: 7, 3: 5}
max_exponents_fft = {1: 15, 2: 10, 3: 7}
if __name__ == "__main__":
for ndims in [1,... |
jschornick/i2c_device | refs/heads/master | examples/lsm_test.py | 1 | #!/usr/bin/env python
import time
import os, sys
import i2c_device
dev = i2c_device.I2CDevice(1,0x19,config='lsm303dlhc_accel_i2c.yaml')
print "Device:", dev
print "Multi-byte read is:", dev.multi
print
ctrl1 = dev.registers['CTRL_REG1_A']
print "Register: ", ctrl1
print "Read: {:08b}".format( ctrl1.read_byte() )
pr... |
Pixomondo/rez | refs/heads/master_pxo | src/rez/tests/data/solver/packages/test_variant_split_start/1.0/package.py | 5 | name = "test_variant_split_start"
version = "1.0"
variants = [["test_variant_split_mid1-1"], ["test_variant_split_mid2-2"]]
|
signed/intellij-community | refs/heads/master | python/testData/editing/py254.after.py | 166 |
class Foo(object):
def foo(bar):
pass
def bar(foo):
pass |
agry/NGECore2 | refs/heads/master | scripts/object/tangible/ship/attachment/weapon/xwing_weapon_pos_s02_0.py | 85615 | import sys
def setup(core, object):
return |
plotly/python-api | refs/heads/master | packages/python/plotly/plotly/validators/layout/polar/angularaxis/tickfont/_family.py | 1 | import _plotly_utils.basevalidators
class FamilyValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="family",
parent_name="layout.polar.angularaxis.tickfont",
**kwargs
):
super(FamilyValidator, self).__init__(
plotly_name... |
virajprabhu/oppia | refs/heads/develop | core/domain/exp_domain_test.py | 9 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... |
CodingVault/LeetCodeInPython | refs/heads/master | remove_dups_from_sorted_list_ii.py | 1 | #!/usr/bin/env python
# encoding: utf-8
"""
remove_dups_from_sorted_list_ii.py
Created by Shengwei on 2014-07-05.
"""
# https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
# tags: medium, linked-list, pointer, dups, edge cases
"""
Given a sorted linked list, delete all nodes that have duplicate n... |
jwren/intellij-community | refs/heads/master | python/testData/completion/instanceFromCallableAssignedToCallAttr.py | 39 | class Foo(object):
bar = True
class FooMaker(object):
__call__ = tuple
fm = FooMaker()
f3 = fm()
f3.c<caret> |
brianwoo/django-tutorial | refs/heads/master | build/Django/django/db/backends/base/features.py | 79 | from django.db.models.aggregates import StdDev
from django.db.utils import ProgrammingError
from django.utils.functional import cached_property
class BaseDatabaseFeatures(object):
gis_enabled = False
allows_group_by_pk = False
# True if django.db.backends.utils.typecast_timestamp is used on values
# r... |
tadebayo/myedge | refs/heads/master | myvenv/Lib/site-packages/django/contrib/gis/utils/layermapping.py | 137 | # LayerMapping -- A Django Model/OGR Layer Mapping Utility
"""
The LayerMapping class provides a way to map the contents of OGR
vector files (e.g. SHP files) to Geographic-enabled Django models.
For more information, please consult the GeoDjango documentation:
https://docs.djangoproject.com/en/dev/ref/contrib/gi... |
klyap/pypes | refs/heads/master | ui/pypesvds/lib/extras/pdfparser.py | 4 | import sys
from StringIO import StringIO
from pdflib.pdfparser import PDFDocument, PDFParser, PDFPasswordIncorrect
from pdflib.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdflib.pdfdevice import PDFDevice, FigureItem, TextItem, PDFPageAggregator
from pdflib.pdffont import PDFUnicodeNotDefined
from pdf... |
mangelajo/python-neutronclient | refs/heads/master | neutronclient/tests/unit/test_command_meta.py | 7 | # Copyright 2013 Intel
# Copyright 2013 Isaku Yamahata <isaku.yamahata at intel com>
# <isaku.yamahata at gmail com>
# 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... |
TripleDogDare/RadioWCSpy | refs/heads/master | env/lib/python2.7/site-packages/setuptools/command/test.py | 363 | from distutils.errors import DistutilsOptionError
from unittest import TestLoader
import unittest
import sys
from pkg_resources import (resource_listdir, resource_exists, normalize_path,
working_set, _namespace_packages,
add_activation_listener, require, EntryPoint... |
renzon/fatec-script-2 | refs/heads/master | backend/appengine/routes/admin/home.py | 59 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from gaecookie.decorator import no_csrf
from gaepermission.decorator import login_not_required, permissions
from config.template_middleware import TemplateResponse
from permission_app.model import ADMIN
from tekton import router
from route... |
cedk/odoo | refs/heads/8.0 | addons/hw_escpos/escpos/__init__.py | 283 | __all__ = ["constants","escpos","exceptions","printer"]
|
adrienbrault/home-assistant | refs/heads/dev | tests/components/uvc/test_camera.py | 5 | """The tests for UVC camera module."""
from datetime import datetime, timedelta, timezone
from unittest.mock import call, patch
import pytest
import requests
from uvcclient import camera as camera, nvr
from homeassistant.components.camera import (
DEFAULT_CONTENT_TYPE,
SERVICE_DISABLE_MOTION,
SERVICE_ENAB... |
carsongee/edx-platform | refs/heads/master | common/lib/tempdir.py | 68 | """Make temporary directories nicely."""
import atexit
import os.path
import shutil
import tempfile
def mkdtemp_clean(suffix="", prefix="tmp", dir=None):
"""Just like mkdtemp, but the directory will be deleted when the process ends."""
the_dir = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=dir)
atex... |
joshloyal/scikit-learn | refs/heads/master | sklearn/externals/joblib/pool.py | 37 | """Custom implementation of multiprocessing.Pool with custom pickler.
This module provides efficient ways of working with data stored in
shared memory with numpy.memmap arrays without inducing any memory
copy between the parent and child processes.
This module should not be imported if multiprocessing is not
availabl... |
asadziach/tensorflow | refs/heads/pedestrian_detection_walabot_tf | tensorflow/contrib/keras/python/keras/constraints.py | 39 | # 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... |
GitHublong/hue | refs/heads/master | desktop/core/ext-py/kazoo-2.0/kazoo/security.py | 36 | """Kazoo Security"""
from base64 import b64encode
from collections import namedtuple
import hashlib
# Represents a Zookeeper ID and ACL object
Id = namedtuple('Id', 'scheme id')
class ACL(namedtuple('ACL', 'perms id')):
"""An ACL for a Zookeeper Node
An ACL object is created by using an :class:`Id` object ... |
SpectreJan/gnuradio | refs/heads/master | gr-digital/python/grc_gnuradio/blks2/packet.py | 2 | # Copyright 2008,2009,2012-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later... |
UOMx/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py | 213 | from opaque_keys.edx.locator import DefinitionLocator
import copy
class DefinitionLazyLoader(object):
"""
A placeholder to put into an xblock in place of its definition which
when accessed knows how to get its content. Only useful if the containing
object doesn't force access during init but waits unt... |
MQQiang/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/asyncio/windows_utils.py | 64 | """
Various Windows specific bits and pieces
"""
import sys
if sys.platform != 'win32': # pragma: no cover
raise ImportError('win32 only')
import socket
import itertools
import msvcrt
import os
import subprocess
import tempfile
import _winapi
__all__ = ['socketpair', 'pipe', 'Popen', 'PIPE', 'PipeHandle']
#... |
AthosOrg/athos-core | refs/heads/master | athos/__init__.py | 1 | import collections
import os
import importlib
import logging
import athos
import athos.plugin
import yaml
import json # TODO: tirar
from matrix_client.client import MatrixClient
from matrix_client.api import MatrixRequestError
log = logging.getLogger(__name__)
class AthosMatrixClient(MatrixClient):
def send(s... |
inteligencia-coletiva-lsd/pybossa | refs/heads/master | alembic/env.py | 13 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python... |
JulianEberius/SublimeRope | refs/heads/master | rope/base/pynamesdef.py | 112 | import rope.base.oi.soi
from rope.base import pynames
from rope.base.pynames import *
class AssignedName(pynames.AssignedName):
def __init__(self, lineno=None, module=None, pyobject=None):
self.lineno = lineno
self.module = module
self.assignments = []
self.pyobject = _Inferred(se... |
rowemoore/odoo | refs/heads/8.0 | openerp/report/interface.py | 380 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
uhef/fs-uae-gles | refs/heads/gles-devel | launcher/fs_uae_launcher/ui/settings/ScanPathsGroup.py | 2 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import traceback
import fs_uae_launcher.fsui as fsui
from ...I18N import _, ngettext
from ...Settings import Settings
from ..IconButton import IconButton
class... |
EttusResearch/gnuradio | refs/heads/master | gnuradio-runtime/python/build_utils.py | 252 | #
# Copyright 2004,2009,2012 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)
# any later ve... |
moreati/django-userena | refs/heads/master | userena/contrib/umessages/urls.py | 9 | from django.conf.urls import *
from userena.contrib.umessages import views as messages_views
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^compose/$',
messages_views.message_compose,
name='userena_umessages_compose'),
url(r'^compose/(?P<recipients>... |
alphafoobar/intellij-community | refs/heads/master | python/testData/copyPaste/SelectionReverse3.after.py | 332 |
if True:
a = 1
b = 2
def f():
if True:
a = 1
b = 2
|
1stvamp/gunicorn | refs/heads/master | tests/treq.py | 6 | # Copyright 2009 Paul J. Davis <paul.joseph.davis@gmail.com>
#
# This file is part of the pywebmachine package released
# under the MIT license.
import t
import inspect
import os
import random
from gunicorn._compat import execfile_
from gunicorn.config import Config
from gunicorn.http.parser import RequestParser
fro... |
seankelly/buildbot | refs/heads/master | worker/buildbot_worker/scripts/restart.py | 11 | # This file is part of Buildbot. Buildbot 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 that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/tangible/loot/factional_schematic/rebel_marine_bracer_l_schematic.py | 85615 | import sys
def setup(core, object):
return |
tfroehlich82/erpnext | refs/heads/develop | erpnext/patches/v7_1/update_component_type.py | 42 | import frappe
from frappe.utils import flt
def execute():
frappe.reload_doc('hr', 'doctype', 'salary_component')
sal_components = frappe.db.sql("""
select DISTINCT salary_component, parentfield from `tabSalary Detail`""", as_dict=True)
if sal_components:
for sal_component in sal_components:
if sal_component... |
emmuchira/kps_erp | refs/heads/develop | erpnext/hr/doctype/interest/test_interest.py | 55 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Interest')
class TestInterest(unittest.TestCase):
pass
|
kingvuplus/boom2 | refs/heads/master | lib/python/Components/Renderer/LcdPicon.py | 2 | # Embedded file name: /usr/lib/enigma2/python/Components/Renderer/LcdPicon.py
import os, re, unicodedata
from Renderer import Renderer
from enigma import ePixmap, ePicLoad
from Tools.Alternatives import GetWithAlternative
from Tools.Directories import pathExists, SCOPE_ACTIVE_SKIN, resolveFilename
from Components... |
trea-uy/django-survey | refs/heads/master | TreaProject/dynamicForms/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
an146/pacman | refs/heads/master | test/pacman/tests/sync102.py | 27 | self.description = "Sysupgrade with a newer local package"
sp = pmpkg("dummy", "0.9-1")
sp.files = ["bin/foo", "bin/bar"]
lp = pmpkg("dummy")
lp.files = ["bin/foo", "bin/baz"]
self.addpkg2db("sync", sp)
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.... |
kurli/blink-crosswalk | refs/heads/master | Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py | 6 | # -*- coding: utf-8; -*-
#
# Copyright (C) 2011 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, a... |
louis01010100/annosapiens | refs/heads/master | variantAnalyzer.py | 1 | #!/usr/bin/env python
import csv
import vcf
# "chr","pos","ref","alt","ac","clnsig","gene","diseases"
ANNOTATION_FILE = 'data/biobank_pathogenic.csv'
BIOBANK_FILE = 'data/grch37/clinvar.vcf.gz'
def to_string(record):
return '{chrom}\t{pos}\t{ref}\t{alt}\t{ac}\t{clnsig}\t{gene}\t{diseases}'.format(
chro... |
Pablo126/SSBW | refs/heads/master | Entrega1/lib/python3.5/site-packages/PIL/JpegImagePlugin.py | 6 | #
# The Python Imaging Library.
# $Id$
#
# JPEG (JFIF) file handling
#
# See "Digital Compression and Coding of Continuous-Tone Still Images,
# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1)
#
# History:
# 1995-09-09 fl Created
# 1995-09-13 fl Added full parser
# 1996-03-25 fl Added hack to use t... |
kosgroup/odoo | refs/heads/10.0 | addons/website_portal/__manifest__.py | 22 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Website Portal',
'category': 'Website',
'summary': 'Account Management Frontend for your Customers',
'version': '1.0',
'description': """
Allows your customers to manage their account from ... |
ThiagoGarciaAlves/intellij-community | refs/heads/master | python/testData/refactoring/introduceParameter/localVariableInFor.py | 83 | for <caret>item in range(100):
pass |
taedla01/MissionPlanner | refs/heads/master | Lib/wsgiref/headers.py | 59 | """Manage HTTP Response Headers
Much of this module is red-handedly pilfered from email.message in the stdlib,
so portions are Copyright (C) 2001,2002 Python Software Foundation, and were
written by Barry Warsaw.
"""
from types import ListType, TupleType
# Regular expression that matches `special' character... |
Pexego/l10n-spain | refs/heads/8.0 | l10n_es_aeat/__init__.py | 2 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2011
# Pexego Sistemas Informáticos. (http://pexego.es)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... |
jicruz/heroku-bot | refs/heads/master | lib/youtube_dl/extractor/rtve.py | 3 | # coding: utf-8
from __future__ import unicode_literals
import base64
import re
import time
from .common import InfoExtractor
from ..compat import (
compat_struct_unpack,
)
from ..utils import (
determine_ext,
ExtractorError,
float_or_none,
remove_end,
remove_start,
sanitized_Request,
... |
drawks/ansible | refs/heads/devel | lib/ansible/plugins/doc_fragments/lxca_common.py | 44 | # -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
# Ansible still belong to the author of the module, and may assign their
# own l... |
fernandezcuesta/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gce.py | 8 | #!/usr/bin/python
# Copyright 2013 Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
... |
rockstor/rockstor-core | refs/heads/master | src/rockstor/smart_manager/views/samba_service.py | 2 | """
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... |
trondhindenes/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_elementsw_snapshot_restore.py | 9 | #!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or
# https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Element Software Snapshot Restore
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
jeremiedecock/snippets | refs/heads/master | python/tkinter/python3/color_chooser.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... |
sunils34/buffer-django-nonrel | refs/heads/master | tests/regressiontests/utils/text.py | 51 | import unittest
from django.utils import text
class TestUtilsText(unittest.TestCase):
def test_truncate_words(self):
self.assertEqual(u'The quick brown fox jumped over the lazy dog.',
text.truncate_words(u'The quick brown fox jumped over the lazy dog.', 10))
self.assertEqual(u'The qui... |
jmtoivan/apparatus | refs/heads/master | src/english_specific.py | 1 | #/usr/bin/env python
# -*- coding: utf-8 -*-
"""
English specific methods for poetry generation.
.. module:: english_specific
"""
import morpha_en
import helpers
def main():
pass
def add_morph(original, new):
"""
Adds the original morphological analysis to the replacing words
>>> add_morph([('The'... |
triflesoft/django-application-talos | refs/heads/master | applications/talos/management/commands/create_basic_identity.py | 1 | from ..abstract_command import AbstractModelCommand
class Command(AbstractModelCommand):
help = 'Creates new basic identity for existing principal.'
def add_command_arguments(self, parser):
principal_parser = parser.add_mutually_exclusive_group(required=True)
principal_parser.add_argument(
... |
jackrzhang/zulip | refs/heads/master | zerver/tests/test_realm_emoji.py | 2 | # -*- coding: utf-8 -*-
import mock
from zerver.lib.actions import do_create_realm, do_create_user, \
do_remove_realm_emoji, get_realm, check_add_realm_emoji
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.test_helpers import get_test_image_file, get_user
from zerver.models import Realm, RealmEm... |
Ambrosys/glyph | refs/heads/master | tests/unittest/test_application.py | 1 | import glyph.application as application
from glyph.assessment import AAssessmentRunner
class AssessmentRunnerMock(AAssessmentRunner):
"""A mock assessment runner. Gives fitness values (1.0, 1.0) to every indidvidual."""
def measure(self, individual):
return 1.0, 1.0
def test_gp_runner_reproducibili... |
robhudson/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/base.py | 445 | import sys
from ctypes.util import find_library
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.sqlite3.base import (
Database, DatabaseWrapper as SQLiteDatabaseWrapper, SQLiteCursorWrapper,
)
from django.utils import six
from .client import SpatiaL... |
scotthartbti/android_external_chromium_org | refs/heads/kk44 | tools/checkdeps/cpp_checker.py | 57 | # Copyright (c) 2012 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.
"""Checks C++ and Objective-C files for illegal includes."""
import codecs
import os
import re
import results
from rules import Rule, MessageRule
cla... |
jamesbroadhead/pex | refs/heads/master | pex/testing.py | 39 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import contextlib
import os
import random
import subprocess
import tempfile
import zipfile
from textwrap import dedent
from .common import safe_mkdir, safe_rmtree
from .compatibility impo... |
garbled1/ansible | refs/heads/devel | lib/ansible/modules/net_tools/dnsimple.py | 29 | #!/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'],
... |
thardie/Diamond | refs/heads/master | src/collectors/kafka/test/testkafka.py | 7 | #!/usr/bin/python
# coding=utf-8
###############################################################################
import urllib2
try:
from xml.etree import ElementTree
except ImportError:
ElementTree = None
from test import CollectorTestCase
from test import get_collector_config
from test import run_only
from ... |
yodalee/servo | refs/heads/master | tests/wpt/web-platform-tests/websockets/security/check.py | 253 | def main(request, response):
return "FAIL" if 'Sec-WebSocket-Key' in request.headers else "PASS"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.