prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils.html import format_html
from sorl.thumbnail import get_thumbnail
from sorl.thumbnail.fields import ImageField
from sno.models import Sno
class SnoGalleries(models.Model):
class Meta:
verbose_name = 'Фотограф... | rmat_html('<a href="{}" target="_blank"><img style="width:75px; height:75px;" src="{}"></a>',
self.photo.url, img.url)
photo_preview.short_description = 'Фото'
def __str__(self):
|
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils.html import format_html
from sorl.thumbnail import get_thumbnail
from sorl.thumbnail.fields import ImageField
from sno.models import Sno
class SnoGalleries(models.Model):
class Meta:
verbose_name = 'Фотограф... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils.html import format_html
from sorl.thumbnail import get_thumbnail
from sorl.thumbnail.fields import ImageField
from sno.models import Sno
class SnoGalleries(models.Model):
class Meta:
verbose_name = 'Фотограф... | p='center')
|
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils.html import format_html
from sorl.thumbnail import get_thumbnail
from sorl.thumbnail.fields import ImageField
from sno.models import Sno
class SnoGalleries(models.Model):
class Meta:
verbose_name = 'Фотограф... | |
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | |
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | erson = get_object_or_404(Person, user=request.user)
context = get_learning_unit_identification_context(learning_unit_year_id, person)
learning_unit_year = context['learning_unit_year']
if learning_unit_year.is_external():
template = "learning_unit/external/read.html"
permission = 'bas... |
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | emplate = "learning_unit/external/read.html"
permission = 'base.can_access_externallearningunityear'
|
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | emplate = "learning_unit/identification.html"
permission = 'base.can_access_learningunit'
|
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | aise PermissionDenied
|
<|file_name|>detail.py<|end_file_name|><|fim▁begin|>############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, i... | earning_unit_identification( |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | return True |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | public_id |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | has_mediafile |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | computed_duration |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | "Describe a corpus"
element_type = 'corpus'
children_type = 'collections'
children = models.ManyToManyField(MediaCollection, related_name="corpus",
verbose_name=_('collections'), blank=True)
recorded_from_year = Integ... |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | return self.code |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | for child in self.children.all():
if child.has_mediafile:
return True
return False |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | duration = Duration()
for child in self.children.all():
duration += child.computed_duration()
return duration |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | db_table = 'media_corpus'
verbose_name = _('corpus')
verbose_name_plural = _('corpus')
ordering = ['code'] |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | "Corpus related media"
resource = ForeignKey(MediaCorpus, related_name="related", verbose_name=_('corpus'))
class Meta(MetaCore):
db_table = 'media_corpus_related'
verbose_name = _('corpus related media')
verbose_name_plural = _('corpus related media') |
<|file_name|>corpus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2010 Samalyse SARL
# Copyright (C) 2010-2014 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | db_table = 'media_corpus_related'
verbose_name = _('corpus related media')
verbose_name_plural = _('corpus related media') |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | from queries import tornado_session
_ARGUMENTS = ['host', 'port', 'dbname', 'user', 'password'] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | """Return the URI for the specified database name from an environment
variable. If dbname is blank, the ``PGSQL`` environment variable is used,
otherwise the database name is cast to upper case and concatenated to
``PGSQL_`` and the URI is retrieved from ``PGSQL_DBNAME``. For example,
if the value `... |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | """Extends queries.Session using configuration data that is stored
in environment variables.
Utilizes connection pooling to ensure that multiple concurrent asynchronous
queries do not block each other. Heavily trafficked services will require
a higher ``max_pool_size`` to allow for greater connecti... |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | if db_url is None:
db_url = _get_uri(dbname)
super(Session, self).__init__(db_url,
cursor_factory,
pool_idle_ttl,
pool_max_size) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | """Extends queries.TornadoSession using configuration data that is stored
in environment variables.
Utilizes connection pooling to ensure that multiple concurrent asynchronous
queries do not block each other. Heavily trafficked services will require
a higher ``max_pool_size`` to allow for greater c... |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | if db_url is None:
db_url = _get_uri(dbname)
super(TornadoSession, self).__init__(db_url,
cursor_factory,
pool_idle_ttl,
pool_max_size,
... |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | return os.environ['PGSQL'] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | db_url = _get_uri(dbname) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | db_url = _get_uri(dbname) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | _get_uri |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | __init__ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
PostgreSQL Session API
======================
The Session classes wrap the Queries :py:class:`Session <queries.Session>` and
:py:class:`TornadoSession <queries.tornado_session.TornadoSession>` classes
providing environment variable based configuration.
Environm... | __init__ |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import models, fields
class AccountBankStatementLine(models.Model):
_inherit = "account.bank.statement.line"
name = fields.Char(
string='Memo',
required=False,<|fim▁hole|> default="",
)<|fim▁e... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import models, fields
class AccountBankStatementLine(models.Model):
<|fim_middle|>
<|fim▁end|> | _inherit = "account.bank.statement.line"
name = fields.Char(
string='Memo',
required=False,
default="",
) |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
features['allowed_values'][AMOUNT_OF_RAM] = \
['256M', '1G', '2G', '3G', '4G', '5G', '6G', '7G', '8G', '9G',
'10G'] |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | def __init__(self, name, params):
base.InstantiationValidationBenchmark.__init__(self, name, params)
if common.RELEASE == 'liberty':
temp_name = 'stress_workload_liberty.yaml'
else:
temp_name = 'stress_workload.yaml'
self.template_file = common.get_template_... |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | base.InstantiationValidationBenchmark.__init__(self, name, params)
if common.RELEASE == 'liberty':
temp_name = 'stress_workload_liberty.yaml'
else:
temp_name = 'stress_workload.yaml'
self.template_file = common.get_template_dir() + \
temp_name
... |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | features = super(InstantiationValidationNoisyNeighborsBenchmark,
self).get_features()
features['description'] = 'Instantiation Validation Benchmark ' \
'with noisy neghbors'
features['parameters'].append(NUM_OF_NEIGHBORS)
feature... |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | super(InstantiationValidationNoisyNeighborsBenchmark, self).init()
common.replace_in_file(self.lua_file, 'local out_file = ""',
'local out_file = "' +
self.results_file + '"')
heat_param = dict()
heat_param['network'] = self.p... |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | common.replace_in_file(self.lua_file, 'local out_file = "' +
self.results_file + '"',
'local out_file = ""')
# destroy neighbor stacks
for stack_name in self.neighbor_stack_names:
common.DEPLOYMENT_UNIT.destroy_heat_templa... |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | temp_name = 'stress_workload_liberty.yaml' |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | temp_name = 'stress_workload.yaml' |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | __init__ |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | get_features |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | init |
<|file_name|>instantiation_validation_noisy_neighbors_benchmark.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Research and Development Ireland Ltd.
#
# 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 ... | finalize |
<|file_name|>logger_setup.py<|end_file_name|><|fim▁begin|>'''
logger_setup.py customizes the app's logging module. Each time an event is
logged the logger checks the level of the event (eg. debug, warning, info...).
If the event is above the approved threshold then it goes through. The handlers
do the same thing; they ... | import pytz
from flask import request, session
from structlog import wrap_logger |
<|file_name|>logger_setup.py<|end_file_name|><|fim▁begin|>'''
logger_setup.py customizes the app's logging module. Each time an event is
logged the logger checks the level of the event (eg. debug, warning, info...).
If the event is above the approved threshold then it goes through. The handlers
do the same thing; they ... | ''' Add custom fields to each record. '''
now = dt.datetime.now()
#event_dict['timestamp'] = TZ.localize(now, True).astimezone(pytz.utc).isoformat()
event_dict['timestamp'] = TZ.localize(now, True).astimezone\
(pytz.timezone(app.config['TIMEZONE'])).strftime(app.config['TIME_FMT'])
event_dic... |
<|file_name|>logger_setup.py<|end_file_name|><|fim▁begin|>'''
logger_setup.py customizes the app's logging module. Each time an event is
logged the logger checks the level of the event (eg. debug, warning, info...).
If the event is above the approved threshold then it goes through. The handlers
do the same thing; they ... | try:
#event_dict['ip_address'] = request.headers['X-Forwarded-For'].split(',')[0].strip()
event_dict['ip_address'] = request.headers.get('X-Forwarded-For', request.remote_addr)
#event_dict['ip_address'] = request.header.get('X-Real-IP')
except:
event_dict[... |
<|file_name|>logger_setup.py<|end_file_name|><|fim▁begin|>'''
logger_setup.py customizes the app's logging module. Each time an event is
logged the logger checks the level of the event (eg. debug, warning, info...).
If the event is above the approved threshold then it goes through. The handlers
do the same thing; they ... | file_handler = RotatingFileHandler(filename=app.config['LOG_FILENAME'],
maxBytes=app.config['LOG_MAXBYTES'],
backupCount=app.config['LOG_BACKUPS'],
mode='a',
en... |
<|file_name|>logger_setup.py<|end_file_name|><|fim▁begin|>'''
logger_setup.py customizes the app's logging module. Each time an event is
logged the logger checks the level of the event (eg. debug, warning, info...).
If the event is above the approved threshold then it goes through. The handlers
do the same thing; they ... | add_fields |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url
import views
<|fim▁hole|> url(r'^appHandler', views.appHandler, name='appHandler'),
url(r'^passToLogin', views.loginByPassword, name='passToLogin'),
url(r'^signToLogin', views.loginBySignature, name='signTo... | urlpatterns = patterns('',
url(r'^logout', views.logout, name='logout'),
url(r'^newUser', views.newUser, name='newUser'), |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2014 Alan Aguiar alanjas@hotmail.com
# Copyright (c) 2012-2014 Butiá Team butia@fing.edu.uy
# Butia is a free and open robotic platform
# www.fing.edu.uy/inco/proyectos/butia
# Facultad de Ingenie... | __version__ = '0.27.0' |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random<|fim▁hole|>import Ch... | from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGoofySpeedwayAI')
def __init__(self, air):
DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Goofy)
self.fsm = ClassicFSM.ClassicFSM('DistributedGoofySpeedwayAI', [State.State('Off', self.enterOff, self... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | DistributedCCharBaseAI.DistributedCCharBaseAI.__init__(self, air, TTLocalizer.Goofy)
self.fsm = ClassicFSM.ClassicFSM('DistributedGoofySpeedwayAI', [State.State('Off', self.enterOff, self.exitOff, ['Lonely', 'TransitionToCostume', 'Walk']),
State.State('Lonely', self.enterLonely, self.exitLonel... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.requestFinalState()
DistributedCCharBaseAI.DistributedCCharBaseAI.delete(self)
self.lonelyDoneEvent = None
self.lonely = None
self.chattyDoneEvent = None
self.chatty = None
self.walkDoneEvent = None
self.walk = None
return |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | DistributedCCharBaseAI.DistributedCCharBaseAI.generate(self)
name = self.getName()
self.lonelyDoneEvent = self.taskName(name + '-lonely-done')
self.lonely = CharStateDatasAI.CharLonelyStateAI(self.lonelyDoneEvent, self)
self.chattyDoneEvent = self.taskName(name + '-chatty-done')
... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | return ToontownGlobals.GoofySpeed |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if self.transitionToCostume == 1:
curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | pass |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | DistributedCCharBaseAI.DistributedCCharBaseAI.exitOff(self) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.lonely.enter()
self.acceptOnce(self.lonelyDoneEvent, self.__decideNextState) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.ignore(self.lonelyDoneEvent)
self.lonely.exit() |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.debug('going for a walk')
self.fsm.request('Walk')
return Task.done |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.chatty.enter()
self.acceptOnce(self.chattyDoneEvent, self.__decideNextState) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.ignore(self.chattyDoneEvent)
self.chatty.exit() |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.debug('going for a walk')
self.walk.enter()
self.acceptOnce(self.walkDoneEvent, self.__decideNextState) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.ignore(self.walkDoneEvent)
self.walk.exit() |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if len(self.nearbyAvatars) == 1:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state')
else:
self.notify.debug('avatarEnterNextState: num avatars: ' ... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if len(self.nearbyAvatars) == 0:
if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | DistributedCCharBaseAI.DistributedCCharBaseAI.handleHolidays(self)
if hasattr(simbase.air, 'holidayManager'):
if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTU... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if self.diffPath == None:
return 1
else:
return 0
return |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | pass |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | pass |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.walk = CharStateDatasAI.CharWalkStateAI(self.walkDoneEvent, self, self.diffPath) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | curWalkNode = self.walk.getDestNode()
if simbase.air.holidayManager:
if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayMana... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if ToontownGlobals.HALLOWEEN_COSTUMES in simbase.air.holidayManager.currentHolidays and simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES]:
simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | simbase.air.holidayManager.currentHolidays[ToontownGlobals.HALLOWEEN_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].triggerSwitch(curWalkNode, self)
self.fsm.request('TransitionToCostume') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.warning('transitionToCostume == 1 but no costume holiday') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.warning('transitionToCostume == 1 but no holiday Manager') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Walk') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Walk') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if len(self.nearbyAvatars) > 0:
self.fsm.request('Chatty')
else:
self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Chatty') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Chatty')
else:
self.notify.debug('avatarEnterNextState: in walk state') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Chatty') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.debug('avatarEnterNextState: in walk state') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.notify.debug('avatarEnterNextState: num avatars: ' + str(len(self.nearbyAvatars))) |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if self.fsm.getCurrentState().getName() != 'Walk':
self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.fsm.request('Lonely') |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if ToontownGlobals.APRIL_FOOLS_COSTUMES in simbase.air.holidayManager.currentHolidays:
if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
... |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | if simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES] != None and simbase.air.holidayManager.currentHolidays[ToontownGlobals.APRIL_FOOLS_COSTUMES].getRunningState():
self.diffPath = TTLocalizer.Donald |
<|file_name|>DistributedGoofySpeedwayAI.py<|end_file_name|><|fim▁begin|>from otp.ai.AIBaseGlobal import *
import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toonba... | self.diffPath = TTLocalizer.Donald |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.