repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
titilambert/teeawards | refs/heads/master | old/achievements/medals/medals.py | 1 | from pymongo import DESCENDING
from libs.lib import tee_db, get_stats, get_player_stats
from bottle import mako_view
from datetime import datetime, timedelta
from libs.achievement import achievement_desc_list, achievement_player_list, achievement_livestat_list
from libs.lib import kill_table
@mako_view("desc_medals"... |
Bumpybox/pyblish-bumpybox | refs/heads/master | pyblish_bumpybox/plugins/nuke/collect_reads.py | 1 | from pyblish import api
from pyblish_bumpybox import inventory
class CollectReads(api.ContextPlugin):
"""Collect all read nodes."""
order = inventory.get_order(__file__, "CollectReads")
label = "Reads"
hosts = ["nuke", "nukeassist"]
def process(self, context):
import os
import c... |
dustymugs/pgpointcloud_utils | refs/heads/master | pgpointcloud_utils/pcpoint.py | 1 | import copy
import struct
import binascii
import pyproj
from decimal import Decimal
from numeric_string_parser import NumericStringParser
from .pcexception import *
from .pcformat import PcDimension, PcFormat
class PcPoint(object):
_dimensions = []
# header format
#
# byte (endian)
# uint32 (pci... |
cmdelatorre/roses | refs/heads/master | skills/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
liorvh/golismero | refs/heads/master | thirdparty_libs/django/core/serializers/pyyaml.py | 110 | """
YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
import decimal
import yaml
from io import StringIO
from django.db import models
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import Serializer as PythonSerializer
fr... |
moritzschaefer/luigi | refs/heads/master | test/remote_scheduler_test.py | 67 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
zeroSteiner/king-phisher | refs/heads/master | king_phisher/client/windows/__init__.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/windows/__init__.py
#
# 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
# ... |
adamkh/micropython | refs/heads/master | docs/conf.py | 6 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# MicroPython documentation build configuration file, created by
# sphinx-quickstart on Sun Sep 21 11:42:03 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
... |
leeon/annotated-django | refs/heads/note | tests/model_formsets/models.py | 69 | from __future__ import unicode_literals
import datetime
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
class Meta:
ordering = ('n... |
2014c2g4/c2g4 | refs/heads/master | w2/static/Brython2.0.0-20140209-164925/Lib/pydoc.py | 40 | #!/usr/bin/env python3
"""Generate Python documentation in HTML or text for interactive use.
In the Python interpreter, do "from pydoc import help" to provide
help. Calling help(thing) on a Python object documents the object.
Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation ... |
shawncaojob/LC | refs/heads/master | QUESTIONS/146_lru_cache.py | 1 | # 146. LRU Cache Add to List QuestionEditorial Solution My Submissions
# Total Accepted: 101493 Total Submissions: 636611 Difficulty: Hard Contributors: Admin
# Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
#
# get(key) - Get the ... |
rosmo/boto | refs/heads/develop | boto/ec2/elb/securitygroup.py | 152 | # Copyright (c) 2010 Reza Lotun http://reza.lotun.name
#
# 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, modify, m... |
tanmaykm/edx-platform | refs/heads/master | lms/djangoapps/bulk_email/models.py | 9 | """
Models for bulk email
"""
import logging
import markupsafe
from django.contrib.auth.models import User
from django.db import models
from openedx.core.djangoapps.course_groups.models import CourseUserGroup
from openedx.core.djangoapps.course_groups.cohorts import get_cohort_by_name
from openedx.core.lib.html_to_te... |
BigBrother1984/android_external_chromium_org | refs/heads/kitkat | tools/telemetry/telemetry/core/platform/profiler/iprofiler_profiler.py | 23 | # 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 signal
import sys
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core.platform import profiler
#... |
amrdraz/kodr | refs/heads/master | app/brython/www/src/Lib/binascii.py | 8 | """A pure Python implementation of binascii.
Rather slow and buggy in corner cases.
PyPy provides an RPython version too.
"""
# borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py
class Error(Exception):
pass
class Done(Exception):
pass
class Incomplete(Exception):
pass
... |
ChenglongChen/topical_word_embeddings | refs/heads/master | TWE-2/gensim/models/tfidfmodel.py | 59 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
import logging
import math
from gensim import interfaces, matutils, utils
from six import iteritems
logger = logging.getLogger('gens... |
Lujeni/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_elementsw_ldap.py | 44 | #!/usr/bin/python
# (c) 2017, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
jnerin/ansible | refs/heads/devel | lib/ansible/template/safe_eval.py | 39 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... |
suqinhuang/virt-test | refs/heads/master | libvirt/update_config.py | 15 | #!/usr/bin/python
"""
Populate/update config files for virt-test
@copyright: Red Hat 2013
"""
import os, sys
import common
from autotest.client.shared import logging_manager
from virttest import data_dir, bootstrap, utils_misc
test_dir = os.path.dirname(sys.modules[__name__].__file__)
test_dir = os.path.abspath(test_... |
ZuluPro/libcloud | refs/heads/trunk | libcloud/__init__.py | 2 | # 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 use ... |
AymericBebert/MusicLearning | refs/heads/master | src/file_actions.py | 1 | #!/usr/bin/env python3
# -*-coding:utf-8-*-
"""
This module is used to read and write sound files
Structure of a sound object : sound[canal][sample] (type int list list)
"""
import os
import wave
from subprocess import call
import glob
import numpy as np
from pydub import AudioSegment
from log import writeLog
from ... |
JohnDenker/brython | refs/heads/master | www/src/Lib/test/test_poll.py | 23 | # Test case for the os.poll() function
import os
import random
import select
import _testcapi
try:
import threading
except ImportError:
threading = None
import time
import unittest
from test.support import TESTFN, run_unittest, reap_threads
try:
select.poll
except AttributeError:
raise unittest.SkipTe... |
foobarbazblarg/stayclean | refs/heads/master | stayclean-2016-february/participant.py | 60 | import datetime
class Participant:
def __init__(self):
self.name = ""
self.isStillIn = True
self.hasCheckedIn = False
self.relapseDate = None
@property
def hasRelapsed(self):
return self.relapseDate is not None
def setFromLine(self, lineString):
# form... |
benoitsteiner/tensorflow-opencl | refs/heads/master | tensorflow/contrib/learn/python/learn/utils/gc.py | 45 | # 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... |
ayepezv/GAD_ERP | refs/heads/master | addons/auth_oauth/models/auth_oauth.py | 39 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AuthOAuthProvider(models.Model):
"""Class defining the configuration values of an OAuth2 provider"""
_name = 'auth.oauth.provider'
_description = 'OAuth2 provider'
... |
Simon-Tang/onedrive-d-old | refs/heads/future | onedrive_d/od_main.py | 7 | #!/usr/bin/python3
"""
Main entry of onedrive-d.
"""
import sys
import click
import daemonocle
from . import od_glob
# this runs before any daemonocle code
config = od_glob.get_config_instance()
is_debug_mode = False
for arg in sys.argv:
if arg == '--debug':
od_glob.get_logger(config.params['MIN_LOG_LEVEL']).debu... |
pkruskal/scikit-learn | refs/heads/master | sklearn/neighbors/__init__.py | 306 | """
The :mod:`sklearn.neighbors` module implements the k-nearest neighbors
algorithm.
"""
from .ball_tree import BallTree
from .kd_tree import KDTree
from .dist_metrics import DistanceMetric
from .graph import kneighbors_graph, radius_neighbors_graph
from .unsupervised import NearestNeighbors
from .classification impo... |
JianyuWang/nova | refs/heads/master | nova/tests/unit/api/openstack/compute/test_plugin_framework.py | 17 | # Copyright 2014 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... |
leiferikb/bitpop | refs/heads/master | src/tools/bisect-builds.py | 4 | #!/usr/bin/env python
# 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.
"""Snapshot Build Bisect Tool
This script bisects a snapshot archive using binary search. It starts at
a bad revision (it will try... |
emawind84/readthedocs.org | refs/heads/master | readthedocs/core/utils/tasks/permission_checks.py | 30 | __all__ = ('user_id_matches',)
def user_id_matches(request, state, context):
user_id = context.get('user_id', None)
if user_id is not None and request.user.is_authenticated():
if request.user.id == user_id:
return True
return False
|
lrn-guru/lrn | refs/heads/master | lrn/repl.py | 1 | import os
import api
import lrn
l = api.l
from subprocess import call
def check_progress(cmd):
task = api.get_task()
test = task['test']
test_dir = api.get_tests_dir()
command = "python {}/{}.py {}".format(test_dir, test, cmd)
status = call(command.split())
return status
def repl():
tr... |
Tatsh-ansible/ansible | refs/heads/devel | lib/ansible/module_utils/nxos.py | 9 | #
# 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 license
# to the complet... |
nhomar/odoo-mirror | refs/heads/8.0 | addons/account_followup/report/__init__.py | 447 | # -*- 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... |
pvalienteverde/MeetUpIntroMLySistemasRecomendacion | refs/heads/master | scripts/SistemasRecomendacion/CollaborativeFiltering.py | 1 | import pandas as pd
import numpy as np
from sklearn.metrics import mean_squared_error
from pyspark.ml.evaluation import RegressionEvaluator,Evaluator
from math import sqrt
from sklearn.metrics.pairwise import pairwise_distances
from sklearn.metrics.pairwise import cosine_similarity
class EvaluadorRMSE(Evaluator):
... |
alfonsotames/linux | refs/heads/master | scripts/gdb/linux/dmesg.py | 299 | #
# gdb helper commands and functions for Linux kernel debugging
#
# kernel log buffer dump
#
# Copyright (c) Siemens AG, 2011, 2012
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
import sys
from linux import utils
class LxDmesg(... |
zuher83/z-odoo8-addons | refs/heads/master | credit_control_limit/__openerp__.py | 1 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-2014 Zuher ELMAS. All Rights Reserved
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
aristofor/Gifomaton | refs/heads/master | gifomaton/menu.py | 1 | # coding: utf-8
import pygame
from pygame.locals import *
from scene import Scene
from player import PlayerScene
from capture import CaptureScene
from models import mock_seqs
class MenuScene(Scene):
cols = 3
rows = 3
_screen_rect = None
_location = None
item_size = (430,310)
gut = 10
# ... |
sfcl/severcart | refs/heads/master | index/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
imajes/Sick-Beard | refs/heads/master | sickbeard/metadata/wdtv.py | 3 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... |
sirkubax/ansible | refs/heads/devel | lib/ansible/plugins/action/copy.py | 22 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
hachard/Cra-Magnet | refs/heads/master | flask/lib/python3.5/site-packages/openid/store/nonce.py | 180 | __all__ = [
'split',
'mkNonce',
'checkTimestamp',
]
from openid import cryptutil
from time import strptime, strftime, gmtime, time
from calendar import timegm
import string
NONCE_CHARS = string.ascii_letters + string.digits
# Keep nonces for five hours (allow five hours for the combination of
# reque... |
GoogleChrome/big-rig | refs/heads/master | app/src/thirdparty/telemetry/internal/util/path.py | 6 | # 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
# TODO(dtu): Move these functions from core.util to here.
GetBaseDir = util.GetBaseDir
GetTelemetryDir = util.Ge... |
qiqi/fds | refs/heads/master | pascal_lite/operators/plinalg.py | 1 | import numpy as np
from numpy import *
try:
from mpi4py import MPI
except ImportError:
pass
def pQR(comm, A):
# Compute QR factorization A = Q*R. Q is assumed to be a tall matrix whose rows are distributed among processors.
Ashape = A.shape
assert Ashape[0] >= Ashape[1]
root = 0
rank = co... |
m-walters/mcmd | refs/heads/master | nn/cnn/cnn.py | 1 | import tensorflow as tf
#from tensorflow.examples.tutorials.mnist import input_data
#mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def bias_variable(shape):
initial = tf.constant(0.1, shape=... |
pinterb/st2 | refs/heads/master | st2common/st2common/models/api/tag.py | 2 | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... |
clarko1/Cramd | refs/heads/master | bigtable/hello/main_test.py | 3 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
ANR-COMPASS/shesha | refs/heads/master | shesha/ao/imats.py | 1 | ## @package shesha.ao.imats
## @brief Computation implementations of interaction matrix
## @author COMPASS Team <https://github.com/ANR-COMPASS>
## @version 5.0.0
## @date 2020/05/18
## @copyright GNU Lesser General Public License
#
# This file is part of COMPASS <https://anr-compass.github.io/compass/... |
teeple/pns_server | refs/heads/master | work/install/Python-2.7.4/Lib/json/encoder.py | 105 | """Implementation of JSONEncoder
"""
import re
try:
from _json import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from _json import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
ESCAPE = re.compile(r'[\x00-\x... |
nkhoit/dcss.py | refs/heads/master | dcss/connection.py | 1 | import paramiko
import time
import pexpect
import datetime
import logging
log = logging.getLogger(__name__)
SPLITTER = '`~`'
COMMAND = 'BOT_CMD:'
UTF8 = 'utf-8'
class LocalConnection():
def __init__(self, playerName):
self.isWaitingForResponse = False
self.process = None
self.delay = 0.... |
GRArmstrong/invenio-inspire-ops | refs/heads/prod | modules/miscutil/lib/upgrades/invenio_2013_03_29_idxINDEX_stopwords_update.py | 19 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2012, 2013 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 opt... |
emfcamp/micropython | refs/heads/tilda-master | tests/inlineasm/asmrettype.py | 54 | # test return type of inline asm
@micropython.asm_thumb
def ret_obj(r0) -> object:
pass
ret_obj(print)(1)
@micropython.asm_thumb
def ret_bool(r0) -> bool:
pass
print(ret_bool(0), ret_bool(1))
@micropython.asm_thumb
def ret_int(r0) -> int:
lsl(r0, r0, 29)
print(ret_int(0), hex(ret_int(1)), hex(ret_int(2))... |
mkaluza/external_chromium_org | refs/heads/kk44 | third_party/tlslite/tlslite/integration/XMLRPCTransport.py | 87 | """TLS Lite + xmlrpclib."""
import xmlrpclib
import httplib
from tlslite.integration.HTTPTLSConnection import HTTPTLSConnection
from tlslite.integration.ClientHelper import ClientHelper
class XMLRPCTransport(xmlrpclib.Transport, ClientHelper):
"""Handles an HTTPS transaction to an XML-RPC server."""
def __i... |
CERNDocumentServer/invenio | refs/heads/prod | modules/miscutil/lib/memoiseutils_unit_tests.py | 3 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013 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... |
murarivarma/candy_crush | refs/heads/gh-pages | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py | 2736 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... |
jayme-github/CouchPotatoServer | refs/heads/master | couchpotato/core/notifications/base.py | 3 | from couchpotato.api import addApiView
from couchpotato.core.event import addEvent
from couchpotato.core.helpers.request import jsonified
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
from couchpotato.environment import Env
log = CPLog(__name__)
class Notification(Plugin)... |
flavour/Turkey | refs/heads/master | modules/unit_tests/s3/s3datatable.py | 6 | # -*- coding: utf-8 -*-
#
# S3DataTable Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3datatable.py
#
import unittest
import datetime
from gluon import *
from gluon.storage import Storage
from s3.s3data import S3DataTable
# ===========================... |
wimnat/ansible-modules-extras | refs/heads/devel | cloud/vmware/vmware_vm_facts.py | 75 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Li... |
elijah513/django | refs/heads/master | django/contrib/gis/gdal/layer.py | 477 | from ctypes import byref, c_double
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope
from django.contrib.gis.gdal.error import (
GDALException, OGRIndexError, SRSException,
)
from django.contrib.gis.gdal.feature import Feature
from django.contrib.g... |
luiseduardohdbackup/odoo | refs/heads/8.0 | addons/sale_crm/wizard/crm_make_sale.py | 223 | # -*- 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... |
nthiep/global-ssh-server | refs/heads/master | lib/python2.7/posixpath.py | 4 | /usr/lib/python2.7/posixpath.py |
RazvanRotari/iaP | refs/heads/master | iaprs/rest_service/rest_service/wsgi.py | 1 | """
WSGI config for rest_service project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... |
4bic-attic/grano | refs/heads/master | grano/alembic/versions/38c7982f4160_add_degree_denormalizations.py | 4 | """add degree denormalizations
Revision ID: 38c7982f4160
Revises: 59d7b4f94cdf
Create Date: 2014-09-11 20:32:37.987989
"""
# revision identifiers, used by Alembic.
revision = '38c7982f4160'
down_revision = '59d7b4f94cdf'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column(u'grano_entit... |
Lvl4Sword/Acedia | refs/heads/master | sloth/tests/test_userinput.py | 2 | # Copyright 2015, 2016 Scott King
#
# This file is part of Sloth.
#
# Sloth is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... |
mohammed-alfatih/servo | refs/heads/master | tests/wpt/web-platform-tests/old-tests/webdriver/runtests.py | 212 | import unittest
from unittest import TestLoader, TextTestRunner, TestSuite
if __name__ == "__main__":
loader = TestLoader()
suite = TestSuite((
loader.discover(".", pattern="*.py")
))
runner = TextTestRunner(verbosity=2)
runner.run(suite)
unittest.main()
|
dkodnik/Ant | refs/heads/master | openerp/report/render/rml.py | 457 | # -*- 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... |
Tejal011089/trufil-erpnext | refs/heads/master | erpnext/setup/doctype/sales_partner/sales_partner.py | 65 | # 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
from frappe.utils import cstr, filter_strip_join
from frappe.website.website_generator import WebsiteGenerator
from erpnext.utilities.addr... |
jsteemann/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/curses/textpad.py | 212 | """Simple textbox editing widget with Emacs-like keybindings."""
import curses
import curses.ascii
def rectangle(win, uly, ulx, lry, lrx):
"""Draw a rectangle with corners at the provided upper-left
and lower-right coordinates.
"""
win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1)
win.hline(u... |
hazelnusse/sympy-old | refs/heads/master | sympy/thirdparty/pyglet/pyglet/window/carbon/__init__.py | 4 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2007 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... |
Gui13/CouchPotatoServer | refs/heads/master | couchpotato/core/plugins/userscript/main.py | 44 | import os
from couchpotato import index
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.variable import isDict
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
from couchpotato.environment import Env
f... |
ojengwa/reportr | refs/heads/master | core/services/freckle.py | 2 | import json
import requests
import datetime
from . import exceptions
class FreckleClient(object):
"""Simple client implementation to fetch json data from the v1 API."""
def __init__(self, account_name, api_token):
"""
Creates a ``FreckleClient`` instance.
:account_name: Your Freckle ac... |
mwx1993/TACTIC | refs/heads/master | src/pyasm/application/common/base_app_info.py | 6 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... |
chand3040/sree_odoo | refs/heads/master | openerp/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py | 374 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... |
tmimori/frappe | refs/heads/develop | frappe/desk/tags.py | 10 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
import json
"""
Server side functions for tagging.
- Tags can be added to any record (doctype, name) in the system.
- Items are filtered by tags
- Top tags are sh... |
toshywoshy/ansible | refs/heads/devel | lib/ansible/modules/network/fortimanager/fmgr_ha.py | 38 | #!/usr/bin/python
#
# 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.
#
# Ansible is distribut... |
wenxiaomao1023/wenxiaomao | refs/heads/master | article/migrations/0004_auto_20160921_1526.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-09-21 15:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('article', '0003_auto_20160921_1520'),
]
operations ... |
gunchleoc/django | refs/heads/master | django/contrib/admindocs/tests/test_fields.py | 638 | from __future__ import unicode_literals
import unittest
from django.contrib.admindocs import views
from django.db import models
from django.db.models import fields
from django.utils.translation import ugettext as _
class CustomField(models.Field):
description = "A custom field type"
class DescriptionLackingFi... |
mdanielwork/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarImport/m2.py | 80 | import m1
|
michaelkirk/QGIS | refs/heads/master | tests/src/python/test_qgsfeature.py | 5 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsFeature.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__auth... |
haocs/autorest | refs/heads/master | src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/operations/__init__.py | 31 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
martin-g/FrameworkBenchmarks | refs/heads/master | frameworks/Python/django/hello/manage.py | 98 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hello.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
jayme-github/headphones | refs/heads/master | lib/pytz/tzfile.py | 480 | #!/usr/bin/env python
'''
$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $
'''
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from datetime import datetime, timedelta
from struct import unpack, calcsize
from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo
fro... |
siosio/intellij-community | refs/heads/master | python/testData/copyPaste/SelectionOneLine1.after.py | 332 | class MyClass(object):
member1 = 1
member2 = 2
member3 = 3 |
JinXinDeep/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/pooling_ops_test.py | 9 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
elijah513/ice | refs/heads/master | cpp/test/Slice/macros/run.py | 18 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... |
IntersectAustralia/asvo-tao | refs/heads/master | core/sageimport_mpi_HDF/CompareDataSet.py | 1 | from numpy import genfromtxt
import string
import numpy
import sys # for listing directory contents
if __name__ == '__main__':
#if len(sys.argv)<2:
# print("Error Not Enough Arguments")
# exit()
File1='/home/amr/workspace/tao.output.0.csv'#sys.argv[1]
File2='/home/amr/workspace/tao.output.0.... |
sugartom/tensorflow-alien | refs/heads/master | tensorflow/contrib/ndlstm/python/__init__.py | 135 | # 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 applicable ... |
web30s/odoo-9.0c-20160402 | refs/heads/master | hello/templates/openerp/addons/test_limits/models.py | 55 | # -*- coding: utf-8 -*-
import time
import openerp
class m(openerp.osv.osv.Model):
""" This model exposes a few methods that will consume between 'almost no
resource' and 'a lot of resource'.
"""
_name = 'test.limits.model'
def consume_nothing(self, cr, uid, context=None):
return True... |
koomik/CouchPotatoServer | refs/heads/develop | couchpotato/core/media/_base/providers/metadata/base.py | 81 | from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
log = CPLog(__name__)
class MetaDataBase(Plugin):
pass
|
Coelhon/MasterRepo.repository | refs/heads/master | plugin.video.RabbitMovies/resources/lib/sources/disabled/zz_movietv10_mv_tv.py | 30 | # -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... |
vpstudios/Codecademy-Exercise-Answers | refs/heads/master | Language Skills/Python/Unit 8/1-Loops/Step Up 'For's/16-Multiple Lists.py | 5 | list_a = [3, 9, 17, 15, 19]
list_b = [2, 4, 8, 10, 30, 40, 50, 60, 70, 80, 90]
for a, b in zip(list_a, list_b):
# Add your code here!
if a > b:
print a
else:
print b
|
saukrIppl/seahub | refs/heads/master | thirdpart/Django-1.8.10-py2.7.egg/django/core/management/__init__.py | 16 | from __future__ import unicode_literals
from collections import OrderedDict, defaultdict
from importlib import import_module
import os
import pkgutil
import sys
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.manageme... |
crb02005/WebDevSkeleton | refs/heads/master | src/serverApp/router.py | 1 | from serverApp.viewmodel import Service
class Router(object):
""" Provides routing for web addresses """
def __init__(self, flask):
self._api = flask.get_api()
def register_routes(self):
""" Registers View Models on Routes """
self._api.add_resource(Service, '/api/v1/<string:data>... |
lgarren/spack | refs/heads/develop | var/spack/repos/builtin/packages/r-shape/package.py | 1 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
Fiware/cloud.PaaS | refs/heads/master | test/acceptance/integration/environments/get_tier_details/__init__.py | 86 | # -*- coding: utf-8 -*-
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE project.
#
# 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:
#
# h... |
sagar30051991/ozsmart-erp | refs/heads/master | erpnext/setup/doctype/uom/test_uom.py | 115 | # 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('UOM')
|
haxoza/django | refs/heads/master | django/contrib/redirects/models.py | 303 | from django.contrib.sites.models import Site
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_compatible
class Redirect(models.Model):
site = models.ForeignKey(Site, models.CASCADE, verbose_name=_('... |
eford/rebound | refs/heads/master | python_examples/horizons/problem.py | 1 | import matplotlib; matplotlib.use("pdf")
import matplotlib.pyplot as plt
import rebound
import socket
import sys
import os.path
import os
filename = "cache.bin"
if 'TRAVIS' in os.environ:
# Shorter built time
solar_system_objects = ["Sun", "Mercury"]
else:
# More planets
solar_system_objects = ["Sun", ... |
hkupty/python-mode | refs/heads/develop | pymode/libs/pylama/lint/pylama_pylint/logilab/common/configuration.py | 19 | # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... |
edmstudio/ansible | refs/heads/devel | contrib/inventory/freeipa.py | 146 | #!/usr/bin/env python
import argparse
from ipalib import api
import json
def initialize():
'''
This function initializes the FreeIPA/IPA API. This function requires
no arguments. A kerberos key must be present in the users keyring in
order for this to work.
'''
api.bootstrap(context='cli')
... |
developerfm/zulip | refs/heads/master | zerver/management/commands/logout_all_users.py | 114 | from __future__ import absolute_import
from optparse import make_option
from django.core.management.base import BaseCommand
from zerver.lib.actions import delete_all_user_sessions, \
delete_realm_user_sessions
from zerver.models import Realm
class Command(BaseCommand):
help = "Log out all users."
optio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.