prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ilas.fondos.Fondo("data/guarida.jpg")
pilas.avisar(menu_aviso)
self.crear_el_menu_principal()
pilas.mundo.agregar_tarea(0.1, self.act)
self.sonido = pilas.sonidos.cargar("data/menu.ogg")
self.sonido.reproducir(repetir=True)
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | pciones = [
(menu1, self.comenzar_a_jugar),
(menu2, self.mostrar_ayuda_del_juego),
(menu3, self.mostrar_historia),
(menu4, self.mostrar_opciones),
(menu5, self.salir_del_juego)
]
self.trans = pilas.actores.Actor("data/trans.png")
self.trans.x = -1... |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | f self.menu.x == -500:
if self.donde == "jugar":
self.sonido.detener()
import escena_niveles
pilas.cambiar_escena(escena_niveles.EscenaNiveles())
return False
elif self.donde == "historia":
self.sonido.detene... |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.menu.x = [-500]
self.trans.x = [-500]
self.donde = "historia"
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.menu.x = [-500]
self.trans.x = [-500]
self.donde = "opciones"
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.menu.x = [-500]
self.trans.x = [-500]
self.donde = "jugar"
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.menu.x = [-500]
self.trans.x = [-500]
self.donde = "ayuda"
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ilas.terminar()
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
<|fim_middle|>
else:
from modulos.EN import *
class EscenaMenu(pil... | from modulos.ES import * |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
<|fim_middle|>
class EscenaMenu(pil... | from modulos.EN import * |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | f self.donde == "jugar":
self.sonido.detener()
import escena_niveles
pilas.cambiar_escena(escena_niveles.EscenaNiveles())
return False
elif self.donde == "historia":
self.sonido.detener()
import escen... |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.sonido.detener()
import escena_niveles
pilas.cambiar_escena(escena_niveles.EscenaNiveles())
return False
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.sonido.detener()
import escena_historia
pilas.cambiar_escena(escena_historia.Historia())
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.sonido.detener()
import escena_ayuda
pilas.cambiar_escena(escena_ayuda.Ayuda())
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | elf.sonido.detener()
import escena_opciones
pilas.cambiar_escena(escena_opciones.Opciones())
|
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | _init__( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | niciar( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | rear_el_menu_principal( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ct( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ostrar_historia( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ostrar_opciones( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | omenzar_a_jugar( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | ostrar_ayuda_del_juego( |
<|file_name|>escena_menu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pilas
archi = open('datos.txt', 'r')
nivel = archi.readline()
pantalla = archi.readline()
idioma = archi.readline()
archi.close()
if idioma == "ES":
from modulos.ES import *
else:
from modulos.EN import *
class EscenaMen... | alir_del_juego( |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import cx_Freeze
import sys
import os
executables = [cx_Freeze.Executable("MusicCompiler.py", base=None)]
cx_Freeze.setup(
name= "MusicCompiler",
description = "Best Program Ever Known To Humanity.",
author = "Space Sheep Enterprises",
opt... | ) |
<|file_name|>S_PARTY_MEMBER_INTERVAL_POS_UPDATE.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def __init__(self, tracker, time, direction, opcode, data):
print(str(type(self)).split('.')[3]+'('+str(len(data))+'): '+ str(data.get_array_hex(1))[1:-1])<|fim▁end|> | from util.tipo import tipo
class S_PARTY_MEMBER_INTERVAL_POS_UPDATE(object):
|
<|file_name|>S_PARTY_MEMBER_INTERVAL_POS_UPDATE.py<|end_file_name|><|fim▁begin|>from util.tipo import tipo
class S_PARTY_MEMBER_INTERVAL_POS_UPDATE(object):
<|fim_middle|>
<|fim▁end|> | def __init__(self, tracker, time, direction, opcode, data):
print(str(type(self)).split('.')[3]+'('+str(len(data))+'): '+ str(data.get_array_hex(1))[1:-1]) |
<|file_name|>S_PARTY_MEMBER_INTERVAL_POS_UPDATE.py<|end_file_name|><|fim▁begin|>from util.tipo import tipo
class S_PARTY_MEMBER_INTERVAL_POS_UPDATE(object):
def __init__(self, tracker, time, direction, opcode, data):
<|fim_middle|>
<|fim▁end|> | print(str(type(self)).split('.')[3]+'('+str(len(data))+'): '+ str(data.get_array_hex(1))[1:-1]) |
<|file_name|>S_PARTY_MEMBER_INTERVAL_POS_UPDATE.py<|end_file_name|><|fim▁begin|>from util.tipo import tipo
class S_PARTY_MEMBER_INTERVAL_POS_UPDATE(object):
def <|fim_middle|>(self, tracker, time, direction, opcode, data):
print(str(type(self)).split('.')[3]+'('+str(len(data))+'): '+ str(data.get_array_hex... | __init__ |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | try:
# Retrieve the network list. |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | """Mixin class to determine the specified network is editable."""
def allowed(self, request, datum=None):
# Only administrator is allowed to create and manage shared networks.
if datum and datum.shared:
return False
return True |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | if datum and datum.shared:
return False
return True |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | @staticmethod
def action_present(count):
return ungettext_lazy(
u"Delete Network",
u"Delete Networks",
count
)
@staticmethod
def action_past(count):
return ungettext_lazy(
u"Deleted Network",
u"Deleted Networks",
... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | return ungettext_lazy(
u"Delete Network",
u"Delete Networks",
count
) |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | return ungettext_lazy(
u"Deleted Network",
u"Deleted Networks",
count
) |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | network_name = network_id
try:
# Retrieve the network list.
network = api.neutron.network_get(request, network_id,
expand_subnet=False)
network_name = network.name
LOG.debug('Network %(network_id)s has subnets:... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = "create"
verbose_name = _("Create Network")
url = "horizon:project:networks:create"
classes = ("ajax-modal",)
icon = "plus"
policy_rules = (("network", "create_network"),)
def allowed(self, request, datum=None):
usages = quotas.tenant_quota_usages(request)
# when Sett... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | usages = quotas.tenant_quota_usages(request)
# when Settings.OPENSTACK_NEUTRON_NETWORK['enable_quotas'] = False
# usages["networks"] is empty
if usages.get('networks', {}).get('available', 1) <= 0:
if "disabled" not in self.classes:
self.classes = [c for c in ... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = "update"
verbose_name = _("Edit Network")
url = "horizon:project:networks:update"
classes = ("ajax-modal",)
icon = "pencil"
policy_rules = (("network", "update_network"),) |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = "subnet"
verbose_name = _("Add Subnet")
url = "horizon:project:networks:addsubnet"
classes = ("ajax-modal",)
icon = "plus"
policy_rules = (("network", "create_subnet"),)
# neutron has used both in their policy files, supporting both
policy_target_attrs = (("network:tenant_id", "te... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | usages = quotas.tenant_quota_usages(request)
# when Settings.OPENSTACK_NEUTRON_NETWORK['enable_quotas'] = False
# usages["subnets'] is empty
if usages.get('subnets', {}).get('available', 1) <= 0:
if 'disabled' not in self.classes:
self.classes = [c for c in se... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | template_name = 'project/networks/_network_ips.html'
context = {"subnets": network.subnets}
return template.loader.render_to_string(template_name, context) |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = "filter_project_networks"
filter_type = "server"
filter_choices = (('name', _("Name ="), True),
('shared', _("Shared ="), True,
_("e.g. Yes / No")),
('router:external', _("External ="), True,
_("e.g. Yes / No"))... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = tables.WrappingColumn("name_or_id",
verbose_name=_("Name"),
link='horizon:project:networks:detail')
subnets = tables.Column(get_subnets,
verbose_name=_("Subnets Associated"),)
shared = tables.Column("shared"... |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | name = "networks"
verbose_name = _("Networks")
table_actions = (CreateNetwork, DeleteNetwork,
ProjectNetworksFilterAction)
row_actions = (EditNetwork, CreateSubnet, DeleteNetwork) |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | return False |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | if "disabled" not in self.classes:
self.classes = [c for c in self.classes] + ["disabled"]
self.verbose_name = _("Create Network (Quota exceeded)") |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | self.classes = [c for c in self.classes] + ["disabled"]
self.verbose_name = _("Create Network (Quota exceeded)") |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | self.verbose_name = _("Create Network")
self.classes = [c for c in self.classes if c != "disabled"] |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | if 'disabled' not in self.classes:
self.classes = [c for c in self.classes] + ['disabled']
self.verbose_name = _('Add Subnet (Quota exceeded)') |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | self.classes = [c for c in self.classes] + ['disabled']
self.verbose_name = _('Add Subnet (Quota exceeded)') |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | self.verbose_name = _('Add Subnet')
self.classes = [c for c in self.classes if c != 'disabled'] |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | allowed |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | action_present |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | action_past |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | delete |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | allowed |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | allowed |
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation
#
# 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/LICENS... | get_subnets |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | user = test.uList.pop()
mode = test.createRandomMode()
u = commands.getoutput('setfacl -m u:' + user + ':' + mode + " " + path + "/" + testfile)
if u != "": |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | test = RandomGen()
u = commands.getoutput('rm ' + path + "/*") # clean directory
print "test acl getfacl\n"
for i in range(l):
test.getUserList()
testfile = 'testfile' + str(i)
u = commands.getoutput('touch ' + path + "/" + testfile)
print "setfacl with " + str(i) + " entries\n " + u
for j in range(i):
... |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | parser = OptionParser()
parser.add_option("-l", "--length", dest="length",type="int",help="max lentgh of ACL")
parser.add_option("-p", "--path", dest="path",help="path of test file")
(options, args) = parser.parse_args()
test_longacl(options.length,options.path) |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | print "setfacl -m u:" + user + ':' + mode + " " + path + "/" + testfile
print u |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | test_longacl |
<|file_name|>test_long_acl.py<|end_file_name|><|fim▁begin|>'''
Access Control Lists testing based on newpynfs framework
Aurelien Charbon - Bull SA
'''
from random_gen import *
from optparse import OptionParser
import commands
import os
import threading
import time
import random
alphabet='abcdefghijklmnopqrstuvwxyz... | main |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# ----------------------------... | """
Wait for given unit(s) to enter given state |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
<|fim_middle|>
# --------------------------------------------------------------------... | """
UnitManager class -- manages a pool
"""
# --------------------------------------------------------------------------
#
def __init__ (self, url=None, scheduler='default', session=None) :
Attributes.__init__ (self)
# ----------------------------------------------------------... |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | Attributes.__init__ (self) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
add (Compute or Data)-Pilot(s) to the pool
"""
raise Exception ("%s.add_pilot() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
List IDs of data and/or compute pilots
"""
raise Exception ("%s.list_pilots() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
Remove pilot(s) (does not cancel the pilot(s), but removes all units
from the pilot(s).
`drain` determines what happens to the units which are managed by the
removed pilot(s). If `True`, the pilot removal is delayed until all
units reach a final state. If `False` (... |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
Instantiate and return (Compute or Data)-Unit object(s)
"""
raise Exception ("%s.submit_unit() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
List IDs of data and/or compute units
"""
raise Exception ("%s.list_units() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
Reconnect to and return (Compute or Data)-Unit object(s)
"""
raise Exception ("%s.get_unit() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
Wait for given unit(s) to enter given state
"""
raise Exception ("%s.wait_unit() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | """
Cancel given unit(s)
"""
raise Exception ("%s.cancel_unit() is not implemented" % self.__class__.__name__) |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | __init__ |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | add_pilot |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | list_pilots |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | remove_pilot |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | submit_unit |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | list_units |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | get_unit |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | wait_unit |
<|file_name|>unit_manager.py<|end_file_name|><|fim▁begin|>
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class UnitManager (Attributes) :
"""
UnitManager class -- manages a pool
"""
# --------------------------... | cancel_units |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | response.s3.prep = prep
|
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | """ Module's Home Page
Default to the rms_req list view.
"""
request.function = "req"
request.args = []
return req()
#module_name = deployment_settings.modules[prefix].name_nice
#response.title = module_name
#return dict(module_name=module_name, a=1) |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | """ RESTful CRUD controller """
resourcename = request.function # check again in case we're coming from index()
tablename = "%s_%s" % (prefix, resourcename)
table = db[tablename]
# Pre-processor
def prep(r):
response.s3.cancel = r.here()
if r.representation in shn_interactive_v... |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | response.s3.cancel = r.here()
if r.representation in shn_interactive_view_formats and r.method != "delete":
# Don't send the locations list to client (pulled by AJAX instead)
r.table.location_id.requires = IS_NULL_OR(IS_ONE_OF_EMPTY(db, "gis_location.id"))
#if r.meth... |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | if r.representation in shn_interactive_view_formats:
#if r.method == "create" and not r.component:
# listadd arrives here as method=None
if r.method != "delete" and not r.component:
# Redirect to the Assessments tabs after creation
r.next = r.o... |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | """ Resource Header for Requests """
if r.representation == "html":
if r.name == "req":
req_record = r.record
if req_record:
_next = r.here()
_same = r.same()
try:
location = db(db.gis_location.id == req_record... |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | """ RESTful CRUD controller """
tablename = "%s_%s" % (prefix, resourcename)
table = db[tablename]
s3xrc.model.configure(table, insertable=False)
return s3_rest_controller(prefix, resourcename) |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | store_table = None
return dict(store_table = store_table) |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | index |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | req |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | prep |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | postp |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | shn_rms_req_rheader |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | ritem |
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="inde... | store_for_req |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.