blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
616
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
112
| license_type
stringclasses 2
values | repo_name
stringlengths 5
115
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 777
values | visit_date
timestamp[us]date 2015-08-06 10:31:46
2023-09-06 10:44:38
| revision_date
timestamp[us]date 1970-01-01 02:38:32
2037-05-03 13:00:00
| committer_date
timestamp[us]date 1970-01-01 02:38:32
2023-09-06 01:08:06
| github_id
int64 4.92k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us]date 2012-06-04 01:52:49
2023-09-14 21:59:50
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-21 12:35:19
⌀ | gha_language
stringclasses 149
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 3
10.2M
| extension
stringclasses 188
values | content
stringlengths 3
10.2M
| authors
sequencelengths 1
1
| author_id
stringlengths 1
132
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
be90ebc66d52f4050ebf05b9127d53fc6025b638 | b09e71b77dd41d5db266733d1eedb845cb56d5c2 | /models/ts_hred/src/hred/read_data.py | e4fab39a8fee951ef16fc947503a9388aea060df | [] | no_license | lingxiao/neural-chatbot | 1bcaaea5ede06d0cdc7232f3905b2c813f97f36d | 70dc9366c9d419c26cfb51086187026503820267 | refs/heads/master | 2021-01-20T07:51:26.398642 | 2017-12-26T07:05:11 | 2017-12-26T07:05:11 | 90,052,227 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,147 | py | import tensorflow as tf
import os
import numpy as np
import subprocess
import pickle
import os
import logging as logger
def read_batch( data_file
, batch_size = 80
, eoq_symbol = 1
, pad_symbol = 2
, max_seq_len = 50 ):
batch = ([], [])
from sys import platform
if platform == "darwin":
command = 'gshuf'
else:
command = 'shuf'
# subprocess.call('%s %s -o %s' % (command, data_file, data_file), shell=True) # shuffling the file for the batches
for i, (x, y) in enumerate(read_line(data_file, eoq_symbol)):
if i != 0 and i % batch_size == 0:
padded_batch, max_len = add_padding(batch, eoq_symbol, pad_symbol, max_seq_len)
yield padded_batch, max_len
batch = ([], [])
batch[0].append(x)
batch[1].append(y)
def read_line(data_file, eoq_symbol=1, eos_symbol=2, sos_symbol=3):
with open(data_file, 'r') as df:
for line in df:
# first replace tab with eoq symbol, never predict eos_symbol
# x = [int(i) for i in line.strip().replace('\t', ' %d ' % eoq_symbol).split()]
# y = x[1:] + [eoq_symbol]
x = [sos_symbol] + [int(i) for i in line.strip().replace('\t', ' %d ' % eoq_symbol).split()] + [eoq_symbol]
y = x[1:] + [eos_symbol]
yield x, y
def add_padding(batch, eoq_symbol=1, pad_symbol=2, max_seq_len=50):
max_len_x = len(max(batch[0], key=len))
max_len_y = len(max(batch[1], key=len))
max_len = min(max(max_len_x, max_len_y), max_seq_len)
padded_batch = ([], [])
# If the length of the current session is longer than max len, we remove the part that is too much
for i in range(len(batch[0])):
x = batch[0][i]
y = batch[1][i]
if len(x) > max_len:
x = x[:max_len]
y = y[:max_len - 1] + [eoq_symbol]
else:
padding = [pad_symbol for j in range(max_len - len(x))]
x += padding
y += padding
padded_batch[0].append(x)
padded_batch[1].append(y)
# Return max_len to keep track of this, to be able to adapt model
return padded_batch, max_len
def add_padding_and_sort(batch, eoq_symbol, pad_symbol, max_seq_len):
sorted_batch = batch.sort(key=len)
add_padding(sorted_batch, eoq_symbol, pad_symbol, max_seq_len)
def read_vocab_lookup(vocab_file):
vocab_shifted = read_token_lookup(vocab_file)
return dict((v, k) for k, v in vocab_shifted.iteritems())
def read_token_lookup(vocab_file):
assert os.path.isfile(vocab_file)
vocab = pickle.load(open(vocab_file, "r"))
# vocab = dict([(x[0], x[1]) for x in loaded_file])
# Check consistency
if '<unk>' not in vocab:
vocab['<unk>'] = 0
if '</q>' not in vocab:
vocab['</q>'] = 1
if '</s>' not in vocab:
vocab['</s>'] = 2
if '</p>' not in vocab:
vocab['</p>'] = 3
logger.info("INFO - Successfully loaded vocabulary dictionary %s." % vocab_file)
logger.info("INFO - Vocabulary contains %d words" % len(vocab))
return vocab | [
"[email protected]"
] | |
eae14d10395cebb9005075be962dbccde8e96453 | d125c002a6447c3f14022b786b07712a7f5b4974 | /tests/bugs/core_6496_test.py | 83add6fecce024bf4fe791101f323a6d8fe430ef | [
"MIT"
] | permissive | FirebirdSQL/firebird-qa | 89d5b0035071f9f69d1c869997afff60c005fca9 | cae18186f8c31511a7f68248b20f03be2f0b97c6 | refs/heads/master | 2023-08-03T02:14:36.302876 | 2023-07-31T23:02:56 | 2023-07-31T23:02:56 | 295,681,819 | 3 | 2 | MIT | 2023-06-16T10:05:55 | 2020-09-15T09:41:22 | Python | UTF-8 | Python | false | false | 934 | py | #coding:utf-8
"""
ID: issue-6726
ISSUE: 6726
TITLE: string_to_datetime and '\\0' symbol
DESCRIPTION:
ascii_char(0) was allowed to be concatenated with string and pass then to cast(... as timestamp)
up to 4.0.0.1227 (29-09-2018), and is forbidden since 4.0.0.1346 (17.12.2018).
FB 3.x allows this character to be used and issues timestamp instead of error.
JIRA: CORE-6496
FBTEST: bugs.core_6496
"""
import pytest
from firebird.qa import *
db = db_factory()
test_script = """
set heading off;
select cast('5.3.2021 01:02:03.1234' || ascii_char(0) as timestamp) from rdb$database;
"""
act = isql_act('db', test_script)
expected_stderr = """
Statement failed, SQLSTATE = 22009
Invalid time zone region:
"""
@pytest.mark.version('>=4.0')
def test_1(act: Action):
act.expected_stderr = expected_stderr
act.execute()
assert act.clean_stderr == act.clean_expected_stderr
| [
"[email protected]"
] | |
3f6b0953d0bf05f639da4bc89ab48e385ff3d3df | ec1deb682fb96a1f937f2fca5f161aa951462876 | /pythonTextBook/exercises/classes/ex-9.6.py | e5f26b58f5dd3a61052ca7291d86c4b458d68fef | [] | no_license | AnatoliKosarev/Python-beginner-course--Teclado- | 31d82f5e9a1f39e2970323bed9de1fd539990565 | fa91199938d6975b5874341585343566caaf3600 | refs/heads/main | 2023-06-30T12:14:33.779827 | 2021-07-24T11:16:19 | 2021-07-24T11:16:19 | 376,371,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | from HelloWorld.pythonTextBook.exercises.classes.exNineFour import Restaurant
class IceCreamStand(Restaurant):
def __init__(self, restaurant_name, cuisine_type):
super().__init__(restaurant_name, cuisine_type)
self.flavours = ["vanilla", "chocolate", "strawberry"]
def show_flavours(self):
print(", ".join(self.flavours))
if __name__ == "__main__":
print(__name__)
ice = IceCreamStand("Bob's", "ice cream")
ice.show_flavours()
ice.describe_restaurant()
| [
"[email protected]"
] | |
7dfd66da43d55823453a16f8a9f215ffd604f136 | 17e0b82a3481dc857be371e3189f2d5ec158111a | /src/service/connections/__init__.py | f54aa4f85d6c79e0450907ffa9a4baebf3b8b502 | [
"Apache-2.0"
] | permissive | deeso/service-utilities | 582cc34cb944734ac16b42dd57815a44e59f9f0e | 9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a | refs/heads/master | 2021-05-14T14:53:37.536862 | 2018-01-23T11:37:12 | 2018-01-23T11:53:16 | 115,980,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | from .base_connection import ConnectionFactory
from .kombu_connection import KombuConnection
from .mongo_connection import MongoConnection
from .socket_connection import TCPConnection, UDPConnection
from .jsonline_connection import JsonTCPLineConnection, JsonUDPLineConnection
ConnectionFactory.register_connection(KombuConnection)
ConnectionFactory.register_connection(MongoConnection)
ConnectionFactory.register_connection(TCPConnection)
ConnectionFactory.register_connection(UDPConnection)
| [
"[email protected]"
] | |
cf2f2d7f88dda9d9c3caa6fbe711331cf4e416d8 | 019fd2c29b8239d7b0a3906cfbdddfd440362417 | /datacatalog/google/cloud/datacatalog_v1beta1/proto/policytagmanagerserialization_pb2_grpc.py | 74a7fdcfa5f77b46313389513bcdf64342f64c96 | [
"Apache-2.0"
] | permissive | tswast/google-cloud-python | 1334d26cdb994293f307d889251d7daef5fcb826 | d897d56bce03d1fda98b79afb08264e51d46c421 | refs/heads/master | 2021-06-10T17:40:06.968584 | 2020-01-11T17:41:29 | 2020-01-11T17:41:29 | 58,775,221 | 1 | 1 | Apache-2.0 | 2019-04-10T17:09:46 | 2016-05-13T22:06:37 | Python | UTF-8 | Python | false | false | 3,846 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.datacatalog_v1beta1.proto import (
policytagmanagerserialization_pb2 as google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2,
)
class PolicyTagManagerSerializationStub(object):
"""Policy tag manager serialization API service allows clients to manipulate
their taxonomies and policy tags data with serialized format.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ImportTaxonomies = channel.unary_unary(
"/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ImportTaxonomies",
request_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesResponse.FromString,
)
self.ExportTaxonomies = channel.unary_unary(
"/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ExportTaxonomies",
request_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesResponse.FromString,
)
class PolicyTagManagerSerializationServicer(object):
"""Policy tag manager serialization API service allows clients to manipulate
their taxonomies and policy tags data with serialized format.
"""
def ImportTaxonomies(self, request, context):
"""Imports all taxonomies and their policy tags to a project as new
taxonomies.
This method provides a bulk taxonomy / policy tag creation using nested
proto structure.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def ExportTaxonomies(self, request, context):
"""Exports all taxonomies and their policy tags in a project.
This method generates SerializedTaxonomy protos with nested policy tags
that can be used as an input for future ImportTaxonomies calls.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def add_PolicyTagManagerSerializationServicer_to_server(servicer, server):
rpc_method_handlers = {
"ImportTaxonomies": grpc.unary_unary_rpc_method_handler(
servicer.ImportTaxonomies,
request_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesRequest.FromString,
response_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesResponse.SerializeToString,
),
"ExportTaxonomies": grpc.unary_unary_rpc_method_handler(
servicer.ExportTaxonomies,
request_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesRequest.FromString,
response_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
"google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization",
rpc_method_handlers,
)
server.add_generic_rpc_handlers((generic_handler,))
| [
"[email protected]"
] | |
e9c38467e2a787714831f7864bb435bcedfaeca4 | 3e8acb5749ff67add92a50718ed44f5e80b589b1 | /app/helpers/sqlalchemy_helpers.py | edcae3444a81f58899f7e98b474581afeacd69a1 | [] | no_license | jeffthemaximum/mtinator | a43b0dc93575742b161373a460e0f883da1c0f35 | a15eccf2acc727c32d8c0e0b31922f27edd3e386 | refs/heads/master | 2022-10-09T23:15:12.092352 | 2019-09-09T18:37:22 | 2019-09-09T18:37:22 | 207,014,198 | 0 | 0 | null | 2022-09-23T22:27:43 | 2019-09-07T19:09:13 | Python | UTF-8 | Python | false | false | 2,239 | py | import datetime
from app.models import Line, Status
def get_or_create(db_session, model, **kwargs):
created = False
instance = db_session.query(model).filter_by(**kwargs).first()
if instance:
return instance, created
else:
instance = model(**kwargs)
db_session.add(instance)
db_session.commit()
created = True
return instance, created
def update_line_and_status(line_name, status_name, db):
line, created = get_or_create(db.session, Line, name=line_name)
previous_status = Status.query.filter_by(
line_id=line.id).order_by(Status.create_time.desc()).first()
status = Status(name=status_name, line_id=line.id)
db.session.add(status)
db.session.commit()
log_status_change(line, status, previous_status)
cache_status_change(line, status, db)
line_name = line.name
status_name = status.name
print(f"{line_name} {status_name}")
return line, status
def log_status_change(line, status, previous_status):
if previous_status is not None:
line_name = line.name
log = None
if (previous_status.name == 'not delayed' and status.name == 'delayed'):
log = f"Line {line_name} is experiecing delays"
elif (previous_status.name == 'delayed' and status.name == 'not delayed'):
log = f"Line {line_name} is now recovered"
if log is not None:
print(log)
def cache_status_change(line, status, db):
if status is not None:
status_name = status.name
previous_status = Status.query.filter(
Status.create_time < status.create_time, Status.line_id == status.line_id).order_by(Status.create_time.desc()).first()
should_cache = (
status_name == 'delayed' or
(
status_name == 'not delayed' and
previous_status is not None and
previous_status.name == 'delayed'
)
)
if should_cache is True:
diff = status.create_time - previous_status.create_time
diff_seconds = diff.total_seconds()
line.down_time += diff_seconds
db.session.add(line)
db.session.commit()
| [
"[email protected]"
] | |
62f22b123e3f5dd0e4c74c13925b4c37009df1a8 | 33a50bb13812090a36257078522b798762978c66 | /top/api/rest/JushitaJdpUserAddRequest.py | 3936dcb28e2258dc2e002dc64d4199ecc712998e | [] | no_license | aa3632840/quanlin | 52ac862073608cd5b977769c14a7f6dcfb556678 | 2890d35fa87367d77e295009f2d911d4b9b56761 | refs/heads/master | 2021-01-10T22:05:14.076949 | 2014-10-25T02:28:15 | 2014-10-25T02:28:15 | 23,178,087 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | '''
Created by auto_sdk on 2014-09-08 16:48:02
'''
from top.api.base import RestApi
class JushitaJdpUserAddRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.rds_name = None
def getapiname(self):
return 'taobao.jushita.jdp.user.add'
| [
"[email protected]"
] | |
be29efc36f6a969ab3bd214e43536e35705e975e | 9b722ca41671eb2cea19bac5126d0920639261bd | /.history/app_20201122215937.py | 6289174e858ea6631f102042e9c2fb4ba21ac8be | [] | no_license | thawalk/db_flask_server | 7928fd481f99d30bdccc60d97f02db78324cfdbe | cd55f1c9bf84c734457ee02d9f64a6833e295fad | refs/heads/master | 2023-01-25T02:40:19.097457 | 2020-12-06T07:45:50 | 2020-12-06T07:45:50 | 314,229,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,946 | py | import json
from flask import Flask, jsonify, url_for, request, redirect,Response,Request
# from flask_pymongo import PyMongo
import pymongo
from bson.json_util import dumps
import mysql.connector
from werkzeug.serving import run_simple
import os
from dotenv import load_dotenv
import datetime
import time
app = Flask(__name__)
# mongo_url = os.getenv("mongo_url")
# dbname = os.getenv("database_name")
# mongo_store = MongoClient(mongo_url)
# metadata = mongo_store.dbname.metadata
test_collection='test_collection'
# sample='user_collection'
mongo = pymongo.MongoClient('mongodb://54.211.223.244:27017/?readPreference=primary&appname=MongoDB%20Compass&ssl=false')
db = pymongo.database.Database(mongo, 'test')
metadata_col = pymongo.collection.Collection(db, 'test_collection')
# impt = dumps(list(col.find({"asin":"1603420304"})))
# print(impt)
# list_data = list(data)
# data_print = dumps(list_data)
# print(data_print)
# data = mongo_store.dbname.sample
# print("testing metadata find")
# print(dumps(list(metadata.find().limit(10))))
db = mysql.connector.connect(
host ='52.87.158.130',
user = 'root',
password = '',
database = 'reviews'
)
cur = db.cursor()
# cur.execute("SELECT asin from kindle_reviews group by asin order by avg(overall) desc limit 9 ")
# print(cur.fetchall())
# print("above fetch all")
@app.route('/',methods=["GET"])
def api_root():
data = {
'message': 'Welcome to our website. Where reviews are our number one priority'
}
js = json.dumps(data)
response = Response(js, status=200, mimetype='application/json')
return response
#returns list of categories
@app.route('/categories', methods = ['GET'])
def get_categories():
categories = []
js = json.dumps(data)
response = Response(js, status=200, mimetype='application/json')
return response
#Search for book using title, price or asin
@app.route('/search', methods=['GET'])
def search_book():
data = dumps(list(metadata_col.find().limit(10)))
print(data)
js = json.dumps(data)
response = Response(js, status=200, mimetype='application/json')
return response
# book = []
# if title in request.args:
# book = metadata.find({'title': title})
# elif price in request.args:
# book = metadata.find({'price':price})
# elif asin in request.args:
# book = metadata.find({'asin':asin})
# if len(book) > 0:
# msg = {'status': 200, 'message': 'book(s) successfully found', 'books': book}
# else :
# msg = {'status': 500, 'message': 'no books found with the following searches'}
# return jsonify(msg)
# @app.route('/review', methods=['POST'])
# def add_review():
# if not request.json or not request.json['asin'] or type(request.json['asin']) != str or not request.json['overall'] or not request.json['reviewText'] or type(request.json['reviewText']) != str or not request.json['reviewTime'] or type(request.json['reviewTime']) != str or not request.json['reviewerID'] or type(request.json['reviewerID']) != str or not request.json['reviewerName'] or type(request.json['reviewerName']) != str or not request.json['summary'] or type(request.json['summary']) != str or not request.json['unixReviewTime'] or type(request.json['unixReviewTime']) != int :
# return 'invalid request msg', 404
# txt = "INSERT INTO 'kindle_reviews' ('id', 'asin', 'overall', 'reviewText', 'reviewTime', 'reviewerID', 'reviewerName', 'summary', 'unixReviewTime') VALUES (%s)"
# values = (None, request.json['asin'], request.json['overall'], request.json['reviewText'], request.json['reviewTime'], request.json['reviewerID'], request.json['reviewerName'], request.json['summary'], request.json['unixReviewTime'])
# cur.execute(txt, values)
# return 'successfully uploaded new review', 200
@app.route()
if __name__ == '__main__':
# app.run(host="0.0.0.0", port=80)
app.run(debug=True) | [
"[email protected]"
] | |
b356dcb3f63d9429c49159d66a995e1973602e26 | 53e90091d10a2454e14a02ecc689e355ac2a7cc1 | /book/pylisting/code_stemmer_indexing.py | dfdae82f171252f3d61a071abec893db065ea0a1 | [] | no_license | dougalg/nltk.github.com | aac74cf03d17475adc177ac08691359cb1f4adb6 | 9a04ac5264f5ef08d87d6b920580c9160042f1a0 | refs/heads/master | 2020-12-07T17:15:15.894232 | 2014-04-21T14:11:17 | 2014-04-21T14:11:17 | 18,965,594 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | # Natural Language Toolkit: code_stemmer_indexing
class IndexedText(object):
def __init__(self, stemmer, text):
self._text = text
self._stemmer = stemmer
self._index = nltk.Index((self._stem(word), i)
for (i, word) in enumerate(text))
def concordance(self, word, width=40):
key = self._stem(word)
wc = width/4 # words of context
for i in self._index[key]:
lcontext = ' '.join(self._text[i-wc:i])
rcontext = ' '.join(self._text[i:i+wc])
ldisplay = '%*s' % (width, lcontext[-width:])
rdisplay = '%-*s' % (width, rcontext[:width])
print ldisplay, rdisplay
def _stem(self, word):
return self._stemmer.stem(word).lower()
| [
"[email protected]"
] | |
bf2bdb42b6618a874bea7a69332aef8708faac3e | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /xNxZx7DDr6BumJLaB_18.py | 8aa7e4f2ef2b69ac807c4f99c801cd1f3a29e0e7 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | """
**Mubashir** wants to remove numbers from a given string!
Help him by fixing the code in the code tab to pass this challenge. Look at
the examples below to get an idea of what the function should do.
### Examples
remove_numbers("mubashir1") ➞ "mubashir"
remove_numbers("12ma23tt") ➞ "matt"
remove_numbers("e1d2a3b4i5t6") ➞ "edabit"
### Notes
* **READ EVERY WORD CAREFULLY, CHARACTER BY CHARACTER!**
* Don't overthink this challenge; it's not supposed to be hard.
"""
def remove_numbers(string):
return ''.join(i for i in string if i.isalpha())
| [
"[email protected]"
] | |
2bbe287656c0e9eb6579f80e9e43e6a9663f4f51 | 4bf5f83a8e5cd4c3ee700569e4a6f07a87dd209c | /students/13th/hyungukkim/project_westagram/user/models.py | 2bf6fc0ee085860322a503e233755d2382c454b0 | [] | no_license | gledong12/westagram-backend | 6e066f4c741aa19df13224ba530b0d9f43a405f7 | 1842f065c599885ad5dcb9ec5fb267eaf3295872 | refs/heads/master | 2023-03-11T20:32:47.055525 | 2021-03-04T01:04:31 | 2021-03-04T01:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | from django.db import models
class Account(models.Model):
name = models.CharField(max_length=45)
email = models.CharField(max_length=45)
phone = models.CharField(max_length=45)
password = models.CharField(max_length=200)
followers = models.IntegerField(default=0)
followees = models.IntegerField(default=0)
relations = models.ManyToManyField('self', symmetrical=False, through='Relation', related_name='+')
class Relation(models.Model):
from_account = models.ForeignKey(Account, on_delete=models.CASCADE, related_name='relation_from_account')
to_account = models.ForeignKey(Account, on_delete=models.CASCADE, related_name='relation_to_account')
| [
"[email protected]"
] | |
22b9c617a333f0820997c188219ab0230f75f0bb | 209a7a4023a9a79693ec1f6e8045646496d1ea71 | /COMP0016_2020_21_Team12-datasetsExperimentsAna/pwa/FADapp/pythonScripts/venv/Lib/site-packages/pandas/tests/util/test_doc.py | c9b12b5c490713603c6c109debfbd33547c8c5b0 | [
"MIT"
] | permissive | anzhao920/MicrosoftProject15_Invictus | 5e2347015411bbffbdf0ceb059df854661fb240c | 15f44eebb09561acbbe7b6730dfadf141e4c166d | refs/heads/main | 2023-04-16T13:24:39.332492 | 2021-04-27T00:47:13 | 2021-04-27T00:47:13 | 361,913,170 | 0 | 0 | MIT | 2021-04-26T22:41:56 | 2021-04-26T22:41:55 | null | UTF-8 | Python | false | false | 1,582 | py | from textwrap import dedent
from pandas.util._decorators import doc
@doc(method="cumsum", operation="sum")
def cumsum(whatever):
"""
This is the {method} method.
It computes the cumulative {operation}.
"""
@doc(
cumsum,
dedent(
"""
Examples
--------
>>> cumavg([1, 2, 3])
2
"""
),
method="cumavg",
operation="average",
)
def cumavg(whatever):
pass
@doc(cumsum, method="cummax", operation="maximum")
def cummax(whatever):
pass
@doc(cummax, method="cummin", operation="minimum")
def cummin(whatever):
pass
def test_docstring_formatting():
docstr = dedent(
"""
This is the cumsum method.
It computes the cumulative sum.
"""
)
assert cumsum.__doc__ == docstr
def test_docstring_appending():
docstr = dedent(
"""
This is the cumavg method.
It computes the cumulative average.
Examples
--------
>>> cumavg([1, 2, 3])
2
"""
)
assert cumavg.__doc__ == docstr
def test_doc_template_from_func():
docstr = dedent(
"""
This is the cummax method.
It computes the cumulative maximum.
"""
)
assert cummax.__doc__ == docstr
def test_inherit_doc_template():
docstr = dedent(
"""
This is the cummin method.
It computes the cumulative minimum.
"""
)
assert cummin.__doc__ == docstr
| [
"[email protected]"
] | |
1496f4e20eb8bd4117fbf6f91248ff6bc0e67fb0 | 9d3b264a75264a28bafa0d22889c0bf6c429bbf4 | /fluent_contents/tests/utils.py | 2d9bed0d2676c3d7b2df627df2b062d241e50491 | [
"Apache-2.0"
] | permissive | hexenxp14/django-fluent-contents | a799b3864c826edf9ed67f4132589f73a4cf7807 | 613a4cd51ac201b86adfd5434e08f9a56eebfa2d | refs/heads/master | 2020-12-30T19:22:42.340848 | 2014-10-30T12:41:13 | 2014-10-30T12:41:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,536 | py | from __future__ import print_function
from future.builtins import str
from functools import wraps
from django.conf import settings, UserSettingsHolder
from django.contrib.auth.models import User
from django.core.management import call_command
from django.contrib.sites.models import Site
from django.db.models import loading
from django.template.loaders import app_directories
from django.test import TestCase
from django.utils.importlib import import_module
import os
class AppTestCase(TestCase):
"""
Tests for URL resolving.
"""
user = None
install_apps = (
'fluent_contents.tests.testapp',
)
@classmethod
def setUpClass(cls):
if cls.install_apps:
# When running this app via `./manage.py test fluent_pages`, auto install the test app + models.
run_syncdb = False
for appname in cls.install_apps:
if appname not in settings.INSTALLED_APPS:
print('Adding {0} to INSTALLED_APPS'.format(appname))
settings.INSTALLED_APPS += (appname,)
run_syncdb = True
# Flush caches
testapp = import_module(appname)
loading.cache.loaded = False
app_directories.app_template_dirs += (
os.path.join(os.path.dirname(testapp.__file__), 'templates'),
)
print(appname, os.path.join(os.path.dirname(testapp.__file__), 'templates'))
if run_syncdb:
call_command('syncdb', verbosity=0) # may run south's overlaid version
# Create basic objects
# 1.4 does not create site automatically with the defined SITE_ID, 1.3 does.
Site.objects.get_or_create(id=settings.SITE_ID, defaults=dict(domain='django.localhost', name='django at localhost'))
(cls.user, _) = User.objects.get_or_create(is_superuser=True, is_staff=True, username="admin")
def assert200(self, url, msg_prefix=''):
"""
Test that an URL exists.
"""
if msg_prefix:
msg_prefix += ": "
self.assertEquals(self.client.get(url).status_code, 200, str(msg_prefix) + u"Page at {0} should be found.".format(url))
def assert404(self, url, msg_prefix=''):
"""
Test that an URL does not exist.
"""
if msg_prefix:
msg_prefix += ": "
self.assertEquals(self.client.get(url).status_code, 404, str(msg_prefix) + u"Page at {0} should return 404.".format(url))
try:
from django.test.utils import override_settings # Django 1.4
except ImportError:
class override_settings(object):
"""
Acts as either a decorator, or a context manager. If it's a decorator it
takes a function and returns a wrapped function. If it's a contextmanager
it's used with the ``with`` statement. In either event entering/exiting
are called before and after, respectively, the function/block is executed.
"""
def __init__(self, **kwargs):
self.options = kwargs
self.wrapped = settings._wrapped
def __enter__(self):
self.enable()
def __exit__(self, exc_type, exc_value, traceback):
self.disable()
def __call__(self, test_func):
from django.test import TransactionTestCase
if isinstance(test_func, type) and issubclass(test_func, TransactionTestCase):
original_pre_setup = test_func._pre_setup
original_post_teardown = test_func._post_teardown
def _pre_setup(innerself):
self.enable()
original_pre_setup(innerself)
def _post_teardown(innerself):
original_post_teardown(innerself)
self.disable()
test_func._pre_setup = _pre_setup
test_func._post_teardown = _post_teardown
return test_func
else:
@wraps(test_func)
def inner(*args, **kwargs):
with self:
return test_func(*args, **kwargs)
return inner
def enable(self):
override = UserSettingsHolder(settings._wrapped)
for key, new_value in self.options.items():
setattr(override, key, new_value)
settings._wrapped = override
def disable(self):
settings._wrapped = self.wrapped
| [
"[email protected]"
] | |
4346489444cdc929ef4cbf646a290ff6bb17a126 | d17a8870ff8ac77b82d0d37e20c85b23aa29ca74 | /lite/tests/unittest_py/op/test_generate_proposals_op.py | e2f0d972640dd4077b6189d8870238550a6c648a | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle-Lite | 4ab49144073451d38da6f085a8c56822caecd5b2 | e241420f813bd91f5164f0d9ee0bc44166c0a172 | refs/heads/develop | 2023-09-02T05:28:14.017104 | 2023-09-01T10:32:39 | 2023-09-01T10:32:39 | 104,208,128 | 2,545 | 1,041 | Apache-2.0 | 2023-09-12T06:46:10 | 2017-09-20T11:41:42 | C++ | UTF-8 | Python | false | false | 5,294 | py | # Copyright (c) 2021 PaddlePaddle 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 law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
sys.path.append('../')
from auto_scan_test import AutoScanTest, IgnoreReasons
from program_config import TensorConfig, ProgramConfig, OpConfig, CxxConfig, TargetType, PrecisionType, DataLayoutType, Place
import unittest
import hypothesis
from hypothesis import given, settings, seed, example, assume
import numpy as np
from functools import partial
import hypothesis.strategies as st
class TestGenerateProposalsOp(AutoScanTest):
def __init__(self, *args, **kwargs):
AutoScanTest.__init__(self, *args, **kwargs)
self.enable_testing_on_place(
TargetType.Host,
PrecisionType.FP32,
DataLayoutType.NCHW,
thread=[1, 4])
def is_program_valid(self,
program_config: ProgramConfig,
predictor_config: CxxConfig) -> bool:
return True
def sample_program_configs(self, draw):
in_shape = draw(
st.lists(
st.integers(
min_value=16, max_value=32),
min_size=4,
max_size=4))
in_shape[0] = 1
anchor_sizes = draw(
st.sampled_from([[32.0], [32.0, 64.0], [64.0, 128.0],
[32.0, 64.0, 128.0]]))
aspect_ratios = draw(
st.sampled_from([[1.0], [1.0, 2.0], [0.5, 1.0, 2.0]]))
variances = draw(
st.lists(
st.floats(
min_value=0.5, max_value=1.5),
min_size=4,
max_size=4))
stride = draw(
st.sampled_from([[16.0, 16.0], [24.0, 24.0], [16.0, 24.0]]))
num_anchors = len(anchor_sizes) * len(aspect_ratios)
anchor_generator_op = OpConfig(
type="anchor_generator",
inputs={"Input": ["input_data"]},
outputs={
"Anchors": ["anchors_data"],
"Variances": ["variance_data"]
},
attrs={
"anchor_sizes": anchor_sizes,
"aspect_ratios": aspect_ratios,
"stride": stride,
"variances": variances,
"offset": 0.5
})
scale = draw(st.floats(min_value=1, max_value=1))
scores_shape = [in_shape[0], num_anchors, in_shape[2], in_shape[3]]
bbox_delta_shape = [
scores_shape[0], scores_shape[1] * 4, scores_shape[2],
scores_shape[3]
]
pre_nms_topN = draw(st.integers(min_value=2000, max_value=8000))
post_nms_topN = draw(st.integers(min_value=1000, max_value=1500))
nms_thresh = draw(st.floats(min_value=0.5, max_value=0.8))
min_size = draw(st.floats(min_value=2, max_value=4))
eta = draw(st.floats(min_value=0.5, max_value=1.5))
def generate_im_info(*args, **kwargs):
return np.array(
[in_shape[2] * stride[0], in_shape[3] * stride[1],
scale]).astype(np.float32)
generate_proposals_op = OpConfig(
type="generate_proposals",
inputs={
"Scores": ["scores_data"],
"BboxDeltas": ["bbox_delta_data"],
"ImInfo": ["im_info_data"],
"Anchors": ["anchors_data"],
"Variances": ["variance_data"]
},
outputs={
"RpnRois": ["rpn_rois_data"],
"RpnRoiProbs": ["rpn_rois_probs_data"],
"RpnRoisNum": ["rpn_rois_num_data"]
},
attrs={
"pre_nms_topN": pre_nms_topN,
"post_nms_topN": post_nms_topN,
"nms_thresh": nms_thresh,
"min_size": min_size,
"eta": eta
})
program_config = ProgramConfig(
ops=[anchor_generator_op, generate_proposals_op],
weights={},
inputs={
"input_data": TensorConfig(shape=in_shape),
"scores_data": TensorConfig(shape=scores_shape),
"bbox_delta_data": TensorConfig(shape=bbox_delta_shape),
"im_info_data":
TensorConfig(data_gen=partial(generate_im_info))
},
outputs=[
"rpn_rois_data", "rpn_rois_probs_data", "rpn_rois_num_data"
])
return program_config
def sample_predictor_configs(self):
return self.get_predictor_configs(), ["anchor_generator"], (1e-5, 1e-5)
def add_ignore_pass_case(self):
pass
def test(self, *args, **kwargs):
self.run_and_statis(quant=False, max_examples=25)
if __name__ == "__main__":
unittest.main(argv=[''])
| [
"[email protected]"
] | |
f586fe3dbe958a601f1a99e6f4f461331e4eb4b8 | a42c73c33f0ed093a57b077ee726eb60bd3a9410 | /tests/res/mnist.py | 5ad533e2b2b65691e6655eef9b540c700fd6ceb5 | [] | no_license | chriamue/mnistclassifier | 81485e70bc6d94aeea5bb84ae66ac45fe5dbac51 | 1c02663f2444bbe195356b65a9ce4deecd763100 | refs/heads/master | 2020-04-14T05:04:57.706819 | 2019-01-07T09:44:11 | 2019-01-07T09:44:11 | 163,652,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | # source: https://github.com/pytorch/examples/blob/master/mnist/main.py
import torch
import torch.nn as nn
import torch.nn.functional as F
class mnist(nn.Module):
def __init__(self, **kwargs):
super(mnist, self).__init__()
self.conv1 = nn.Conv2d(1, 20, 5, 1)
self.conv2 = nn.Conv2d(20, 50, 5, 1)
self.fc1 = nn.Linear(4*4*50, 500)
self.fc2 = nn.Linear(500, 10)
def forward(self, x):
x = F.relu(self.conv1(x))
x = F.max_pool2d(x, 2, 2)
x = F.relu(self.conv2(x))
x = F.max_pool2d(x, 2, 2)
x = x.view(-1, 4*4*50)
x = F.relu(self.fc1(x))
x = self.fc2(x)
return F.log_softmax(x, dim=1)
| [
"[email protected]"
] | |
e5f2dc700e06c9c83226158065ea027d552e8f9a | 556db265723b0cc30ad2917442ed6dad92fd9044 | /tensorflow/python/autograph/impl/api.py | 1115318c610daf1cd97b2a404ad426a4608bbc6a | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | graphcore/tensorflow | c1669b489be0e045b3ec856b311b3139858de196 | 085b20a4b6287eff8c0b792425d52422ab8cbab3 | refs/heads/r2.6/sdk-release-3.2 | 2023-07-06T06:23:53.857743 | 2023-03-14T13:04:04 | 2023-03-14T13:48:43 | 162,717,602 | 84 | 17 | Apache-2.0 | 2023-03-25T01:13:37 | 2018-12-21T13:30:38 | C++ | UTF-8 | Python | false | false | 33,056 | py | # 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 law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""This module contains the user- and codegen-facing API for AutoGraph."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import imp
import inspect
import os
import sys
import textwrap
import traceback
import six
from tensorflow.python.autograph import operators
from tensorflow.python.autograph import utils
from tensorflow.python.autograph.converters import asserts
from tensorflow.python.autograph.converters import break_statements
from tensorflow.python.autograph.converters import call_trees
from tensorflow.python.autograph.converters import conditional_expressions
from tensorflow.python.autograph.converters import continue_statements
from tensorflow.python.autograph.converters import control_flow
from tensorflow.python.autograph.converters import directives
from tensorflow.python.autograph.converters import functions
from tensorflow.python.autograph.converters import lists
from tensorflow.python.autograph.converters import logical_expressions
from tensorflow.python.autograph.converters import return_statements
from tensorflow.python.autograph.converters import slices
from tensorflow.python.autograph.converters import variables
from tensorflow.python.autograph.core import ag_ctx
from tensorflow.python.autograph.core import converter
from tensorflow.python.autograph.core import function_wrappers
from tensorflow.python.autograph.core import unsupported_features_checker
from tensorflow.python.autograph.impl import conversion
from tensorflow.python.autograph.lang import special_functions
from tensorflow.python.autograph.operators import py_builtins
from tensorflow.python.autograph.pyct import anno
from tensorflow.python.autograph.pyct import cfg
from tensorflow.python.autograph.pyct import error_utils
from tensorflow.python.autograph.pyct import errors
from tensorflow.python.autograph.pyct import inspect_utils
from tensorflow.python.autograph.pyct import origin_info
from tensorflow.python.autograph.pyct import qual_names
from tensorflow.python.autograph.pyct import transpiler
from tensorflow.python.autograph.pyct.static_analysis import activity
from tensorflow.python.autograph.pyct.static_analysis import reaching_definitions
from tensorflow.python.autograph.utils import ag_logging as logging
from tensorflow.python.eager import function
from tensorflow.python.framework import errors_impl
from tensorflow.python.util import tf_decorator
from tensorflow.python.util import tf_inspect
from tensorflow.python.util import tf_stack
from tensorflow.python.util.tf_export import tf_export
def is_autograph_strict_conversion_mode():
return int(os.environ.get('AUTOGRAPH_STRICT_CONVERSION', '0')) > 0
#
# Error handling
#
# TODO(mdan): Export this symbol.
class AutoGraphError(errors.PyCTError):
"""Base class for all AutoGraph exceptions."""
pass
class ConversionError(AutoGraphError):
"""Raised during the conversion process."""
pass
class StagingError(AutoGraphError):
"""Raised during the staging (i.e. Python execution) of converted code."""
pass
class _ErrorMetadata(error_utils.ErrorMetadataBase):
"""AutoGraph-specific error metadata. See base class."""
def create_exception(self, source_error):
preferred_type = type(source_error)
if issubclass(preferred_type, errors_impl.OpError):
# Best-effort unpacking of OpError exceptions.
# TODO(mdan): Use a mechanism that is more future-proof.
init_argspec = tf_inspect.getfullargspec(preferred_type.__init__)
message = self.get_message()
init_args = tuple(init_argspec.args)
# At the time of this writing, TF errors either take 3 or 4 arguments,
# the argument '*args' may or may not be used.
if init_args == ('self', 'node_def', 'op', 'message'):
return preferred_type(source_error.node_def, source_error.op, message,
source_error.experimental_payloads)
elif preferred_type in (errors.PyCTError, AutoGraphError, ConversionError,
StagingError, errors_impl.InaccessibleTensorError,
errors_impl.OperatorNotAllowedInGraphError):
return preferred_type(self.get_message())
exc = super(_ErrorMetadata, self).create_exception(source_error)
if exc is not None:
return exc
# Note: While changing an error's message property to change the message it
# displays will probably work a lot of times, there is no standard way in
# Python to do that. The safest way is therefore to create a new exception.
# For user defined exceptions, we could define an interface that allowed
# them to work under this mechanism.
return StagingError(self.get_message())
def _attach_error_metadata(e, f):
"""Augments an error with the metadata necessary for rewrite."""
if hasattr(e, 'ag_pass_through'):
return
metadata = getattr(e, 'ag_error_metadata', None)
source_map = f.ag_source_map
if metadata is None:
logging.log(1, 'Caught error in user callable %s', f, exc_info=True)
message = '{}: {}'.format(e.__class__.__name__, e)
else:
message = None
cause_tb = traceback.extract_tb(sys.exc_info()[2])[1:]
e.ag_error_metadata = _ErrorMetadata(cause_tb, metadata, message, source_map,
__file__)
class StackTraceMapper(tf_stack.StackTraceMapper):
"""Remaps generated code to code it originated from."""
def __init__(self, converted_fn):
super().__init__()
self._source_map = converted_fn.ag_source_map
# This may be called repeatedly: once on entry, by the superclass, then by
# each child context manager.
self._cached_map = None
def get_effective_source_map(self):
if self._cached_map is not None:
return self._cached_map
parent_map = self.parent.get_effective_source_map()
effective_source_map = {}
for loc, origin in self._source_map.items():
effective_source_map[(loc.filename, loc.lineno)] = (origin.loc.filename,
origin.loc.lineno,
origin.function_name)
for key, value in parent_map.items():
filename, lineno, _ = value
value_loc = origin_info.LineLocation(filename=filename, lineno=lineno)
if value_loc in self._source_map:
origin = self._source_map[value_loc]
effective_source_map[key] = (origin.loc.filename, origin.loc.lineno,
origin.function_name)
else:
effective_source_map[key] = value
self._cached_map = effective_source_map
return effective_source_map
#
# Actual source code transformation
#
class PyToTF(transpiler.PyToPy):
"""The TensorFlow AutoGraph transformer."""
def __init__(self):
super(PyToTF, self).__init__()
self._extra_locals = None
def get_transformed_name(self, node):
return 'tf__' + super(PyToTF, self).get_transformed_name(node)
def get_extra_locals(self):
if self._extra_locals is None:
# TODO(mdan): Move into core or replace with an actual importable module.
# Craft a module that exposes the external API as well as certain
# internal modules.
ag_internal = imp.new_module('autograph')
ag_internal.__dict__.update(inspect.getmodule(PyToTF).__dict__)
ag_internal.ConversionOptions = converter.ConversionOptions
ag_internal.STD = converter.STANDARD_OPTIONS
ag_internal.Feature = converter.Feature
ag_internal.utils = utils
ag_internal.FunctionScope = function_wrappers.FunctionScope
ag_internal.with_function_scope = function_wrappers.with_function_scope
# TODO(mdan): Add safeguards against name clashes.
# We don't want to create a submodule because we want the operators to be
# accessible as ag__.<operator>
ag_internal.__dict__.update(special_functions.__dict__)
ag_internal.__dict__.update(operators.__dict__)
self._extra_locals = {'ag__': ag_internal}
return self._extra_locals
def get_caching_key(self, ctx):
return ctx.options
def initial_analysis(self, node, ctx):
graphs = cfg.build(node)
node = qual_names.resolve(node)
node = activity.resolve(node, ctx, None)
node = reaching_definitions.resolve(node, ctx, graphs)
anno.dup(
node,
{
anno.Static.DEFINITIONS: anno.Static.ORIG_DEFINITIONS,
},
)
return node
def transform_ast(self, node, ctx):
unsupported_features_checker.verify(node)
node = self.initial_analysis(node, ctx)
node = functions.transform(node, ctx)
node = directives.transform(node, ctx)
node = break_statements.transform(node, ctx)
if ctx.user.options.uses(converter.Feature.ASSERT_STATEMENTS):
node = asserts.transform(node, ctx)
# Note: sequencing continue canonicalization before for loop one avoids
# dealing with the extra loop increment operation that the for
# canonicalization creates.
node = continue_statements.transform(node, ctx)
node = return_statements.transform(node, ctx)
if ctx.user.options.uses(converter.Feature.LISTS):
node = lists.transform(node, ctx)
node = slices.transform(node, ctx)
node = call_trees.transform(node, ctx)
node = control_flow.transform(node, ctx)
node = conditional_expressions.transform(node, ctx)
node = logical_expressions.transform(node, ctx)
node = variables.transform(node, ctx)
return node
def _convert_actual(entity, program_ctx):
"""Applies AutoGraph to entity."""
# TODO(mdan): Put these extra fields inside __autograph_info__.
if not hasattr(entity, '__code__'):
raise ValueError('Cannot apply autograph to a function that doesn\'t '
'expose a __code__ object. If this is a @tf.function,'
' try passing f.python_function instead.')
transformed, module, source_map = _TRANSPILER.transform(entity, program_ctx)
assert not hasattr(transformed, 'ag_module')
assert not hasattr(transformed, 'ag_source_map')
transformed.ag_module = module
transformed.ag_source_map = source_map
return transformed
#
# Generated code support
#
def autograph_artifact(entity, extras=None):
if inspect.ismethod(entity):
setattr(entity.__func__, 'autograph_info__', extras)
else:
setattr(entity, 'autograph_info__', extras)
return entity
def is_autograph_artifact(entity):
return hasattr(entity, 'autograph_info__')
def converted_call(f, args, kwargs, caller_fn_scope=None, options=None):
"""Converts a function call inline.
For internal use only.
Note: The argument list is optimized for readability of generated code, which
may look like this:
ag__.converted_call(f, (arg1, arg2), None, fscope)
ag__.converted_call(f, (), dict(arg1=val1, **kwargs), fscope)
ag__.converted_call(f, (arg1, arg2) + varargs, dict(**kwargs), lscope)
Args:
f: The function to convert.
args: Tuple, the original positional arguments of f
kwargs: Optional[Dict], the original keyword arguments of f
caller_fn_scope: Optional[function_wrappers.FunctionScope], the function
scope of the converted function in which this call was originally made.
options: Optional[converter.ConversionOptions], conversion options. If not
specified, the value of caller_fn_scope.callopts is used. Either options
or caller_fn_scope must be present.
Returns:
Any, the result of executing a possibly-converted `f` with the given
arguments.
"""
logging.log(1, 'Converted call: %s\n args: %s\n kwargs: %s\n', f, args,
kwargs)
if options is None:
if caller_fn_scope is None:
raise ValueError('either caller_fn_scope or options must have a value')
options = caller_fn_scope.callopts
if conversion.is_in_allowlist_cache(f, options):
logging.log(2, 'Allowlisted %s: from cache', f)
return _call_unconverted(f, args, kwargs, options, False)
if ag_ctx.control_status_ctx().status == ag_ctx.Status.DISABLED:
logging.log(2, 'Allowlisted: %s: AutoGraph is disabled in context', f)
return _call_unconverted(f, args, kwargs, options, False)
if is_autograph_artifact(f):
logging.log(2, 'Permanently allowed: %s: AutoGraph artifact', f)
return _call_unconverted(f, args, kwargs, options)
# If this is a partial, unwrap it and redo all the checks.
if isinstance(f, functools.partial):
new_kwargs = {}
if f.keywords is not None:
# Use copy to avoid mutating the underlying keywords.
new_kwargs = f.keywords.copy()
if kwargs is not None:
new_kwargs.update(kwargs)
new_args = f.args + args
logging.log(3, 'Forwarding call of partial %s with\n%s\n%s\n', f, new_args,
new_kwargs)
return converted_call(
f.func,
new_args,
new_kwargs,
caller_fn_scope=caller_fn_scope,
options=options)
if inspect_utils.isbuiltin(f):
if f is eval:
return py_builtins.eval_in_original_context(f, args, caller_fn_scope)
if f is super:
return py_builtins.super_in_original_context(f, args, caller_fn_scope)
if f is globals:
return py_builtins.globals_in_original_context(caller_fn_scope)
if f is locals:
return py_builtins.locals_in_original_context(caller_fn_scope)
if kwargs:
return py_builtins.overload_of(f)(*args, **kwargs)
else:
return py_builtins.overload_of(f)(*args)
if conversion.is_unsupported(f):
return _call_unconverted(f, args, kwargs, options)
if not options.user_requested and conversion.is_allowlisted(f):
return _call_unconverted(f, args, kwargs, options)
# internal_convert_user_code is for example turned off when issuing a dynamic
# call conversion from generated code while in nonrecursive mode. In that
# case we evidently don't want to recurse, but we still have to convert
# things like builtins.
if not options.internal_convert_user_code:
return _call_unconverted(f, args, kwargs, options)
try:
if inspect.ismethod(f) or inspect.isfunction(f):
target_entity = f
effective_args = args
f_self = getattr(f, '__self__', None)
if f_self is not None:
if isinstance(f_self, function.TfMethodTarget):
f_self = f_self.target
effective_args = (f_self,) + effective_args
elif hasattr(f, '__class__') and hasattr(f.__class__, '__call__'):
# Callable objects. Dunder methods have special lookup rules, see:
# https://docs.python.org/3/reference/datamodel.html#specialnames
# TODO(mdan): Recurse into converted_call to simplify other verifications.
# This should be handled in the same way as partials.
target_entity = f.__class__.__call__
effective_args = (f,) + args
else:
target_entity = f
raise NotImplementedError('unknown callable type "%s"' % type(f))
except Exception as e: # pylint:disable=broad-except
logging.log(1, 'Error transforming entity %s', target_entity, exc_info=True)
if is_autograph_strict_conversion_mode():
raise
return _fall_back_unconverted(f, args, kwargs, options, e)
if not hasattr(target_entity, '__code__'):
logging.log(2, 'Permanently allowed: %s: native binding', target_entity)
return _call_unconverted(f, args, kwargs, options)
elif (hasattr(target_entity.__code__, 'co_filename') and
target_entity.__code__.co_filename == '<string>'):
# TODO(mdan): __globals__['txt'] might work in Py3.
logging.log(2, 'Permanently allowed: %s: dynamic code (exec?)',
target_entity)
return _call_unconverted(f, args, kwargs, options)
try:
program_ctx = converter.ProgramContext(options=options)
converted_f = _convert_actual(target_entity, program_ctx)
if logging.has_verbosity(2):
_log_callargs(converted_f, effective_args, kwargs)
except Exception as e: # pylint:disable=broad-except
logging.log(1, 'Error transforming entity %s', target_entity, exc_info=True)
if is_autograph_strict_conversion_mode():
raise
return _fall_back_unconverted(f, args, kwargs, options, e)
with StackTraceMapper(converted_f), tf_stack.CurrentModuleFilter():
try:
if kwargs is not None:
result = converted_f(*effective_args, **kwargs)
else:
result = converted_f(*effective_args)
except Exception as e:
_attach_error_metadata(e, converted_f)
raise
return result
def _call_unconverted(f, args, kwargs, options, update_cache=True):
"""Calls the original function without converting with AutoGraph."""
if update_cache:
conversion.cache_allowlisted(f, options)
if inspect.ismethod(f) and isinstance(f.__self__, function.TfMethodTarget):
return f.__self__.call(args, kwargs)
if kwargs is not None:
return f(*args, **kwargs)
return f(*args)
def _fall_back_unconverted(f, args, kwargs, options, exc):
"""Falls back to calling the function unconverted, in case of error."""
# TODO(mdan): Consider adding an internal metric.
warning_template = (
'AutoGraph could not transform %s and will run it as-is.\n'
'%s'
'Cause: %s\n'
'To silence this warning, decorate the function with'
' @tf.autograph.experimental.do_not_convert')
if isinstance(exc, errors.UnsupportedLanguageElementError):
if not conversion.is_in_allowlist_cache(f, options):
logging.warn(warning_template, f, '', exc)
else:
file_bug_message = (
'Please report this to the TensorFlow team. When filing the bug, set'
' the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and'
' attach the full output.\n')
logging.warn(warning_template, f, file_bug_message, exc)
return _call_unconverted(f, args, kwargs, options)
#
# TensorFlow integration
#
@tf_export('__internal__.autograph.tf_convert', v1=[])
def tf_convert(f, ctx, convert_by_default=True, user_requested=False):
"""Decorator that applies AutoGraph to a function.
Use in internal APIs.
This API is suitable for high order functions internal to the TensorFlow API,
and more generally any function to which AutoGraph is not applied.
Guidance: `convert` was a decorator meant for use directly by developers, but
most of today's uses go through `tf.function`. `tf_convert` is to be called
from high order functions internal to TF. By default, all the internal
TensorFlow functions are skipped when AutoGraph processes the code. This may
lead to user-supplied functions to be incorrectly skipped as well.
`tf_convert` helps avoid that. See the following example for more details.
```
=====tf_internal_module.py=====
def unconverted(input_fn):
return input_fn()
def converted(input_fn):
return tf.__internal__.autograph.tf_convert(
input_fn, ctx=tf.__internal__.autograph.control_status_ctx())()
======user_module.py======
@tf.function
def foo(input_fn)
return unconverted(input_fn)
@tf.function
def bar(input_fn)
return converted(input_fn)
@tf.function(autograph=False)
def baz(input_fn)
return converted(input_fn)
```
The `foo` method above will execute the `input_fn` without autograph
conversion, while the `bar` method will run an autographed `input_fn`. The
`baz` method will run an unconverted `input_fn`, since `tf_convert` respect
the control status context.
Note that both methods in `tf_internal_module` are skipped by autograph when
tracing the `tf.function`. The configuration of whether a module/package
should be skipped by autograph is controlled in
tensorflow/python/autograph/core/config.py.
Args:
f: Callable.
ctx: ag_ctx.ControlStatusCtx, the Autograph context in which `f` is used.
convert_by_default: bool, whether to use AutoGraph when the context doesn't
specify.
user_requested: bool, whether to ignore the conversion allowlist. See
ConversionOptions.user_requested.
Returns:
Either `f or the converted version of `f`.
"""
if is_autograph_artifact(f):
return f
f_wrapper = f
decorators, f = tf_decorator.unwrap(f)
# TODO(mdan): Grab features from context.
# Note: we pass the original context through to convert to properly handle the
# following scenario, which can be used inside TF implementations:
#
# ctx = ag_ctx.control_status_ctx()
# @function(autograph=False) # Low-level graph code
# def inner_fn():
# # The context is disabled here, but should be enabled in user user_fn
# tf_convert(user_fn, ctx=ctx)
if ctx.status == ag_ctx.Status.ENABLED:
wrapper_factory = convert(
recursive=True, user_requested=user_requested, conversion_ctx=ctx)
elif ctx.status == ag_ctx.Status.DISABLED:
wrapper_factory = do_not_convert
elif ctx.status == ag_ctx.Status.UNSPECIFIED:
if convert_by_default:
wrapper_factory = convert(
recursive=True, user_requested=user_requested, conversion_ctx=ctx)
else:
wrapper_factory = call_with_unspecified_conversion_status
else:
assert False, 'This switch contains all possible cases!'
wrapper = wrapper_factory(f)
if decorators:
wrapper = tf_decorator.rewrap(f_wrapper, f, wrapper)
return autograph_artifact(wrapper)
def call_with_unspecified_conversion_status(func):
"""Decorator that resets the conversion context to the unspecified status."""
def wrapper(*args, **kwargs):
with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.UNSPECIFIED):
return func(*args, **kwargs)
if inspect.isfunction(func) or inspect.ismethod(func):
wrapper = functools.update_wrapper(wrapper, func)
return autograph_artifact(wrapper)
def _log_callargs(f, args, kwargs):
"""Logging helper."""
logging.log(2, 'Defaults of %s : %s', f, f.__defaults__)
if not six.PY2:
logging.log(2, 'KW defaults of %s : %s', f, f.__kwdefaults__)
if kwargs is not None:
callargs = tf_inspect.getcallargs(f, *args, **kwargs)
else:
callargs = tf_inspect.getcallargs(f, *args)
formatted_callargs = '\n'.join(
' {}: {}'.format(k, v) for k, v in callargs.items())
logging.log(2, 'Calling %s with\n%s\n', f, formatted_callargs)
#
# Public API
#
@tf_export('autograph.experimental.do_not_convert')
def do_not_convert(func=None):
"""Decorator that suppresses the conversion of a function.
Args:
func: function to decorate.
Returns:
If `func` is not None, returns a `Callable` which is equivalent to
`func`, but is not converted by AutoGraph.
If `func` is None, returns a decorator that, when invoked with a
single `func` argument, returns a `Callable` equivalent to the
above case.
"""
if func is None:
return do_not_convert
def wrapper(*args, **kwargs):
with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.DISABLED):
return func(*args, **kwargs)
if inspect.isfunction(func) or inspect.ismethod(func):
wrapper = functools.update_wrapper(wrapper, func)
return autograph_artifact(wrapper)
# TODO(mdan): Make private.
def convert(recursive=False,
optional_features=None,
user_requested=True,
conversion_ctx=ag_ctx.NullCtx()):
"""Decorator that compiles a function to use TensorFlow ops.
The decorator is dynamic - it recompiles the target whenever the decorated
function is called. This means the parameter values are known at conversion.
It also means that repeated calls with different types of parameters will be
correctly processed.
Args:
recursive: bool, whether to recursively convert any functions or classes
that the converted function may use.
optional_features: converted.Feature, allows toggling optional or
experimental features. When set to None, only the core features are
enabled.
user_requested: bool, whether this is a function that the user explicitly
asked to be converted. See ConversionOptions.user_requested.
conversion_ctx: Optional ag_ctx.ControlStatusCtx, the Autograph context in
which `f` is used.
Returns:
Callable, a decorator that converts the given function into an equivalent
function that uses TensorFlow ops.
"""
def decorator(f):
"""Decorator implementation."""
def wrapper(*args, **kwargs):
"""Wrapper that calls the converted version of f."""
options = converter.ConversionOptions(
recursive=recursive,
user_requested=user_requested,
optional_features=optional_features)
try:
with conversion_ctx:
return converted_call(f, args, kwargs, options=options)
except Exception as e: # pylint:disable=broad-except
if hasattr(e, 'ag_error_metadata'):
raise e.ag_error_metadata.to_exception(e)
else:
raise
if inspect.isfunction(f) or inspect.ismethod(f):
wrapper = functools.update_wrapper(wrapper, f)
decorated_wrapper = tf_decorator.make_decorator(f, wrapper)
return autograph_artifact(decorated_wrapper)
return decorator
# pylint:disable=line-too-long
@tf_export('autograph.to_graph', v1=[])
def to_graph(entity, recursive=True, experimental_optional_features=None):
"""Converts a Python entity into a TensorFlow graph.
Also see: `tf.autograph.to_code`, `tf.function`.
Unlike `tf.function`, `to_graph` is a low-level transpiler that converts
Python code to TensorFlow graph code. It does not implement any caching,
variable management or create any actual ops, and is best used where greater
control over the generated TensorFlow graph is desired. Another difference
from `tf.function` is that `to_graph` will not wrap the graph into a
TensorFlow function or a Python callable. Internally, `tf.function` uses
`to_graph`.
Example usage:
>>> def f(x):
... if x > 0:
... y = x * x
... else:
... y = -x
... return y
...
>>> converted_f = to_graph(f)
>>> x = tf.constant(2)
>>> converted_f(x) # converted_foo is like a TensorFlow Op.
<tf.Tensor: shape=(), dtype=int32, numpy=4>
Supported Python entities include:
* functions
* classes
* object methods
Functions are converted into new functions with converted code.
Classes are converted by generating a new class whose methods use converted
code.
Methods are converted into unbound function that have an additional first
argument called `self`.
For a tutorial, see the
[tf.function and AutoGraph guide](https://www.tensorflow.org/guide/function).
For more detailed information, see the
[AutoGraph reference documentation](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/index.md).
Args:
entity: Python callable or class to convert.
recursive: Whether to recursively convert any functions that the converted
function may call.
experimental_optional_features: `None`, a tuple of, or a single
`tf.autograph.experimental.Feature` value.
Returns:
Same as `entity`, the converted Python function or class.
Raises:
ValueError: If the entity could not be converted.
"""
try:
program_ctx = converter.ProgramContext(
options=converter.ConversionOptions(
recursive=recursive,
user_requested=True,
optional_features=experimental_optional_features))
return autograph_artifact(_convert_actual(entity, program_ctx))
except (ValueError, AttributeError, KeyError, NameError, AssertionError) as e:
logging.error(1, 'Error converting %s', entity, exc_info=True)
raise ConversionError('converting {}: {}: {}'.format(
entity, e.__class__.__name__, str(e)))
@tf_export(v1=['autograph.to_graph'])
def to_graph_v1(entity,
recursive=True,
arg_values=None,
arg_types=None,
experimental_optional_features=None):
"""Converts a Python entity into a TensorFlow graph.
Also see: `tf.autograph.to_code`, `tf.function`.
Unlike `tf.function`, `to_graph` is a low-level transpiler that converts
Python code to TensorFlow graph code. It does not implement any caching,
variable management or create any actual ops, and is best used where greater
control over the generated TensorFlow graph is desired. Another difference
from `tf.function` is that `to_graph` will not wrap the graph into a
TensorFlow function or a Python callable. Internally, `tf.function` uses
`to_graph`.
_Example Usage_
```python
def foo(x):
if x > 0:
y = x * x
else:
y = -x
return y
converted_foo = to_graph(foo)
x = tf.constant(1)
y = converted_foo(x) # converted_foo is a TensorFlow Op-like.
assert is_tensor(y)
```
Supported Python entities include:
* functions
* classes
* object methods
Functions are converted into new functions with converted code.
Classes are converted by generating a new class whose methods use converted
code.
Methods are converted into unbound function that have an additional first
argument called `self`.
Args:
entity: Python callable or class to convert.
recursive: Whether to recursively convert any functions that the converted
function may call.
arg_values: Deprecated.
arg_types: Deprecated.
experimental_optional_features: `None`, a tuple of, or a single
`tf.autograph.experimental.Feature` value.
Returns:
Same as `entity`, the converted Python function or class.
Raises:
ValueError: If the entity could not be converted.
"""
del arg_types
del arg_values
return to_graph(
entity,
recursive=recursive,
experimental_optional_features=experimental_optional_features)
@tf_export(v1=['autograph.to_code'])
def to_code_v1(entity,
recursive=True,
arg_values=None,
arg_types=None,
indentation=' ',
experimental_optional_features=None):
"""Returns the source code generated by AutoGraph, as a string.
Example usage:
>>> def f(x):
... if x < 0:
... x = -x
... return x
>>> tf.autograph.to_code(f)
"...def tf__f(x):..."
Also see: `tf.autograph.to_graph`.
Note: If a function has been decorated with `tf.function`, pass its
underlying Python function, rather than the callable that `tf.function
creates:
>>> @tf.function
... def f(x):
... if x < 0:
... x = -x
... return x
>>> tf.autograph.to_code(f.python_function)
"...def tf__f(x):..."
Args:
entity: Python callable or class.
recursive: Whether to recursively convert any functions that the converted
function may call.
arg_values: Deprecated.
arg_types: Deprecated.
indentation: Deprecated.
experimental_optional_features: `None`, a tuple of, or a single
`tf.autograph.experimental.Feature` value.
Returns:
The converted code as string.
"""
del arg_values
del arg_types
del indentation
return to_code(
entity,
recursive=recursive,
experimental_optional_features=experimental_optional_features)
@tf_export('autograph.to_code', v1=[])
def to_code(entity, recursive=True, experimental_optional_features=None):
"""Returns the source code generated by AutoGraph, as a string.
Example usage:
>>> def f(x):
... if x < 0:
... x = -x
... return x
>>> tf.autograph.to_code(f)
"...def tf__f(x):..."
Also see: `tf.autograph.to_graph`.
Note: If a function has been decorated with `tf.function`, pass its
underlying Python function, rather than the callable that `tf.function
creates:
>>> @tf.function
... def f(x):
... if x < 0:
... x = -x
... return x
>>> tf.autograph.to_code(f.python_function)
"...def tf__f(x):..."
Args:
entity: Python callable or class to convert.
recursive: Whether to recursively convert any functions that the converted
function may call.
experimental_optional_features: `None`, a tuple of, or a single
`tf.autograph.experimental.Feature` value.
Returns:
The converted code as string.
"""
source = tf_inspect.getsource(
to_graph(
entity,
recursive=recursive,
experimental_optional_features=experimental_optional_features))
return textwrap.dedent(source)
_TRANSPILER = PyToTF()
| [
"[email protected]"
] | |
7f6038af767e1779c691a01c5838ef93949692f0 | 2beecbbcc8d3b21d6c536885dc10570bf20044bb | /week_four/media_clone/media_app/models.py | 9d3dc421e33c69a41301b3d6ba06b11aa7a32289 | [] | no_license | MTaylorfullStack/python_april | 05724dff121370f72b14beaf9737bcd39292111b | e15a496dc5ea3e0cb5f966000bfb7ad30c6bce28 | refs/heads/master | 2022-07-22T15:55:21.335557 | 2020-05-21T01:02:11 | 2020-05-21T01:02:11 | 255,476,577 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | from django.db import models
class User(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Message_Post(models.Model):
message = models.CharField(max_length=255)
poster = models.ForeignKey(User, related_name="message_posts", on_delete=models.CASCADE)
likes = models.ManyToManyField(User, related_name="likes")
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
# Create your models here.
| [
"[email protected]"
] | |
81d7c0b15b03f6fd57c59e9e2efe51c989c26b7f | dc3c88f1fe5c80147e4c52ee6ec3136307ec9702 | /copyPluginName/readMe_model.py | e68cca9deb5a4c208e6e7256e693996c1687b6a5 | [] | no_license | ypapax/all_sublime_plugins | 062f9b9992a093a02e6b905c1329c681c8532034 | 8b10e471233bd6c2e77907cf5569b0ddccfc88f9 | refs/heads/master | 2021-01-15T21:10:08.029750 | 2015-08-16T06:32:51 | 2015-08-16T06:32:51 | 40,391,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | import re
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/moveNearReplace')
import filer2
def read(self):
view = self.window.active_view()
filename = view.file_name()
data = filer2.read(filename)
return data
def windowPluginName(self):
data = read(self)
m = re.findall(r'class (.+)Command\(sublime_plugin', data)
pluginName = m[0]
return pluginName | [
"[email protected]"
] | |
7902e49a5df27303eec60da89c20f7aefa4c720d | 7db3916d8ac8a66a954d230e43bb74b37f81357c | /15day/06-用进程池创建进程.py | 8f6ee1c366d1b43c8dca4fa6d5a3c44a7a884afe | [] | no_license | 2001128/2_1805 | 2fc96bc6f8e2afcd9d4743891ecd87b754c28cc8 | b3d4bfab2703a7c6aa1c280669376efeab28cad1 | refs/heads/master | 2020-03-22T20:53:14.903808 | 2018-07-30T06:04:49 | 2018-07-30T06:04:49 | 140,639,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | from multiprocessing import Pool
import time
def work(msg):
for i in range(10):
time.sleep(1)
print("嘿嘿嘿%s"%msg)
p = Pool(3)#最大装3个进程
for i in range(6):
p.apply_async(work,(i,))#非阻塞
#p.apply(work,(i,))#阻塞
print("添加一个")
p.close()
p.join()
| [
"[email protected]"
] | |
851f182f4e8fd3a5a29ab28134a076b696039ae6 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/stdlib-big-823.py | d21cebeaf029e04de343a5b0650c3a2f5c83733c | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,998 | py | # ChocoPy library functions
def int_to_str(x: int) -> str:
digits:[str] = None
result:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
if x >= 10:
result = result + int_to_str(x // 10)
result = result + digits[x % 10]
return result
def int_to_str2(x: int, x2: int) -> str:
digits:[str] = None
digits2:[str] = None
result:str = ""
result2:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
if x >= 10:
result = result + int_to_str(x // 10)
result = result + digits[x % 10]
return result
def int_to_str3(x: int, x2: int, x3: int) -> str:
digits:[str] = None
digits2:[str] = None
digits3:[str] = None
result:str = ""
result2:str = ""
result3:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
if x >= 10:
result = result + int_to_str(x // 10)
result = result + digits[x % 10]
return result
def int_to_str4(x: int, x2: int, x3: int, x4: int) -> str:
digits:[str] = None
digits2:[str] = None
digits3:[str] = None
digits4:[str] = None
result:str = ""
result2:str = ""
result3:str = ""
result4:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
if x >= 10:
result = result + int_to_str(x // 10)
result = result + digits[x % 10]
return result
def int_to_str5(x: int, x2: int, x3: int, x4: int, x5: int) -> str:
digits:[str] = None
digits2:[str] = None
digits3:[str] = None
digits4:[str] = None
digits5:[str] = None
result:str = ""
$FuncBodyMember
result3:str = ""
result4:str = ""
result5:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
if x >= 10:
result = result + int_to_str(x // 10)
result = result + digits[x % 10]
return result
def str_to_int(x: str) -> int:
result:int = 0
digit:int = 0
char:str = ""
sign:int = 1
first_char:bool = True
# Parse digits
for char in x:
if char == "-":
if not first_char:
return 0 # Error
sign = -1
elif char == "0":
digit = 0
elif char == "1":
digit = 1
elif char == "2":
digit = 2
elif char == "3":
digit = 3
elif char == "3":
digit = 3
elif char == "4":
digit = 4
elif char == "5":
digit = 5
elif char == "6":
digit = 6
elif char == "7":
digit = 7
elif char == "8":
digit = 8
elif char == "9":
digit = 9
else:
return 0 # On error
first_char = False
result = result * 10 + digit
# Compute result
return result * sign
def str_to_int2(x: str, x2: str) -> int:
result:int = 0
result2:int = 0
digit:int = 0
digit2:int = 0
char:str = ""
char2:str = ""
sign:int = 1
sign2:int = 1
first_char:bool = True
first_char2:bool = True
# Parse digits
for char in x:
if char == "-":
if not first_char:
return 0 # Error
sign = -1
elif char == "0":
digit = 0
elif char == "1":
digit = 1
elif char == "2":
digit = 2
elif char == "3":
digit = 3
elif char == "3":
digit = 3
elif char == "4":
digit = 4
elif char == "5":
digit = 5
elif char == "6":
digit = 6
elif char == "7":
digit = 7
elif char == "8":
digit = 8
elif char == "9":
digit = 9
else:
return 0 # On error
first_char = False
result = result * 10 + digit
# Compute result
return result * sign
def str_to_int3(x: str, x2: str, x3: str) -> int:
result:int = 0
result2:int = 0
result3:int = 0
digit:int = 0
digit2:int = 0
digit3:int = 0
char:str = ""
char2:str = ""
char3:str = ""
sign:int = 1
sign2:int = 1
sign3:int = 1
first_char:bool = True
first_char2:bool = True
first_char3:bool = True
# Parse digits
for char in x:
if char == "-":
if not first_char:
return 0 # Error
sign = -1
elif char == "0":
digit = 0
elif char == "1":
digit = 1
elif char == "2":
digit = 2
elif char == "3":
digit = 3
elif char == "3":
digit = 3
elif char == "4":
digit = 4
elif char == "5":
digit = 5
elif char == "6":
digit = 6
elif char == "7":
digit = 7
elif char == "8":
digit = 8
elif char == "9":
digit = 9
else:
return 0 # On error
first_char = False
result = result * 10 + digit
# Compute result
return result * sign
def str_to_int4(x: str, x2: str, x3: str, x4: str) -> int:
result:int = 0
result2:int = 0
result3:int = 0
result4:int = 0
digit:int = 0
digit2:int = 0
digit3:int = 0
digit4:int = 0
char:str = ""
char2:str = ""
char3:str = ""
char4:str = ""
sign:int = 1
sign2:int = 1
sign3:int = 1
sign4:int = 1
first_char:bool = True
first_char2:bool = True
first_char3:bool = True
first_char4:bool = True
# Parse digits
for char in x:
if char == "-":
if not first_char:
return 0 # Error
sign = -1
elif char == "0":
digit = 0
elif char == "1":
digit = 1
elif char == "2":
digit = 2
elif char == "3":
digit = 3
elif char == "3":
digit = 3
elif char == "4":
digit = 4
elif char == "5":
digit = 5
elif char == "6":
digit = 6
elif char == "7":
digit = 7
elif char == "8":
digit = 8
elif char == "9":
digit = 9
else:
return 0 # On error
first_char = False
result = result * 10 + digit
# Compute result
return result * sign
def str_to_int5(x: str, x2: str, x3: str, x4: str, x5: str) -> int:
result:int = 0
result2:int = 0
result3:int = 0
result4:int = 0
result5:int = 0
digit:int = 0
digit2:int = 0
digit3:int = 0
digit4:int = 0
digit5:int = 0
char:str = ""
char2:str = ""
char3:str = ""
char4:str = ""
char5:str = ""
sign:int = 1
sign2:int = 1
sign3:int = 1
sign4:int = 1
sign5:int = 1
first_char:bool = True
first_char2:bool = True
first_char3:bool = True
first_char4:bool = True
first_char5:bool = True
# Parse digits
for char in x:
if char == "-":
if not first_char:
return 0 # Error
sign = -1
elif char == "0":
digit = 0
elif char == "1":
digit = 1
elif char == "2":
digit = 2
elif char == "3":
digit = 3
elif char == "3":
digit = 3
elif char == "4":
digit = 4
elif char == "5":
digit = 5
elif char == "6":
digit = 6
elif char == "7":
digit = 7
elif char == "8":
digit = 8
elif char == "9":
digit = 9
else:
return 0 # On error
first_char = False
result = result * 10 + digit
# Compute result
return result * sign
# Input parameters
c:int = 42
c2:int = 42
c3:int = 42
c4:int = 42
c5:int = 42
n:int = 10
n2:int = 10
n3:int = 10
n4:int = 10
n5:int = 10
# Run [-nc, nc] with step size c
s:str = ""
s2:str = ""
s3:str = ""
s4:str = ""
s5:str = ""
i:int = 0
i2:int = 0
i3:int = 0
i4:int = 0
i5:int = 0
i = -n * c
# Crunch
while i <= n * c:
s = int_to_str(i)
print(s)
i = str_to_int(s) + c
| [
"[email protected]"
] | |
d711b04956217dda83f8d47d7a2a5a5ee2d06a86 | 14e36010b98895e08bd9edfcbc60dce30cbfb82b | /oneflow/compatible_single_client_python/framework/local_blob.py | 8983fd0ce3ae9d403eddf84b197066a33689b23e | [
"Apache-2.0"
] | permissive | duzhanyuan/oneflow | a9719befbfe112a7e2dd0361ccbd6d71012958fb | c6b47a3e4c9b5f97f5bc9f60bc1401313adc32c5 | refs/heads/master | 2023-06-21T20:31:55.828179 | 2021-07-20T16:10:02 | 2021-07-20T16:10:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,242 | py | """
Copyright 2020 The OneFlow 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 law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
import numpy as np
from oneflow.compatible_single_client_python.framework import (
remote_blob as remote_blob_util,
)
import oneflow._oneflow_internal
import traceback
class LocalBlob(object):
# TODO(chengcheng): maybe not need LocalBlob.
def __init__(self, ndarray, is_dynamic):
self.ndarray_ = ndarray
self.is_dynamic_ = is_dynamic
@property
def is_dynamic(self):
return self.is_dynamic_
def ndarray_list(self):
print(
"WARNING:",
"LocalBlob.ndarray_list is deprecated, please use LocalBlob.numpy()\n",
traceback.format_stack()[-2],
)
return self.numpy_list()
def numpy_list(self):
return [self.numpy()]
def ndarray(self):
print(
"WARNING:",
"LocalBlob.ndarray is deprecated, please use LocalBlob.numpy()\n",
traceback.format_stack()[-2],
)
return self.numpy()
def numpy(self, parallel_id=None):
assert parallel_id is None or parallel_id == 0
return self.ndarray_
def parallel_num(self):
return 1
def __getattr__(self, attr):
return getattr(self.numpy(), attr)
def MakeLocalBlob4EagerBlob(eager_blob):
# TODO(chengcheng): refactor eager local blob.
assert isinstance(eager_blob, oneflow._oneflow_internal.EagerBlobTrait)
if isinstance(eager_blob, oneflow._oneflow_internal.EagerMirroredBlob):
assert eager_blob.numpy_size() == 1
return LocalBlob(eager_blob.numpy(), is_dynamic=eager_blob.is_dynamic,)
elif isinstance(eager_blob, oneflow._oneflow_internal.EagerConsistentBlob):
return LocalBlob(eager_blob.numpy(), is_dynamic=False)
else:
raise NotImplementedError
non_override_field = set(
[
"__class__",
"__doc__",
"__new__",
"__init__",
"__del__",
"__call__",
"__getattr__",
"__getattribute__",
"__setattr__",
"__delattr__",
"__dir__",
"__get__",
"__set__",
"__delete__",
]
)
def MakeBlobMethod(field_name):
def ConvertOtherArgs(args):
return [x.numpy() if isinstance(x, LocalBlob) else x for x in args]
return lambda self, *args: getattr(self.numpy(), field_name)(
*ConvertOtherArgs(args)
)
for field_name in dir(np.ndarray):
if field_name.startswith("__") == False:
continue
if field_name in non_override_field:
continue
if hasattr(LocalBlob, field_name) == False:
setattr(LocalBlob, field_name, MakeBlobMethod(field_name))
| [
"[email protected]"
] | |
4c5f939acd7ce243666553d243a0661345dd58fe | 6bc991e3db089dca9ac7a5716f2114017029c6a3 | /sppas/sppas/bin/alignment.py | 824e0e6612b3ee11ddd3be818873a6978d6ffcb5 | [
"GFDL-1.1-or-later",
"GPL-3.0-only",
"GPL-3.0-or-later",
"MIT"
] | permissive | mirfan899/MTTS | 8b32924754cf399147293d7e314b7fcb134f3f77 | 3167b65f576abcc27a8767d24c274a04712bd948 | refs/heads/master | 2020-06-11T20:59:03.788965 | 2019-10-09T12:34:02 | 2019-10-09T12:34:02 | 194,083,206 | 0 | 0 | MIT | 2019-06-27T11:30:30 | 2019-06-27T11:30:30 | null | UTF-8 | Python | false | false | 8,297 | py | #!/usr/bin/env python
"""
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ analysis
___/ | | | | ___/ of speech
http://www.sppas.org/
Use of this software is governed by the GNU Public License, version 3.
SPPAS 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.
SPPAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SPPAS. If not, see <http://www.gnu.org/licenses/>.
This banner notice must not be removed.
---------------------------------------------------------------------
bin.alignment.py
~~~~~~~~~~~~~~~~
:author: Brigitte Bigi
:organization: Laboratoire Parole et Langage, Aix-en-Provence, France
:contact: [email protected]
:license: GPL, v3
:copyright: Copyright (C) 2011-2019 Brigitte Bigi
:summary: Run the alignment automatic annotation
"""
import logging
import sys
import os
from argparse import ArgumentParser
PROGRAM = os.path.abspath(__file__)
SPPAS = os.path.dirname(os.path.dirname(os.path.dirname(PROGRAM)))
sys.path.append(SPPAS)
from sppas import sg, annots
from sppas.src.anndata.aio import extensions_out
from sppas import sppasAlign
from sppas import sppasParam
from sppas import sppasAnnotationsManager
from sppas import sppasLogSetup
from sppas import sppasAppConfig
if __name__ == "__main__":
# -----------------------------------------------------------------------
# Fix initial annotation parameters
# -----------------------------------------------------------------------
parameters = sppasParam(["alignment.json"])
ann_step_idx = parameters.activate_annotation("alignment")
ann_options = parameters.get_options(ann_step_idx)
# -----------------------------------------------------------------------
# Verify and extract args:
# -----------------------------------------------------------------------
parser = ArgumentParser(
usage="%(prog)s [files] [options]",
description=
parameters.get_step_name(ann_step_idx) + ": " +
parameters.get_step_descr(ann_step_idx),
epilog="This program is part of {:s} version {:s}. {:s}. Contact the "
"author at: {:s}".format(sg.__name__, sg.__version__,
sg.__copyright__, sg.__contact__)
)
parser.add_argument(
"--quiet",
action='store_true',
help="Disable the verbosity")
parser.add_argument(
"--log",
metavar="file",
help="File name for a Procedure Outcome Report (default: None)")
# Add arguments for input/output files
# ------------------------------------
group_io = parser.add_argument_group('Files')
group_io.add_argument(
"-i",
metavar="file",
help='Input wav file name.')
group_io.add_argument(
"-p",
metavar="file",
help='Input file name with the phonetization.')
group_io.add_argument(
"-t",
metavar="file",
help='Input file name with the tokenization.')
group_io.add_argument(
"-o",
metavar="file",
help='Output file name with estimated alignments.')
group_io.add_argument(
"-r",
metavar="model",
help='Directory of the acoustic model of the language of the text')
group_io.add_argument(
"-R",
metavar="model",
help='Directory of the acoustic model of the mother language of the speaker')
group_io.add_argument(
"-I",
metavar="file",
action='append',
help='Input transcription file name (append).')
group_io.add_argument(
"-l",
metavar="lang",
choices=parameters.get_langlist(ann_step_idx),
help='Language code (iso8859-3). One of: {:s}.'
''.format(" ".join(parameters.get_langlist(ann_step_idx))))
group_io.add_argument(
"-e",
metavar=".ext",
default=annots.extension,
choices=extensions_out,
help='Output file extension. One of: {:s}'
''.format(" ".join(extensions_out)))
# Add arguments from the options of the annotation
# ------------------------------------------------
group_opt = parser.add_argument_group('Options')
for opt in ann_options:
group_opt.add_argument(
"--" + opt.get_key(),
type=opt.type_mappings[opt.get_type()],
default=opt.get_value(),
help=opt.get_text() + " (default: {:s})"
"".format(opt.get_untypedvalue()))
# Force to print help if no argument is given then parse
# ------------------------------------------------------
if len(sys.argv) <= 1:
sys.argv.append('-h')
args = parser.parse_args()
# Mutual exclusion of inputs
# --------------------------
if args.i and args.I:
parser.print_usage()
print("{:s}: error: argument -I: not allowed with argument -i"
"".format(os.path.basename(PROGRAM)))
sys.exit(1)
# -----------------------------------------------------------------------
# The automatic annotation is here:
# -----------------------------------------------------------------------
# Redirect all messages to logging
# --------------------------------
with sppasAppConfig() as cg:
if not args.quiet:
log_level = cg.log_level
else:
log_level = cg.quiet_log_level
lgs = sppasLogSetup(log_level)
lgs.stream_handler()
# Get options from arguments
# --------------------------
arguments = vars(args)
for a in arguments:
if a not in ('i', 'o', 'p', 't', 'r', 'R', 'I', 'l', 'e', 'quiet', 'log'):
parameters.set_option_value(ann_step_idx, a, str(arguments[a]))
if args.i or args.p:
# Perform the annotation on a single file
# ---------------------------------------
if not args.p:
print("argparse.py: error: option -p is required with option -i")
sys.exit(1)
ann = sppasAlign(log=None)
if args.r:
ann.load_resources(args.r, args.R)
ann.fix_options(parameters.get_options(ann_step_idx))
ann.print_options()
if args.o:
ann.run([args.p], [args.i, args.t], args.o)
else:
trs = ann.run([args.p], [args.i, args.t])
for tier in trs:
print(tier.get_name())
for a in tier:
print("{} {} {:s}".format(
a.get_location().get_best().get_begin().get_midpoint(),
a.get_location().get_best().get_end().get_midpoint(),
a.serialize_labels(" ")))
elif args.I:
# Perform the annotation on a set of files
# ----------------------------------------
if not args.l:
print("argparse.py: error: option -l is required with option -I")
sys.exit(1)
# Fix input files
for f in args.I:
parameters.add_to_workspace(os.path.abspath(f))
# Fix the output file extension and others
parameters.set_lang(args.l)
parameters.set_output_format(args.e)
parameters.set_report_filename(args.log)
# Perform the annotation
process = sppasAnnotationsManager()
process.annotate(parameters)
else:
if not args.quiet:
logging.info("No file was given to be annotated. Nothing to do!")
| [
"[email protected]"
] | |
60f4317f06b40db9362ee145924634045e727923 | d3cac61f30d7a76eb61560ac54b0b8d11fd63a19 | /src/model/model.py | 33a6eee5e2b1a4916972b46a64914ee6f015bb93 | [
"MIT"
] | permissive | Lukeeeeee/FISDNN | a676f7f73b8f7b54386054daf320b6a683d89b02 | 49361770fe987337b16a296c00cfd6562a7e95ed | refs/heads/master | 2021-08-24T00:59:46.587476 | 2017-12-07T10:32:58 | 2017-12-07T10:32:58 | 113,009,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | import tensorflow as tf
class Model(object):
standard_key_list = []
def __init__(self, config, sess_flag=False, data=None):
self.config = config
self.data = data
self.net = None
if sess_flag is True:
self.sess = tf.InteractiveSession()
def create_model(self, *args, **kwargs):
pass
def create_training_method(self, *args, **kwargs):
pass
def update(self, *args, **kwargs):
pass
def eval_tensor(self, *args, **kwargs):
pass
def predict(self, *args, **kwargs):
pass
def save_model(self, *args, **kwargs):
pass
def load_model(self, *args, **kwargs):
pass
@property
def var_list(self):
return self.net.all_params
| [
"[email protected]"
] | |
9cb2f1bdd1bdc428bbeab2a4bcd011661e134f04 | bad44a92fb338260f9c077689d7fa5472526c3fe | /models/tensorflow/google_bert/optimization_test.py | 4f2dcf133f1bc4d4531fc9b82432d149be054b21 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/nnfusion | ebc4c06331b8e93dbf5e176e5ecd3382e322ff21 | bd4f6feed217a43c9ee9be16f02fa8529953579a | refs/heads/main | 2023-08-25T17:41:37.517769 | 2022-09-16T05:59:01 | 2022-09-16T05:59:01 | 252,069,995 | 872 | 157 | MIT | 2023-07-19T03:06:21 | 2020-04-01T04:15:38 | C++ | UTF-8 | Python | false | false | 1,721 | py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import optimization
import tensorflow as tf
class OptimizationTest(tf.test.TestCase):
def test_adam(self):
with self.test_session() as sess:
w = tf.get_variable(
"w",
shape=[3],
initializer=tf.constant_initializer([0.1, -0.2, -0.1]))
x = tf.constant([0.4, 0.2, -0.5])
loss = tf.reduce_mean(tf.square(x - w))
tvars = tf.trainable_variables()
grads = tf.gradients(loss, tvars)
global_step = tf.train.get_or_create_global_step()
optimizer = optimization.AdamWeightDecayOptimizer(learning_rate=0.2)
train_op = optimizer.apply_gradients(zip(grads, tvars), global_step)
init_op = tf.group(tf.global_variables_initializer(),
tf.local_variables_initializer())
sess.run(init_op)
for _ in range(100):
sess.run(train_op)
w_np = sess.run(w)
self.assertAllClose(w_np.flat, [0.4, 0.2, -0.5], rtol=1e-2, atol=1e-2)
if __name__ == "__main__":
tf.test.main()
| [
"[email protected]"
] | |
9d45c7ac1d31dcdc4b7a018c9ea7c272e9ce58b4 | 2c3da6e0bddf55d64d650040bbf286c47b31811a | /学习路线/1.python基础/day12/03-自定义异常.py | bd4172eec5c4d550a58d35d8fc6cc71179cba149 | [
"MIT"
] | permissive | Bngzifei/PythonNotes | 76bd53db3033a9c51ab4bdd727842cd89607b584 | 01590e1b6c1bc0f04aa2d355fa2553c04cce27f2 | refs/heads/master | 2023-02-04T06:49:00.725463 | 2020-12-15T09:26:40 | 2020-12-15T09:26:40 | 155,154,662 | 1 | 2 | MIT | 2020-09-08T01:30:19 | 2018-10-29T05:02:48 | Python | UTF-8 | Python | false | false | 1,938 | py | """
异常抛出的原理:
raise: 关键字 抛出 表示抛出指定的异常实例对象
raise 抛出异常的实例对象,然后except去拦截这个异常实例对象.
能不能拦截:是要看这个错误是不是这个错误的类创建的.
拦截:判断是不是同一个类造出来的,是,就把这个异常实例对象赋值给error.
先抛出来才能拦截.
自定义异常:不用解释器提供异常类.
1> 让异常信息是中文的,让用户也能看懂.更加人性化
2> 提前干预,还没有出错之前就来对问题进行处理.
3> 简化异常处理的流程,批量抛出,一次拦截.
注意: 自定义异常类必须继承Exception类,是为了使用raise的能力.否则会报错误.
"""
# try:
# # print(a)
# error_instance = NameError("name 'a' is not define") # 创建指定异常的实例对象
# print(id(error_instance)) # 2291212287760
# raise error_instance # 抛出指定的异常实例对象
#
#
# except NameError as error: # 里面写了各种错误类型,根据错误去找是什么样的错误类型.
# print('提示:%s' % error) # 实际是一个NameError()类产生的一个实例对象.error实际就是一个错误类型的实例对象.
# print(id(error)) # 2291212287760
# error = error_instance ,实际对应关系.
class PhoneException(Exception):
# 实际的
# def __init__(self, name):
# self.name = name
#
# def __str__(self):
# # return 'xxxxxxxxxxxxxxxx'
# return self.name
pass
phone_num = input('手机号:')
try:
if len(phone_num) != 11:
# print('号码位数不对')
raise PhoneException('手机号码位数不对')
elif phone_num.isdecimal() is False: # isdecimal():判断是不是数字,返回值是False或者是True
# print('号码不是纯数字')
raise PhoneException('手机号码不是纯数字')
except PhoneException as error:
print(error)
# var = 'df'.center(20,'*') # 输出 : *********df*********
# print(var)
| [
"[email protected]"
] | |
f1629890cb41cf63d385ff4525caec9e3678951b | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/word-count/4633f41ce11c4f3db40f1cfe10da8a7c.py | 7c016a0265697b750d833f5b89770e6f4100a444 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 355 | py | import string
def stripPunc(x): # From S.Lott's solution
for i in string.punctuation:
x = x.replace(i,"")
while " " in x:
x = x[0:x.find(" ")] + x[(x.find(" ") + 1):]
return x
def word_count(x):
words = {}
for i in stripPunc(x).lower().split(" "):
if i in words:
words[i] += 1
else:
words[i] = 1
return words
| [
"[email protected]"
] | |
3acf4e7c0a1d9229123d0246516ee9b90f9c7d65 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_2239+043/sdB_PG_2239+043_coadd.py | 8fd4cff041120c8922b19c408c25702306753147 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[339.639,4.857103], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_PG_2239+043/sdB_PG_2239+043_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB_PG_2239+043/sdB_PG_2239+043_count_coadd.fits", overwrite=True, verbose=3)
if __name__ == "__main__":
main()
| [
"[email protected]"
] | |
43f43e93f47c1bebed88ed87d44afa9e783bf0d5 | 426e3c51d85e3ee60ce27c8b4f870b69db5dfc30 | /config/settings.py | 55666356579de325f1ac9be4bb1b0ab92bf4b406 | [] | no_license | seiya0723/diary_04 | ad5468f5af9f69bf659bfc3f977da6402cde1667 | 700213f4d646c09634fd0f76566604101796d2c1 | refs/heads/master | 2023-06-28T19:13:59.905437 | 2021-07-31T01:33:14 | 2021-07-31T01:33:14 | 391,228,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,842 | py | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'whj+@6kd^oo2_1$1gat0s7v4rk6vtjann1x+tqxeq_(d=tt6+h'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bbs.apps.BbsConfig',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'config.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ os.path.join(BASE_DIR,"templates") ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'config.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'ja'
TIME_ZONE = 'Asia/Tokyo'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
if DEBUG:
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
if not DEBUG:
# Herokuデプロイ時に必要になるライブラリのインポート
import django_heroku
import dj_database_url
# ALLOWED_HOSTSにホスト名)を入力
ALLOWED_HOSTS = [ 'hogehoge.herokuapp.com' ]
# 静的ファイル配信ミドルウェア、whitenoiseを使用。※順番不一致だと動かないため下記をそのままコピーする。
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
# DBを使用する場合は下記を入力する。
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ここにDatabaseを入力',
'USER': 'ここにUserを入力',
'PASSWORD': 'ここにPasswordを入力',
'HOST': 'ここにHostを入力',
'PORT': 'ここにPortを入力',
}
}
db_from_env = dj_database_url.config(conn_max_age=600, ssl_require=True)
DATABASES['default'].update(db_from_env)
# 静的ファイル(static)の存在場所を指定する。
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
| [
"seiya@asahina"
] | seiya@asahina |
77bb8d0edbc32f2daee27dd739c806a846f8d986 | be8057bf5bfb491cd876c42821a94a58266ae836 | /manage.py | e4d17ff2433cbfdaf94d9146ff9376763cd3bd67 | [] | no_license | hasgeek/packman | 88ae1aa220167dc50a2b83011c53a49c13349437 | d99a1d7f08f26e3476a969278a6f0d87b050a280 | refs/heads/master | 2020-12-25T17:30:07.449733 | 2019-05-26T14:47:52 | 2019-05-26T14:47:52 | 24,697,117 | 0 | 1 | null | 2019-05-26T14:47:53 | 2014-10-01T22:03:35 | Python | UTF-8 | Python | false | false | 242 | py | #!/usr/bin/env python
from coaster.manage import init_manager
from packman.models import db
from packman import app, init_for
if __name__ == '__main__':
db.init_app(app)
manager = init_manager(app, db, init_for)
manager.run()
| [
"[email protected]"
] | |
22dfefc6daa031bb7883752c31a9bb1bd9aced00 | 5e84763c16bd6e6ef06cf7a129bb4bd29dd61ec5 | /blimgui/dist/OpenGL/raw/GL/NV/stereo_view_rendering.py | 95d69c29319d993fde3973be7deea23fe0d87849 | [
"MIT"
] | permissive | juso40/bl2sdk_Mods | 8422a37ca9c2c2bbf231a2399cbcb84379b7e848 | 29f79c41cfb49ea5b1dd1bec559795727e868558 | refs/heads/master | 2023-08-15T02:28:38.142874 | 2023-07-22T21:48:01 | 2023-07-22T21:48:01 | 188,486,371 | 42 | 110 | MIT | 2022-11-20T09:47:56 | 2019-05-24T20:55:10 | Python | UTF-8 | Python | false | false | 511 | py | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_EXTENSION_NAME = 'GL_NV_stereo_view_rendering'
def _f( function ):
return _p.createFunction( function,_p.PLATFORM.GL,'GL_NV_stereo_view_rendering',error_checker=_errors._error_checker)
| [
"[email protected]"
] | |
db542dd2eab000423a4880c15cd1cfb2c66c5f0e | 28e8fd6383631ad0e629ab427a3665906eb0e827 | /xierpa3/contributions/filibuster/content/auction.py | b25fb2bc3a3623ff160ce7d450f34ad04825985c | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | simons-design/Xierpa3 | d2a684c2fed8757b9a49616419e1f8cce508ab1e | 4c49986d85a942e719d371dab918bb1c4f813f29 | refs/heads/master | 2021-01-18T04:54:34.591661 | 2014-05-23T10:57:39 | 2014-05-23T10:57:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,285 | py | # -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
# xierpa server
# Copyright (c) 2014+ [email protected], www.petr.com, www.xierpa.com
#
# X I E R P A 3
# Distribution by the MIT License.
#
# -----------------------------------------------------------------------------
#
# Contributed by Erik van Blokland and Jonathan Hoefler
# Original from filibuster.
#
# FILIBUSTER.ORG!
"""
auction
--------------------------------------------------------------------
"""
__version__ = '3.0.0'
__author__ = "someone"
content = {
'auction_section': ['<#commercial_section#>'],
'auction_shortheadline':[
'<#^,politics_euro_nationality#> <#^,auction_antiques_objects#>',
'<#^,auction_antiques_period#> <#^,auction_antiques_objects#>',
'<#^,auction_antiques_adj#> <#^,auction_antiques_objects#>',
],
'auction_antiques': [
'<#politics_euro_nationality#> <#auction_antiques_adj#> <#auction_antiques_period#> <#auction_antiques_objects#> (<#auction_object_state#>)',
'<#auction_antiques_adj#> <#politics_euro_nationality#> <#auction_antiques_period#> <#auction_antiques_objects#> (<#auction_object_state#>)',
'<#auction_antiques_adj#> <#auction_antiques_material#> <#auction_antiques_period#> <#auction_antiques_objects#>',
],
'auction_antiques_adj': [
'Antique',
'old',
'antique',
'embossed',
'signed',
'embroidered',
'vintage',
],
'auction_antiques_bid': [
'<-randint(1, 100)->,000',
],
'auction_antiques_material': [
'cloth',
'cotton',
'glass',
'silver',
'gold-plated',
'wood',
'pine',
'oak',
'leather',
],
'auction_antiques_objects': [
'clock',
'tea tin',
'book',
'embroidery',
'pocket knife',
'coverlet',
'hunting pouch',
'mirror',
'tapestry sampler',
'wall phone',
'hat pin',
'trunk',
'dental tools',
'tryptich',
'piano roll',
'master',
'painting',
'tool',
'chronometer',
],
'auction_antiques_period': [
'<-randint(17, 19)->th century',
'edwardian',
'victorian',
'art nouveau',
'impressionist',
'"arts and crafts"',
'Jeffersonian',
],
'auction_autos': [
'<-randint(1960, 1970)-> <#car_brand#><#car_mod#>',
'Drive a <#car_brand#><#car_mod#> for FREE! Exclusive Secrets!',
'COBRA RADAR/LASER DETECTORS',
'Turbocharged MR2 REAR ENGINE SPORT CAR..WOW!',
],
'auction_autos_bid': [
'<-randint(10, 50)->,000',
],
'auction_beanbags': [
'<#hero_pets#> beanie baby',
'<#hero_pets#> Beaniebaby',
],
'auction_beanbags_bid': [
'<-randint(10, 100)*50->',
],
'auction_books': [
'<#hero_comic_title#>',
],
'auction_books_bid': [
'<-randint(10, 100)->.00',
],
'auction_category': [
'autos',
'antiques',
'books',
'music',
'movies',
'coins',
'stamps',
'collectibles',
'computers',
'dolls',
'jewelry',
'photo',
'electronics',
'pottery',
'glass',
'sports',
'memorabilia',
'toys',
'beanbags',
'miscellaneous',
],
'auction_coins': [
'<#politics_euro_nationality#> coins (<#auction_object_state#>)',
'coins from <#country#> (<#auction_object_state#>)',
'Complete collection from <#country#> (<#auction_object_state#>)',
'Historic currency from <#country#>',
],
'auction_coins_bid': [
'<-randint(5, 10)->,000',
],
'auction_collectibles': [
'<#hero_comic_title#> (<#auction_object_state#>)',
],
'auction_collectibles_bid': [
'<-randint(5, 20)*20->',
],
'auction_computers': [
'<#CE_product#>',
],
'auction_computers_bid': [
'<-randint(10, 40)*75->.00',
],
'auction_dolls': [
'The <#names_first_female#> Collection',
'<-randint(1960, 2000)-> <#names_first_female#>',
'<#names_first_female#>, <-randint(1960, 2000)-> issue.',
'Hummel ceramic figurine',
],
'auction_dolls_bid': [
'<-randint(10, 100)*50->',
],
'auction_electronics': [
'<#CE_product#>',
],
'auction_electronics_bid': [
'<-randint(10, 100)*50->',
],
'auction_glass': [
'Some old Glass',
],
'auction_glass_bid': [
'<-randint(10, 100)*50->',
],
'auction_item': [
'<#auction_<#auction_category#>#><#auction_qualification#>',
],
'auction_item_bid': [
'$<#auction_<#auction_category#>_bid#>.00',
],
'auction_jewelry': [
'<#auction_antiques_adj#> <#auction_jewelry_object#>',
'<#auction_antiques_period#> <#auction_jewelry_object#>',
'<#auction_jewelry_object#>',
'<#auction_jewelry_adj#> <#auction_jewelry_object#>',
'<#auction_jewelry_object#> (<#auction_object_state#>)',
'<#auction_jewelry_adj#> <#auction_jewelry_object#> (<#auction_object_state#>)',
],
'auction_jewelry_adj': [
'diamond',
'glass',
'gold',
'silver',
'platinum',
'gold plated',
'brass',
'rhinestone',
],
'auction_jewelry_bid': [
'<-randint(10, 100)*50->',
],
'auction_jewelry_object': [
'necklace',
'ring',
'earring',
'armband',
'tiara',
'leaf pin',
'pin',
'chain',
],
'auction_memorabilia': [
'Memories, hardly used.',
],
'auction_memorabilia_bid': [
'<-randint(10, 100)*50->',
],
'auction_miscellaneous': [
'<#!capitalize, sci_anatomy_human#>, <#sci_blood#>',
'property on <#sci_astro_planets#>',
],
'auction_miscellaneous_bid': [
'<-randint(10, 100)*50->',
],
'auction_movies': [
'<#!uppercase, movie_medium#>: <#movie_superheroes#> (<-randint(1960, 2000)->)',
'<#!uppercase, movie_medium#>: <#movie_superheroes#> (by <#name_japanese#>)',
'<#!uppercase, movie_medium#>: <#!uppercase, robot#> (by <#name_japanese#>, <-randint(1960, 2000)->)',
'<#!uppercase, movie_medium#>: <#robot#> (<-randint(1960, 2000)->)',
],
'auction_movies_bid': [
'<-randint(5, 100)*20->,00',
],
'auction_music': [
'<#classic_composer#> by <#classic_orchestra#> (<#auction_object_state#>)',
'CD: <#classic_recording_highbrow#>',
u'old 78’s! <#classic_composer#> <#classic_classification#> (<#auction_object_state#>)',
'Piano rolls: <#classic_composer#> (<#auction_object_state#>)',
],
'auction_music_bid': [
'<-randint(5, 20)*5->.00',
],
'auction_object_detail': [
'corner',
'back',
'front',
'top',
'bottom',
'inside',
],
'auction_object_state': [
'slightly scratched',
'mint',
'near mint',
'excellent condition',
'reasonable',
'<#auction_object_state_deteriorate#> at <#auction_object_detail#>',
'in original box',
'w/original box',
],
'auction_object_state_deteriorate': [
'slight foxing',
'scratches',
'worn',
'discolored',
'frayed',
],
'auction_photo': [
'<#corporation_japanese#> Camera',
],
'auction_photo_bid': [
'<-randint(10, 100)*50->',
],
'auction_pottery': [
'Piece of therapeutic pottery',
],
'auction_pottery_bid': [
'<-randint(5, 10)->',
],
'auction_qualification': [
' - in excellent condition',
' L@@K!!',
' (needs some work)',
' GREAT PRICE',
' Limited Time Only',
' - Mint Condition',
'~BLOWOUT SALE~',
'WOW',
'',
'',
'',
'',
'',
'',
],
'auction_sports': [
'<#sportsteam_us#> cap',
'Signed <#sportsteam_us#> Ball',
'Signed <#sportsteam_us#> Shirts',
'<#sportsteam_us#> season tickets',
'<#sportsteam_us#> tickets - Great Seats!',
],
'auction_sports_bid': [
'<-randint(10, 100)*50->',
],
'auction_stamps': [
'<#colors_primary#> Mauritius <-randint(5, 50)-> cents. Rare!stamps from <#country#>',
'Complete collections from <#country#>',
'Historic stamps from <#country#>',
],
'auction_stamps_bid': [
'<-randint(5, 10)->,000.00',
],
'auction_toys': [
'<#robot#>, <-randint(1960, 2000)->, needs batteries',
],
'auction_toys_bid': [
'<-randint(10, 200)*50->',
],
'car_brand': [
'GM',
'Mustang',
'Chevvy',
'Ferrari',
'Volkswagen',
'Mercedes-Benz',
],
'car_mod': [
' Convertible',
' Roadster',
' High Top',
' Van',
'',
'',
'',
'',
'',
'',
], }
| [
"[email protected]"
] | |
59041a9045421c361c8d5f960d5f68b475d4c6a1 | 3afc48df003fb180a24072b769b9e5fb5ffb7eb6 | /tests/matchers/test_called_once_with.py | 9f13e48a6a09f4189dfdcc3a5d03b82907403180 | [
"MIT"
] | permissive | hieueastagile/robber.py | d20e90bf43ba2c354ffec56c80080bf65268fd6f | b439251848fd3b5085cdac45130311bfe0facc13 | refs/heads/master | 2021-01-21T21:09:42.378373 | 2017-04-24T03:23:22 | 2017-04-24T03:23:22 | 92,312,856 | 0 | 0 | null | 2017-05-24T16:21:42 | 2017-05-24T16:21:41 | null | UTF-8 | Python | false | false | 2,219 | py | from unittest import TestCase
from mock import Mock
from robber import expect
from robber.matchers.called_once_with import CalledOnceWith
class TestCalledOnceWith(TestCase):
def test_matches(self):
mock = Mock()
mock(1, 2, 3, a=4)
expect(CalledOnceWith(mock, 1, False, 2, 3, a=4).matches()).to.eq(True)
def test_failure_message_with_not_called_mock(self):
mock = Mock()
called_once_with = CalledOnceWith(mock, 2)
called_once_with.matches()
message = called_once_with.failure_message()
expect(message) == 'Expected {mock} to be called once with 2. Actually not called.'.format(mock=mock)
def test_failure_message_with_called_multiple_times(self):
mock = Mock()
mock(1)
mock(1)
called_once_with = CalledOnceWith(mock, 2)
called_once_with.matches()
message = called_once_with.failure_message()
expect(message) == 'Expected {mock} to be called once with 2. ' \
'Actually called 2 times with 1.'.format(mock=mock)
def test_failure_message_with_wrong_params(self):
mock = Mock()
mock(4, 5, 6, c=7)
called_once_with = CalledOnceWith(mock, 1, False, 2, 3, a=4)
called_once_with.matches()
message = called_once_with.failure_message()
expect(message) == 'Expected {mock} to be called once with 1, 2, 3, a=4. ' \
'Actually called 1 times with 4, 5, 6, c=7.'.format(mock=mock)
def test_negative_failure_message(self):
mock = Mock()
mock(1, 2, 3, a=4)
called_once_with = CalledOnceWith(mock, 1, True, 2, 3, a=4)
called_once_with.matches()
message = called_once_with.failure_message()
expect(message) == 'Expected {mock} not to be called once with 1, 2, 3, a=4. ' \
'Actually called 1 times with 1, 2, 3, a=4.'.format(mock=mock)
def test_register(self):
expect(expect.matcher('called_once_with')) == CalledOnceWith
def test_not_a_mock(self):
self.assertRaises(TypeError, CalledOnceWith("a", "b").matches)
self.assertRaises(TypeError, CalledOnceWith(1, "b").matches)
| [
"[email protected]"
] | |
e6e473574eb22795757091531ef21ac06a1dffb9 | 109a830aad476305f029274d75e28bec8b54f597 | /venv/lib/python3.9/site-packages/django/contrib/admindocs/urls.py | 472df9835b304fd18b7f673137b62f549373cbff | [] | no_license | Dapucla/EP | 53b156088046abfd6833eba95dc4393ebeb93f4e | 9368032b4b289b20ec1bdf0033d3fe199223d200 | refs/heads/master | 2023-06-19T08:02:55.984888 | 2021-07-11T22:52:24 | 2021-07-11T22:52:24 | 330,009,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,314 | py | from django.contrib.admindocs import views
from django.urls import path, re_path
urlpatterns = [
path(
'',
views.BaseAdminDocsView.as_view(template_name='admin_doc/post_list.html'),
name='django-admindocs-docroot',
),
path(
'bookmarklets/',
views.BookmarkletsView.as_view(),
name='django-admindocs-bookmarklets',
),
path(
'tags/',
views.TemplateTagIndexView.as_view(),
name='django-admindocs-tags',
),
path(
'filters/',
views.TemplateFilterIndexView.as_view(),
name='django-admindocs-filters',
),
path(
'views/',
views.ViewIndexView.as_view(),
name='django-admindocs-views-index',
),
path(
'views/<view>/',
views.ViewDetailView.as_view(),
name='django-admindocs-views-detail',
),
path(
'models/',
views.ModelIndexView.as_view(),
name='django-admindocs-models-index',
),
re_path(
r'^models/(?P<app_label>[^\.]+)\.(?P<model_name>[^/]+)/$',
views.ModelDetailView.as_view(),
name='django-admindocs-models-detail',
),
path(
'templates/<path:template>/',
views.TemplateDetailView.as_view(),
name='django-admindocs-templates',
),
]
| [
"[email protected]"
] | |
94413847eb45e257955156690c75cb5f1ca00387 | 334d0190164d92b53be2844a3afc2826d64b1a6d | /lib/python3.9/site-packages/theano/gpuarray/ctc.py | ef6c1d0af4e794d85d8c3e393db03ecc0dd468bb | [] | no_license | sou133688/BayesianStatics | f294d7c47cfa56374cf73b520529620dc6120f47 | be9121429494cd8fd231594b029fc2f030d8335f | refs/heads/main | 2023-08-21T15:57:32.980658 | 2021-10-01T00:01:13 | 2021-10-01T00:01:13 | 401,909,680 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,292 | py | import os
import sys
import theano.tensor as tt
from theano.configdefaults import config
from theano.gpuarray import pygpu
from theano.gpuarray.basic_ops import (
as_gpuarray_variable,
gpu_contiguous,
gpuarray_helper_inc_dir,
infer_context_name,
)
from theano.gpuarray.elemwise import GpuDimShuffle
from theano.gpuarray.type import GpuArrayType, gpu_context_type
from theano.gradient import grad_undefined
from theano.graph.basic import Apply
from theano.graph.op import _NoPythonExternalCOp
from theano.graph.opt import local_optimizer
from theano.tensor.nnet.ctc import ctc_available
from theano.tensor.opt import register_canonicalize
class GpuConnectionistTemporalClassification(_NoPythonExternalCOp):
"""
GPU wrapper for Baidu CTC loss function.
Parameters
----------
compute_grad
If set to True, enables the computation of gradients of the CTC loss function.
"""
__props__ = ("compute_grad",)
_cop_num_inputs = 3
_cop_num_outputs = 2
func_file = "./c_code/ctc_wrapper.c"
func_name = "APPLY_SPECIFIC(ctc_cost_gpu)"
params_type = gpu_context_type
def __init__(self, compute_grad=True):
if not ctc_available():
raise RuntimeError(
"Baidu CTC is not available and "
"GpuConnectionistTemporalClassification Op "
"can not be constructed."
)
self.compute_grad = compute_grad
# Return only the cost. Gradient will be returned by grad()
self.default_output = 0
super().__init__(self.func_file, self.func_name)
def c_lib_dirs(self, **kwargs):
lib_dirs = []
if ctc_available.path is not None:
lib_dirs += [ctc_available.path]
return lib_dirs
def c_compile_args(self, **kwargs):
if ctc_available.path is not None:
if sys.platform != "darwin" and " " in ctc_available.path:
return ['-Wl,-rpath,"' + ctc_available.path + '"']
else:
return ["-Wl,-rpath," + ctc_available.path]
return []
def c_libraries(self, **kwargs):
return ["warpctc", "gpuarray"]
def c_header_dirs(self, **kwargs):
dirs = [
gpuarray_helper_inc_dir(),
pygpu.get_include(),
config.cuda__include_path,
]
if config.ctc__root != "":
dirs.append(os.path.join(config.ctc__root, "include"))
return dirs
def c_headers(self, **kwargs):
return [
"ctc.h",
"numpy_compat.h",
"gpuarray/ext_cuda.h",
"gpuarray_helper.h",
"gpuarray/types.h",
"gpuarray_api.h",
"gpuarray/array.h",
"gpuarray/util.h",
"gpuarray/extension.h",
]
def get_params(self, node):
return node.inputs[0].type.context
def make_node(self, activations, labels, input_lengths):
context_name = infer_context_name(activations)
t_activations = as_gpuarray_variable(activations, context_name=context_name)
# Ensure activations array is C-contiguous
t_activations = gpu_contiguous(t_activations)
# Labels and input lengths are always on the CPU
t_labels = tt.as_tensor_variable(labels)
t_input_lengths = tt.as_tensor_variable(input_lengths)
if t_activations.type.dtype != "float32":
raise TypeError("activations must use the float32 type.")
if t_activations.ndim != 3:
raise ValueError("activations must have 3 dimensions.")
if t_labels.type.dtype != "int32":
raise TypeError("labels must use the int32 type.")
if t_labels.ndim != 2:
raise ValueError("labels must have 2 dimensions.")
if t_input_lengths.type.dtype != "int32":
raise TypeError("input_lengths must use the int32 type.")
if t_input_lengths.ndim != 1:
raise ValueError("input_lengths must have 1 dimension.")
costs = GpuArrayType(
dtype="float32", broadcastable=(False,), context_name=context_name
)()
outputs = [costs]
if self.compute_grad:
gradients = GpuArrayType(
dtype="float32",
broadcastable=(
False,
False,
False,
),
context_name=context_name,
)()
outputs += [gradients]
return Apply(
self, inputs=[t_activations, t_labels, t_input_lengths], outputs=outputs
)
def L_op(self, inputs, outputs, output_grads):
# Gradients computed by Op
assert self.compute_grad and len(outputs) == 2
gradients = outputs[1]
assert gradients is not None
# Gradients of original function, to compose chain rule
grad_op = output_grads[0]
grad_shuffle = GpuDimShuffle(
input_broadcastable=(
False,
False,
False,
),
new_order=(1, 0, 2),
)(gradients)
grad_bdot = tt.batched_dot(grad_op, grad_shuffle)
grad_shuffle_reverse = GpuDimShuffle(
input_broadcastable=(
False,
False,
False,
),
new_order=(1, 0, 2),
)(grad_bdot)
return [
grad_shuffle_reverse,
grad_undefined(self, 1, inputs[1]),
grad_undefined(self, 2, inputs[2]),
]
def gpu_ctc(activations, labels, input_lengths):
"""
Compute CTC loss function on the GPU.
Parameters
----------
activations
Three-dimensional tensor, which has a shape of (t, m, p), where
t is the time index, m is the minibatch index, and p is the index
over the probabilities of each symbol in the alphabet. The memory
layout is assumed to be in C-order, which consists in the slowest
to the fastest changing dimension, from left to right. In this case,
p is the fastest changing dimension.
labels
A 2-D tensor of all the labels for the minibatch. In each row, there
is a sequence of target labels. Negative values are assumed to be padding,
and thus are ignored. Blank symbol is assumed to have index 0 in the
alphabet.
input_lengths
A 1-D tensor with the number of time steps for each sequence in
the minibatch.
Returns
-------
1-D array
Cost of each example in the minibatch.
"""
return GpuConnectionistTemporalClassification()(activations, labels, input_lengths)
# Disable gradient computation if not needed
@register_canonicalize("fast_compile")
@local_optimizer([GpuConnectionistTemporalClassification])
def local_gpu_ctc_no_grad(fgraph, node):
if isinstance(node.op, GpuConnectionistTemporalClassification):
if len(node.outputs) > 1:
if len(fgraph.clients[node.outputs[1]]) == 0: # gradient is not used
return [
GpuConnectionistTemporalClassification(compute_grad=False)(
*node.inputs
),
None,
]
return False
| [
"[email protected]"
] | |
8c27649f58ae110222601c787c28c39019e012ec | 9dee94907e6456a4af9855d358693923c17b4e0d | /1023_Camelcase_Matching.py | 2d8d31d02064c55c4031b5e1652870448db622a6 | [] | no_license | chien-wei/LeetCode | e215915a8103e56f182040dacc9fb0d6996c86ec | 0d6f414e7610fedb2ec4818ecf88d51aa69e1355 | refs/heads/master | 2021-05-13T14:48:22.891100 | 2019-08-20T05:52:59 | 2019-08-20T05:52:59 | 116,749,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | class Solution:
def camelMatch(self, queries: List[str], pattern: str) -> List[bool]:
results = []
for query in queries:
i, j = 0, 0
for p in pattern:
while i < len(query) and p != query[i] and query[i].islower():
i += 1
if i == len(query):
break
if p != query[i]:
break
i += 1
j += 1
if j == len(pattern) and (query[i:] == '' or query[i:].islower()):
results.append(True)
else:
results.append(False)
return results | [
"[email protected]"
] | |
c3e72a66dd43e325edf92a51acd0b89628fd0aeb | 1284718203be50b23dcd1f6159746cfa42a04163 | /python_visual_mpc/visual_mpc_core/algorithm/cem_controller_sim.py | ab65cdf4cedbb126c9d46e3038c9869d366b9a5d | [] | no_license | febert/robustness_via_retrying | 8fe4106d7705228ff339f9643518a80c0a243d36 | 1def282dc22f24b72c51ff1ef9ea1a7a83291369 | refs/heads/master | 2020-03-31T19:33:39.664525 | 2018-11-07T21:52:56 | 2018-11-07T21:52:56 | 152,502,702 | 17 | 2 | null | null | null | null | UTF-8 | Python | false | false | 10,283 | py | """ This file defines the linear Gaussian policy class. """
import IPython
from python_visual_mpc.video_prediction.utils_vpred.create_gif_lib import *
import copy
from .cem_controller_base import CEM_Controller_Base
from python_visual_mpc.visual_mpc_core.agent.general_agent import resize_store
import ray
import traceback
@ray.remote
class SimWorker(object):
def __init__(self):
print('created worker')
pass
def create_sim(self, agentparams, reset_state, goal_pos, finalweight, len_pred,
naction_steps, discrete_ind, action_bound, adim, repeat, initial_std):
print('create sim')
self.agentparams = agentparams
self._goal_pos = goal_pos
self.len_pred = len_pred
self.finalweight = finalweight
self.current_reset_state = reset_state
env_type, env_params = self.agentparams['env']
# env_params['verbose_dir'] = '/home/frederik/Desktop/'
self.env = env_type(env_params, self.current_reset_state)
self.env.set_goal_obj_pose(self._goal_pos)
# hyperparams passed into sample_action function
class HP(object):
def __init__(self, naction_steps, discrete_ind, action_bound, adim, repeat, initial_std):
self.naction_steps = naction_steps
self.discrete_ind = discrete_ind
self.action_bound = action_bound
self.adim = adim
self.repeat = repeat
self.initial_std = initial_std
self.hp = HP(naction_steps, discrete_ind, action_bound, adim, repeat, initial_std)
def recreate_sim(self):
env_type, env_params = self.agentparams['env']
# env_params['verbose_dir'] = '/home/frederik/Desktop/'
self.env = env_type(env_params, self.current_reset_state)
self.env.set_goal_obj_pose(self._goal_pos)
def eval_action(self):
return self.env.get_distance_score()
def _post_process_obs(self, env_obs, agent_data, initial_obs=False):
agent_img_height = self.agentparams['image_height']
agent_img_width = self.agentparams['image_width']
if initial_obs:
T = self.len_pred + 1
self._agent_cache = {}
for k in env_obs:
if k == 'images':
if 'obj_image_locations' in env_obs:
self.traj_points = []
n_cams = env_obs['images'].shape[0]
self._agent_cache['images'] = np.zeros((T, n_cams, agent_img_height, agent_img_width, 3),
dtype = np.uint8)
elif isinstance(env_obs[k], np.ndarray):
obs_shape = [T] + list(env_obs[k].shape)
self._agent_cache[k] = np.zeros(tuple(obs_shape), dtype=env_obs[k].dtype)
else:
self._agent_cache[k] = []
self._cache_cntr = 0
t = self._cache_cntr
self._cache_cntr += 1
point_target_width = float(self.agentparams.get('point_space_width', agent_img_width))
obs = {}
for k in env_obs:
if k == 'images':
resize_store(t, self._agent_cache['images'], env_obs['images'])
elif k == 'obj_image_locations':
self.traj_points.append(copy.deepcopy(env_obs['obj_image_locations'][0])) #only take first camera
env_obs['obj_image_locations'] = np.round((env_obs['obj_image_locations'] *
point_target_width / env_obs['images'].shape[2])).astype(np.int64)
self._agent_cache['obj_image_locations'][t] = env_obs['obj_image_locations']
elif isinstance(env_obs[k], np.ndarray):
self._agent_cache[k][t] = env_obs[k]
else:
self._agent_cache[k].append(env_obs[k])
obs[k] = self._agent_cache[k][:self._cache_cntr]
if 'obj_image_locations' in env_obs:
agent_data['desig_pix'] = env_obs['obj_image_locations']
return obs
def sim_rollout(self, curr_qpos, curr_qvel, actions):
agent_data = {}
t = 0
done = False
# initial_env_obs, _ = self.env.reset(curr_reset_state)
initial_env_obs , _ = self.env.qpos_reset(curr_qpos, curr_qvel)
obs = self._post_process_obs(initial_env_obs, agent_data, initial_obs=True)
costs = []
while not done:
# print('inner sim step', t)
obs = self._post_process_obs(self.env.step(actions[t]), agent_data)
if (self.len_pred - 1) == t:
done = True
t += 1
costs.append(self.eval_action())
return costs, obs['images']
def perform_rollouts(self, curr_qpos, curr_qvel, actions, M):
all_scores = np.empty(M, dtype=np.float64)
image_list = []
for smp in range(M):
score, images = self.sim_rollout(curr_qpos, curr_qvel, actions[smp])
image_list.append(images.squeeze())
# print('score', score)
per_time_multiplier = np.ones([len(score)])
per_time_multiplier[-1] = self.finalweight
all_scores[smp] = np.sum(per_time_multiplier*score)
images = np.stack(image_list, 0)[:,1:].astype(np.float32)/255.
return images, np.stack(all_scores, 0)
class CEM_Controller_Sim(CEM_Controller_Base):
"""
Cross Entropy Method Stochastic Optimizer
"""
def __init__(self, ag_params, policyparams, gpu_id, ngpu):
super(CEM_Controller_Sim, self).__init__(ag_params, policyparams)
self.parallel = True
# self.parallel = False
if self.parallel:
ray.init()
def _default_hparams(self):
default_dict = {
'len_pred':15,
'num_workers':10,
}
parent_params = super()._default_hparams()
parent_params.ncam = 1
for k in default_dict.keys():
parent_params.add_hparam(k, default_dict[k])
return parent_params
def create_sim(self):
self.workers = []
if self.parallel:
self.n_worker = self._hp.num_workers
else:
self.n_worker = 1
for i in range(self.n_worker):
if self.parallel:
self.workers.append(SimWorker.remote())
else:
self.workers.append(SimWorker())
id_list = []
for i, worker in enumerate(self.workers):
if self.parallel:
id_list.append(worker.create_sim.remote(self.agentparams, self.curr_sim_state, self.goal_pos, self._hp.finalweight, self.len_pred,
self.naction_steps, self._hp.discrete_ind, self._hp.action_bound, self.adim, self.repeat, self._hp.initial_std))
else:
return worker.create_sim(self.agentparams, self.curr_sim_state, self.goal_pos, self._hp.finalweight, self.len_pred,
self.naction_steps, self._hp.discrete_ind, self._hp.action_bound, self.adim, self.repeat, self._hp.initial_std)
if self.parallel:
# blocking call
for id in id_list:
ray.get(id)
def get_rollouts(self, actions, cem_itr, itr_times):
images, all_scores = self.sim_rollout_parallel(actions)
if self.verbose:
self.save_gif(images, all_scores, cem_itr)
return all_scores
def save_gif(self, images, all_scores, cem_itr):
bestindices = all_scores.argsort()[:self.K]
images = (images[bestindices]*255.).astype(np.uint8) # select cam0
vid = []
for t in range(self.naction_steps * self.repeat):
row = np.concatenate(np.split(images[:,t], images.shape[0], axis=0), axis=2).squeeze()
vid.append(row)
name = 't{}_iter{}'.format(self.t, cem_itr)
file_path = self.agentparams['record']
npy_to_gif(vid, file_path +'/video' + name)
def sim_rollout_parallel(self, actions):
per_worker = int(self.M / np.float32(self.n_worker))
id_list = []
for i, worker in enumerate(self.workers):
if self.parallel:
actions_perworker = actions[i*per_worker:(i+1)*per_worker]
id_list.append(worker.perform_rollouts.remote(self.qpos_full, self.qvel_full, actions_perworker, per_worker))
else:
images, scores_mjc = worker.perform_rollouts(self.qpos_full, self.qvel_full, actions, self.M)
# blocking call
if self.parallel:
image_list, scores_list = [], []
for id in id_list:
images, scores_mjc = ray.get(id)
image_list.append(images)
scores_list.append(scores_mjc)
scores_mjc = np.concatenate(scores_list, axis=0)
images = np.concatenate(image_list, axis=0)
scores = self.get_scores(images, scores_mjc)
return images, scores
def get_scores(self, images, scores_mjc):
return scores_mjc
def get_int_targetpos(self, substep, prev, next):
assert substep >= 0 and substep < self.agentparams['substeps']
return substep/float(self.agentparams['substeps'])*(next - prev) + prev
def plot_ctrls(self):
plt.figure()
# a = plt.gca()
self.hf_qpos_l = np.stack(self.hf_qpos_l, axis=0)
self.hf_target_qpos_l = np.stack(self.hf_target_qpos_l, axis=0)
tmax = self.hf_target_qpos_l.shape[0]
for i in range(self.adim):
plt.plot(list(range(tmax)) , self.hf_qpos_l[:,i], label='q_{}'.format(i))
plt.plot(list(range(tmax)) , self.hf_target_qpos_l[:, i], label='q_target{}'.format(i))
plt.legend()
plt.show()
def act(self, t, i_tr, qpos_full, qvel_full, state, object_qpos, goal_pos, reset_state):
# def act(self, t, i_tr, qpos_full, goal_pos, reset_state):
self.curr_sim_state = reset_state
self.qpos_full = qpos_full[t]
self.qvel_full = qvel_full[t]
self.goal_pos = goal_pos
if t == 0:
self.create_sim()
return super(CEM_Controller_Sim, self).act(t, i_tr)
| [
"[email protected]"
] | |
44361f5f1844f827da35dd426fbe24580b644796 | 08615c64a62fc364a802bb92314cf49080ddbcee | /django-oldboy/s1bms2/app01/models.py | e47061a1ed45c130f1022f5f77abe4351abad813 | [] | no_license | xiangys0134/python_study | afc4591fca1db6ebddf83f0604e35ed2ef614728 | 6ec627af7923b9fd94d244c561297ccbff90c1e9 | refs/heads/master | 2023-02-24T01:24:45.734510 | 2022-10-29T02:11:20 | 2022-10-29T02:11:20 | 143,358,792 | 2 | 0 | null | 2023-02-08T03:07:26 | 2018-08-03T00:43:46 | Python | UTF-8 | Python | false | false | 1,348 | py | from django.db import models
# Create your models here.
class Book(models.Model):
title = models.CharField(max_length=32)
price = models.DecimalField(max_digits=8,decimal_places=2)
book_type = models.CharField(max_length=32,null=True)
publish = models.CharField(max_length=32)
pub_date = models.DateTimeField()
publish = models.ForeignKey("Publish",on_delete=models.CASCADE)
authors = models.ManyToManyField("Author",db_table="book2author")
class Meta:
db_table = "book"
class Publish(models.Model):
name = models.CharField(max_length=32)
addr = models.CharField(max_length=32)
class Meta:
db_table = "publish"
class Author(models.Model):
name = models.CharField(max_length=20)
class Meta:
db_table = "author"
class AuthorDetail(models.Model):
name = models.CharField(max_length=20)
gf = models.CharField(max_length=32)
uid = models.CharField(max_length=32,null=True)
author = models.OneToOneField("Author",on_delete=models.CASCADE,null=True)
class Meta:
db_table = "authordetail"
class Emp(models.Model):
name = models.CharField(max_length=32)
age = models.IntegerField()
salary = models.DecimalField(max_digits=8, decimal_places=2)
dep = models.CharField(max_length=32)
province = models.CharField(max_length=32) | [
"[email protected]"
] | |
bfec217317ad49de9380a27431e4a9aa0666544a | 5667cc877342204b7d54b6c3cc5a9f4854f08829 | /.history/apppersona/views_20201029201908.py | dd580d4aa77ce4a4588bd4c7df3ded781932da1a | [] | no_license | Nyckhos/TestCommit | d62e3f6fefb04ab5647475cc7ead0d72cbd89efa | 9aa8e2e35280b7862960cc8a864e9c02ac7f4796 | refs/heads/main | 2023-01-05T05:57:59.223641 | 2020-11-02T02:08:18 | 2020-11-02T02:08:18 | 309,237,224 | 2 | 0 | null | 2020-11-02T02:30:43 | 2020-11-02T02:30:43 | null | UTF-8 | Python | false | false | 1,688 | py | from django.http import request
from django.shortcuts import render
from django.http import HttpResponse
from .models import *
from .forms import *
from django.contrib.auth.models import User
# Create your views here.
def lista_personas(request):
lista = Persona.objects.all() # Todas las personas
return render(request, 'apppersona/lista_personas.html', {'lista': lista})
def lista_tarjetas(request):
tarjetas = TarjetaJunaeb.objects.all()
return render(request, 'apppersona/lista_tarjetas.html', {'listaTarjetas': tarjetas})
def tarjetas_con_plata(request):
tarjetas = TarjetaJunaeb.objects.filter(montoDisponible__gte=1)
return render(request, 'apppersona/lista_tarjetas.html', {'listaTarjetas': tarjetas})
def persona_nueva(request):
if request.method == "POST":
formulario = FormularioPersona(request.POST)
if formulario.is_valid():
persona = formulario.save(commit=False)
persona.save()
return HttpResponse("PERSONA GUARDADA")
else:
formulario = FormularioPersona()
return render(request, 'apppersona/registro.html', {'form': formulario})
def index(request):
return render(request, 'apppersona/index.html')
def contacto(request):
return render(request, 'apppersona/contacto.html')
def nosotros(request):
return render(request, 'apppersona/nosotros.html')
def register(response):
if response.method == "POST":
form = RegisterForm(response.POST)
if form.is_valid():
form.save()
return HttpResponse("/home")
else:
form = RegisterForm()
return render(response, "apppersona/register.html", {"form":form}) | [
"[email protected]"
] | |
4de7b4d69f235c2fb5fc0b420156d5bcd46241ed | cfefcd99016a908df2584896845406942097671d | /python/test/test_asset_model_portfolio.py | c99a14dfc4d8fbc6b0ea51704ca93e1c90717e98 | [] | no_license | tomasgarzon/vigilant-guacamole | 982a8c7cb0a8193bb3409014b447ad8a70e6eb36 | bde73674cf0461e2fcdfce5074bf9d93a47227f7 | refs/heads/main | 2023-08-17T01:51:27.168440 | 2021-09-01T11:23:46 | 2021-09-01T11:23:46 | 398,827,144 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 950 | py | """
Nucoro API
No description # noqa: E501
The version of the OpenAPI document: 4.175.0
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import openapi_client
from openapi_client.model.related_asset_serializer_with_asset_categories import RelatedAssetSerializerWithAssetCategories
globals()['RelatedAssetSerializerWithAssetCategories'] = RelatedAssetSerializerWithAssetCategories
from openapi_client.model.asset_model_portfolio import AssetModelPortfolio
class TestAssetModelPortfolio(unittest.TestCase):
"""AssetModelPortfolio unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testAssetModelPortfolio(self):
"""Test AssetModelPortfolio"""
# FIXME: construct object with mandatory attributes with example values
# model = AssetModelPortfolio() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| [
"[email protected]"
] | |
f11f22018b6dc38cb4c0889e78a36b82dc0dc9ef | eb59f8212f40bd7c316e1ef3be03bf7da3dde65f | /annotated2_0/scr_pyu.py | 7079ccc0b34af2cec4c4e0956794dda240a88b7b | [] | no_license | shtkn/frameDataParser | 764cc3197051966717990f7ca3eb2f02639cf438 | 690d44d4bf188a14c4e5ebebd95bdc75b827f5e5 | refs/heads/master | 2021-07-05T00:52:53.316670 | 2020-10-03T18:16:52 | 2020-10-03T18:16:52 | 187,556,058 | 0 | 0 | null | 2019-11-25T05:36:06 | 2019-05-20T02:40:24 | Python | UTF-8 | Python | false | false | 239,973 | py | @Subroutine
def PreInit():
Unknown12019('70797500000000000000000000000000')
@Subroutine
def MatchInit():
Health(16000)
DashFInitialVelocity(16000)
JumpYVelocity(34000)
SuperJumpYVelocity(38000)
Unknown12011(1650)
AirBDashDuration(13)
Unknown12037(-1650)
Unknown12024(1)
Unknown13039(1)
Unknown2049(1)
Unknown23003(0, 1, 7, 1, 9, 0, -1, -1)
Unknown23005(0, 1)
Unknown30093(1, 9, 30, 0, 0)
Unknown3060('0000000076725f6c61796572310000000000000000000000000000000000000000000000')
Unknown3061(0, 5)
Unknown3063(0, 65000)
Unknown3062(0, 100000)
Move_Register('AutoFDash', 0x0)
Unknown14009(6)
Move_AirGround_(0x2000)
Move_Input_(0x78)
Unknown14013('CmnActFDash')
Move_EndRegister()
Move_Register('NmlAtk5A', 0x7)
Move_AirGround_(0x3083)
MoveMaxChainRepeat(1)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 3000, 50)
Unknown15015(18, 55)
Move_EndRegister()
Move_Register('NmlAtk5A2nd', 0x7)
Unknown14005(1)
Move_AirGround_(0x3083)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Unknown15015(21, 30)
Move_EndRegister()
Move_Register('NmlAtk5A3rd', 0x7)
Unknown14005(1)
Move_AirGround_(0x3083)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Unknown15015(17, 25)
Move_EndRegister()
Move_Register('NmlAtk5A4th', 0x7)
Unknown14005(1)
Move_AirGround_(0x3083)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk4A', 0x6)
Unknown14015(0, 450000, -200000, 200000, 3000, 50)
Unknown14027('NmlAtk2A')
Move_EndRegister()
Move_Register('NmlAtk4A2nd', 0x6)
Unknown14005(1)
Unknown14015(0, 350000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk4A3nd', 0x6)
Unknown14015(0, 350000, -200000, 150000, 1000, 50)
Unknown14005(1)
Move_EndRegister()
Move_Register('NmlAtk4A4th', 0x6)
Unknown14005(1)
Unknown14013('NmlAtk5A4th')
Unknown14015(0, 350000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk2A', 0x4)
MoveMaxChainRepeat(3)
Unknown14015(0, 250000, -200000, 150000, 1000, 50)
Unknown15009()
Move_EndRegister()
Move_Register('NmlAtk5B', 0x19)
MoveMaxChainRepeat(2)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk6B', 0x1a)
Move_Input_(0x79)
Unknown14027('NmlAtk5B')
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk4B', 0x18)
Move_Input_(0x5f)
Unknown14027('NmlAtk5B')
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk5B2nd', 0x19)
Move_AirGround_(0x2000)
Move_Input_(INPUT_PRESS_B)
Unknown14005(1)
MoveMaxChainRepeat(2)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk5B2nd_Front', 0x1a)
Unknown14005(1)
Unknown14027('NmlAtk5B2nd')
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk5B2nd_Back', 0x18)
Unknown14005(1)
Unknown14027('NmlAtk5B2nd')
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtk2B', 0x16)
MoveMaxChainRepeat(2)
Unknown14015(0, 500000, -200000, 500000, 1000, 0)
Move_EndRegister()
Move_Register('NmlAtk3B', 0x17)
Unknown14027('NmlAtk2B')
Unknown14015(0, 500000, -200000, 500000, 1000, 0)
Move_EndRegister()
Move_Register('NmlAtk1B', 0x15)
Unknown14027('NmlAtk2B')
Unknown14015(0, 500000, -200000, 500000, 1000, 0)
Move_EndRegister()
Move_Register('CmnActCrushAttack', 0x66)
Unknown14015(0, 300000, -200000, 150000, 0, 0)
Unknown15008()
Unknown15012(1000)
Move_EndRegister()
Move_Register('NmlAtk2C', 0x28)
Unknown14015(0, 450000, -200000, 150000, 1000, 50)
Unknown15009()
Move_EndRegister()
Move_Register('CmnActChangePartnerQuickOut', 0x63)
Move_EndRegister()
Move_Register('NmlAtkAIR5A', 0x10)
Unknown14015(-100000, 300000, -300000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkAIR5A2nd', 0x10)
Unknown14005(1)
MoveMaxChainRepeat(2)
Unknown14015(-100000, 300000, -300000, 150000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkAIR5B', 0x22)
MoveMaxChainRepeat(1)
Unknown14015(0, 1000000, -500000, 0, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkAIR6B', 0x23)
Unknown14027('NmlAtkAIR5B')
Unknown14015(0, 1000000, -500000, 0, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkAIR4B', 0x21)
Unknown14027('NmlAtkAIR5B')
Unknown14015(0, 1000000, -500000, 0, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkAIR5C', 0x34)
Move_AirGround_(0x3083)
Move_AirGround_(0x300e)
Unknown14015(0, 400000, -500000, 200000, 1000, 50)
Move_EndRegister()
Move_Register('NmlAtkThrow', 0x5d)
Unknown15010()
Unknown15021(1)
Unknown15013(1)
Unknown14015(0, 350000, -200000, 200000, 1000, 0)
Move_EndRegister()
Move_Register('NmlAtkBackThrow', 0x61)
Unknown15010()
Unknown15021(1)
Unknown15013(1)
Unknown14015(0, 350000, -200000, 200000, 1000, 0)
Move_EndRegister()
Move_Register('AgiA', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_A)
Move_AirGround_(0x300e)
Unknown14015(0, 550000, -200000, 150000, 1000, 50)
Unknown15016(0, 1, 43)
Move_EndRegister()
Move_Register('AgiB', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_B)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Unknown15016(1, 1, 20)
Move_EndRegister()
Move_Register('AgiEX', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_C)
Move_AirGround_(0x3086)
Move_AirGround_(0x300e)
Unknown14015(0, 750000, -200000, 150000, 500, 50)
Unknown15025('000000000000000005000000f401000020030000')
Unknown15016(2, 1, 20)
Move_EndRegister()
Move_Register('AgiAirA', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2001)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_A)
Move_AirGround_(0x300e)
Unknown14015(0, 550000, -200000, 150000, 1000, 50)
Unknown15016(0, 1, 20)
Move_EndRegister()
Move_Register('AgiAirB', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2001)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_B)
Move_AirGround_(0x300e)
Unknown14015(0, 1000000, -200000, 150000, 1000, 50)
Unknown15016(1, 1, 20)
Move_EndRegister()
Move_Register('AgiAirEX', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2001)
Move_Input_(INPUT_236)
Move_Input_(INPUT_PRESS_C)
Move_AirGround_(0x3086)
Move_AirGround_(0x300e)
Unknown14015(0, 750000, -200000, 150000, 500, 50)
Unknown15025('000000000000000005000000f401000020030000')
Unknown15016(2, 1, 20)
Move_EndRegister()
Move_Register('MaharagiA', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_214)
Move_Input_(INPUT_PRESS_A)
Move_AirGround_(0x300e)
Move_AirGround_(0x3009)
Unknown14015(0, 600000, -200000, 400000, 1000, 50)
Move_EndRegister()
Move_Register('MaharagiB', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_214)
Move_Input_(INPUT_PRESS_B)
Move_AirGround_(0x300e)
Move_AirGround_(0x3009)
Unknown14015(0, 800000, -200000, 400000, 1000, 50)
Unknown15016(1, 38, 54)
Move_EndRegister()
Move_Register('MaharagiEX', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_214)
Move_Input_(INPUT_PRESS_C)
Move_AirGround_(0x3086)
Move_AirGround_(0x300e)
Move_AirGround_(0x3009)
Unknown14015(0, 800000, -200000, 400000, 500, 50)
Unknown15016(2, 38, 80)
Unknown15012(2000)
Unknown15025('000000000000000005000000f401000020030000')
Move_EndRegister()
Move_Register('FireBoosterA', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_22)
Move_Input_(INPUT_PRESS_A)
Unknown14015(700000, 1500000, -200000, 1500000, 0, 0)
Move_EndRegister()
Move_Register('FireBoosterB', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_22)
Move_Input_(INPUT_PRESS_B)
Unknown14015(700000, 1500000, -200000, 1500000, 0, 0)
Move_EndRegister()
Move_Register('FireBoosterC', INPUT_SPECIALMOVE)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_Input_(INPUT_22)
Move_Input_(INPUT_PRESS_C)
Move_AirGround_(0x3086)
Unknown14015(700000, 1500000, -200000, 1500000, 0, 0)
Move_EndRegister()
Move_Register('CmnActInvincibleAttack', 0x64)
Move_AirGround_(0x3083)
Unknown15006(0)
Unknown15013(0)
Unknown15012(0)
Unknown15014(6000)
Unknown15020(500, 1000, 100, 1000)
Unknown14015(0, 200000, -200000, 150000, 250, 5)
Move_EndRegister()
Move_Register('UltimateAgidine', 0x68)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_AirGround_(0x3089)
Move_Input_(INPUT_236)
Move_Input_(0xde)
Unknown14015(0, 500000, -200000, 150000, 200, 0)
Unknown15014(1000)
Unknown15020(800, 1000, 500, 1000)
Move_EndRegister()
Move_Register('UltimateAgidine_OD', 0x68)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_AirGround_(0x3089)
Move_Input_(INPUT_236)
Move_Input_(0xde)
Move_AirGround_(0x3081)
Unknown14015(0, 500000, -200000, 150000, 200, 0)
Unknown15014(1000)
Unknown15020(800, 1000, 500, 1000)
Move_EndRegister()
Move_Register('UltimateMaharagidine', 0x68)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_AirGround_(0x3089)
Move_Input_(INPUT_214)
Move_Input_(0xde)
Unknown14015(0, 700000, -200000, 300000, 200, 0)
Unknown15020(800, 1000, 500, 1000)
Move_EndRegister()
Move_Register('UltimateMaharagidineOD', 0x68)
Move_AirGround_(0x3083)
Move_AirGround_(0x2000)
Move_AirGround_(0x3089)
Move_Input_(INPUT_214)
Move_Input_(0xde)
Move_AirGround_(0x3081)
Unknown14015(0, 700000, -200000, 300000, 200, 0)
Unknown15020(800, 1000, 500, 1000)
Move_EndRegister()
Move_Register('DebugSkill', 0x1)
Move_Input_(0x26)
Move_AirGround_(0x306f)
Move_EndRegister()
Move_Register('DS_YarareCHECK1', 0x1)
Move_Input_(0x6b)
Move_Input_(INPUT_RELEASE_A)
Unknown14018(1, 1, 1)
Move_AirGround_(0x306f)
Unknown14019('Func_DS_Yarare1')
Move_EndRegister()
Move_Register('DS_YarareCHECK2', 0x1)
Move_Input_(0x5e)
Move_Input_(INPUT_RELEASE_A)
Unknown14018(1, 1, 1)
Move_AirGround_(0x306f)
Unknown14019('Func_DS_Yarare2')
Move_EndRegister()
Move_Register('DS_YarareCHECK3', 0x1)
Move_Input_(0x44)
Move_Input_(INPUT_RELEASE_A)
Unknown14018(1, 1, 1)
Move_AirGround_(0x306f)
Unknown14019('Func_DS_Yarare3')
Move_EndRegister()
Move_Register('Ichigeki', 0x69)
Move_AirGround_(0x2000)
Move_AirGround_(0x304a)
Move_Input_(0xcd)
Move_Input_(0xde)
Unknown15014(3000)
Unknown15013(3000)
Unknown14015(0, 650000, -200000, 200000, 1000, 50)
Move_EndRegister()
Unknown15024('NmlAtk5A', 'NmlAtk5A2nd', 10000000)
Unknown15024('NmlAtk5A2nd', 'NmlAtk5A3rd', 10000000)
Unknown15024('NmlAtk5A3rd', 'NmlAtk5A4th', 10000000)
Unknown15024('NmlAtk4A', 'NmlAtk4A2nd', 10000000)
Unknown15024('NmlAtk4A', 'NmlAtk2C', 3000000)
Unknown15024('NmlAtk4A2nd', 'NmlAtk4A3nd', 10000000)
Unknown15024('NmlAtk4A2nd', 'NmlAtk2C', 3000000)
Unknown15024('NmlAtk4A3nd', 'NmlAtk4A4th', 10000000)
Unknown15024('NmlAtk4A3nd', 'NmlAtk2C', 3000000)
Unknown15024('NmlAtk2A', 'NmlAtk4A', 10000000)
Unknown15024('NmlAtk2C', 'AgiA', 10000000)
Unknown15024('NmlAtk2C', 'AgiEX', 10000000)
Unknown12018(0, 'yu060_00')
Unknown12018(1, 'yu060_01')
Unknown12018(2, 'yu060_02')
Unknown12018(3, 'yu060_03')
Unknown12018(4, 'yu060_04')
Unknown12018(5, 'yu060_05')
Unknown12018(6, 'yu060_06')
Unknown12018(7, 'yu041_02')
Unknown12018(8, 'yu040_02')
Unknown12018(9, 'yu045_02')
Unknown12018(10, 'yu060_00')
Unknown12018(11, 'yu060_01')
Unknown12018(12, 'yu060_03')
Unknown12018(13, 'yu060_05')
Unknown12018(14, 'yu060_07')
Unknown12018(15, 'yu125_00')
Unknown12018(16, 'yu050_00')
Unknown12018(17, 'yu052_00')
Unknown12018(18, 'yu054_00')
Unknown12018(25, 'yu063_00')
Unknown12018(26, 'yu063_01')
Unknown12018(27, 'yu063_02')
Unknown12018(28, 'yu063_05')
Unknown12018(29, 'yu060_12')
Unknown12018(24, 'yu072_03')
Unknown7010(0, 'pyu000')
Unknown7010(1, 'pyu001')
Unknown7010(2, 'pyu002')
Unknown7010(3, 'pyu003')
Unknown7010(4, 'pyu004')
Unknown7010(5, 'pyu005')
Unknown7010(6, 'pyu006')
Unknown7010(7, 'pyu007')
Unknown7010(8, 'pyu008')
Unknown7010(9, 'pyu009')
Unknown7010(10, 'pyu010')
Unknown7010(15, 'pyu015')
Unknown7010(16, 'pyu016')
Unknown7010(17, 'pyu017')
Unknown7010(18, 'pyu018')
Unknown7010(19, 'pyu019')
Unknown7010(20, 'pyu020')
Unknown7010(21, 'pyu021')
Unknown7010(22, 'pyu022')
Unknown7010(23, 'pyu023')
Unknown7010(24, 'pyu024')
Unknown7010(25, 'pyu025')
Unknown7010(28, 'pyu028')
Unknown7010(29, 'pyu029')
Unknown7010(30, 'pyu030')
Unknown7010(31, 'pyu031')
Unknown7010(32, 'pyu025')
Unknown7010(33, 'pyu033')
Unknown7010(34, 'pyu034')
Unknown7010(35, 'pyu035')
Unknown7010(36, 'pyu036')
Unknown7010(37, 'pyu037')
Unknown7010(39, 'pyu039')
Unknown7010(42, 'pyu042')
Unknown7010(43, 'pyu043')
Unknown7010(44, 'pyu044')
Unknown7010(45, 'pyu045')
Unknown7010(46, 'pyu046')
Unknown7010(47, 'pyu301_0')
Unknown7010(48, 'pyu048')
Unknown7010(49, 'pyu049')
Unknown7010(50, 'pyu050')
Unknown7010(52, 'pyu052')
Unknown7010(53, 'pyu053')
Unknown7010(54, 'pyu100_0')
Unknown7010(55, 'pyu100_1')
Unknown7010(56, 'pyu100_2')
Unknown7010(63, 'pyu101_0')
Unknown7010(64, 'pyu101_1')
Unknown7010(65, 'pyu101_2')
Unknown7010(57, 'pyu102_0')
Unknown7010(58, 'pyu102_1')
Unknown7010(59, 'pyu102_2')
Unknown7010(66, 'pyu103_0')
Unknown7010(67, 'pyu103_1')
Unknown7010(68, 'pyu103_2')
Unknown7010(60, 'pyu104_0')
Unknown7010(61, 'pyu104_1')
Unknown7010(62, 'pyu104_2')
Unknown7010(69, 'pyu105_0')
Unknown7010(70, 'pyu105_1')
Unknown7010(71, 'pyu105_2')
Unknown7010(72, 'pyu150')
Unknown7010(73, 'pyu151')
Unknown7010(74, 'pyu152')
Unknown7010(85, 'pyu153')
Unknown7010(87, 'pyu154')
Unknown7010(88, 'pyu155')
Unknown7010(96, 'pyu161_0')
Unknown7010(97, 'pyu161_1')
Unknown7010(92, 'pyu162_0')
Unknown7010(93, 'pyu162_1')
Unknown7010(98, 'pyu163_0')
Unknown7010(99, 'pyu163_1')
Unknown7010(100, 'pyu164_0')
Unknown7010(101, 'pyu164_1')
Unknown7010(105, 'pyu165_0')
Unknown7010(106, 'pyu165_1')
Unknown7010(102, 'pyu166_0')
Unknown7010(103, 'pyu166_1')
Unknown7010(90, 'pyu167_0')
Unknown7010(91, 'pyu167_1')
Unknown7010(107, 'pyu168_0')
Unknown7010(108, 'pyu168_1')
Unknown7010(110, 'pyu169_0')
Unknown7010(111, 'pyu169_1')
Unknown7010(112, 'pyu159_0')
Unknown7010(113, 'pyu159_1')
Unknown7010(94, 'pyu400_0')
Unknown7010(95, 'pyu400_1')
Unknown30036('5059555f506572736f6e61437265617465000000000000000000000000000000ffffffff')
Unknown38(11, 1)
Unknown12059('00000000436d6e416374496e76696e6369626c6541747461636b00000000000000000000')
Unknown12059('010000004e6d6c41746b3241000000000000000000000000000000000000000000000000')
Unknown12059('02000000556c74696d61746541676964696e650000000000000000000000000000000000')
Unknown12059('03000000556c74696d61746541676964696e655f4f440000000000000000000000000000')
Unknown12059('04000000556c74696d6174654d6168617261676964696e65000000000000000000000000')
Unknown12059('05000000556c74696d6174654d6168617261676964696e654f4400000000000000000000')
Unknown12059('06000000436d6e4163744244617368000000000000000000000000000000000000000000')
Unknown12059('070000004e6d6c41746b5468726f77000000000000000000000000000000000000000000')
Unknown12059('08000000436d6e4163744368616e6765506172746e6572517569636b4f75740000000000')
@Subroutine
def Func_DS_Yarare1():
Unknown1000(-600000)
teleportRelativeY(0)
Unknown36(22)
Unknown1000(-600000)
teleportRelativeY(0)
Unknown35()
GFX_0('Func_DS_Yarare1', -1)
@Subroutine
def Func_DS_Yarare2():
Unknown1000(-600000)
teleportRelativeY(0)
Unknown36(22)
Unknown1000(-600000)
teleportRelativeY(0)
Unknown35()
GFX_0('Func_DS_Yarare2', -1)
@Subroutine
def Func_DS_Yarare3():
Unknown1000(-600000)
teleportRelativeY(0)
Unknown36(22)
Unknown1000(-600000)
teleportRelativeY(0)
Unknown35()
GFX_0('Func_DS_Yarare3', -1)
@Subroutine
def OnFrameStep():
if (not SLOT_81):
if SLOT_90:
Unknown58('TRI_PYUFireLv', 2, 67)
if SLOT_67:
SLOT_31 = SLOT_67
if SLOT_170:
Unknown23008(0, 0)
if (SLOT_31 == 9):
if (not SLOT_81):
if (not SLOT_31):
SLOT_60 = 0
SLOT_61 = (SLOT_61 + 1)
if (SLOT_61 >= 2):
SLOT_61 = 0
if SLOT_61:
if (not SLOT_64):
GFX_1('yuef_403jizokuaura', 105)
SLOT_64 = 1
if (not SLOT_30):
if SLOT_21:
SLOT_64 = 0
if Unknown23148('CmnActTagBattleWait'):
SLOT_64 = 1
if Unknown23148('CmnActChangePartnerOut'):
SLOT_64 = 1
if Unknown23148('CmnActChangePartnerQuickOut'):
SLOT_64 = 1
if Unknown23148('CmnActFDownLoop'):
SLOT_64 = 1
if Unknown23148('Ichigeki'):
SLOT_64 = 1
@State
def CmnActStand():
label(0)
sprite('yu000_00', 6) # 1-6
sprite('yu000_01', 6) # 7-12
sprite('yu000_02', 6) # 13-18
sprite('yu000_03', 6) # 19-24
sprite('yu000_04', 6) # 25-30
sprite('yu000_05', 6) # 31-36
sprite('yu000_06', 6) # 37-42
sprite('yu000_07', 6) # 43-48
sprite('yu000_08', 6) # 49-54
sprite('yu000_09', 6) # 55-60
sprite('yu000_10', 6) # 61-66
sprite('yu000_11', 6) # 67-72
sprite('yu000_12', 6) # 73-78
sprite('yu000_13', 6) # 79-84
sprite('yu000_14', 6) # 85-90
sprite('yu000_15', 6) # 91-96
loopRest()
random_(1, 2, 87)
if SLOT_ReturnVal:
_gotolabel(0)
random_(0, 2, 123)
if SLOT_ReturnVal:
_gotolabel(0)
random_(0, 2, 122)
if SLOT_ReturnVal:
_gotolabel(0)
random_(2, 0, 90)
if SLOT_ReturnVal:
_gotolabel(0)
sprite('yu001_00', 8) # 97-104
SLOT_88 = 960
sprite('yu001_01', 8) # 105-112
SFX_1('pyu000')
sprite('yu001_02', 8) # 113-120
sprite('yu001_03', 8) # 121-128
sprite('yu001_04', 8) # 129-136
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 137-144
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 145-152
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 153-160
sprite('yu001_08', 8) # 161-168
sprite('yu001_00', 8) # 169-176
loopRest()
gotoLabel(0)
@State
def CmnActStandTurn():
sprite('yu003_00', 4) # 1-4
sprite('yu003_01', 4) # 5-8
sprite('yu003_02', 4) # 9-12
@State
def CmnActStand2Crouch():
sprite('yu010_00', 4) # 1-4
sprite('yu010_01', 4) # 5-8
@State
def CmnActCrouch():
label(0)
sprite('yu010_02', 6) # 1-6
sprite('yu010_03', 6) # 7-12
sprite('yu010_04', 6) # 13-18
sprite('yu010_05', 6) # 19-24
sprite('yu010_06', 6) # 25-30
sprite('yu010_07', 6) # 31-36
sprite('yu010_08', 6) # 37-42
sprite('yu010_09', 6) # 43-48
sprite('yu010_10', 6) # 49-54
sprite('yu010_11', 6) # 55-60
sprite('yu010_12', 6) # 61-66
sprite('yu010_13', 6) # 67-72
sprite('yu010_14', 6) # 73-78
sprite('yu010_15', 6) # 79-84
sprite('yu010_16', 6) # 85-90
sprite('yu010_17', 6) # 91-96
loopRest()
gotoLabel(0)
@State
def CmnActCrouchTurn():
sprite('yu013_00', 4) # 1-4
sprite('yu013_01', 4) # 5-8
sprite('yu013_02', 4) # 9-12
@State
def CmnActCrouch2Stand():
sprite('yu010_01', 4) # 1-4
sprite('yu010_00', 4) # 5-8
@State
def CmnActJumpPre():
if SLOT_37:
if SLOT_93:
if SLOT_16:
Unknown1045(15000)
sprite('yu010_00', 4) # 1-4
@State
def CmnActJumpUpper():
label(0)
sprite('yu020_00', 4) # 1-4
sprite('yu020_01', 4) # 5-8
loopRest()
gotoLabel(0)
@State
def CmnActJumpUpperEnd():
sprite('yu020_02', 4) # 1-4
sprite('yu020_03', 5) # 5-9
@State
def CmnActJumpDown():
sprite('yu020_05', 3) # 1-3
sprite('yu020_06', 3) # 4-6
label(0)
sprite('yu020_07', 4) # 7-10
sprite('yu020_08', 4) # 11-14
loopRest()
gotoLabel(0)
@State
def CmnActJumpLanding():
sprite('yu010_01', 3) # 1-3
sprite('yu010_00', 3) # 4-6
@State
def CmnActLandingStiffLoop():
sprite('yu232_02', 2) # 1-2
sprite('yu232_03', 2) # 3-4
sprite('yu232_04', 32767) # 5-32771
@State
def CmnActLandingStiffEnd():
sprite('yu010_01', 4) # 1-4
sprite('yu010_00', 4) # 5-8
@State
def CmnActFWalk():
sprite('yu030_00', 5) # 1-5
sprite('yu030_01', 5) # 6-10
label(0)
sprite('yu030_02', 5) # 11-15
SFX_FOOTSTEP_(100, 1, 1)
sprite('yu030_03', 5) # 16-20
sprite('yu030_04', 5) # 21-25
sprite('yu030_05', 5) # 26-30
sprite('yu030_06', 5) # 31-35
sprite('yu030_07', 5) # 36-40
SFX_FOOTSTEP_(100, 1, 1)
sprite('yu030_08', 5) # 41-45
sprite('yu030_09', 5) # 46-50
sprite('yu030_10', 5) # 51-55
loopRest()
gotoLabel(0)
@State
def CmnActBWalk():
sprite('yu031_00', 6) # 1-6
sprite('yu031_01', 6) # 7-12
label(0)
sprite('yu031_02', 6) # 13-18
SFX_FOOTSTEP_(100, 1, 1)
sprite('yu031_03', 6) # 19-24
sprite('yu031_04', 6) # 25-30
sprite('yu031_05', 6) # 31-36
sprite('yu031_06', 6) # 37-42
sprite('yu031_07', 6) # 43-48
SFX_FOOTSTEP_(100, 1, 1)
sprite('yu031_08', 6) # 49-54
sprite('yu031_09', 6) # 55-60
sprite('yu031_10', 6) # 61-66
loopRest()
gotoLabel(0)
@State
def CmnActFDash():
sprite('yu030_00', 3) # 1-3
sprite('yu032_00', 2) # 4-5
label(0)
sprite('yu032_01', 4) # 6-9
sprite('yu032_02', 4) # 10-13
sprite('yu032_03', 4) # 14-17
Unknown8006(100, 1, 1)
sprite('yu032_04', 4) # 18-21
sprite('yu032_05', 4) # 22-25
sprite('yu032_06', 4) # 26-29
sprite('yu032_07', 4) # 30-33
Unknown8006(100, 1, 1)
sprite('yu032_08', 4) # 34-37
loopRest()
gotoLabel(0)
@State
def CmnActFDashStop():
sprite('yu032_09', 4) # 1-4
sprite('yu032_10', 4) # 5-8
@State
def CmnActBDash():
def upon_IMMEDIATE():
Unknown2042(1)
Unknown28(8, '_NEUTRAL')
setInvincibleFor(7)
Unknown1084(1)
sendToLabelUpon(2, 1)
Unknown23001(100, 0)
Unknown23076()
sprite('yu033_00', 2) # 1-2
sprite('yu033_01', 3) # 3-5
physicsXImpulse(-18000)
physicsYImpulse(8800)
setGravity(1550)
Unknown8002()
sprite('yu033_02', 1) # 6-6
sprite('yu033_02', 2) # 7-8
sprite('yu033_03', 3) # 9-11
label(0)
sprite('yu033_04', 3) # 12-14
loopRest()
gotoLabel(0)
label(1)
sprite('yu033_05', 3) # 15-17
Unknown1084(1)
Unknown8000(100, 1, 1)
sprite('yu033_06', 1) # 18-18
sprite('yu033_06', 2) # 19-20
sprite('yu033_07', 3) # 21-23
sprite('yu033_08', 3) # 24-26
@State
def CmnActBDashLanding():
pass
@State
def CmnActAirFDash():
sprite('yu035_00', 2) # 1-2
sprite('yu035_01', 3) # 3-5
sprite('yu035_02', 3) # 6-8
sprite('yu035_01', 3) # 9-11
sprite('yu035_02', 3) # 12-14
sprite('yu035_01', 3) # 15-17
sprite('yu035_00', 3) # 18-20
@State
def CmnActAirBDash():
sprite('yu036_00', 1) # 1-1
physicsYImpulse(12000)
sprite('yu036_00', 4) # 2-5
sprite('yu036_01', 4) # 6-9
sprite('yu036_02', 4) # 10-13
sprite('yu036_00', 4) # 14-17
sprite('yu020_06', 4) # 18-21
label(0)
sprite('yu020_07', 4) # 22-25
sprite('yu020_08', 4) # 26-29
loopRest()
gotoLabel(0)
@State
def CmnActHitStandLv1():
sprite('yu050_00', 1) # 1-1
sprite('yu050_01', 7) # 2-8
sprite('yu050_00', 2) # 9-10
@State
def CmnActHitStandLv2():
sprite('yu050_01', 1) # 1-1
sprite('yu050_02', 7) # 2-8
sprite('yu050_01', 2) # 9-10
sprite('yu050_00', 2) # 11-12
@State
def CmnActHitStandLv3():
sprite('yu050_02', 1) # 1-1
sprite('yu050_03', 7) # 2-8
sprite('yu050_02', 2) # 9-10
sprite('yu050_01', 2) # 11-12
sprite('yu050_00', 2) # 13-14
@State
def CmnActHitStandLv4():
sprite('yu050_03', 1) # 1-1
sprite('yu050_04', 8) # 2-9
sprite('yu050_03', 2) # 10-11
sprite('yu050_02', 2) # 12-13
sprite('yu050_01', 2) # 14-15
sprite('yu050_00', 2) # 16-17
@State
def CmnActHitStandLv5():
sprite('yu050_04', 1) # 1-1
sprite('yu050_04', 8) # 2-9
sprite('yu050_04', 2) # 10-11
sprite('yu050_03', 2) # 12-13
sprite('yu050_02', 2) # 14-15
sprite('yu050_01', 2) # 16-17
sprite('yu050_00', 2) # 18-19
@State
def CmnActHitStandLowLv1():
sprite('yu052_00', 1) # 1-1
sprite('yu052_01', 7) # 2-8
sprite('yu052_00', 2) # 9-10
@State
def CmnActHitStandLowLv2():
sprite('yu052_01', 1) # 1-1
sprite('yu052_02', 7) # 2-8
sprite('yu052_01', 2) # 9-10
sprite('yu052_00', 2) # 11-12
@State
def CmnActHitStandLowLv3():
sprite('yu052_02', 1) # 1-1
sprite('yu052_03', 7) # 2-8
sprite('yu052_02', 2) # 9-10
sprite('yu052_01', 2) # 11-12
sprite('yu052_00', 2) # 13-14
@State
def CmnActHitStandLowLv4():
sprite('yu052_03', 1) # 1-1
sprite('yu052_04', 8) # 2-9
sprite('yu052_03', 2) # 10-11
sprite('yu052_02', 2) # 12-13
sprite('yu052_01', 2) # 14-15
sprite('yu052_00', 2) # 16-17
@State
def CmnActHitStandLowLv5():
sprite('yu052_04', 1) # 1-1
sprite('yu052_04', 8) # 2-9
sprite('yu052_04', 2) # 10-11
sprite('yu052_03', 2) # 12-13
sprite('yu052_02', 2) # 14-15
sprite('yu052_01', 2) # 16-17
sprite('yu052_00', 2) # 18-19
@State
def CmnActHitCrouchLv1():
sprite('yu054_00', 1) # 1-1
sprite('yu054_01', 9) # 2-10
sprite('yu054_00', 2) # 11-12
@State
def CmnActHitCrouchLv2():
sprite('yu054_01', 1) # 1-1
sprite('yu054_02', 11) # 2-12
sprite('yu054_01', 2) # 13-14
sprite('yu054_00', 2) # 15-16
@State
def CmnActHitCrouchLv3():
sprite('yu054_02', 1) # 1-1
sprite('yu054_03', 12) # 2-13
sprite('yu054_02', 2) # 14-15
sprite('yu054_01', 2) # 16-17
sprite('yu054_00', 2) # 18-19
@State
def CmnActHitCrouchLv4():
sprite('yu054_03', 1) # 1-1
sprite('yu054_04', 12) # 2-13
sprite('yu054_03', 2) # 14-15
sprite('yu054_02', 2) # 16-17
sprite('yu054_01', 2) # 18-19
sprite('yu054_00', 2) # 20-21
@State
def CmnActHitCrouchLv5():
sprite('yu054_04', 1) # 1-1
sprite('yu054_04', 25) # 2-26
sprite('yu054_04', 2) # 27-28
sprite('yu054_03', 2) # 29-30
sprite('yu054_02', 2) # 31-32
sprite('yu054_01', 2) # 33-34
sprite('yu054_00', 2) # 35-36
@State
def CmnActBDownUpper():
sprite('yu060_00', 4) # 1-4
label(0)
sprite('yu060_01', 4) # 5-8
sprite('yu060_02', 4) # 9-12
loopRest()
gotoLabel(0)
@State
def CmnActBDownUpperEnd():
sprite('yu060_03', 4) # 1-4
@State
def CmnActBDownDown():
sprite('yu060_04', 8) # 1-8
label(1)
sprite('yu060_05', 4) # 9-12
sprite('yu060_06', 4) # 13-16
loopRest()
gotoLabel(1)
@State
def CmnActBDownCrash():
sprite('yu060_07', 4) # 1-4
@State
def CmnActBDownBound():
sprite('yu060_08', 2) # 1-2
sprite('yu060_09', 2) # 3-4
sprite('yu060_10', 2) # 5-6
sprite('yu060_11', 2) # 7-8
@State
def CmnActBDownLoop():
sprite('yu060_12', 1) # 1-1
@State
def CmnActBDown2Stand():
sprite('yu064_00', 4) # 1-4
sprite('yu064_01', 4) # 5-8
sprite('yu064_02', 4) # 9-12
sprite('yu064_03', 4) # 13-16
@State
def CmnActFDownUpper():
sprite('yu063_00', 4) # 1-4
@State
def CmnActFDownUpperEnd():
sprite('yu063_01', 3) # 1-3
@State
def CmnActFDownDown():
label(1)
sprite('yu063_03', 4) # 1-4
sprite('yu063_04', 4) # 5-8
loopRest()
gotoLabel(1)
@State
def CmnActFDownCrash():
sprite('yu063_05', 4) # 1-4
@State
def CmnActFDownBound():
sprite('yu060_08', 2) # 1-2
sprite('yu060_09', 2) # 3-4
sprite('yu060_10', 2) # 5-6
sprite('yu060_11', 2) # 7-8
@State
def CmnActFDownLoop():
sprite('yu060_12', 1) # 1-1
@State
def CmnActFDown2Stand():
sprite('yu064_00', 4) # 1-4
sprite('yu064_01', 4) # 5-8
sprite('yu064_02', 4) # 9-12
sprite('yu064_03', 4) # 13-16
@State
def CmnActVDownUpper():
sprite('yu060_00', 4) # 1-4
label(0)
sprite('yu060_01', 4) # 5-8
sprite('yu060_02', 4) # 9-12
loopRest()
gotoLabel(0)
@State
def CmnActVDownUpperEnd():
sprite('yu060_03', 8) # 1-8
@State
def CmnActVDownDown():
sprite('yu060_04', 8) # 1-8
label(0)
sprite('yu060_05', 4) # 9-12
sprite('yu060_06', 4) # 13-16
loopRest()
gotoLabel(0)
@State
def CmnActVDownCrash():
sprite('yu060_07', 4) # 1-4
@State
def CmnActBlowoff():
sprite('yu072_00', 3) # 1-3
label(0)
sprite('yu072_01', 3) # 4-6
sprite('yu072_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActKirimomiUpper():
label(0)
sprite('yu074_00', 2) # 1-2
sprite('yu074_01', 2) # 3-4
sprite('yu074_02', 2) # 5-6
sprite('yu074_03', 2) # 7-8
loopRest()
gotoLabel(0)
@State
def CmnActSkeleton():
label(0)
sprite('yu082_00', 2) # 1-2
loopRest()
gotoLabel(0)
@State
def CmnActFreeze():
sprite('yu052_01', 1) # 1-1
@State
def CmnActWallBound():
sprite('yu072_03', 32767) # 1-32767
@State
def CmnActWallBoundDown():
sprite('yu063_00', 4) # 1-4
sprite('yu063_01', 32767) # 5-32771
@State
def CmnActStaggerLoop():
sprite('yu070_00', 32767) # 1-32767
@State
def CmnActStaggerDown():
sprite('yu070_01', 4) # 1-4
sprite('yu070_02', 4) # 5-8
sprite('yu070_03', 4) # 9-12
sprite('yu070_04', 4) # 13-16
sprite('yu070_05', 4) # 17-20
sprite('yu070_06', 4) # 21-24
@State
def CmnActUkemiStagger():
sprite('yu040_03', 2) # 1-2
sprite('yu040_02', 2) # 3-4
sprite('yu040_01', 2) # 5-6
sprite('yu040_00', 2) # 7-8
@State
def CmnActUkemiAirF():
sprite('yu020_02', 3) # 1-3
sprite('yu020_03', 3) # 4-6
sprite('yu020_04', 9) # 7-15
@State
def CmnActUkemiAirB():
sprite('yu020_02', 3) # 1-3
sprite('yu020_03', 3) # 4-6
sprite('yu020_04', 9) # 7-15
@State
def CmnActUkemiAirN():
sprite('yu020_02', 3) # 1-3
sprite('yu020_03', 3) # 4-6
sprite('yu020_04', 9) # 7-15
@State
def CmnActUkemiLandF():
sprite('yu112_00', 3) # 1-3
sprite('yu112_01', 3) # 4-6
sprite('yu112_02', 3) # 7-9
sprite('yu112_03', 3) # 10-12
sprite('yu112_04', 3) # 13-15
sprite('yu112_05', 3) # 16-18
sprite('yu020_07', 4) # 19-22
sprite('yu020_08', 4) # 23-26
@State
def CmnActUkemiLandB():
sprite('yu112_00', 3) # 1-3
sprite('yu112_01', 3) # 4-6
sprite('yu112_02', 3) # 7-9
sprite('yu112_03', 3) # 10-12
sprite('yu112_04', 3) # 13-15
sprite('yu112_05', 3) # 16-18
sprite('yu020_07', 4) # 19-22
sprite('yu020_08', 4) # 23-26
@State
def CmnActUkemiLandN():
sprite('yu112_00', 3) # 1-3
sprite('yu112_01', 3) # 4-6
sprite('yu112_02', 3) # 7-9
sprite('yu112_03', 3) # 10-12
sprite('yu112_04', 3) # 13-15
sprite('yu112_05', 3) # 16-18
sprite('yu020_07', 4) # 19-22
sprite('yu020_08', 4) # 23-26
@State
def CmnActUkemiLandNLanding():
sprite('yu010_01', 3) # 1-3
sprite('yu010_00', 3) # 4-6
@State
def CmnActMidGuardPre():
sprite('yu040_00', 3) # 1-3
sprite('yu040_01', 3) # 4-6
@State
def CmnActMidGuardLoop():
label(0)
sprite('yu040_02', 5) # 1-5
sprite('yu040_03', 5) # 6-10
loopRest()
gotoLabel(0)
@State
def CmnActMidGuardEnd():
sprite('yu040_01', 3) # 1-3
sprite('yu040_00', 3) # 4-6
@State
def CmnActMidHeavyGuardLoop():
sprite('yu040_04', 1) # 1-1
label(0)
sprite('yu040_02', 5) # 2-6
sprite('yu040_03', 5) # 7-11
loopRest()
gotoLabel(0)
@State
def CmnActMidHeavyGuardEnd():
sprite('yu040_01', 3) # 1-3
sprite('yu040_00', 3) # 4-6
@State
def CmnActHighGuardPre():
sprite('yu040_00', 3) # 1-3
sprite('yu040_01', 3) # 4-6
@State
def CmnActHighGuardLoop():
sprite('yu040_04', 1) # 1-1
label(0)
sprite('yu040_02', 5) # 2-6
sprite('yu040_03', 5) # 7-11
loopRest()
gotoLabel(0)
@State
def CmnActHighGuardEnd():
sprite('yu040_01', 3) # 1-3
sprite('yu040_00', 3) # 4-6
@State
def CmnActHighHeavyGuardLoop():
sprite('yu040_04', 1) # 1-1
label(0)
sprite('yu040_02', 5) # 2-6
sprite('yu040_03', 5) # 7-11
loopRest()
gotoLabel(0)
@State
def CmnActHighHeavyGuardEnd():
sprite('yu040_01', 3) # 1-3
sprite('yu040_00', 3) # 4-6
@State
def CmnActCrouchGuardPre():
sprite('yu043_00', 3) # 1-3
sprite('yu043_01', 3) # 4-6
@State
def CmnActCrouchGuardLoop():
label(0)
sprite('yu043_02', 5) # 1-5
sprite('yu043_03', 5) # 6-10
loopRest()
gotoLabel(0)
@State
def CmnActCrouchGuardEnd():
sprite('yu043_01', 3) # 1-3
sprite('yu043_00', 3) # 4-6
@State
def CmnActCrouchHeavyGuardLoop():
sprite('yu043_04', 1) # 1-1
label(0)
sprite('yu043_02', 5) # 2-6
sprite('yu043_03', 5) # 7-11
loopRest()
gotoLabel(0)
@State
def CmnActCrouchHeavyGuardEnd():
sprite('yu043_01', 3) # 1-3
sprite('yu043_00', 3) # 4-6
@State
def CmnActAirGuardPre():
sprite('yu045_00', 3) # 1-3
sprite('yu045_01', 3) # 4-6
@State
def CmnActAirGuardLoop():
label(0)
sprite('yu045_02', 5) # 1-5
sprite('yu045_03', 5) # 6-10
loopRest()
gotoLabel(0)
@State
def CmnActAirGuardEnd():
sprite('yu045_01', 3) # 1-3
sprite('yu045_00', 3) # 4-6
@State
def CmnActAirHeavyGuardLoop():
sprite('yu045_04', 1) # 1-1
label(0)
sprite('yu045_02', 5) # 2-6
sprite('yu045_03', 5) # 7-11
loopRest()
gotoLabel(0)
@State
def CmnActAirHeavyGuardEnd():
sprite('yu045_01', 3) # 1-3
sprite('yu045_00', 3) # 4-6
@State
def CmnActGuardBreakStand():
sprite('yu040_04', 2) # 1-2
sprite('yu040_04', 2) # 3-4
sprite('yu040_04', 1) # 5-5
Unknown2042(1)
sprite('yu040_02', 4) # 6-9
sprite('yu040_01', 4) # 10-13
sprite('yu040_00', 4) # 14-17
@State
def CmnActGuardBreakCrouch():
sprite('yu043_04', 2) # 1-2
sprite('yu043_04', 2) # 3-4
sprite('yu043_04', 1) # 5-5
Unknown2042(1)
sprite('yu043_02', 4) # 6-9
sprite('yu043_01', 4) # 10-13
sprite('yu043_00', 4) # 14-17
@State
def CmnActGuardBreakAir():
sprite('yu045_04', 2) # 1-2
sprite('yu045_04', 2) # 3-4
sprite('yu045_04', 1) # 5-5
Unknown2042(1)
sprite('yu045_02', 4) # 6-9
sprite('yu045_01', 4) # 10-13
sprite('yu045_00', 4) # 14-17
@State
def CmnActAirTurn():
sprite('yu025_02', 1) # 1-1
sprite('yu025_01', 2) # 2-3
sprite('yu025_00', 1) # 4-4
@State
def CmnActLockWait():
sprite('yu040_02', 1) # 1-1
sprite('yu040_01', 3) # 2-4
sprite('yu040_00', 3) # 5-7
@State
def CmnActLockReject():
sprite('yu200_00', 5) # 1-5
sprite('yu200_01', 3) # 6-8
sprite('yu200_02', 3) # 9-11 **attackbox here**
sprite('yu200_03', 5) # 12-16
sprite('yu200_04', 4) # 17-20
sprite('yu200_05', 3) # 21-23
sprite('yu200_06', 3) # 24-26
sprite('yu200_07', 3) # 27-29
@State
def CmnActAirLockWait():
sprite('yu045_02', 1) # 1-1
sprite('yu045_01', 3) # 2-4
sprite('yu045_00', 3) # 5-7
@State
def CmnActAirLockReject():
sprite('yu250_00', 3) # 1-3
sprite('yu250_01', 3) # 4-6
sprite('yu250_02', 3) # 7-9
sprite('yu250_03', 5) # 10-14 **attackbox here**
sprite('yu250_04', 6) # 15-20
sprite('yu250_05', 6) # 21-26
sprite('yu250_06', 3) # 27-29
@State
def CmnActLandSpin():
sprite('yu071_00', 2) # 1-2
label(0)
sprite('yu071_01', 2) # 3-4
sprite('yu071_02', 2) # 5-6
sprite('yu071_03', 2) # 7-8
sprite('yu071_04', 2) # 9-10
sprite('yu071_05', 2) # 11-12
sprite('yu071_06', 2) # 13-14
sprite('yu071_07', 2) # 15-16
sprite('yu071_08', 2) # 17-18
loopRest()
gotoLabel(0)
@State
def CmnActLandSpinDown():
sprite('yu040_02', 6) # 1-6
sprite('yu040_01', 5) # 7-11
sprite('yu040_00', 5) # 12-16
@State
def CmnActVertSpin():
sprite('yu071_00', 2) # 1-2
label(0)
sprite('yu071_01', 2) # 3-4
sprite('yu071_02', 2) # 5-6
sprite('yu071_03', 2) # 7-8
sprite('yu071_04', 2) # 9-10
sprite('yu071_05', 2) # 11-12
sprite('yu071_06', 2) # 13-14
sprite('yu071_07', 2) # 15-16
sprite('yu071_08', 2) # 17-18
loopRest()
gotoLabel(0)
@State
def CmnActSlideAir():
sprite('yu124_00', 2) # 1-2
label(0)
sprite('yu124_01', 2) # 3-4
sprite('yu124_02', 2) # 5-6
sprite('yu124_03', 2) # 7-8
sprite('yu124_04', 2) # 9-10
sprite('yu124_05', 2) # 11-12
sprite('yu124_06', 2) # 13-14
sprite('yu124_07', 2) # 15-16
sprite('yu124_08', 2) # 17-18
loopRest()
gotoLabel(0)
@State
def CmnActSlideKeep():
sprite('yu077_02', 4) # 1-4
label(0)
sprite('yu077_03', 3) # 5-7
sprite('yu077_04', 3) # 8-10
loopRest()
gotoLabel(0)
@State
def CmnActSlideEnd():
sprite('yu077_05', 5) # 1-5
sprite('yu077_06', 4) # 6-9
@State
def CmnActAomukeSlideKeep():
sprite('yu077_02', 4) # 1-4
label(0)
sprite('yu077_03', 3) # 5-7
sprite('yu077_04', 3) # 8-10
loopRest()
gotoLabel(0)
@State
def CmnActAomukeSlideEnd():
sprite('yu077_05', 5) # 1-5
sprite('yu077_06', 4) # 6-9
@State
def CmnActBurstBegin():
label(0)
sprite('yu121_00', 2) # 1-2
sprite('yu121_01', 2) # 3-4
sprite('yu121_02', 2) # 5-6
loopRest()
gotoLabel(0)
@State
def CmnActBurstLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActBurstEnd():
sprite('yu121_07', 3) # 1-3
sprite('yu121_08', 3) # 4-6
@State
def CmnActAirBurstBegin():
label(0)
sprite('yu121_00', 2) # 1-2
sprite('yu121_01', 2) # 3-4
sprite('yu121_02', 2) # 5-6
loopRest()
gotoLabel(0)
@State
def CmnActAirBurstLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActAirBurstEnd():
sprite('yu121_07', 3) # 1-3
sprite('yu121_08', 3) # 4-6
@State
def CmnActOverDriveBegin():
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActOverDriveLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActOverDriveEnd():
sprite('yu121_07', 4) # 1-4
sprite('yu121_08', 4) # 5-8
sprite('yu010_00', 4) # 9-12
@State
def CmnActAirOverDriveBegin():
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActAirOverDriveLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActAirOverDriveEnd():
sprite('yu121_07', 3) # 1-3
sprite('yu121_08', 3) # 4-6
sprite('yu020_05', 3) # 7-9
sprite('yu020_06', 3) # 10-12
label(0)
sprite('yu020_07', 4) # 13-16
sprite('yu020_08', 4) # 17-20
gotoLabel(0)
@State
def CmnActCrossRushBegin():
def upon_IMMEDIATE():
loopRelated(17, 7)
def upon_17():
Unknown36(28)
Unknown23148('PYU_PersonaWait')
Unknown48('030000000200000033000000190000000200000000000000')
Unknown35()
if (not SLOT_51):
Unknown23029(11, 13, 0)
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActCrossRushLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActCrossRushEnd():
sprite('yu121_07', 6) # 1-6
sprite('yu121_08', 6) # 7-12
@State
def CmnActAirCrossRushBegin():
def upon_IMMEDIATE():
loopRelated(17, 7)
def upon_17():
Unknown36(28)
Unknown23148('PYU_PersonaWait')
Unknown48('030000000200000033000000190000000200000000000000')
Unknown35()
if (not SLOT_51):
Unknown23029(11, 13, 0)
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActAirCrossRushLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActAirCrossRushEnd():
sprite('yu121_07', 3) # 1-3
sprite('yu121_08', 3) # 4-6
sprite('yu020_05', 3) # 7-9
sprite('yu020_06', 3) # 10-12
label(0)
sprite('yu020_07', 4) # 13-16
sprite('yu020_08', 4) # 17-20
gotoLabel(0)
@State
def CmnActCrossChangeBegin():
def upon_IMMEDIATE():
loopRelated(17, 7)
def upon_17():
Unknown36(28)
Unknown23148('PYU_PersonaWait')
Unknown48('030000000200000033000000190000000200000000000000')
Unknown35()
if (not SLOT_51):
Unknown23029(11, 13, 0)
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActCrossChangeLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActCrossChangeEnd():
sprite('yu121_07', 6) # 1-6
sprite('yu121_08', 6) # 7-12
@State
def CmnActAirCrossChangeBegin():
def upon_IMMEDIATE():
loopRelated(17, 7)
def upon_17():
Unknown36(28)
Unknown23148('PYU_PersonaWait')
Unknown48('030000000200000033000000190000000200000000000000')
Unknown35()
if (not SLOT_51):
Unknown23029(11, 13, 0)
label(0)
sprite('yu121_00', 3) # 1-3
sprite('yu121_01', 3) # 4-6
sprite('yu121_02', 3) # 7-9
loopRest()
gotoLabel(0)
@State
def CmnActAirCrossChangeLoop():
sprite('yu121_03', 3) # 1-3
label(0)
sprite('yu121_04', 2) # 4-5
sprite('yu121_05', 2) # 6-7
sprite('yu121_06', 2) # 8-9
loopRest()
gotoLabel(0)
@State
def CmnActAirCrossChangeEnd():
sprite('yu121_07', 3) # 1-3
sprite('yu121_08', 3) # 4-6
sprite('yu020_05', 3) # 7-9
sprite('yu020_06', 3) # 10-12
label(0)
sprite('yu020_07', 4) # 13-16
sprite('yu020_08', 4) # 17-20
gotoLabel(0)
@State
def CmnActTagBattleWait():
def upon_IMMEDIATE():
setInvincible(1)
EnableCollision(0)
Unknown2034(0)
teleportRelativeY(0)
sprite('null', 32767) # 1-32767
@State
def CmnActChangePartnerAppeal():
pass
@State
def CmnActChangePartnerAppealAir():
pass
@State
def CmnActChangePartnerIn():
def upon_IMMEDIATE():
Unknown17021('')
Unknown9016(1)
AttackLevel_(4)
blockstun(24)
Hitstop(20)
DisableAttackRestOfMove()
Unknown11063(1)
def upon_41():
clearUponHandler(41)
sendToLabel(100)
def upon_LANDING():
clearUponHandler(2)
sendToLabel(9)
sprite('null', 2) # 1-2
sprite('null', 600) # 3-602
label(100)
sprite('null', 28) # 603-630
sprite('null', 1) # 631-631
Unknown1086(22)
teleportRelativeX(-1750000)
teleportRelativeY(650000)
physicsXImpulse(300000)
physicsYImpulse(-130000)
label(1)
sprite('yu250_03', 2) # 632-633 **attackbox here**
gotoLabel(1)
label(9)
sprite('yu250_03', 3) # 634-636 **attackbox here**
Unknown1019(30)
sprite('yu232_02', 6) # 637-642
Unknown1084(1)
Unknown8000(-1, 1, 1)
sprite('yu232_03', 4) # 643-646
sprite('yu232_04', 4) # 647-650
sprite('yu010_01', 4) # 651-654
sprite('yu010_00', 4) # 655-658
@State
def CmnActChangePartnerQuickIn():
sprite('yu032_05', 3) # 1-3
sprite('yu032_06', 5) # 4-8
sprite('yu032_09', 7) # 9-15
sprite('yu032_09', 7) # 16-22
sprite('yu032_10', 7) # 23-29
@State
def CmnActChangePartnerOut():
def upon_IMMEDIATE():
Unknown17013()
sprite('yu033_00', 3) # 1-3
sprite('yu033_01', 3) # 4-6
sprite('yu033_02', 3) # 7-9
sprite('yu033_03', 3) # 10-12
sprite('yu033_04', 3) # 13-15
sprite('yu033_00', 3) # 16-18
sprite('yu033_01', 3) # 19-21
sprite('yu033_02', 3) # 22-24
sprite('yu033_03', 3) # 25-27
sprite('yu033_04', 3) # 28-30
sprite('yu033_00', 30) # 31-60
@State
def CmnActChangePartnerQuickOut():
def upon_IMMEDIATE():
Unknown17013()
sendToLabelUpon(2, 1)
sprite('yu033_00', 1) # 1-1
sprite('yu033_01', 4) # 2-5
sprite('yu033_02', 4) # 6-9
loopRest()
label(0)
sprite('yu033_02', 3) # 10-12
loopRest()
gotoLabel(0)
label(1)
sprite('yu033_03', 3) # 13-15
sprite('yu033_04', 3) # 16-18
@State
def CmnActChangeReturnAppeal():
def upon_IMMEDIATE():
Unknown17013()
sprite('yu611_00', 5) # 1-5
sprite('yu611_01', 5) # 6-10
sprite('yu611_02', 7) # 11-17
sprite('yu611_03', 7) # 18-24
sprite('yu611_04', 7) # 25-31
sprite('yu611_03', 7) # 32-38
sprite('yu611_02', 7) # 39-45
sprite('yu611_03', 7) # 46-52
sprite('yu611_04', 7) # 53-59
sprite('yu611_03', 7) # 60-66
sprite('yu611_01', 4) # 67-70
sprite('yu611_00', 4) # 71-74
sprite('yu000_03', 2) # 75-76
@State
def CmnActChangePartnerAssistAdmiss():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
def upon_LANDING():
clearUponHandler(2)
Unknown1084(1)
sendToLabel(99)
sprite('null', 2) # 1-2
label(0)
sprite('yu020_07', 4) # 3-6
Unknown1019(95)
sprite('yu020_08', 4) # 7-10
Unknown1019(95)
loopRest()
gotoLabel(0)
label(99)
sprite('yu010_00', 2) # 11-12
Unknown8000(100, 1, 1)
sprite('keep', 100) # 13-112
@State
def CmnActChangePartnerAssistAtk_A():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown30040(1)
Unknown2006()
def upon_STATE_END():
EnableCollision(1)
Unknown2034(1)
Unknown2053(1)
sprite('yu403_00', 3) # 1-3
sprite('yu403_07', 3) # 4-6
Unknown23029(11, 4080, 0)
sprite('yu403_08', 3) # 7-9
GFX_1('persona_enter_ply', 0)
GFX_0('fire_booster', 100)
sprite('yu403_09', 3) # 10-12
sprite('yu403_11', 3) # 13-15
if (SLOT_31 < 9):
selfDamage(500)
SLOT_31 = (SLOT_31 + 1)
SFX_3('distortion_b')
Recovery()
sprite('yu403_12', 3) # 16-18
sprite('yu450_00', 3) # 19-21
Unknown2006()
sprite('yu450_01', 3) # 22-24
Unknown7007('7079753231325f300000000000000000640000007079753231325f310000000000000000640000007079753231325f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu450_02', 3) # 25-27
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 3) # 28-30
sprite('yu450_04', 3) # 31-33
sprite('yu450_05', 3) # 34-36
sprite('yu450_06', 3) # 37-39
sprite('yu450_07', 3) # 40-42
Unknown23029(11, 5030, 0)
sprite('yu450_08', 1) # 43-43
sprite('yu450_09', 1) # 44-44
sprite('yu450_10', 3) # 45-47
sprite('yu450_11', 3) # 48-50
sprite('yu450_12', 4) # 51-54
sprite('yu450_13', 4) # 55-58
sprite('yu450_14', 4) # 59-62
sprite('yu450_12', 4) # 63-66
sprite('yu450_13', 4) # 67-70
sprite('yu450_14', 4) # 71-74
sprite('yu450_12', 4) # 75-78
sprite('yu450_13', 4) # 79-82
sprite('yu450_14', 4) # 83-86
sprite('yu450_12', 4) # 87-90
sprite('yu450_13', 4) # 91-94
sprite('yu450_14', 4) # 95-98
sprite('yu450_15', 4) # 99-102
sprite('yu010_02', 4) # 103-106
sprite('yu010_01', 4) # 107-110
sprite('yu010_00', 3) # 111-113
@State
def CmnActChangePartnerAssistAtk_B():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
AttackLevel_(3)
AttackP1(70)
GroundedHitstunAnimation(10)
AirHitstunAnimation(10)
AirPushbackX(2000)
AirPushbackY(38000)
AirUntechableTime(50)
Damage(1200)
Unknown11042(1)
Unknown11063(1)
Unknown30040(1)
Unknown2006()
def upon_STATE_END():
EnableCollision(1)
Unknown2034(1)
Unknown2053(1)
sprite('yu400_01', 2) # 1-2
Unknown7007('7079753230305f300000000000000000640000007079753230305f310000000000000000640000007079753230305f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu400_02', 2) # 3-4
sprite('yu400_03', 2) # 5-6
sprite('yu400_04', 2) # 7-8
setInvincible(1)
Unknown22022(0)
Unknown22038(0)
Unknown22019('0000000000000000000000000100000000000000')
GFX_0('rinkakuaura_Assist', 100)
Unknown38(5, 1)
Unknown23029(5, 56, 0)
Unknown23029(11, 4010, 0)
GFX_0('rinkakuaura2', 100)
Unknown23029(1, 57, 0)
sprite('yu400_05', 2) # 9-10
sprite('yu400_06', 2) # 11-12
Unknown1084(1)
physicsYImpulse(2000)
sprite('yu400_07ex01', 4) # 13-16 **attackbox here**
RefreshMultihit()
sprite('yu400_08ex01', 4) # 17-20 **attackbox here**
GFX_0('diacharge', 104)
Unknown38(6, 1)
Unknown23029(6, 58, 0)
GFX_0('diacharge_floor', 0)
Unknown38(7, 1)
Unknown23029(7, 59, 0)
sprite('yu400_09ex01', 4) # 21-24 **attackbox here**
sprite('yu400_10ex01', 4) # 25-28 **attackbox here**
DisableAttackRestOfMove()
SFX_3('yu004')
def upon_CLEAR_OR_EXIT():
Unknown47('090000000200000033000000000000003c0000000200000034000000')
if SLOT_52:
SFX_3('yu004')
SLOT_51 = 0
if (SLOT_145 <= 300000):
Unknown48('19000000020000003500000018000000020000004b000000')
if SLOT_53:
Unknown21000(10)
SLOT_51 = (SLOT_51 + 1)
Unknown36(24)
Unknown21000(20)
Unknown35()
else:
Unknown21000(20)
physicsYImpulse(-600)
SFX_3('yu002')
sprite('yu400_07', 3) # 29-31 **attackbox here**
sprite('yu400_08', 3) # 32-34 **attackbox here**
sprite('yu400_09', 3) # 35-37 **attackbox here**
sprite('yu400_10', 3) # 38-40 **attackbox here**
sprite('yu400_07', 3) # 41-43 **attackbox here**
sprite('yu400_08', 3) # 44-46 **attackbox here**
sprite('yu400_09', 3) # 47-49 **attackbox here**
sprite('yu400_10', 3) # 50-52 **attackbox here**
sprite('yu400_07', 3) # 53-55 **attackbox here**
sprite('yu400_08', 3) # 56-58 **attackbox here**
sprite('yu400_09', 3) # 59-61 **attackbox here**
sprite('yu400_10', 3) # 62-64 **attackbox here**
sprite('yu400_07', 3) # 65-67 **attackbox here**
sprite('yu400_08', 3) # 68-70 **attackbox here**
sprite('yu400_09', 3) # 71-73 **attackbox here**
sprite('yu400_10', 3) # 74-76 **attackbox here**
sprite('yu400_07', 3) # 77-79 **attackbox here**
sprite('yu400_08', 3) # 80-82 **attackbox here**
sprite('yu400_09', 3) # 83-85 **attackbox here**
sprite('yu400_10', 3) # 86-88 **attackbox here**
sprite('yu400_07', 3) # 89-91 **attackbox here**
sprite('yu400_08', 3) # 92-94 **attackbox here**
sprite('yu400_09', 3) # 95-97 **attackbox here**
sprite('yu400_10', 3) # 98-100 **attackbox here**
sprite('yu400_07', 3) # 101-103 **attackbox here**
sprite('yu400_08', 3) # 104-106 **attackbox here**
sprite('yu400_09', 3) # 107-109 **attackbox here**
sprite('yu400_10', 3) # 110-112 **attackbox here**
sprite('yu400_07', 3) # 113-115 **attackbox here**
setGravity(500)
setInvincible(0)
Unknown23029(5, 52, 0)
Unknown23029(6, 53, 0)
Unknown23029(7, 54, 0)
Unknown23029(11, 11, 0)
sprite('yu400_08', 3) # 116-118 **attackbox here**
sprite('yu400_09', 3) # 119-121 **attackbox here**
sprite('yu400_10', 3) # 122-124 **attackbox here**
loopRest()
label(1)
sprite('yu400_11', 4) # 125-128
sprite('yu400_12', 4) # 129-132
sprite('yu400_13', 4) # 133-136
@State
def CmnActChangePartnerAssistAtk_D():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown30040(1)
Unknown2006()
def upon_STATE_END():
EnableCollision(1)
Unknown2034(1)
Unknown2053(1)
sprite('yu404_00', 3) # 1-3
Unknown1084(1)
sprite('yu404_01', 4) # 4-7
Unknown23029(11, 4074, 0)
Unknown7007('7079753231305f300000000000000000640000007079753231305f310000000000000000640000007079753231305f320000000000000000640000007079753231315f32000000000000000064000000')
sprite('yu404_02', 4) # 8-11
GFX_1('persona_enter_ply', 0)
sprite('yu404_03', 4) # 12-15
physicsXImpulse(-3000)
sprite('yu404_03', 4) # 16-19
Unknown1019(120)
sprite('yu404_04', 4) # 20-23
Unknown1019(110)
sprite('yu404_04', 4) # 24-27
Unknown1019(100)
sprite('yu404_05', 4) # 28-31
Unknown1019(50)
sprite('yu404_05', 4) # 32-35
Unknown1019(50)
sprite('yu404_06', 4) # 36-39
Unknown1019(50)
Recovery()
sprite('yu404_06', 5) # 40-44
sprite('yu404_07', 5) # 45-49
Unknown1084(1)
sprite('yu404_08', 9) # 50-58
@State
def CmnActChangePartnerDD():
def upon_IMMEDIATE():
setInvincible(1)
if SLOT_162:
SLOT_58 = 1
def upon_LANDING():
clearUponHandler(2)
Unknown1084(1)
Unknown8000(100, 1, 1)
sendToLabel(1)
sprite('null', 1) # 1-1
Unknown2036(104, -1, 0)
sprite('null', 1) # 2-2
teleportRelativeX(-1500000)
teleportRelativeY(240000)
setGravity(0)
physicsYImpulse(-10434)
SLOT_12 = SLOT_19
teleportRelativeX(-145000)
Unknown1019(4)
label(0)
sprite('yu020_07', 4) # 3-6
sprite('yu020_08', 4) # 7-10
loopRest()
gotoLabel(0)
label(1)
sprite('keep', 10) # 11-20
if SLOT_58:
enterState('ChangePartnerDDOD_Exe')
else:
enterState('ChangePartnerDD_Exe')
@State
def ChangePartnerDD_Exe():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
setInvincible(1)
Unknown13024(0)
Unknown30063(1)
sprite('yu430_00', 3) # 1-3
Unknown1084(1)
setInvincible(1)
sprite('yu430_00', 3) # 4-6
SFX_1('yu310')
sprite('yu430_01', 4) # 7-10
sprite('yu430_02', 4) # 11-14
sprite('yu430_03', 4) # 15-18
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
sprite('yu430_04', 4) # 19-22
sprite('yu430_05', 4) # 23-26
sprite('yu430_06', 4) # 27-30
sprite('yu430_07', 4) # 31-34
sprite('yu430_08', 4) # 35-38
sprite('yu430_09', 4) # 39-42
sprite('yu430_10', 4) # 43-46
sprite('yu430_11', 4) # 47-50
sprite('yu430_12', 3) # 51-53
sprite('yu430_13', 3) # 54-56
sprite('yu430_14', 3) # 57-59
sprite('yu430_15', 3) # 60-62
sprite('yu430_16', 3) # 63-65
sprite('yu430_17', 3) # 66-68
sprite('yu430_18', 4) # 69-72
Unknown21007(5, 32)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
sprite('yu430_19', 4) # 73-76
Unknown23029(11, 10060, 0)
sprite('yu430_20', 4) # 77-80
sprite('yu430_21', 4) # 81-84
sprite('yu430_19', 4) # 85-88
sprite('yu430_20', 4) # 89-92
setInvincible(0)
sprite('yu430_21', 4) # 93-96
sprite('yu430_19', 4) # 97-100
Unknown7007('7079753235315f300000000000000000640000007079753235315f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu430_20', 4) # 101-104
sprite('yu430_21', 4) # 105-108
sprite('yu430_19', 5) # 109-113
sprite('yu430_20', 5) # 114-118
sprite('yu430_21', 5) # 119-123
sprite('yu430_19', 5) # 124-128
sprite('yu430_20', 5) # 129-133
sprite('yu430_21', 5) # 134-138
sprite('yu430_19', 5) # 139-143
sprite('yu430_20', 5) # 144-148
sprite('yu430_21', 5) # 149-153
sprite('yu430_22', 4) # 154-157
sprite('yu430_23', 4) # 158-161
Recovery()
@State
def ChangePartnerDDOD_Exe():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
setInvincible(1)
Unknown13024(0)
Unknown30063(1)
sprite('yu430_00', 3) # 1-3
Unknown1084(1)
setInvincible(1)
sprite('yu430_00', 3) # 4-6
SFX_1('yu310')
sprite('yu430_01', 4) # 7-10
sprite('yu430_02', 4) # 11-14
sprite('yu430_03', 4) # 15-18
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
sprite('yu430_04', 4) # 19-22
sprite('yu430_05', 4) # 23-26
sprite('yu430_06', 4) # 27-30
sprite('yu430_07', 4) # 31-34
sprite('yu430_08', 4) # 35-38
sprite('yu430_09', 4) # 39-42
sprite('yu430_10', 4) # 43-46
sprite('yu430_11', 4) # 47-50
sprite('yu430_12', 3) # 51-53
sprite('yu430_13', 3) # 54-56
sprite('yu430_14', 3) # 57-59
sprite('yu430_15', 3) # 60-62
sprite('yu430_16', 3) # 63-65
sprite('yu430_17', 3) # 66-68
sprite('yu430_18', 4) # 69-72
Unknown21007(5, 32)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
sprite('yu430_19', 4) # 73-76
Unknown23029(11, 10061, 0)
sprite('yu430_20', 4) # 77-80
sprite('yu430_21', 4) # 81-84
sprite('yu430_19', 4) # 85-88
sprite('yu430_20', 4) # 89-92
setInvincible(0)
sprite('yu430_21', 4) # 93-96
sprite('yu430_19', 4) # 97-100
Unknown7007('7079753235315f300000000000000000640000007079753235315f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu430_20', 4) # 101-104
sprite('yu430_21', 4) # 105-108
sprite('yu430_19', 5) # 109-113
sprite('yu430_20', 5) # 114-118
sprite('yu430_21', 5) # 119-123
sprite('yu430_19', 5) # 124-128
sprite('yu430_20', 5) # 129-133
sprite('yu430_21', 5) # 134-138
sprite('yu430_19', 5) # 139-143
sprite('yu430_20', 5) # 144-148
sprite('yu430_21', 5) # 149-153
sprite('yu430_22', 4) # 154-157
sprite('yu430_23', 4) # 158-161
Recovery()
@State
def CmnActChangeRequest():
pass
@State
def CmnActChangePartnerBurst():
def upon_IMMEDIATE():
Unknown17021('')
Unknown9016(1)
def upon_41():
clearUponHandler(41)
sendToLabel(0)
sprite('null', 120) # 1-120
label(0)
sprite('null', 8) # 121-128
Unknown1086(22)
teleportRelativeX(-150000)
teleportRelativeX(-580000)
Unknown1007(2900000)
physicsXImpulse(20000)
physicsYImpulse(-100000)
sprite('yu250_03', 3) # 129-131 **attackbox here**
sprite('yu250_03', 3) # 132-134 **attackbox here**
sprite('yu250_03', 3) # 135-137 **attackbox here**
sprite('yu250_03', 3) # 138-140 **attackbox here**
sprite('yu250_03', 3) # 141-143 **attackbox here**
sprite('yu250_03', 3) # 144-146 **attackbox here**
sprite('yu250_03', 3) # 147-149 **attackbox here**
Unknown2053(1)
sprite('yu250_03', 3) # 150-152 **attackbox here**
sendToLabelUpon(2, 9)
label(1)
sprite('yu250_03', 3) # 153-155 **attackbox here**
sprite('yu250_03', 3) # 156-158 **attackbox here**
gotoLabel(1)
label(9)
sprite('yu232_02', 6) # 159-164
Unknown1084(1)
Unknown8000(-1, 1, 1)
sprite('yu232_03', 6) # 165-170
sprite('yu232_04', 6) # 171-176
sprite('yu010_01', 6) # 177-182
sprite('yu010_00', 7) # 183-189
endState()
@State
def CmnActChangeReturnAppealBurst():
sprite('yu064_02', 35) # 1-35
sprite('yu064_03', 5) # 36-40
sprite('yu010_02', 5) # 41-45
sprite('yu010_01', 5) # 46-50
sprite('yu010_00', 5) # 51-55
sprite('yu000_00', 5) # 56-60
loopRest()
@State
def CmnActAComboFinalBlow():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown9016(1)
def upon_LANDING():
sendToLabel(1)
sprite('null', 30) # 1-30
sprite('null', 1) # 31-31
teleportRelativeX(-25000)
Unknown1007(600000)
setGravity(0)
physicsYImpulse(-60000)
SLOT_12 = SLOT_19
Unknown1019(4)
label(0)
sprite('yu250_03', 3) # 32-34 **attackbox here**
loopRest()
gotoLabel(0)
label(1)
sprite('keep', 1) # 35-35
sprite('yu232_02', 5) # 36-40
if SLOT_3:
enterState('CmnActAComboFinalBlowFinish')
clearUponHandler(2)
Unknown1084(1)
Unknown8000(100, 1, 1)
sprite('yu232_03', 6) # 41-46
Unknown23022(0)
sprite('yu232_04', 6) # 47-52
sprite('yu010_01', 6) # 53-58
sprite('yu010_00', 7) # 59-65
@State
def CmnActAComboFinalBlowFinish():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown9017(1)
sprite('yu232_02', 3) # 1-3
sprite('yu232_03', 3) # 4-6
sprite('yu232_04', 3) # 7-9
sprite('yu010_01', 3) # 10-12
sprite('yu010_00', 3) # 13-15
sprite('yu450_00', 2) # 16-17
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_01', 2) # 18-19
Unknown23029(11, 502, 0)
Unknown4020(11)
sprite('yu450_02', 2) # 20-21
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 2) # 22-23
sprite('yu450_04', 2) # 24-25
sprite('yu450_05', 2) # 26-27
sprite('yu450_06', 2) # 28-29
sprite('yu450_07', 1) # 30-30
Unknown7009(4)
sprite('yu450_08', 1) # 31-31
sprite('yu450_09', 1) # 32-32
sprite('yu450_10', 2) # 33-34
sprite('yu450_11', 3) # 35-37
RefreshMultihit()
sprite('yu450_12', 3) # 38-40
sprite('yu450_13', 3) # 41-43
sprite('yu450_14', 3) # 44-46
sprite('yu450_12', 3) # 47-49
sprite('yu450_13', 3) # 50-52
sprite('yu450_14', 3) # 53-55
EnableCollision(1)
sprite('yu450_12', 3) # 56-58
sprite('yu450_13', 3) # 59-61
sprite('yu450_14', 3) # 62-64
sprite('yu450_15', 3) # 65-67
sprite('yu010_02', 1) # 68-68
sprite('yu010_01', 2) # 69-70
sprite('yu010_00', 2) # 71-72
Unknown4020(0)
@State
def NmlAtk5A():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
Unknown2006()
Unknown1112('')
Unknown14077(0)
def upon_43():
if (SLOT_48 == 106):
Unknown14077(1)
HitOrBlockCancel('NmlAtk5A2nd')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
HitOrBlockCancel('NmlAtkThrow')
HitOrBlockCancel('NmlAtkBackThrow')
if (SLOT_48 == 107):
sendToLabel(1)
if (SLOT_48 == 109):
Unknown2063()
sprite('yu205_00', 2) # 1-2
Unknown1051(70)
sprite('yu205_01', 2) # 3-4
sprite('yu205_02', 3) # 5-7
GFX_1('persona_enter_ply', 0)
Unknown23029(11, 102, 0)
Unknown7007('7079753132305f300000000000000000640000007079753132305f310000000000000000640000007079753132305f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu205_03', 5) # 8-12
sprite('yu205_04', 1) # 13-13
sprite('yu205_04', 3) # 14-16
sprite('yu205_02', 4) # 17-20
sprite('yu205_03', 1) # 21-21
sprite('yu205_03', 3) # 22-24
Recovery()
sprite('yu205_04', 4) # 25-28
sprite('yu205_02', 4) # 29-32
sprite('yu205_03', 4) # 33-36
sprite('yu205_04', 4) # 37-40
label(0)
sprite('yu205_02', 4) # 41-44
if (SLOT_51 >= 1):
gotoLabel(1)
SLOT_51 = (SLOT_51 + 1)
sprite('yu205_03', 4) # 45-48
sprite('yu205_04', 4) # 49-52
gotoLabel(0)
label(1)
sprite('yu205_05', 5) # 53-57
sprite('yu205_06', 6) # 58-63
@State
def NmlAtk5A2nd():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
def upon_43():
if (SLOT_48 == 105):
Unknown14072('NmlAtk5A3rd')
Unknown14072('NmlAtk5B')
Unknown14072('NmlAtk6B')
Unknown14072('NmlAtk4B')
Unknown14072('NmlAtk3B')
Unknown14072('NmlAtk1B')
Unknown14072('NmlAtk2B')
Unknown14072('NmlAtk2C')
Unknown14072('AgiA')
Unknown14072('AgiB')
Unknown14072('AgiEX')
Unknown14072('MaharagiA')
Unknown14072('MaharagiB')
Unknown14072('MaharagiEX')
Unknown14072('FireBoosterA')
Unknown14072('FireBoosterB')
Unknown14072('FireBoosterC')
Unknown14072('UltimateAgidine')
Unknown14072('UltimateAgidine_OD')
Unknown14072('UltimateMaharagidine')
Unknown14072('UltimateMaharagidineOD')
Unknown14072('CmnActCrushAttack')
Unknown14072('CmnActInvincibleAttack')
HitOrBlockJumpCancel(1)
sprite('yu206_00', 3) # 1-3
sprite('yu206_01', 3) # 4-6
Unknown23029(11, 101, 0)
SFX_1('pyu123_2')
sprite('yu206_02', 3) # 7-9
sprite('yu206_03', 3) # 10-12
GFX_1('persona_enter_ply', 0)
sprite('yu206_04', 3) # 13-15
sprite('yu206_05', 3) # 16-18
sprite('yu206_03', 3) # 19-21
Unknown14070('NmlAtk5A3rd')
Unknown14070('NmlAtk5B')
Unknown14070('NmlAtk6B')
Unknown14070('NmlAtk4B')
Unknown14070('NmlAtk3B')
Unknown14070('NmlAtk1B')
Unknown14070('NmlAtk2B')
Unknown14070('NmlAtk2C')
Unknown14070('AgiA')
Unknown14070('AgiB')
Unknown14070('AgiEX')
Unknown14070('MaharagiA')
Unknown14070('MaharagiB')
Unknown14070('MaharagiEX')
Unknown14070('FireBoosterA')
Unknown14070('FireBoosterB')
Unknown14070('FireBoosterC')
Unknown14070('UltimateAgidine')
Unknown14070('UltimateAgidine_OD')
Unknown14070('UltimateMaharagidine')
Unknown14070('UltimateMaharagidineOD')
Unknown14070('CmnActCrushAttack')
Unknown14070('CmnActInvincibleAttack')
HitOrBlockCancel('NmlAtkThrow')
HitOrBlockCancel('NmlAtkBackThrow')
sprite('yu206_04', 3) # 22-24
Recovery()
sprite('yu206_05', 3) # 25-27
sprite('yu206_03', 2) # 28-29
sprite('yu206_03', 1) # 30-30
Unknown14074('NmlAtk5A3rd')
Unknown14074('NmlAtk5B')
Unknown14074('NmlAtk6B')
Unknown14074('NmlAtk4B')
Unknown14074('NmlAtk3B')
Unknown14074('NmlAtk1B')
Unknown14074('NmlAtk2B')
Unknown14074('NmlAtk2C')
Unknown14074('NmlAtk5A2nd')
Unknown14074('NmlAtk5B')
Unknown14074('NmlAtk2B')
Unknown14074('AgiA')
Unknown14074('AgiB')
Unknown14074('AgiEX')
Unknown14074('MaharagiA')
Unknown14074('MaharagiB')
Unknown14074('MaharagiEX')
Unknown14074('FireBoosterA')
Unknown14074('FireBoosterB')
Unknown14074('FireBoosterC')
Unknown14074('UltimateAgidine')
Unknown14074('UltimateAgidine_OD')
Unknown14074('UltimateMaharagidine')
Unknown14074('UltimateMaharagidineOD')
Unknown14074('CmnActCrushAttack')
Unknown14074('CmnActInvincibleAttack')
sprite('yu206_04', 3) # 31-33
sprite('yu206_05', 3) # 34-36
sprite('yu206_03', 3) # 37-39
sprite('yu206_04', 3) # 40-42
sprite('yu206_06', 3) # 43-45
sprite('yu206_07', 3) # 46-48
sprite('yu206_08', 3) # 49-51
sprite('yu206_09', 3) # 52-54
@State
def NmlAtk5A3rd():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
def upon_43():
if (SLOT_48 == 202):
Unknown14072('NmlAtk5A4th')
Unknown14072('NmlAtk5B')
Unknown14072('NmlAtk6B')
Unknown14072('NmlAtk4B')
Unknown14072('NmlAtk3B')
Unknown14072('NmlAtk1B')
Unknown14072('NmlAtk2B')
Unknown14072('NmlAtk2C')
Unknown14072('AgiA')
Unknown14072('AgiB')
Unknown14072('AgiEX')
Unknown14072('MaharagiA')
Unknown14072('MaharagiB')
Unknown14072('MaharagiEX')
Unknown14072('FireBoosterA')
Unknown14072('FireBoosterB')
Unknown14072('FireBoosterC')
Unknown14072('UltimateAgidine')
Unknown14072('UltimateAgidine_OD')
Unknown14072('UltimateMaharagidine')
Unknown14072('UltimateMaharagidineOD')
Unknown14072('CmnActCrushAttack')
Unknown14072('CmnActInvincibleAttack')
if (SLOT_48 == 210):
Unknown14074('NmlAtk5A4th')
Unknown14074('NmlAtk5B')
Unknown14074('NmlAtk6B')
Unknown14074('NmlAtk4B')
Unknown14074('NmlAtk3B')
Unknown14074('NmlAtk1B')
Unknown14074('NmlAtk2B')
Unknown14074('NmlAtk2C')
Unknown14074('NmlAtk5A2nd')
Unknown14074('NmlAtk5B')
Unknown14074('NmlAtk2B')
Unknown14074('AgiA')
Unknown14074('AgiB')
Unknown14074('AgiEX')
Unknown14074('MaharagiA')
Unknown14074('MaharagiB')
Unknown14074('MaharagiEX')
Unknown14074('FireBoosterA')
Unknown14074('FireBoosterB')
Unknown14074('FireBoosterC')
Unknown14074('UltimateAgidine')
Unknown14074('UltimateAgidine_OD')
Unknown14074('UltimateMaharagidine')
Unknown14074('UltimateMaharagidineOD')
Unknown14074('CmnActCrushAttack')
Unknown14074('CmnActInvincibleAttack')
sprite('yu401_00', 2) # 1-2
sprite('yu401_01', 1) # 3-3
Unknown23029(11, 201, 0)
sprite('yu401_01', 1) # 4-4
sprite('yu401_02', 2) # 5-6
sprite('yu401_03', 1) # 7-7
sprite('yu401_03', 1) # 8-8
sprite('yu401_04', 3) # 9-11
Unknown7007('7079753132335f31000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu401_05', 3) # 12-14
Unknown14070('NmlAtk5A4th')
Unknown14070('NmlAtk5B')
Unknown14070('NmlAtk6B')
Unknown14070('NmlAtk4B')
Unknown14070('NmlAtk3B')
Unknown14070('NmlAtk1B')
Unknown14070('NmlAtk2B')
Unknown14070('NmlAtk2C')
Unknown14070('AgiA')
Unknown14070('AgiB')
Unknown14070('AgiEX')
Unknown14070('MaharagiA')
Unknown14070('MaharagiB')
Unknown14070('MaharagiEX')
Unknown14070('FireBoosterA')
Unknown14070('FireBoosterB')
Unknown14070('FireBoosterC')
Unknown14070('UltimateAgidine')
Unknown14070('UltimateAgidine_OD')
Unknown14070('UltimateMaharagidine')
Unknown14070('UltimateMaharagidineOD')
Unknown14070('CmnActCrushAttack')
Unknown14070('CmnActInvincibleAttack')
sprite('yu401_06', 3) # 15-17
sprite('yu401_05', 1) # 18-18
Recovery()
sprite('yu401_05', 1) # 19-19
sprite('yu401_04', 3) # 20-22
sprite('yu401_05', 3) # 23-25
sprite('yu401_06', 1) # 26-26
sprite('yu401_06', 2) # 27-28
sprite('yu401_05', 3) # 29-31
sprite('yu401_04', 3) # 32-34
sprite('yu401_05', 3) # 35-37
sprite('yu401_03', 3) # 38-40
sprite('yu401_02', 3) # 41-43
sprite('yu401_01', 3) # 44-46
sprite('yu401_00', 3) # 47-49
@State
def NmlAtk5A4th():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
JumpCancel_(0)
def upon_STATE_END():
SLOT_4 = 0
if Unknown23145('NmlAtk5A3rd'):
SLOT_4 = 1
sprite('yu404_00', 3) # 1-3
Unknown1084(1)
sprite('yu404_01', 4) # 4-7
Unknown23029(11, 5020, 0)
Unknown7007('7079753231305f300000000000000000640000007079753231305f310000000000000000640000007079753231305f320000000000000000640000007079753231315f32000000000000000064000000')
sprite('yu404_02', 4) # 8-11
GFX_1('persona_enter_ply', 0)
sprite('yu404_03', 3) # 12-14
physicsXImpulse(-10000)
sprite('yu404_03', 3) # 15-17
Unknown1019(120)
sprite('yu404_04', 3) # 18-20
Unknown1019(110)
sprite('yu404_04', 3) # 21-23
Unknown1019(100)
sprite('yu404_05', 2) # 24-25
Unknown1019(50)
sprite('yu404_05', 1) # 26-26
sprite('yu404_05', 3) # 27-29
Unknown1019(50)
sprite('yu404_06', 3) # 30-32
Unknown1019(50)
Recovery()
Unknown2063()
sprite('yu404_06', 5) # 33-37
sprite('yu404_07', 9) # 38-46
Unknown1084(1)
sprite('yu404_08', 9) # 47-55
@State
def NmlAtk4A():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
AttackLevel_(3)
Damage(1000)
PushbackX(9000)
AirPushbackY(10000)
Unknown9016(1)
Unknown1112('')
HitOrBlockCancel('NmlAtk4A2nd')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2A')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
HitOrBlockCancel('NmlAtkThrow')
HitOrBlockCancel('NmlAtkBackThrow')
HitOrBlockJumpCancel(1)
sprite('yu200_00', 3) # 1-3
sprite('yu200_00', 1) # 4-4
Unknown1051(80)
sprite('yu200_01', 5) # 5-9
physicsXImpulse(8000)
sprite('yu200_02', 4) # 10-13 **attackbox here**
Unknown1019(0)
SFX_3('slash_rapier_fast')
RefreshMultihit()
Unknown7007('7079753130305f300000000000000000640000007079753130305f310000000000000000640000007079753130305f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu200_03', 3) # 14-16
Recovery()
Unknown2063()
sprite('yu200_04', 3) # 17-19
sprite('yu200_05', 3) # 20-22
sprite('yu200_06', 3) # 23-25
sprite('yu200_07', 3) # 26-28
@State
def NmlAtk4A2nd():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
AttackLevel_(3)
Damage(1000)
AirPushbackY(15000)
Unknown9016(1)
HitOrBlockCancel('NmlAtk4A3nd')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
HitOrBlockCancel('NmlAtkThrow')
HitOrBlockCancel('NmlAtkBackThrow')
HitOrBlockJumpCancel(1)
sprite('yu201_00', 3) # 1-3
physicsXImpulse(5000)
sprite('yu201_01', 3) # 4-6
sprite('yu201_02', 3) # 7-9
sprite('yu201_03', 3) # 10-12 **attackbox here**
Unknown1084(1)
RefreshMultihit()
SFX_3('slash_rapier_fast')
Unknown7007('7079753130315f300000000000000000640000007079753130315f310000000000000000640000007079753130315f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu201_04', 2) # 13-14 **attackbox here**
Recovery()
Unknown2063()
sprite('yu201_05', 2) # 15-16
sprite('yu201_06', 4) # 17-20
sprite('yu201_07', 3) # 21-23
sprite('yu201_08', 3) # 24-26
endState()
@State
def NmlAtk4A3nd():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
AttackLevel_(4)
Damage(1200)
AirPushbackX(10000)
AirPushbackY(-20000)
PushbackX(20000)
AirUntechableTime(30)
Unknown9310(1)
AirHitstunAnimation(9)
Unknown9016(1)
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk4A4th')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
HitJumpCancel(1)
sprite('yu202_00', 5) # 1-5
physicsXImpulse(8000)
sprite('yu202_01', 3) # 6-8
sprite('yu202_02', 3) # 9-11
Unknown7007('7079753130325f300000000000000000640000007079753130325f310000000000000000640000007079753130325f320000000000000000640000000000000000000000000000000000000000000000')
Unknown1019(90)
sprite('yu202_03', 3) # 12-14 **attackbox here**
Unknown1019(90)
sprite('yu202_04', 3) # 15-17 **attackbox here**
Unknown1019(0)
SFX_3('slash_rapier_middle')
sprite('yu202_05', 3) # 18-20
Recovery()
Unknown2063()
sprite('yu202_06', 3) # 21-23
sprite('yu202_07', 3) # 24-26
sprite('yu202_08', 5) # 27-31
sprite('yu202_09', 3) # 32-34
sprite('yu202_10', 3) # 35-37
sprite('yu202_11', 3) # 38-40
@State
def NmlAtk2A():
def upon_IMMEDIATE():
AttackDefaults_CrouchingNormal()
AttackLevel_(2)
AttackP1(90)
HitLow(2)
WhiffCancel('NmlAtk2A')
HitOrBlockCancel('NmlAtk4A')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
HitOrBlockCancel('NmlAtkThrow')
HitOrBlockCancel('NmlAtkBackThrow')
sprite('yu230_00', 4) # 1-4
sprite('yu230_01', 3) # 5-7
Unknown1051(80)
sprite('yu230_02', 2) # 8-9 **attackbox here**
SFX_3('hit_l_fast')
RefreshMultihit()
Unknown7009(0)
sprite('yu230_03', 3) # 10-12
Recovery()
WhiffCancelEnable(1)
sprite('yu230_05', 4) # 13-16
sprite('yu230_04', 4) # 17-20
sprite('yu230_00', 3) # 21-23
@State
def NmlAtk5B():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
Unknown1112('')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu203_00', 3) # 1-3
sprite('yu203_01', 1) # 4-4
sprite('yu203_01', 1) # 5-5
sprite('yu203_02', 4) # 6-9
Unknown14070('NmlAtk5B2nd')
Unknown14070('NmlAtk5B2nd_Front')
Unknown14070('NmlAtk5B2nd_Back')
sprite('yu203_03', 2) # 10-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A', 0)
sprite('yu203_04', 2) # 12-13
sprite('yu203_05', 2) # 14-15
Unknown14072('NmlAtk5B2nd')
Unknown14072('NmlAtk5B2nd_Front')
Unknown14072('NmlAtk5B2nd_Back')
sprite('yu203_06', 3) # 16-18
sprite('yu203_07', 3) # 19-21
sprite('yu203_08', 3) # 22-24
Recovery()
Unknown2063()
sprite('yu203_09', 5) # 25-29
sprite('yu203_10', 7) # 30-36
Unknown14074('NmlAtk5B2nd')
Unknown14074('NmlAtk5B2nd_Front')
Unknown14074('NmlAtk5B2nd_Back')
sprite('yu203_11', 5) # 37-41
SFX_3('yu000')
sprite('yu203_12', 5) # 42-46
@State
def NmlAtk6B():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
Unknown1112('')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu203_00', 3) # 1-3
sprite('yu203_01', 1) # 4-4
sprite('yu203_01', 1) # 5-5
sprite('yu203_02', 4) # 6-9
Unknown14070('NmlAtk5B2nd')
Unknown14070('NmlAtk5B2nd_Front')
Unknown14070('NmlAtk5B2nd_Back')
sprite('yu203_03', 2) # 10-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A', 0)
Unknown23029(1, 1011, 0)
sprite('yu203_04', 3) # 12-14
sprite('yu203_05', 3) # 15-17
Unknown14072('NmlAtk5B2nd')
Unknown14072('NmlAtk5B2nd_Front')
Unknown14072('NmlAtk5B2nd_Back')
sprite('yu203_06', 3) # 18-20
sprite('yu203_07', 3) # 21-23
sprite('yu203_08', 3) # 24-26
Recovery()
Unknown2063()
sprite('yu203_09', 4) # 27-30
sprite('yu203_10', 6) # 31-36
Unknown14074('NmlAtk5B2nd')
Unknown14074('NmlAtk5B2nd_Front')
Unknown14074('NmlAtk5B2nd_Back')
sprite('yu203_11', 5) # 37-41
SFX_3('yu000')
sprite('yu203_12', 5) # 42-46
@State
def NmlAtk4B():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
Unknown1112('')
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2B')
HitOrBlockCancel('NmlAtk3B')
HitOrBlockCancel('NmlAtk1B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu203_00', 3) # 1-3
sprite('yu203_01', 1) # 4-4
sprite('yu203_01', 1) # 5-5
sprite('yu203_02', 4) # 6-9
Unknown14070('NmlAtk5B2nd')
Unknown14070('NmlAtk5B2nd_Front')
Unknown14070('NmlAtk5B2nd_Back')
sprite('yu203_03', 2) # 10-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A', 0)
Unknown23029(1, 1012, 0)
sprite('yu203_04', 3) # 12-14
sprite('yu203_05', 3) # 15-17
Unknown14072('NmlAtk5B2nd')
Unknown14072('NmlAtk5B2nd_Front')
Unknown14072('NmlAtk5B2nd_Back')
sprite('yu203_06', 3) # 18-20
sprite('yu203_07', 3) # 21-23
sprite('yu203_08', 3) # 24-26
Recovery()
Unknown2063()
sprite('yu203_09', 4) # 27-30
sprite('yu203_10', 6) # 31-36
Unknown14074('NmlAtk5B2nd')
Unknown14074('NmlAtk5B2nd_Front')
Unknown14074('NmlAtk5B2nd_Back')
sprite('yu203_11', 5) # 37-41
SFX_3('yu000')
sprite('yu203_12', 5) # 42-46
@State
def NmlAtk5B2nd():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu204_00', 2) # 1-2
sprite('yu204_01', 1) # 3-3
sprite('yu204_01', 2) # 4-5
sprite('yu204_02', 3) # 6-8
sprite('yu204_03', 3) # 9-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A_2nd', 0)
sprite('yu204_04', 4) # 12-15
sprite('yu204_05', 4) # 16-19
sprite('yu204_06', 4) # 20-23
sprite('yu204_07', 4) # 24-27
sprite('yu204_08', 4) # 28-31
sprite('yu204_09', 4) # 32-35
Recovery()
Unknown2063()
sprite('yu203_10', 3) # 36-38
sprite('yu203_10', 1) # 39-39
sprite('yu203_11', 2) # 40-41
SFX_3('yu000')
sprite('yu203_11', 3) # 42-44
sprite('yu203_12', 4) # 45-48
@State
def NmlAtk5B2nd_Front():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu204_00', 2) # 1-2
sprite('yu204_01', 1) # 3-3
sprite('yu204_01', 2) # 4-5
sprite('yu204_02', 3) # 6-8
sprite('yu204_03', 3) # 9-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A_2nd', 0)
Unknown23029(1, 1011, 0)
sprite('yu204_04', 4) # 12-15
sprite('yu204_05', 4) # 16-19
sprite('yu204_06', 4) # 20-23
sprite('yu204_07', 4) # 24-27
sprite('yu204_08', 4) # 28-31
sprite('yu204_09', 4) # 32-35
Recovery()
Unknown2063()
sprite('yu203_10', 3) # 36-38
sprite('yu203_10', 1) # 39-39
sprite('yu203_11', 2) # 40-41
SFX_3('yu000')
sprite('yu203_11', 3) # 42-44
sprite('yu203_12', 5) # 45-49
@State
def NmlAtk5B2nd_Back():
def upon_IMMEDIATE():
AttackDefaults_StandingNormal()
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu204_00', 2) # 1-2
sprite('yu204_01', 1) # 3-3
sprite('yu204_01', 2) # 4-5
sprite('yu204_02', 3) # 6-8
sprite('yu204_03', 3) # 9-11
Unknown7007('7079753130325f310000000000000000640000007079753330325f300000000000000000640000007079753330365f310000000000000000640000000000000000000000000000000000000000000000')
GFX_0('Sensu_Stand_A_2nd', 0)
Unknown23029(1, 1012, 0)
sprite('yu204_04', 4) # 12-15
sprite('yu204_05', 4) # 16-19
sprite('yu204_06', 4) # 20-23
sprite('yu204_07', 4) # 24-27
sprite('yu204_08', 4) # 28-31
sprite('yu204_09', 4) # 32-35
Recovery()
Unknown2063()
sprite('yu203_10', 3) # 36-38
sprite('yu203_10', 2) # 39-40
sprite('yu203_11', 2) # 41-42
SFX_3('yu000')
sprite('yu203_11', 4) # 43-46
sprite('yu203_12', 6) # 47-52
@State
def NmlAtk2B():
def upon_IMMEDIATE():
AttackDefaults_CrouchingNormal()
HitOrBlockJumpCancel(1)
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu231_00', 4) # 1-4
sprite('yu231_01', 5) # 5-9
sprite('yu231_02', 4) # 10-13
setInvincible(1)
Unknown22019('0100000000000000000000000000000000000000')
sprite('yu231_03', 1) # 14-14
Unknown7007('7079753330335f300000000000000000640000007079753330335f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
GFX_0('Sensu_2A', 0)
GFX_0('Sensu_2A', 0)
Unknown23029(1, 1021, 0)
sprite('yu231_03', 2) # 15-16
sprite('yu231_04', 4) # 17-20
setInvincible(0)
sprite('yu231_05', 4) # 21-24
sprite('yu231_06', 3) # 25-27
Recovery()
Unknown2063()
sprite('yu231_07', 3) # 28-30
sprite('yu231_08', 2) # 31-32
sprite('yu231_09', 5) # 33-37
SFX_3('yu000')
sprite('yu231_10', 5) # 38-42
@State
def NmlAtk3B():
def upon_IMMEDIATE():
AttackDefaults_CrouchingNormal()
HitOrBlockJumpCancel(1)
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu231_00', 4) # 1-4
sprite('yu231_01', 5) # 5-9
sprite('yu231_02', 4) # 10-13
setInvincible(1)
Unknown22019('0100000000000000000000000000000000000000')
sprite('yu231_03', 1) # 14-14
Unknown7007('7079753330335f300000000000000000640000007079753330335f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
GFX_0('Sensu_2A', 0)
GFX_0('Sensu_2A', 0)
Unknown23029(1, 1021, 0)
sprite('yu231_03', 2) # 15-16
sprite('yu231_04', 4) # 17-20
setInvincible(0)
sprite('yu231_05', 4) # 21-24
sprite('yu231_06', 3) # 25-27
Recovery()
Unknown2063()
sprite('yu231_07', 3) # 28-30
sprite('yu231_08', 2) # 31-32
sprite('yu231_09', 5) # 33-37
SFX_3('yu000')
sprite('yu231_10', 5) # 38-42
@State
def NmlAtk1B():
def upon_IMMEDIATE():
AttackDefaults_CrouchingNormal()
HitOrBlockJumpCancel(1)
HitOrBlockCancel('NmlAtk5A')
HitOrBlockCancel('NmlAtk5B')
HitOrBlockCancel('NmlAtk6B')
HitOrBlockCancel('NmlAtk4B')
HitOrBlockCancel('NmlAtk2C')
HitOrBlockCancel('CmnActCrushAttack')
sprite('yu231_00', 4) # 1-4
sprite('yu231_01', 5) # 5-9
sprite('yu231_02', 4) # 10-13
setInvincible(1)
Unknown22019('0100000000000000000000000000000000000000')
sprite('yu231_03', 1) # 14-14
Unknown7007('7079753330335f300000000000000000640000007079753330335f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
GFX_0('Sensu_2A', 0)
GFX_0('Sensu_2A', 0)
Unknown23029(1, 1022, 0)
sprite('yu231_03', 2) # 15-16
sprite('yu231_04', 4) # 17-20
setInvincible(0)
sprite('yu231_05', 4) # 21-24
sprite('yu231_06', 3) # 25-27
Recovery()
Unknown2063()
sprite('yu231_07', 3) # 28-30
sprite('yu231_08', 2) # 31-32
sprite('yu231_09', 5) # 33-37
SFX_3('yu000')
sprite('yu231_10', 5) # 38-42
@State
def NmlAtk2C():
def upon_IMMEDIATE():
AttackDefaults_CrouchingNormal()
AttackLevel_(3)
AttackP1(90)
HitLow(2)
AirPushbackX(6000)
AirPushbackY(13500)
AirUntechableTime(30)
AirHitstunAnimation(11)
GroundedHitstunAnimation(11)
Unknown9016(1)
HitJumpCancel(1)
sprite('yu211_00', 3) # 1-3
sprite('yu211_01', 2) # 4-5
sprite('yu211_02', 2) # 6-7
sprite('yu211_04', 2) # 8-9
sprite('yu211_06', 3) # 10-12 **attackbox here**
Unknown23054('79753231315f303500000000000000000000000000000000000000000000000003000000')
RefreshMultihit()
Unknown7007('7079753130375f300000000000000000640000007079753130375f310000000000000000640000007079753130375f320000000000000000640000000000000000000000000000000000000000000000')
SFX_3('slash_rapier_fast')
sprite('yu211_06', 2) # 13-14 **attackbox here**
sprite('yu211_07', 4) # 15-18
Recovery()
sprite('yu211_08', 4) # 19-22
sprite('yu211_09', 4) # 23-26
sprite('yu211_10', 3) # 27-29
@State
def NmlAtkAIR5A():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
AttackLevel_(3)
Damage(1000)
AirUntechableTime(21)
Unknown9016(1)
HitOrBlockJumpCancel(1)
HitOrBlockCancel('NmlAtkAIR5A2nd')
HitOrBlockCancel('NmlAtkAIR5B')
HitOrBlockCancel('NmlAtkAIR6B')
HitOrBlockCancel('NmlAtkAIR4B')
HitOrBlockCancel('NmlAtkAIR5C')
sprite('yu250_00', 3) # 1-3
sprite('yu250_01', 3) # 4-6
sprite('yu250_02', 3) # 7-9
SFX_3('slash_rapier_fast')
sprite('yu250_03', 3) # 10-12 **attackbox here**
RefreshMultihit()
Unknown7007('7079753130305f300000000000000000640000007079753130305f310000000000000000640000007079753130305f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu250_04', 3) # 13-15
Recovery()
Unknown2063()
sprite('yu250_05', 5) # 16-20
sprite('yu250_06', 5) # 21-25
@State
def NmlAtkAIR5A2nd():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
AttackLevel_(3)
Damage(1000)
AirUntechableTime(21)
Unknown9016(1)
HitOrBlockJumpCancel(1)
HitOrBlockCancel('NmlAtkAIR5A2nd')
HitOrBlockCancel('NmlAtkAIR5B')
HitOrBlockCancel('NmlAtkAIR6B')
HitOrBlockCancel('NmlAtkAIR4B')
HitOrBlockCancel('NmlAtkAIR5C')
sprite('yu250_01', 3) # 1-3
sprite('yu250_02', 3) # 4-6
SFX_3('slash_rapier_fast')
sprite('yu250_03', 3) # 7-9 **attackbox here**
RefreshMultihit()
Unknown7009(0)
sprite('yu250_04', 3) # 10-12
Recovery()
Unknown2063()
sprite('yu250_05', 5) # 13-17
sprite('yu250_06', 5) # 18-22
@State
def NmlAtkAIR5B():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
HitOrBlockCancel('NmlAtkAIR5C')
HitJumpCancel(1)
sprite('yu251_00', 4) # 1-4
sprite('yu251_01', 3) # 5-7
Unknown1039(80)
sprite('yu251_02', 2) # 8-9
sprite('yu251_03', 2) # 10-11
Unknown1019(50)
sprite('yu251_04', 3) # 12-14
Unknown22004(6, 1)
Unknown1019(50)
Unknown7007('7079753330345f300000000000000000640000007079753330345f310000000000000000640000007079753330325f300000000000000000640000007079753330365f31000000000000000064000000')
GFX_0('Sensu_Air', 0)
sprite('yu251_05', 2) # 15-16
Unknown1019(50)
sprite('yu251_06', 2) # 17-18
sprite('yu251_07', 2) # 19-20
sprite('yu251_08', 2) # 21-22
Recovery()
Unknown2063()
sprite('yu251_09', 3) # 23-25
sprite('yu251_10', 3) # 26-28
sprite('yu251_11', 3) # 29-31
SFX_3('yu000')
sprite('yu251_12', 3) # 32-34
@State
def NmlAtkAIR6B():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
HitOrBlockCancel('NmlAtkAIR5C')
HitJumpCancel(1)
sprite('yu251_00', 4) # 1-4
sprite('yu251_01', 3) # 5-7
Unknown1039(80)
sprite('yu251_02', 2) # 8-9
sprite('yu251_03', 2) # 10-11
Unknown1019(50)
sprite('yu251_04', 3) # 12-14
Unknown22004(8, 1)
Unknown1019(50)
Unknown7007('7079753330345f300000000000000000640000007079753330345f310000000000000000640000007079753330325f300000000000000000640000007079753330365f31000000000000000064000000')
GFX_0('Sensu_Air', 0)
Unknown23029(1, 1031, 0)
sprite('yu251_05', 2) # 15-16
Unknown1019(50)
sprite('yu251_06', 2) # 17-18
sprite('yu251_07', 2) # 19-20
sprite('yu251_08', 2) # 21-22
Recovery()
Unknown2063()
sprite('yu251_09', 3) # 23-25
sprite('yu251_10', 1) # 26-26
sprite('yu251_10', 2) # 27-28
sprite('yu251_11', 3) # 29-31
SFX_3('yu000')
sprite('yu251_12', 3) # 32-34
@State
def NmlAtkAIR4B():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
HitOrBlockCancel('NmlAtkAIR5C')
HitJumpCancel(1)
sprite('yu251_00', 4) # 1-4
sprite('yu251_01', 3) # 5-7
Unknown1039(80)
sprite('yu251_02', 2) # 8-9
sprite('yu251_03', 2) # 10-11
Unknown1019(50)
sprite('yu251_04', 3) # 12-14
Unknown1019(50)
Unknown7007('7079753330345f300000000000000000640000007079753330345f310000000000000000640000007079753330325f300000000000000000640000007079753330365f31000000000000000064000000')
GFX_0('Sensu_Air', 0)
Unknown23029(1, 1032, 0)
sprite('yu251_05', 2) # 15-16
Unknown1019(50)
sprite('yu251_06', 2) # 17-18
sprite('yu251_07', 2) # 19-20
sprite('yu251_08', 2) # 21-22
Recovery()
Unknown2063()
sprite('yu251_09', 3) # 23-25
sprite('yu251_10', 1) # 26-26
sprite('yu251_10', 2) # 27-28
sprite('yu251_11', 3) # 29-31
SFX_3('yu000')
sprite('yu251_12', 3) # 32-34
@State
def NmlAtkAIR5C():
def upon_IMMEDIATE():
AttackDefaults_AirNormal()
def upon_43():
if (SLOT_48 == 5031):
JumpCancel_(1)
def upon_LANDING():
sendToLabel(1)
loopRelated(17, 300)
def upon_17():
clearUponHandler(17)
Unknown1043()
sprite('yu254_00', 3) # 1-3
sprite('yu254_01', 2) # 4-5
Unknown1017()
Unknown1022()
Unknown1037()
Unknown1084(1)
GFX_1('persona_enter_ply', 0)
Unknown7007('7079753132345f300000000000000000640000007079753132345f310000000000000000640000007079753132345f320000000000000000640000000000000000000000000000000000000000000000')
Unknown23029(11, 302, 0)
sprite('yu254_02', 3) # 6-8
sprite('yu254_03', 3) # 9-11
sprite('yu254_01', 3) # 12-14
sprite('yu254_02', 3) # 15-17
sprite('yu254_03', 3) # 18-20
sprite('yu254_01', 3) # 21-23
sprite('yu254_02', 3) # 24-26
sprite('yu254_03', 3) # 27-29
sprite('yu254_01', 3) # 30-32
sprite('yu254_02', 3) # 33-35
sprite('yu254_04', 3) # 36-38
Recovery()
Unknown1018()
Unknown1023()
Unknown1038()
Unknown1019(40)
YAccel(85)
sprite('yu254_05', 3) # 39-41
sprite('yu254_06', 3) # 42-44
sprite('yu020_05', 3) # 45-47
sprite('yu020_06', 3) # 48-50
label(0)
sprite('yu020_07', 4) # 51-54
sprite('yu020_08', 4) # 55-58
gotoLabel(0)
label(1)
@State
def CmnActCrushAttack():
def upon_IMMEDIATE():
Unknown30072('')
Unknown9016(1)
sprite('yu210_00', 2) # 1-2
sprite('yu210_01', 3) # 3-5
sprite('yu210_02', 3) # 6-8
sprite('yu210_03', 2) # 9-10
sprite('yu210_03', 2) # 11-12
Unknown7007('7079753130355f300000000000000000640000007079753130355f310000000000000000640000007079753130355f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu210_04', 2) # 13-14
physicsXImpulse(15000)
GFX_0('sensu_sakura', 0)
sprite('yu210_04', 3) # 15-17
GFX_0('sensu_sakura', 0)
sprite('yu210_05', 4) # 18-21
GFX_0('sensu_sakura', 0)
sprite('yu210_06', 4) # 22-25
Unknown1019(80)
GFX_0('sensu_sakura', 0)
sprite('yu210_07', 3) # 26-28 **attackbox here**
Unknown1019(80)
GFX_0('sensu_sakura', 0)
SFX_3('slash_rapier_middle')
sprite('yu210_08', 1) # 29-29 **attackbox here**
Unknown2003(1)
physicsXImpulse(0)
GFX_0('sensu_sakura', 0)
sprite('yu210_08', 3) # 30-32 **attackbox here**
sprite('yu210_09', 3) # 33-35
GFX_0('sensu_sakura', 0)
sprite('yu210_10', 3) # 36-38
sprite('yu210_11', 4) # 39-42
SFX_3('yu001')
sprite('yu210_12', 4) # 43-46
@State
def CmnActCrushAttackChase1st():
def upon_IMMEDIATE():
Unknown30073(0)
DisableAttackRestOfMove()
Unknown9016(1)
EnableCollision(0)
def upon_STATE_END():
EnableCollision(1)
loopRelated(17, 180)
def upon_17():
clearUponHandler(17)
sendToLabel(1)
sprite('keep', 1) # 1-1
sprite('yu205_00', 7) # 2-8
sprite('yu205_01', 7) # 9-15
sprite('yu205_02', 2) # 16-17
Unknown23029(11, 501, 0)
Unknown4020(11)
GFX_1('persona_enter_ply', 0)
tag_voice(1, 'pyu208_2', 'pyu302_1', '', '')
sprite('yu205_02', 4) # 18-21
sprite('yu205_02', 3) # 22-24
sprite('yu205_03', 3) # 25-27
sprite('yu205_04', 2) # 28-29
sprite('yu205_04', 1) # 30-30
RefreshMultihit()
sprite('yu205_04', 1) # 31-31
sprite('yu205_04', 1) # 32-32
sprite('yu205_02', 3) # 33-35
sprite('yu205_03', 3) # 36-38
sprite('yu205_04', 3) # 39-41
sprite('yu205_05', 4) # 42-45
sprite('yu205_06', 5) # 46-50
sprite('yu000_00', 6) # 51-56
sprite('yu000_01', 6) # 57-62
sprite('yu000_02', 6) # 63-68
sprite('yu000_03', 6) # 69-74
sprite('yu000_04', 6) # 75-80
sprite('yu000_05', 6) # 81-86
sprite('yu000_06', 6) # 87-92
sprite('yu000_07', 6) # 93-98
sprite('yu000_08', 6) # 99-104
sprite('yu000_09', 6) # 105-110
sprite('yu000_10', 6) # 111-116
sprite('yu000_11', 6) # 117-122
sprite('yu000_12', 6) # 123-128
sprite('yu000_13', 6) # 129-134
sprite('yu000_14', 6) # 135-140
sprite('yu000_15', 6) # 141-146
Unknown4020(0)
label(0)
sprite('yu000_00', 6) # 147-152
sprite('yu000_01', 6) # 153-158
sprite('yu000_02', 6) # 159-164
sprite('yu000_03', 6) # 165-170
sprite('yu000_04', 6) # 171-176
sprite('yu000_05', 6) # 177-182
sprite('yu000_06', 6) # 183-188
sprite('yu000_07', 6) # 189-194
sprite('yu000_08', 6) # 195-200
sprite('yu000_09', 6) # 201-206
sprite('yu000_10', 6) # 207-212
sprite('yu000_11', 6) # 213-218
sprite('yu000_12', 6) # 219-224
sprite('yu000_13', 6) # 225-230
sprite('yu000_14', 6) # 231-236
sprite('yu000_15', 6) # 237-242
loopRest()
gotoLabel(0)
label(1)
sprite('keep', 1) # 243-243
@State
def CmnActCrushAttackChase2nd():
def upon_IMMEDIATE():
Unknown30074(0)
DisableAttackRestOfMove()
Unknown9016(1)
EnableCollision(0)
def upon_STATE_END():
EnableCollision(1)
loopRelated(17, 180)
def upon_17():
clearUponHandler(17)
sendToLabel(1)
sprite('yu206_00', 3) # 1-3
sprite('yu206_01', 2) # 4-5
sprite('yu206_01', 3) # 6-8
sprite('yu206_02', 3) # 9-11
sprite('yu206_03', 3) # 12-14
Unknown23029(11, 503, 0)
Unknown4020(11)
GFX_1('persona_enter_ply', 0)
sprite('yu206_04', 3) # 15-17
RefreshMultihit()
sprite('yu206_05', 3) # 18-20
sprite('yu206_03', 3) # 21-23
sprite('yu206_04', 3) # 24-26
Recovery()
sprite('yu206_05', 3) # 27-29
sprite('yu206_03', 3) # 30-32
sprite('yu206_04', 3) # 33-35
sprite('yu206_05', 3) # 36-38
sprite('yu206_03', 3) # 39-41
sprite('yu206_04', 3) # 42-44
sprite('yu206_06', 3) # 45-47
sprite('yu206_07', 3) # 48-50
sprite('yu206_08', 3) # 51-53
sprite('yu206_09', 3) # 54-56
sprite('yu000_00', 6) # 57-62
sprite('yu000_01', 6) # 63-68
sprite('yu000_02', 6) # 69-74
sprite('yu000_03', 6) # 75-80
sprite('yu000_04', 6) # 81-86
sprite('yu000_05', 6) # 87-92
sprite('yu000_06', 6) # 93-98
sprite('yu000_07', 6) # 99-104
sprite('yu000_08', 6) # 105-110
sprite('yu000_09', 6) # 111-116
sprite('yu000_10', 6) # 117-122
sprite('yu000_11', 6) # 123-128
sprite('yu000_12', 6) # 129-134
sprite('yu000_13', 6) # 135-140
sprite('yu000_14', 6) # 141-146
sprite('yu000_15', 6) # 147-152
Unknown4020(0)
label(0)
sprite('yu000_00', 6) # 153-158
sprite('yu000_01', 6) # 159-164
sprite('yu000_02', 6) # 165-170
sprite('yu000_03', 6) # 171-176
sprite('yu000_04', 6) # 177-182
sprite('yu000_05', 6) # 183-188
sprite('yu000_06', 6) # 189-194
sprite('yu000_07', 6) # 195-200
sprite('yu000_08', 6) # 201-206
sprite('yu000_09', 6) # 207-212
sprite('yu000_10', 6) # 213-218
sprite('yu000_11', 6) # 219-224
sprite('yu000_12', 6) # 225-230
sprite('yu000_13', 6) # 231-236
sprite('yu000_14', 6) # 237-242
sprite('yu000_15', 6) # 243-248
loopRest()
gotoLabel(0)
label(1)
sprite('keep', 1) # 249-249
@State
def CmnActCrushAttackFinish():
def upon_IMMEDIATE():
Unknown30075(0)
Unknown9017(1)
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_00', 2) # 1-2
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_01', 2) # 3-4
Unknown23029(11, 502, 0)
Unknown4020(11)
sprite('yu450_02', 2) # 5-6
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 2) # 7-8
sprite('yu450_04', 2) # 9-10
sprite('yu450_05', 2) # 11-12
sprite('yu450_06', 2) # 13-14
sprite('yu450_07', 1) # 15-15
tag_voice(0, 'pyu106_1', 'pyu106_0', '', '')
sprite('yu450_08', 1) # 16-16
sprite('yu450_09', 1) # 17-17
sprite('yu450_10', 2) # 18-19
sprite('yu450_11', 3) # 20-22
RefreshMultihit()
sprite('yu450_12', 3) # 23-25
sprite('yu450_13', 3) # 26-28
sprite('yu450_14', 3) # 29-31
sprite('yu450_12', 3) # 32-34
sprite('yu450_13', 3) # 35-37
sprite('yu450_14', 3) # 38-40
EnableCollision(1)
sprite('yu450_12', 3) # 41-43
sprite('yu450_13', 3) # 44-46
sprite('yu450_14', 3) # 47-49
sprite('yu450_12', 3) # 50-52
sprite('yu450_15', 3) # 53-55
sprite('yu010_02', 1) # 56-56
sprite('yu010_01', 2) # 57-58
sprite('yu010_00', 2) # 59-60
Unknown4020(0)
@State
def CmnActCrushAttackExFinish():
def upon_IMMEDIATE():
Unknown30089(0)
Unknown9017(1)
loopRelated(17, 60)
def upon_17():
clearUponHandler(17)
sendToLabel(1)
label(0)
sprite('yu000_00', 6) # 1-6
sprite('yu000_01', 6) # 7-12
sprite('yu000_02', 6) # 13-18
sprite('yu000_03', 6) # 19-24
sprite('yu000_04', 6) # 25-30
sprite('yu000_05', 6) # 31-36
sprite('yu000_06', 6) # 37-42
sprite('yu000_07', 6) # 43-48
sprite('yu000_08', 6) # 49-54
sprite('yu000_09', 6) # 55-60
sprite('yu000_10', 6) # 61-66
sprite('yu000_11', 6) # 67-72
sprite('yu000_12', 6) # 73-78
sprite('yu000_13', 6) # 79-84
sprite('yu000_14', 6) # 85-90
sprite('yu000_15', 6) # 91-96
loopRest()
gotoLabel(0)
label(1)
sprite('yu450_00', 2) # 97-98
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_01', 2) # 99-100
Unknown23029(11, 502, 0)
Unknown4020(11)
sprite('yu450_02', 2) # 101-102
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 2) # 103-104
sprite('yu450_04', 2) # 105-106
sprite('yu450_05', 2) # 107-108
sprite('yu450_06', 2) # 109-110
sprite('yu450_07', 1) # 111-111
tag_voice(0, 'pyu106_1', 'pyu106_0', '', '')
sprite('yu450_08', 1) # 112-112
sprite('yu450_09', 1) # 113-113
sprite('yu450_10', 2) # 114-115
sprite('yu450_11', 3) # 116-118
RefreshMultihit()
sprite('yu450_12', 3) # 119-121
sprite('yu450_13', 3) # 122-124
sprite('yu450_14', 3) # 125-127
sprite('yu450_12', 3) # 128-130
sprite('yu450_13', 3) # 131-133
sprite('yu450_14', 3) # 134-136
EnableCollision(1)
sprite('yu450_12', 3) # 137-139
sprite('yu450_13', 3) # 140-142
sprite('yu450_14', 3) # 143-145
sprite('yu450_12', 3) # 146-148
sprite('yu450_15', 3) # 149-151
sprite('yu010_02', 1) # 152-152
sprite('yu010_01', 2) # 153-154
sprite('yu010_00', 2) # 155-156
Unknown4020(0)
@State
def CmnActCrushAttackAssistChase1st():
def upon_IMMEDIATE():
Unknown30073(1)
Unknown9016(1)
sprite('null', 22) # 1-22
Unknown1086(22)
teleportRelativeY(0)
sprite('null', 1) # 23-23
Unknown30081('')
Unknown1086(22)
teleportRelativeX(-1000000)
Unknown1007(500000)
setGravity(0)
SLOT_12 = SLOT_19
Unknown1019(10)
sprite('yu020_05', 3) # 24-26
physicsXImpulse(35000)
physicsYImpulse(-25000)
def upon_LANDING():
clearUponHandler(2)
sendToLabel(2)
sprite('yu020_06', 3) # 27-29
sprite('yu020_07', 3) # 30-32
sprite('yu250_00', 3) # 33-35
sprite('yu250_01', 3) # 36-38
sprite('yu250_02', 3) # 39-41
SFX_3('slash_rapier_fast')
sprite('yu250_03', 3) # 42-44 **attackbox here**
sprite('yu250_04', 3) # 45-47
sprite('yu250_05', 5) # 48-52
sprite('yu250_06', 5) # 53-57
label(2)
sprite('yu010_01', 3) # 58-60
Unknown1084(1)
Unknown8000(-1, 1, 1)
sprite('yu010_01', 3) # 61-63
sprite('yu010_02', 3) # 64-66
sprite('yu010_03', 3) # 67-69
sprite('yu000_00', 6) # 70-75
sprite('yu000_01', 6) # 76-81
sprite('yu000_02', 6) # 82-87
sprite('yu000_03', 6) # 88-93
sprite('yu000_04', 6) # 94-99
sprite('yu000_05', 6) # 100-105
sprite('yu000_06', 6) # 106-111
sprite('yu000_07', 6) # 112-117
sprite('yu000_08', 6) # 118-123
sprite('yu000_09', 6) # 124-129
sprite('yu000_10', 6) # 130-135
sprite('yu000_11', 6) # 136-141
sprite('yu000_12', 6) # 142-147
sprite('yu000_13', 6) # 148-153
sprite('yu000_14', 6) # 154-159
sprite('yu000_15', 6) # 160-165
@State
def CmnActCrushAttackAssistChase2nd():
def upon_IMMEDIATE():
Unknown30074(1)
Unknown9016(1)
sprite('keep', 3) # 1-3
sprite('yu207_00', 2) # 4-5
Unknown1019(150)
sprite('yu207_01', 2) # 6-7
Unknown1019(150)
sprite('yu207_02', 2) # 8-9
Unknown1019(50)
sprite('yu207_03', 2) # 10-11
Unknown1019(50)
sprite('yu207_05', 3) # 12-14 **attackbox here**
Unknown23054('79753230375f303400000000000000000000000000000000000000000000000003000000')
SFX_3('slash_rapier_fast')
RefreshMultihit()
Unknown1019(0)
sprite('yu207_06', 3) # 15-17
sprite('yu207_07', 3) # 18-20
Unknown2001()
sprite('yu207_08', 3) # 21-23
sprite('yu207_09', 3) # 24-26
sprite('yu207_10', 3) # 27-29
sprite('yu000_00', 6) # 30-35
sprite('yu000_01', 6) # 36-41
sprite('yu000_02', 6) # 42-47
sprite('yu000_03', 6) # 48-53
sprite('yu000_04', 6) # 54-59
sprite('yu000_05', 6) # 60-65
sprite('yu000_06', 6) # 66-71
sprite('yu000_07', 6) # 72-77
sprite('yu000_08', 6) # 78-83
sprite('yu000_09', 6) # 84-89
sprite('yu000_10', 6) # 90-95
sprite('yu000_11', 6) # 96-101
sprite('yu000_12', 6) # 102-107
sprite('yu000_13', 6) # 108-113
@State
def CmnActCrushAttackAssistFinish():
def upon_IMMEDIATE():
Unknown30075(1)
Unknown9017(1)
sprite('yu450_00', 2) # 1-2
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_01', 2) # 3-4
Unknown23029(11, 502, 0)
Unknown4020(11)
sprite('yu450_02', 2) # 5-6
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 2) # 7-8
sprite('yu450_04', 2) # 9-10
sprite('yu450_05', 2) # 11-12
sprite('yu450_06', 2) # 13-14
sprite('yu450_07', 1) # 15-15
sprite('yu450_08', 1) # 16-16
sprite('yu450_09', 1) # 17-17
sprite('yu450_10', 2) # 18-19
sprite('yu450_11', 3) # 20-22
RefreshMultihit()
sprite('yu450_12', 3) # 23-25
sprite('yu450_13', 3) # 26-28
sprite('yu450_14', 3) # 29-31
sprite('yu450_12', 3) # 32-34
sprite('yu450_13', 3) # 35-37
sprite('yu450_14', 3) # 38-40
EnableCollision(1)
sprite('yu450_12', 3) # 41-43
sprite('yu450_13', 3) # 44-46
sprite('yu450_14', 3) # 47-49
sprite('yu450_12', 3) # 50-52
sprite('yu450_15', 3) # 53-55
sprite('yu010_02', 1) # 56-56
sprite('yu010_01', 2) # 57-58
sprite('yu010_00', 2) # 59-60
Unknown4020(0)
@State
def CmnActCrushAttackAssistExFinish():
def upon_IMMEDIATE():
Unknown30089(1)
Unknown9017(1)
loopRelated(17, 60)
def upon_17():
clearUponHandler(17)
sendToLabel(1)
label(0)
sprite('yu000_00', 6) # 1-6
sprite('yu000_01', 6) # 7-12
sprite('yu000_02', 6) # 13-18
sprite('yu000_03', 6) # 19-24
sprite('yu000_04', 6) # 25-30
sprite('yu000_05', 6) # 31-36
sprite('yu000_06', 6) # 37-42
sprite('yu000_07', 6) # 43-48
sprite('yu000_08', 6) # 49-54
sprite('yu000_09', 6) # 55-60
sprite('yu000_10', 6) # 61-66
sprite('yu000_11', 6) # 67-72
sprite('yu000_12', 6) # 73-78
sprite('yu000_13', 6) # 79-84
sprite('yu000_14', 6) # 85-90
sprite('yu000_15', 6) # 91-96
loopRest()
gotoLabel(0)
label(1)
sprite('yu450_00', 2) # 97-98
EnableCollision(0)
DisableAttackRestOfMove()
sprite('yu450_01', 2) # 99-100
Unknown23029(11, 502, 0)
Unknown4020(11)
sprite('yu450_02', 2) # 101-102
GFX_1('persona_enter_ply', 0)
sprite('yu450_03', 2) # 103-104
sprite('yu450_04', 2) # 105-106
sprite('yu450_05', 2) # 107-108
sprite('yu450_06', 2) # 109-110
sprite('yu450_07', 1) # 111-111
sprite('yu450_08', 1) # 112-112
sprite('yu450_09', 1) # 113-113
sprite('yu450_10', 2) # 114-115
sprite('yu450_11', 3) # 116-118
RefreshMultihit()
sprite('yu450_12', 3) # 119-121
sprite('yu450_13', 3) # 122-124
sprite('yu450_14', 3) # 125-127
sprite('yu450_12', 3) # 128-130
sprite('yu450_13', 3) # 131-133
sprite('yu450_14', 3) # 134-136
EnableCollision(1)
sprite('yu450_12', 3) # 137-139
sprite('yu450_13', 3) # 140-142
sprite('yu450_14', 3) # 143-145
sprite('yu450_12', 3) # 146-148
sprite('yu450_15', 3) # 149-151
sprite('yu010_02', 1) # 152-152
sprite('yu010_01', 2) # 153-154
sprite('yu010_00', 2) # 155-156
Unknown4020(0)
@State
def NmlAtkThrow():
def upon_IMMEDIATE():
Unknown17011('ThrowExe', 1, 0, 0)
Unknown11054(120000)
physicsXImpulse(8000)
def upon_CLEAR_OR_EXIT():
if (SLOT_18 == 7):
Unknown8007(100, 1, 1)
physicsXImpulse(16000)
if (SLOT_18 >= 7):
Unknown1015(440)
if (SLOT_12 >= 28000):
SLOT_12 = 28000
if (SLOT_18 >= 25):
sendToLabel(1)
if (SLOT_18 >= 3):
if (SLOT_19 < 180000):
sendToLabel(1)
sprite('yu030_00', 3) # 1-3
sprite('yu032_00', 2) # 4-5
label(0)
sprite('yu032_01', 4) # 6-9
sprite('yu032_02', 4) # 10-13
sprite('yu032_03', 4) # 14-17
Unknown8006(100, 1, 1)
sprite('yu032_04', 4) # 18-21
sprite('yu032_05', 4) # 22-25
sprite('yu032_06', 4) # 26-29
sprite('yu032_07', 4) # 30-33
Unknown8006(100, 1, 1)
sprite('yu032_08', 4) # 34-37
loopRest()
gotoLabel(0)
label(1)
sprite('yu310_00', 1) # 38-38
clearUponHandler(3)
Unknown1019(10)
Unknown8010(100, 1, 1)
SFX_3('yu001')
sprite('yu310_01', 2) # 39-40
sprite('yu310_02', 3) # 41-43 **attackbox here**
Unknown1084(1)
sprite('yu310_03', 3) # 44-46
sprite('yu310_04', 5) # 47-51
SFX_4('pyu154')
sprite('yu310_05', 9) # 52-60
sprite('yu310_06', 3) # 61-63
SFX_3('yu000')
sprite('yu310_07', 3) # 64-66
@State
def ThrowExe():
def upon_IMMEDIATE():
Unknown17012(1, 0, 0)
AttackLevel_(4)
Damage(2000)
AttackP2(50)
hitstun(25)
Unknown9130(16)
Unknown9142(100)
PushbackX(20000)
Hitstop(7)
GroundedHitstunAnimation(2)
AirHitstunAnimation(2)
Unknown2004(1, 0)
sprite('yu310_02', 4) # 1-4 **attackbox here**
Unknown5000(8, 0)
Unknown5001('0000000004000000040000000000000000000000')
Unknown5003(1)
Unknown2018(1, 80)
StartMultihit()
SFX_3('grip_fast')
sprite('yu311_00', 4) # 5-8
Unknown5001('0000000004000000040000000000000000000000')
sprite('yu311_01', 6) # 9-14
sprite('yu311_02', 3) # 15-17
Unknown2018(0, 80)
SFX_3('hit_l_fast')
sprite('yu311_03', 3) # 18-20 **attackbox here**
Unknown2018(1, 80)
RefreshMultihit()
SFX_3('slap_large')
SFX_4('pyu153')
sprite('yu311_04', 12) # 21-32
sprite('yu311_05', 3) # 33-35
sprite('yu311_06', 6) # 36-41
sprite('yu311_07', 5) # 42-46
SFX_3('yu000')
@State
def NmlAtkBackThrow():
def upon_IMMEDIATE():
Unknown17011('BackThrowExe', 1, 0, 0)
Unknown11054(120000)
physicsXImpulse(8000)
def upon_CLEAR_OR_EXIT():
if (SLOT_18 == 7):
Unknown8007(100, 1, 1)
physicsXImpulse(16000)
if (SLOT_18 >= 7):
Unknown1015(440)
if (SLOT_12 >= 28000):
SLOT_12 = 28000
if (SLOT_18 >= 25):
sendToLabel(1)
if (SLOT_18 >= 3):
if (SLOT_19 < 180000):
sendToLabel(1)
sprite('yu030_00', 3) # 1-3
sprite('yu032_00', 2) # 4-5
label(0)
sprite('yu032_01', 4) # 6-9
sprite('yu032_02', 4) # 10-13
sprite('yu032_03', 4) # 14-17
Unknown8006(100, 1, 1)
sprite('yu032_04', 4) # 18-21
sprite('yu032_05', 4) # 22-25
sprite('yu032_06', 4) # 26-29
sprite('yu032_07', 4) # 30-33
Unknown8006(100, 1, 1)
sprite('yu032_08', 4) # 34-37
loopRest()
gotoLabel(0)
label(1)
sprite('yu310_00', 1) # 38-38
clearUponHandler(3)
Unknown1019(10)
Unknown8010(100, 1, 1)
SFX_3('yu001')
sprite('yu310_01', 2) # 39-40
sprite('yu310_02', 3) # 41-43 **attackbox here**
Unknown1084(1)
sprite('yu310_03', 3) # 44-46
sprite('yu310_04', 5) # 47-51
SFX_4('pyu154')
sprite('yu310_05', 9) # 52-60
sprite('yu310_06', 3) # 61-63
SFX_3('yu000')
sprite('yu310_07', 3) # 64-66
@State
def BackThrowExe():
def upon_IMMEDIATE():
Unknown17012(1, 0, 0)
AttackLevel_(4)
Damage(2000)
AttackP2(50)
hitstun(25)
Unknown9130(16)
Unknown9142(100)
PushbackX(20000)
Hitstop(7)
GroundedHitstunAnimation(2)
AirHitstunAnimation(2)
sprite('yu310_02', 4) # 1-4 **attackbox here**
Unknown5000(8, 0)
Unknown5001('0000000004000000040000000000000000000000')
Unknown5003(1)
Unknown2018(1, 80)
StartMultihit()
SFX_3('grip_fast')
sprite('yu311_00ex', 4) # 5-8
Unknown5001('0000000004000000040000000000000001000000')
sprite('yu311_01', 6) # 9-14
Unknown2005()
sprite('yu311_02', 3) # 15-17
Unknown2018(0, 80)
SFX_3('hit_l_fast')
sprite('yu311_03', 3) # 18-20 **attackbox here**
Unknown2018(1, 80)
RefreshMultihit()
SFX_3('slap_large')
SFX_4('pyu153')
sprite('yu311_04', 12) # 21-32
sprite('yu311_05', 3) # 33-35
sprite('yu311_06', 6) # 36-41
sprite('yu311_07', 5) # 42-46
SFX_3('yu000')
@State
def AgiA():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
Unknown21015('41676973686f7441000000000000000000000000000000000000000000000000cb0f000000000000')
sprite('yu401_00', 2) # 1-2
sprite('yu401_01', 1) # 3-3
sprite('yu401_01', 1) # 4-4
sprite('yu401_02', 2) # 5-6
sprite('yu401_03', 1) # 7-7
Unknown23029(11, 4020, 0)
sprite('yu401_03', 1) # 8-8
sprite('yu401_04', 3) # 9-11
GFX_1('persona_enter_ply', 0)
Unknown7007('7079753230315f300000000000000000640000007079753230315f310000000000000000640000007079753230315f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu401_05', 3) # 12-14
sprite('yu401_06', 3) # 15-17
sprite('yu401_05', 3) # 18-20
sprite('yu401_04', 3) # 21-23
sprite('yu401_05', 3) # 24-26
sprite('yu401_06', 3) # 27-29
sprite('yu401_05', 3) # 30-32
sprite('yu401_04', 3) # 33-35
sprite('yu401_05', 3) # 36-38
sprite('yu401_03', 4) # 39-42
Recovery()
sprite('yu401_02', 4) # 43-46
sprite('yu401_01', 4) # 47-50
sprite('yu401_00', 4) # 51-54
@State
def AgiB():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
Unknown21015('41676973686f7442000000000000000000000000000000000000000000000000cc0f000000000000')
sprite('yu401_00', 2) # 1-2
sprite('yu401_01', 1) # 3-3
sprite('yu401_01', 1) # 4-4
sprite('yu401_02', 2) # 5-6
sprite('yu401_03', 1) # 7-7
Unknown23029(11, 4030, 0)
sprite('yu401_03', 1) # 8-8
sprite('yu401_04', 3) # 9-11
GFX_1('persona_enter_ply', 0)
Unknown7007('7079753230315f300000000000000000640000007079753230315f310000000000000000640000007079753230315f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu401_05', 3) # 12-14
sprite('yu401_06', 3) # 15-17
sprite('yu401_05', 3) # 18-20
sprite('yu401_04', 3) # 21-23
sprite('yu401_05', 3) # 24-26
sprite('yu401_06', 3) # 27-29
sprite('yu401_05', 3) # 30-32
sprite('yu401_04', 3) # 33-35
sprite('yu401_05', 3) # 36-38
sprite('yu401_03', 4) # 39-42
Recovery()
sprite('yu401_02', 4) # 43-46
sprite('yu401_01', 4) # 47-50
sprite('yu401_00', 4) # 51-54
@State
def AgiEX():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
Unknown21015('41676973686f7441420000000000000000000000000000000000000000000000cd0f000000000000')
sprite('yu401_00', 3) # 1-3
sprite('yu401_01', 1) # 4-4
sprite('yu401_01', 2) # 5-6
Unknown23125('')
ConsumeSuperMeter(-5000)
Unknown7007('7079753230335f300000000000000000640000007079753230335f310000000000000000640000007079753230335f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu401_02', 2) # 7-8
sprite('yu401_03', 1) # 9-9
sprite('yu401_03', 1) # 10-10
Unknown23029(11, 4040, 0)
sprite('yu401_04', 3) # 11-13
GFX_1('persona_enter_ply', 0)
sprite('yu401_05', 3) # 14-16
sprite('yu401_06', 3) # 17-19
sprite('yu401_04', 3) # 20-22
sprite('yu401_05', 3) # 23-25
sprite('yu401_06', 3) # 26-28
sprite('yu401_04', 3) # 29-31
sprite('yu401_05', 3) # 32-34
sprite('yu401_06', 3) # 35-37
sprite('yu401_05', 3) # 38-40
sprite('yu401_04', 3) # 41-43
Recovery()
sprite('yu401_02', 3) # 44-46
sprite('yu401_01', 3) # 47-49
sprite('yu401_00', 2) # 50-51
@State
def AgiAirA():
def upon_IMMEDIATE():
Unknown17003()
Unknown21015('41676973686f7441000000000000000000000000000000000000000000000000cb0f000000000000')
sprite('yu255_00', 3) # 1-3
Unknown1017()
Unknown1022()
Unknown1037()
Unknown1084(1)
sprite('yu255_01', 1) # 4-4
sprite('yu255_01', 2) # 5-6
Unknown22004(6, 6)
sprite('yu255_02', 1) # 7-7
Unknown23029(11, 5032, 0)
sprite('yu255_02', 2) # 8-9
sprite('yu255_03', 3) # 10-12
GFX_1('persona_enter_ply', 0)
Unknown7007('7079753230325f300000000000000000640000007079753230325f310000000000000000640000007079753230325f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu255_04', 1) # 13-13
sprite('yu255_04', 2) # 14-15
sprite('yu255_05', 3) # 16-18
sprite('yu255_03', 4) # 19-22
sprite('yu255_04', 4) # 23-26
sprite('yu255_05', 4) # 27-30
sprite('yu255_03', 4) # 31-34
sprite('yu255_04', 4) # 35-38
sprite('yu255_05', 4) # 39-42
sprite('yu255_06', 4) # 43-46
Unknown1018()
Unknown1038()
Unknown1019(85)
setGravity(2400)
Recovery()
sprite('yu255_07', 4) # 47-50
sprite('yu255_08', 4) # 51-54
@State
def AgiAirB():
def upon_IMMEDIATE():
Unknown17003()
Unknown21015('41676973686f7442000000000000000000000000000000000000000000000000cc0f000000000000')
sprite('yu255_00', 3) # 1-3
Unknown1017()
Unknown1022()
Unknown1037()
Unknown1084(1)
sprite('yu255_01', 1) # 4-4
sprite('yu255_01', 2) # 5-6
Unknown22004(6, 6)
sprite('yu255_02', 1) # 7-7
Unknown23029(11, 5033, 0)
sprite('yu255_02', 2) # 8-9
sprite('yu255_03', 3) # 10-12
GFX_1('persona_enter_ply', 0)
Unknown7007('7079753230325f300000000000000000640000007079753230325f310000000000000000640000007079753230325f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu255_04', 3) # 13-15
sprite('yu255_05', 3) # 16-18
sprite('yu255_03', 4) # 19-22
sprite('yu255_04', 4) # 23-26
sprite('yu255_05', 4) # 27-30
sprite('yu255_03', 4) # 31-34
sprite('yu255_04', 4) # 35-38
sprite('yu255_05', 4) # 39-42
sprite('yu255_06', 4) # 43-46
Unknown1018()
Unknown1038()
Unknown1019(85)
setGravity(2400)
Recovery()
sprite('yu255_07', 4) # 47-50
sprite('yu255_08', 4) # 51-54
@State
def AgiAirEX():
def upon_IMMEDIATE():
Unknown17003()
Unknown21015('41676973686f7441420000000000000000000000000000000000000000000000cd0f000000000000')
sprite('yu255_00', 2) # 1-2
Unknown1017()
Unknown1022()
Unknown1037()
Unknown1084(1)
sprite('yu255_01', 1) # 3-3
sprite('yu255_01', 1) # 4-4
Unknown22004(6, 6)
sprite('yu255_02', 3) # 5-7
Unknown23125('')
ConsumeSuperMeter(-5000)
Unknown7007('7079753230335f300000000000000000640000007079753230335f310000000000000000640000007079753230335f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu255_03', 1) # 8-8
GFX_1('persona_enter_ply', 0)
Unknown23029(11, 5034, 0)
sprite('yu255_03', 3) # 9-11
sprite('yu255_04', 4) # 12-15
sprite('yu255_05', 4) # 16-19
sprite('yu255_03', 4) # 20-23
sprite('yu255_04', 4) # 24-27
sprite('yu255_05', 4) # 28-31
sprite('yu255_03', 4) # 32-35
sprite('yu255_04', 4) # 36-39
Unknown1018()
Unknown1038()
Unknown1019(85)
setGravity(2400)
sprite('yu255_05', 4) # 40-43
sprite('yu255_06', 4) # 44-47
Recovery()
sprite('yu255_07', 4) # 48-51
sprite('yu255_08', 4) # 52-55
@State
def MaharagiA():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
sprite('yu402_00', 2) # 1-2
sprite('yu402_01', 2) # 3-4
sprite('yu402_02', 2) # 5-6
sprite('yu402_03', 2) # 7-8
sprite('yu402_04', 3) # 9-11
GFX_1('persona_enter_ply', 0)
Unknown23029(11, 4060, 0)
Unknown7007('7079753230355f300000000000000000640000007079753230355f310000000000000000640000007079753230355f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu402_05', 4) # 12-15
sprite('yu402_06', 4) # 16-19
sprite('yu402_07', 4) # 20-23
sprite('yu402_05', 4) # 24-27
sprite('yu402_06', 4) # 28-31
sprite('yu402_07', 4) # 32-35
sprite('yu402_05', 4) # 36-39
sprite('yu402_06', 4) # 40-43
sprite('yu402_07', 4) # 44-47
sprite('yu402_05', 4) # 48-51
sprite('yu402_08', 4) # 52-55
@State
def MaharagiB():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
sprite('yu402_00', 3) # 1-3
sprite('yu402_01', 3) # 4-6
sprite('yu402_02', 3) # 7-9
sprite('yu402_03', 3) # 10-12
sprite('yu402_04', 3) # 13-15
GFX_1('persona_enter_ply', 0)
sprite('yu402_05', 3) # 16-18
Unknown7007('7079753230345f300000000000000000640000007079753230345f310000000000000000640000007079753230345f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu402_06', 3) # 19-21
sprite('yu402_07', 3) # 22-24
sprite('yu402_05', 3) # 25-27
Unknown23029(11, 4050, 0)
sprite('yu402_06', 4) # 28-31
sprite('yu402_07', 4) # 32-35
sprite('yu402_05', 4) # 36-39
sprite('yu402_08', 4) # 40-43
@State
def MaharagiEX():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
Unknown2006()
sprite('yu402_00', 2) # 1-2
sprite('yu402_01', 1) # 3-3
sprite('yu402_01', 1) # 4-4
Unknown23125('')
ConsumeSuperMeter(-5000)
Unknown7007('7079753230365f300000000000000000640000007079753230365f310000000000000000640000007079753230365f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu402_02', 2) # 5-6
sprite('yu402_03', 2) # 7-8
sprite('yu402_04', 3) # 9-11
GFX_1('persona_enter_ply', 0)
Unknown23029(11, 4071, 0)
sprite('yu402_05', 4) # 12-15
sprite('yu402_06', 4) # 16-19
sprite('yu402_07', 4) # 20-23
sprite('yu402_05', 4) # 24-27
sprite('yu402_06', 4) # 28-31
sprite('yu402_08', 3) # 32-34
Recovery()
@State
def FireBoosterA():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
sprite('yu403_00', 3) # 1-3
sprite('yu403_07', 3) # 4-6
Unknown7007('7079753230375f300000000000000000640000007079753230375f310000000000000000640000007079753230375f320000000000000000640000000000000000000000000000000000000000000000')
Unknown23029(11, 4080, 0)
sprite('yu403_08', 3) # 7-9
GFX_1('persona_enter_ply', 0)
GFX_0('fire_booster', 100)
sprite('yu403_09', 3) # 10-12
sprite('yu403_10', 3) # 13-15
sprite('yu403_08', 3) # 16-18
sprite('yu403_09', 3) # 19-21
if (SLOT_31 < 9):
selfDamage(500)
SLOT_31 = (SLOT_31 + 1)
SFX_3('distortion_b')
Recovery()
sprite('yu403_10', 3) # 22-24
sprite('yu403_08', 3) # 25-27
sprite('yu403_09', 3) # 28-30
sprite('yu403_11', 3) # 31-33
sprite('yu403_12', 3) # 34-36
@State
def FireBoosterB():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
sprite('yu403_00', 3) # 1-3
sprite('yu403_01', 3) # 4-6
sprite('yu403_02', 3) # 7-9
sprite('yu403_03', 3) # 10-12
sprite('yu403_04', 3) # 13-15
sprite('yu403_05', 3) # 16-18
Unknown7007('7079753230385f300000000000000000640000007079753230385f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu403_06', 3) # 19-21
sprite('yu403_07', 3) # 22-24
Unknown23029(11, 4080, 0)
sprite('yu403_08', 3) # 25-27
GFX_1('persona_enter_ply', 0)
GFX_0('fire_booster', 100)
sprite('yu403_09', 3) # 28-30
sprite('yu403_10', 3) # 31-33
if (SLOT_31 < 9):
selfDamage(500)
SLOT_31 = (SLOT_31 + 1)
SFX_3('distortion_b')
sprite('yu403_08', 3) # 34-36
sprite('yu403_09', 3) # 37-39
sprite('yu403_10', 3) # 40-42
if (SLOT_31 < 9):
SLOT_31 = (SLOT_31 + 1)
SFX_3('distortion_b')
Recovery()
sprite('yu403_08', 3) # 43-45
sprite('yu403_09', 3) # 46-48
sprite('yu403_10', 3) # 49-51
sprite('yu403_11', 3) # 52-54
sprite('yu403_12', 3) # 55-57
@State
def FireBoosterC():
def upon_IMMEDIATE():
AttackDefaults_StandingSpecial()
GuardPoint_(1)
sprite('yu403_00', 3) # 1-3
sprite('yu403_07', 2) # 4-5
Unknown23125('')
ConsumeSuperMeter(-5000)
setInvincible(1)
Unknown22022(0)
Unknown22038(0)
Unknown22019('0000000000000000000000000100000000000000')
Unknown7007('7079753230395f300000000000000000640000007079753230395f310000000000000000640000007079753230395f320000000000000000640000000000000000000000000000000000000000000000')
Unknown23029(11, 4080, 0)
sprite('yu403_08', 2) # 6-7
GFX_1('persona_enter_ply', 0)
GFX_0('fire_booster', 100)
sprite('yu403_09', 2) # 8-9
sprite('yu403_10', 2) # 10-11
sprite('yu403_08', 2) # 12-13
if (SLOT_31 < 9):
selfDamage(500)
SLOT_31 = (SLOT_31 + 2)
SFX_3('distortion_b')
Recovery()
sprite('yu403_11', 4) # 14-17
sprite('yu403_12', 5) # 18-22
@State
def CmnActInvincibleAttack():
def upon_IMMEDIATE():
Unknown17024('')
sendToLabelUpon(2, 1)
GroundedHitstunAnimation(9)
AirHitstunAnimation(9)
AirPushbackX(40000)
AirPushbackY(20000)
YImpluseBeforeWallbounce(2000)
AirUntechableTime(60)
Damage(1200)
Unknown9021(1)
GuardPoint_(1)
sprite('yu400_01', 3) # 1-3
Unknown7007('7079753230305f300000000000000000640000007079753230305f310000000000000000640000007079753230305f320000000000000000640000000000000000000000000000000000000000000000')
sprite('yu400_02', 3) # 4-6
sprite('yu400_03', 3) # 7-9
sprite('yu400_04', 3) # 10-12
GFX_0('rinkakuaura', 100)
Unknown38(5, 1)
Unknown23029(11, 4010, 0)
GFX_0('rinkakuaura2', 100)
sprite('yu400_05', 3) # 13-15
sprite('yu400_06', 3) # 16-18
Unknown1084(1)
physicsYImpulse(2000)
sprite('yu400_07', 3) # 19-21 **attackbox here**
RefreshMultihit()
sprite('yu400_08', 3) # 22-24 **attackbox here**
GFX_0('diacharge', 104)
Unknown38(6, 1)
GFX_0('diacharge_floor', 0)
Unknown38(7, 1)
def upon_CLEAR_OR_EXIT():
Unknown21000(60)
sprite('yu400_09', 3) # 25-27 **attackbox here**
sprite('yu400_10', 3) # 28-30 **attackbox here**
DisableAttackRestOfMove()
SFX_3('yu004')
Unknown22022(0)
Unknown22038(0)
Unknown22019('0000000000000000000000000100000000000000')
physicsYImpulse(-600)
sprite('yu400_07', 3) # 31-33 **attackbox here**
sprite('yu400_08', 3) # 34-36 **attackbox here**
sprite('yu400_09', 3) # 37-39 **attackbox here**
label(2)
sprite('yu400_07', 3) # 40-42 **attackbox here**
Unknown11063(1)
def upon_CLEAR_OR_EXIT():
if (not CheckInput(0x1)):
if (not CheckInput(0x1c)):
clearUponHandler(3)
sendToLabel(0)
Unknown47('090000000200000033000000000000003c0000000200000034000000')
if
if SLOT_52:
SFX_3('yu004')
SLOT_51 = 0:
Unknown21000(30)
SLOT_51 = (SLOT_51 + 1)
else:
clearUponHandler(3)
sendToLabel(0)
SFX_3('yu002')
YAccel(-100)
sprite('yu400_08', 3) # 43-45 **attackbox here**
sprite('yu400_09', 3) # 46-48 **attackbox here**
sprite('yu400_10', 3) # 49-51 **attackbox here**
loopRest()
gotoLabel(2)
label(0)
sprite('yu400_07', 3) # 52-54 **attackbox here**
setGravity(350)
setInvincible(0)
Unknown23029(5, 52, 0)
Unknown23029(6, 53, 0)
Unknown23029(7, 54, 0)
Unknown23029(11, 11, 0)
sprite('yu400_08', 3) # 55-57 **attackbox here**
sprite('yu400_09', 3) # 58-60 **attackbox here**
sprite('yu400_10', 3) # 61-63 **attackbox here**
loopRest()
gotoLabel(0)
label(1)
sprite('yu400_11', 4) # 64-67
sprite('yu400_12', 4) # 68-71
sprite('yu400_13', 4) # 72-75
@State
def UltimateAgidine():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
Unknown2021(1)
Unknown2006()
Unknown23055('')
sprite('yu430_00', 3) # 1-3
Unknown1084(1)
setInvincible(1)
sprite('yu430_00', 3) # 4-6
Unknown2036(78, -1, 0)
ConsumeSuperMeter(-10000)
Unknown7007('7079753235305f300000000000000000640000007079753235305f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
Unknown30080('')
sprite('yu430_01', 4) # 7-10
sprite('yu430_02', 4) # 11-14
sprite('yu430_03', 4) # 15-18
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
sprite('yu430_04', 4) # 19-22
sprite('yu430_05', 4) # 23-26
sprite('yu430_06', 4) # 27-30
sprite('yu430_07', 4) # 31-34
sprite('yu430_08', 4) # 35-38
sprite('yu430_09', 4) # 39-42
sprite('yu430_10', 4) # 43-46
sprite('yu430_11', 4) # 47-50
sprite('yu430_12', 3) # 51-53
sprite('yu430_13', 3) # 54-56
sprite('yu430_14', 3) # 57-59
sprite('yu430_15', 3) # 60-62
sprite('yu430_16', 3) # 63-65
sprite('yu430_17', 3) # 66-68
sprite('yu430_18', 4) # 69-72
Unknown21007(5, 32)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
sprite('yu430_19', 4) # 73-76
Unknown23029(11, 10010, 0)
sprite('yu430_20', 4) # 77-80
sprite('yu430_21', 4) # 81-84
label(0)
sprite('yu430_19', 4) # 85-88
sprite('yu430_20', 4) # 89-92
if (SLOT_51 >= 1):
setInvincible(0)
if (SLOT_2 >= 7):
sendToLabel(1)
sprite('yu430_21', 4) # 93-96
Unknown2038(1)
SLOT_51 = (SLOT_51 + 1)
gotoLabel(0)
label(1)
sprite('yu430_19', 4) # 97-100
Unknown7007('7079753235315f300000000000000000640000007079753235315f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu430_20', 4) # 101-104
sprite('yu430_21', 4) # 105-108
sprite('yu430_19', 5) # 109-113
sprite('yu430_20', 5) # 114-118
sprite('yu430_21', 5) # 119-123
sprite('yu430_19', 5) # 124-128
sprite('yu430_20', 5) # 129-133
sprite('yu430_21', 5) # 134-138
sprite('yu430_19', 5) # 139-143
sprite('yu430_20', 5) # 144-148
sprite('yu430_21', 5) # 149-153
sprite('yu430_22', 4) # 154-157
sprite('yu430_23', 4) # 158-161
Recovery()
@State
def UltimateMaharagidine():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
Unknown2006()
Unknown23055('')
def upon_43():
if (SLOT_48 == 10055):
Unknown23159('UltimateMaharagidine_Front')
SLOT_51 = 1
def upon_CLEAR_OR_EXIT():
if SLOT_51:
sendToLabel(0)
sprite('yu431_00', 4) # 1-4
Unknown1084(1)
setInvincible(1)
sprite('yu431_01', 4) # 5-8
sprite('yu431_02', 1) # 9-9
sprite('yu431_02', 4) # 10-13
Unknown2036(87, -1, 0)
ConsumeSuperMeter(-10000)
Unknown30080('')
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
Unknown36(1)
physicsYImpulse(-2200)
Unknown4007(2)
Unknown35()
sprite('yu431_03', 5) # 14-18
sprite('yu431_04', 5) # 19-23
Unknown7007('7079753235325f300000000000000000640000007079753235325f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu431_02', 5) # 24-28
sprite('yu431_03', 5) # 29-33
Unknown23024(1)
sprite('yu431_04', 5) # 34-38
sprite('yu431_05', 4) # 39-42
sprite('yu431_06', 4) # 43-46
sprite('yu431_07', 4) # 47-50
sprite('yu431_08', 4) # 51-54
Unknown21007(5, 32)
Unknown23029(11, 10030, 0)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
sprite('yu431_09', 4) # 55-58
sprite('yu431_10', 4) # 59-62
sprite('yu431_08', 4) # 63-66
sprite('yu431_09', 4) # 67-70
sprite('yu431_10', 4) # 71-74
sprite('yu431_08', 4) # 75-78
Unknown7007('7079753235335f300000000000000000640000007079753235335f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu431_09', 4) # 79-82
sprite('yu431_10', 4) # 83-86
sprite('yu431_08', 4) # 87-90
sprite('yu431_09', 4) # 91-94
sprite('yu431_10', 4) # 95-98
label(0)
sprite('yu431_10', 4) # 99-102
clearUponHandler(3)
clearUponHandler(43)
sprite('yu431_08', 4) # 103-106
sprite('yu431_09', 4) # 107-110
setInvincible(0)
sprite('yu431_10', 4) # 111-114
sprite('yu431_08', 4) # 115-118
sprite('yu431_09', 4) # 119-122
sprite('yu431_10', 4) # 123-126
sprite('yu431_08', 4) # 127-130
sprite('yu431_09', 4) # 131-134
sprite('yu431_10', 4) # 135-138
sprite('yu431_08', 4) # 139-142
sprite('yu431_09', 4) # 143-146
sprite('yu431_10', 4) # 147-150
sprite('yu431_08', 4) # 151-154
sprite('yu431_11', 5) # 155-159
sprite('yu431_12', 6) # 160-165
sprite('yu431_13', 6) # 166-171
@State
def UltimateAgidine_OD():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
Unknown2021(1)
Unknown23055('')
Unknown2006()
sprite('yu430_00', 3) # 1-3
Unknown1084(1)
setInvincible(1)
sprite('yu430_00', 3) # 4-6
Unknown2036(78, -1, 0)
ConsumeSuperMeter(-10000)
Unknown30080('')
Unknown7007('7079753235305f300000000000000000640000007079753235305f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
SFX_1('yu310')
sprite('yu430_01', 4) # 7-10
sprite('yu430_02', 4) # 11-14
sprite('yu430_03', 4) # 15-18
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
sprite('yu430_04', 4) # 19-22
sprite('yu430_05', 4) # 23-26
sprite('yu430_06', 4) # 27-30
sprite('yu430_07', 4) # 31-34
sprite('yu430_08', 4) # 35-38
sprite('yu430_09', 4) # 39-42
sprite('yu430_10', 4) # 43-46
sprite('yu430_11', 4) # 47-50
sprite('yu430_12', 3) # 51-53
sprite('yu430_13', 3) # 54-56
sprite('yu430_14', 3) # 57-59
sprite('yu430_15', 3) # 60-62
sprite('yu430_16', 3) # 63-65
sprite('yu430_17', 3) # 66-68
sprite('yu430_18', 4) # 69-72
Unknown21007(5, 32)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
sprite('yu430_19', 4) # 73-76
Unknown23029(11, 10020, 0)
sprite('yu430_20', 4) # 77-80
sprite('yu430_21', 4) # 81-84
sprite('yu430_19', 4) # 85-88
sprite('yu430_20', 4) # 89-92
sprite('yu430_21', 4) # 93-96
label(0)
sprite('yu430_19', 4) # 97-100
if (SLOT_2 >= 7):
sendToLabel(1)
sprite('yu430_20', 4) # 101-104
setInvincible(0)
sprite('yu430_21', 4) # 105-108
Unknown2038(1)
SLOT_51 = (SLOT_51 + 1)
gotoLabel(0)
label(1)
sprite('yu430_19', 4) # 109-112
Unknown7007('7079753235315f300000000000000000640000007079753235315f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu430_20', 4) # 113-116
sprite('yu430_21', 4) # 117-120
sprite('yu430_19', 5) # 121-125
sprite('yu430_20', 5) # 126-130
sprite('yu430_21', 5) # 131-135
sprite('yu430_19', 5) # 136-140
sprite('yu430_20', 5) # 141-145
sprite('yu430_21', 5) # 146-150
sprite('yu430_19', 5) # 151-155
sprite('yu430_20', 5) # 156-160
sprite('yu430_21', 5) # 161-165
sprite('yu430_22', 4) # 166-169
sprite('yu430_23', 4) # 170-173
Recovery()
@State
def UltimateMaharagidineOD():
def upon_IMMEDIATE():
AttackDefaults_StandingDD()
Unknown23055('')
Unknown2006()
def upon_43():
if (SLOT_48 == 10055):
Unknown23159('UltimateMaharagidineOD_Front')
SLOT_51 = 1
def upon_CLEAR_OR_EXIT():
if SLOT_51:
sendToLabel(0)
sprite('yu431_00', 4) # 1-4
Unknown1084(1)
setInvincible(1)
sprite('yu431_01', 4) # 5-8
sprite('yu431_02', 1) # 9-9
sprite('yu431_02', 4) # 10-13
Unknown2036(87, -1, 0)
ConsumeSuperMeter(-10000)
Unknown30080('')
Unknown4004('436172640000000000000000000000000000000000000000000000000000000000000000')
Unknown38(5, 1)
Unknown36(1)
physicsYImpulse(-2200)
Unknown35()
sprite('yu431_03', 5) # 14-18
sprite('yu431_04', 5) # 19-23
Unknown7007('7079753235325f300000000000000000640000007079753235325f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu431_02', 5) # 24-28
sprite('yu431_03', 5) # 29-33
Unknown23024(1)
sprite('yu431_04', 5) # 34-38
sprite('yu431_05', 4) # 39-42
sprite('yu431_06', 4) # 43-46
sprite('yu431_07', 4) # 47-50
sprite('yu431_08', 4) # 51-54
Unknown21007(5, 32)
Unknown23029(11, 10053, 0)
GFX_1('persona_enter_ply', 0)
SFX_3('persona_destroy')
SFX_1('yu312')
sprite('yu431_09', 4) # 55-58
sprite('yu431_10', 4) # 59-62
sprite('yu431_08', 4) # 63-66
sprite('yu431_09', 4) # 67-70
sprite('yu431_10', 4) # 71-74
sprite('yu431_08', 4) # 75-78
Unknown7007('7079753235335f300000000000000000640000007079753235335f3100000000000000006400000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
sprite('yu431_09', 4) # 79-82
sprite('yu431_10', 4) # 83-86
sprite('yu431_08', 4) # 87-90
sprite('yu431_09', 4) # 91-94
sprite('yu431_10', 4) # 95-98
label(0)
sprite('yu431_10', 4) # 99-102
clearUponHandler(3)
clearUponHandler(43)
sprite('yu431_08', 4) # 103-106
sprite('yu431_09', 4) # 107-110
setInvincible(0)
sprite('yu431_10', 4) # 111-114
sprite('yu431_08', 4) # 115-118
sprite('yu431_09', 4) # 119-122
sprite('yu431_10', 4) # 123-126
sprite('yu431_08', 4) # 127-130
sprite('yu431_09', 4) # 131-134
sprite('yu431_10', 4) # 135-138
sprite('yu431_08', 4) # 139-142
sprite('yu431_09', 4) # 143-146
sprite('yu431_10', 4) # 147-150
sprite('yu431_08', 4) # 151-154
sprite('yu431_11', 5) # 155-159
sprite('yu431_12', 6) # 160-165
sprite('yu431_13', 6) # 166-171
@State
def Ichigeki():
def upon_IMMEDIATE():
AttackDefaults_Astral()
AttackLevel_(5)
Hitstop(0)
Damage(100000)
AirHitstunAnimation(9)
GroundedHitstunAnimation(9)
AirPushbackX(0)
AirPushbackY(0)
YImpluseBeforeWallbounce(0)
Unknown11064(3)
Unknown11050('050000000000000000000000000000000000000000000000000000000000000000000000')
Unknown11023(1)
Unknown23083(1)
def upon_32():
SLOT_51 = 1
setInvincible(1)
Unknown23083(1)
EnableCollision(0)
Unknown23084(1)
Unknown23157(1)
Unknown23088(1, 1)
def upon_CLEAR_OR_EXIT():
Unknown48('19000000020000003400000016000000020000000c000000')
if (SLOT_52 > 0):
clearUponHandler(3)
Unknown23024(3)
sendToLabel(2)
def upon_STATE_END():
Unknown20000(0)
setInvincible(0)
sprite('yu450_00', 3) # 1-3
setInvincible(1)
sprite('yu450_01', 3) # 4-6
sprite('yu450_02', 3) # 7-9
sprite('yu450_03', 3) # 10-12
sprite('yu450_04', 3) # 13-15
Unknown2036(86, -1, 2)
Unknown23147()
GFX_0('P4U_Cutin_Parent', 100)
tag_voice(1, 'pyu290_0', 'pyu290_1', '', '')
sprite('yu450_05', 3) # 16-18
sprite('yu450_06', 3) # 19-21
sprite('yu450_07', 3) # 22-24
sprite('yu450_08', 3) # 25-27
sprite('yu450_09', 3) # 28-30
sprite('yu450_10', 3) # 31-33
Unknown23029(11, 10070, 0)
Unknown18009(1)
sprite('yu450_11', 4) # 34-37
sprite('yu450_12', 4) # 38-41
sprite('yu450_13', 4) # 42-45
sprite('yu450_14', 4) # 46-49
sprite('yu450_12', 4) # 50-53
sprite('yu450_13', 4) # 54-57
sprite('yu450_14', 4) # 58-61
sprite('yu450_12', 4) # 62-65
sprite('yu450_13', 4) # 66-69
sprite('yu450_14', 4) # 70-73
sprite('yu450_12', 4) # 74-77
sprite('yu450_13', 4) # 78-81
sprite('yu450_14', 4) # 82-85
sprite('yu450_12', 4) # 86-89
sprite('yu450_13', 4) # 90-93
sprite('yu450_14', 4) # 94-97
sprite('yu450_12', 4) # 98-101
sprite('yu450_13', 4) # 102-105
sprite('yu450_14', 4) # 106-109
sprite('yu450_12', 4) # 110-113
sprite('yu450_13', 4) # 114-117
sprite('yu450_14', 4) # 118-121
sprite('yu450_12', 4) # 122-125
loopRest()
Unknown19(0, 2, 51)
label(1)
sprite('yu450_12', 4) # 126-129
sprite('yu450_13', 4) # 130-133
sprite('yu450_14', 4) # 134-137
gotoLabel(1)
label(2)
sprite('yu450_12', 3) # 138-140
sprite('yu450_13', 3) # 141-143
sprite('yu450_14', 120) # 144-263
sprite('yu450_14', 20) # 264-283
Unknown36(22)
Unknown3004(-30)
Unknown35()
Unknown36(3)
Unknown3004(-30)
Unknown35()
GFX_0('450flash', 100)
sprite('keep', 50) # 284-333
Unknown2034(0)
Unknown2053(0)
Unknown1000(0)
Unknown36(22)
Unknown2034(0)
Unknown2053(0)
Unknown1000(-500000)
Unknown35()
Unknown1084(1)
GFX_0('IchigekiCamera', 100)
Unknown21012('4963686967656b6943616d65726100000000000000000000000000000000000022000000')
GFX_0('IchigekiPicture', 100)
GFX_0('Sakurafubuki_slow', 100)
GFX_0('SakuraSE', 100)
sprite('null', 30) # 334-363
tag_voice(0, 'pyu291_0', 'pyu291_1', '', '')
sprite('null', 70) # 364-433
sprite('null', 20) # 434-453
GFX_0('BG_sakura', 100)
sprite('null', 40) # 454-493
Unknown36(22)
Unknown3004(30)
Unknown35()
Unknown36(3)
Unknown3004(30)
Unknown35()
GFX_0('IchigekiBlack', 100)
tag_voice(0, 'pyu292_0', 'pyu292_1', '', '')
sprite('null', 10) # 494-503
Unknown21012('53616b757261534500000000000000000000000000000000000000000000000020000000')
SFX_3('yu003')
GFX_0('Ichigeki_HitEff', 100)
label(3)
sprite('null', 5) # 504-508
SFX_3('yu003')
SLOT_53 = (SLOT_53 + 1)
if (SLOT_53 == 32):
sendToLabel(4)
loopRest()
gotoLabel(3)
label(4)
sprite('null', 20) # 509-528
sprite('null', 120) # 529-648
Unknown21012('4963686967656b69426c61636b0000000000000000000000000000000000000020000000')
Unknown21012('42475f73616b757261000000000000000000000000000000000000000000000020000000')
GFX_0('IchigekiCamera', 100)
Unknown21012('4963686967656b6943616d65726100000000000000000000000000000000000021000000')
Unknown18009(0)
GFX_0('IchigekiWhite', 100)
Unknown23024(0)
sprite('yu450_16', 30) # 649-678 **attackbox here**
Unknown21012('53616b757261667562756b695f736c6f7700000000000000000000000000000020000000')
GFX_0('Sakuraend', 100)
sprite('yu450_16', 2) # 679-680 **attackbox here**
sprite('yu450_16', 4) # 681-684 **attackbox here**
Unknown20000(1)
sprite('yu450_17', 6) # 685-690 **attackbox here**
sprite('yu450_18', 6) # 691-696 **attackbox here**
sprite('yu450_19', 6) # 697-702 **attackbox here**
sprite('yu450_20', 6) # 703-708 **attackbox here**
SFX_3('cloth_m')
sprite('yu450_16', 6) # 709-714 **attackbox here**
sprite('yu450_17', 6) # 715-720 **attackbox here**
sprite('yu450_18', 6) # 721-726 **attackbox here**
sprite('yu450_19', 6) # 727-732 **attackbox here**
sprite('yu450_20', 6) # 733-738 **attackbox here**
SFX_3('cloth_m')
sprite('yu450_16', 6) # 739-744 **attackbox here**
Unknown18010()
tag_voice(0, 'pyu293_0', 'pyu293_1', '', '')
Unknown23018(1)
sprite('yu450_17', 6) # 745-750 **attackbox here**
sprite('yu450_18', 6) # 751-756 **attackbox here**
sprite('yu450_19', 6) # 757-762 **attackbox here**
sprite('yu450_20', 6) # 763-768 **attackbox here**
SFX_3('cloth_l')
label(99)
sprite('yu450_16', 6) # 769-774 **attackbox here**
sprite('yu450_17', 6) # 775-780 **attackbox here**
sprite('yu450_18', 6) # 781-786 **attackbox here**
sprite('yu450_19', 6) # 787-792 **attackbox here**
sprite('yu450_20', 6) # 793-798 **attackbox here**
SFX_3('cloth_l')
loopRest()
gotoLabel(99)
ExitState()
label(0)
sprite('yu450_12', 4) # 799-802
setInvincible(0)
sprite('yu450_13', 4) # 803-806
sprite('yu450_14', 4) # 807-810
sprite('yu450_12', 4) # 811-814
sprite('yu450_13', 4) # 815-818
sprite('yu450_14', 4) # 819-822
sprite('yu450_12', 5) # 823-827
sprite('yu450_13', 5) # 828-832
sprite('yu450_14', 5) # 833-837
sprite('yu450_12', 6) # 838-843
sprite('yu450_13', 6) # 844-849
sprite('yu450_14', 6) # 850-855
sprite('yu450_15', 4) # 856-859
@Subroutine
def MouthTableInit():
Unknown18011('pyu000', 12643, 14177, 14179, 14177, 14179, 14177, 13155, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_1', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu500', 12643, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu500', '001')
Unknown18011('pyu501', 13923, 12641, 25392, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 12594, 12643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu501', '002')
Unknown18011('pyu502', 12643, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu502', '003')
Unknown18011('pyu503', 12643, 14177, 14179, 14177, 14179, 14177, 12899, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu503', '004')
Unknown18011('pyu504', 12643, 24884, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu504', '005')
Unknown18011('pyu505', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12899, 24885, 25399, 24887, 25399, 24887, 25399, 12852, 14177, 14179, 14177, 12899, 25393, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu505', '006')
Unknown18011('pyu506', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu506', '007')
Unknown18011('pyu507', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu507', '008')
Unknown18011('pyu520', 12643, 14177, 14179, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu520', '009')
Unknown18011('pyu521', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu521', '010')
Unknown18011('pyu522', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 14133, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu522', '011')
Unknown18011('pyu523', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu523', '012')
Unknown18011('pyu524', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu524', '013')
Unknown18011('pyu525', 12643, 14177, 14179, 14177, 13667, 24882, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu525', '014')
Unknown18011('pyu402_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu402_1', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu403_0', 12643, 14177, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu403_1', 12643, 14177, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601brc', 12643, 14177, 12643, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601brc', '019')
Unknown18011('pyu601bph', 12643, 14177, 14179, 14177, 13155, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 12850, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601bph', '020')
Unknown18011('pyu601bjb', 12643, 14177, 14179, 14177, 14179, 14177, 13923, 24887, 25399, 24887, 25399, 24887, 25399, 14132, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601bjb', '021')
Unknown18011('pyu601pbc', 12643, 14177, 13155, 24880, 25399, 24887, 25399, 24887, 25399, 14132, 14177, 14179, 14177, 14179, 14177, 14179, 12641, 25394, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601pbc', '022')
Unknown18011('pyu600pce', 12643, 13665, 13667, 13665, 13155, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu600pce', '023')
Unknown18011('pyu601pka', 12643, 12897, 25392, 14134, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 14134, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601pka', '024')
Unknown18011('pyu600pla', 12643, 14177, 14179, 14177, 13155, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 12340, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu600pla', '025')
Unknown18011('pyu600uca', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 24880, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu600uca', '026')
Unknown18011('pyu601ugo', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601ugo', '027')
Unknown18011('pyu600rwi', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13667, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 12339, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu600rwi', '028')
Unknown18011('pyu601pad', 14179, 14177, 14179, 14177, 13155, 24885, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601pad', '029')
Unknown18011('pyu600kym', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 24884, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 12850, 14177, 14179, 13921, 13923, 13921, 13923, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu600kym', '030')
Unknown18011('pyu601bce', 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 24889, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu601bce', '044')
Unknown18011('pyu701brc', 12643, 13665, 13667, 13665, 12899, 24885, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701brc', '031')
Unknown18011('pyu700bph', 12643, 14177, 12643, 24880, 25399, 14132, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700bph', '032')
Unknown18011('pyu700bjb', 12643, 12641, 25392, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 14131, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700bjb', '033')
Unknown18011('pyu700pbc', 12643, 14177, 14179, 14177, 13155, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 14131, 14177, 14179, 14177, 14179, 14177, 13155, 24887, 25399, 24887, 25399, 14132, 14177, 14179, 14177, 12643, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700pbc', '034')
Unknown18011('pyu701pce_1', 12643, 14177, 14179, 14177, 13411, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701pce_1', '035')
Unknown18011('pyu700pka', 12643, 14177, 14179, 14177, 12899, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700pka', '037')
Unknown18011('pyu701pla', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12899, 24880, 25397, 24885, 25397, 24885, 25397, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701pla', '038')
Unknown18011('pyu700uca', 12643, 13665, 13667, 13665, 13411, 24887, 25399, 14131, 14177, 14179, 14177, 12643, 24880, 25399, 24887, 25399, 14130, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700uca', '039')
Unknown18011('pyu701ugo', 12643, 14177, 12643, 24880, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 13107, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701ugo', '040')
Unknown18011('pyu700rwi', 12643, 13665, 13667, 13665, 12899, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700rwi', '041')
Unknown18011('pyu701pad', 13411, 14177, 13155, 24884, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 13361, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701pad', '042')
Unknown18011('pyu701kym', 12643, 14177, 14179, 13921, 13923, 13921, 13923, 13921, 13923, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu701kym', '043')
Unknown18011('pyu700bce', 13665, 13667, 13665, 12899, 24880, 25398, 24886, 25398, 24886, 25398, 24886, 25398, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu700bce', '045')
Unknown18011('pyu293_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_1', 12643, 13667, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown30092('pyu293_0', '046')
Unknown30092('pyu293_1', '047')
if SLOT_172:
Unknown18011('pyu000', 12643, 14177, 14179, 14177, 14179, 14177, 13155, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_1', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu500', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 12643, 14177, 13155, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12641, 12899, 14177, 13155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu501', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu502', 12643, 12643, 14177, 14179, 14177, 14179, 12897, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 13411, 14177, 14179, 13921, 12643, 13153, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu503', 12643, 12899, 14177, 14179, 14177, 14179, 12897, 13411, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13409, 13667, 13921, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu504', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 13155, 14177, 12899, 14691, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu505', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 12899, 14177, 14179, 14177, 12643, 13411, 13153, 12643, 14177, 14179, 13665, 12643, 14177, 13155, 13155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu506', 12643, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13665, 12643, 14177, 14179, 14177, 14179, 14177, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu507', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 12643, 24887, 25399, 24887, 25398, 24884, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25394, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu520', 12643, 12643, 14177, 14179, 14177, 12643, 12899, 24881, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25394, 12594, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu521', 12643, 12643, 14177, 14179, 14177, 13923, 12643, 14177, 14179, 14177, 13411, 12643, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu522', 12643, 12643, 14177, 14179, 13921, 12643, 12897, 14435, 13409, 12643, 24888, 25399, 24887, 25393, 24881, 25399, 24887, 25399, 24888, 25399, 24887, 25399, 25399, 24881, 25399, 24887, 25399, 24887, 25394, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu523', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12643, 24884, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25395, 24881, 25399, 24887, 25394, 24885, 25399, 24887, 25399, 24882, 25399, 24887, 25399, 25393, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu524', 12643, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 12643, 24882, 25399, 24887, 25399, 24887, 25393, 24883, 25399, 24887, 25399, 24887, 25395, 24881, 25399, 24887, 25399, 25396, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu525', 12643, 12643, 14177, 14179, 14177, 14179, 13153, 13155, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13409, 12643, 14177, 14179, 14177, 14179, 13665, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 13923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu402_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu402_1', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu403_0', 12643, 14177, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu403_1', 12643, 14177, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601brc', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 13667, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601bph', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 12897, 13411, 14177, 13411, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12641, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601bjb', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 13667, 12899, 14177, 13923, 14691, 14177, 14179, 14177, 14179, 14177, 14179, 13923, 14177, 13667, 13667, 14177, 14179, 14177, 14179, 13921, 12643, 14177, 14179, 14177, 12899, 13155, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 13155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601pbc', 12643, 12643, 14177, 14179, 14177, 14179, 12899, 14177, 14179, 13921, 12643, 14177, 14179, 14177, 14179, 14177, 13411, 12643, 14177, 14179, 13153, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12641, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu600pce', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 14179, 14177, 14179, 14177, 13155, 12643, 14177, 14179, 14177, 14179, 13921, 13411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601pka', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 12643, 14177, 14179, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 14177, 13411, 13667, 12897, 13411, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu600pla', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 12897, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu600uca', 12643, 12899, 14177, 13411, 14177, 14179, 12897, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 12643, 24883, 25399, 24887, 25399, 24887, 25399, 24887, 25394, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601ugo', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu600rwi', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 13411, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13155, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601pad', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 13409, 12899, 24884, 25399, 25398, 24881, 25399, 25393, 12849, 14177, 14179, 14177, 14179, 13665, 12643, 24885, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25398, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu600kym', 13667, 14177, 14691, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12899, 24887, 25400, 12337, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14689, 12643, 24888, 25399, 12593, 14689, 12643, 24882, 25399, 24887, 25399, 24887, 12337, 12643, 24880, 25399, 24887, 12337, 13411, 12899, 13923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu601bce', 12643, 14177, 14179, 14177, 13923, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 12897, 13411, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13411, 13411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701brc', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 13155, 13153, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700bph', 12643, 12643, 14177, 14179, 14177, 13923, 12643, 24888, 25399, 24887, 25397, 24886, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25399, 24882, 25396, 12850, 14177, 14179, 14177, 14179, 12897, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700bjb', 12643, 12643, 14177, 14179, 13409, 13667, 14177, 13667, 13155, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12897, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 12643, 12643, 14177, 13155, 12899, 14177, 14179, 12897, 13155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700pbc', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 12897, 12643, 14177, 14179, 14177, 14179, 13665, 12643, 14177, 13667, 13667, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13921, 12899, 24888, 25399, 24887, 25399, 25398, 13873, 14177, 14179, 14177, 14179, 13665, 13667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701pce_1', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13923, 12899, 14177, 14179, 14177, 14179, 12897, 13667, 14177, 14179, 14177, 14179, 13665, 13411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700pka', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 13923, 12899, 13665, 12643, 24881, 25399, 24887, 25399, 24887, 25399, 25397, 24881, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25393, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25393, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701pla', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 13409, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700uca', 12643, 12643, 14177, 14179, 13153, 13923, 14177, 14179, 14177, 13155, 14177, 14179, 14177, 13667, 12643, 24883, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 24887, 25399, 25393, 24881, 25399, 24887, 25399, 25397, 12337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701ugo', 12643, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 12641, 12899, 13665, 12643, 14177, 14179, 14177, 13923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700rwi', 12643, 12643, 14177, 14179, 13409, 12899, 24885, 25399, 24887, 25399, 24887, 25399, 25397, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701pad', 12643, 12643, 14177, 14179, 14177, 14179, 13665, 12899, 14177, 13411, 14177, 14179, 14177, 14179, 14177, 14179, 13409, 13411, 14177, 14179, 14177, 14179, 14177, 13155, 12899, 14177, 14179, 14177, 13923, 14435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu701kym', 12643, 12643, 14177, 14179, 14177, 13411, 13411, 14177, 14179, 14177, 13667, 13155, 14177, 14179, 14177, 14179, 14177, 12899, 14435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu700bce', 12643, 12643, 14177, 14179, 14177, 14179, 14177, 14179, 13153, 13155, 14177, 14179, 14177, 14179, 14177, 13155, 12899, 14177, 13155, 13411, 14177, 14179, 13665, 13923, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_0', 12643, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown18011('pyu293_1', 12643, 12899, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 14177, 14179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
@State
def CmnActEntry():
label(0)
sprite('null', 1) # 1-1
loopRest()
if SLOT_17:
_gotolabel(0)
if SLOT_169:
_gotolabel(482)
if SLOT_122:
_gotolabel(482)
if SLOT_123:
_gotolabel(482)
PartnerChar('brc')
if SLOT_ReturnVal:
_gotolabel(100)
PartnerChar('bjb')
if SLOT_ReturnVal:
_gotolabel(110)
PartnerChar('pbc')
if SLOT_ReturnVal:
_gotolabel(120)
PartnerChar('ugo')
if SLOT_ReturnVal:
_gotolabel(130)
PartnerChar('rwi')
if SLOT_ReturnVal:
_gotolabel(140)
PartnerChar('pka')
if SLOT_ReturnVal:
_gotolabel(150)
PartnerChar('pce')
if SLOT_ReturnVal:
_gotolabel(160)
PartnerChar('uca')
if SLOT_ReturnVal:
_gotolabel(170)
PartnerChar('pla')
if SLOT_ReturnVal:
_gotolabel(180)
PartnerChar('bph')
if SLOT_ReturnVal:
_gotolabel(190)
PartnerChar('bce')
if SLOT_ReturnVal:
_gotolabel(200)
PartnerChar('pad')
if SLOT_ReturnVal:
_gotolabel(210)
PartnerChar('kym')
if SLOT_ReturnVal:
_gotolabel(220)
label(482)
Unknown19(991, 2, 158)
random_(2, 0, 50)
if SLOT_ReturnVal:
_gotolabel(10)
sprite('yu600_00', 6) # 2-7
if SLOT_158:
Unknown7006('pyu500', 100, 896891248, 12592, 0, 0, 100, 896891248, 12848, 0, 0, 100, 896891248, 13872, 0, 0, 100)
sprite('yu600_01', 6) # 8-13
sprite('yu600_02', 6) # 14-19
sprite('yu600_03', 6) # 20-25
sprite('yu600_04', 30) # 26-55
sprite('yu600_03', 6) # 56-61
sprite('yu600_02', 6) # 62-67
sprite('yu600_01', 6) # 68-73
sprite('yu600_05', 6) # 74-79
sprite('yu600_06', 6) # 80-85
sprite('yu600_07', 6) # 86-91
sprite('yu600_08', 6) # 92-97
sprite('yu600_09', 6) # 98-103
GFX_1('yuef_hinoko', 0)
sprite('yu600_10', 6) # 104-109
SFX_3('yu000')
GFX_1('yuef_hinoko', 0)
sprite('yu600_11', 10) # 110-119
GFX_1('yuef_hinoko', 0)
sprite('yu600_12', 6) # 120-125
GFX_1('yuef_hinoko', 0)
sprite('yu600_13', 6) # 126-131
GFX_1('yuef_hinoko', 0)
Unknown23018(1)
label(1)
sprite('yu000_00', 6) # 132-137
sprite('yu000_01', 6) # 138-143
sprite('yu000_02', 6) # 144-149
sprite('yu000_03', 6) # 150-155
sprite('yu000_04', 6) # 156-161
sprite('yu000_05', 6) # 162-167
sprite('yu000_06', 6) # 168-173
sprite('yu000_07', 6) # 174-179
sprite('yu000_08', 6) # 180-185
sprite('yu000_09', 6) # 186-191
sprite('yu000_10', 6) # 192-197
sprite('yu000_11', 6) # 198-203
sprite('yu000_12', 6) # 204-209
sprite('yu000_13', 6) # 210-215
sprite('yu000_14', 6) # 216-221
sprite('yu000_15', 6) # 222-227
loopRest()
gotoLabel(1)
ExitState()
label(10)
sprite('yu601_00', 32767) # 228-32994
Unknown36(24)
teleportRelativeX(-200000)
Unknown35()
Unknown23029(11, 50, 0)
sendToLabelUpon(32, 11)
loopRest()
label(11)
sprite('yu601_01', 6) # 32995-33000
if random_(2, 0, 50):
Unknown7006('pyu503', 100, 896891248, 13616, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
SLOT_2 = 1
else:
SLOT_51 = 1
sprite('yu601_02', 6) # 33001-33006
if SLOT_51:
if random_(2, 0, 50):
SFX_1('pyu504')
SLOT_2 = 1
else:
SFX_1('pyu507')
Unknown23018(1)
sprite('yu601_01', 6) # 33007-33012
sprite('yu601_02', 6) # 33013-33018
sprite('yu601_01', 6) # 33019-33024
sprite('yu601_02', 6) # 33025-33030
sprite('yu601_01', 6) # 33031-33036
sprite('yu601_02', 6) # 33037-33042
sprite('yu601_01', 6) # 33043-33048
sprite('yu601_02', 6) # 33049-33054
sprite('yu601_01', 6) # 33055-33060
sprite('yu601_02', 6) # 33061-33066
sprite('yu601_01', 6) # 33067-33072
sprite('yu601_02', 6) # 33073-33078
sprite('yu601_01', 6) # 33079-33084
sprite('yu601_02', 6) # 33085-33090
sprite('yu601_01', 6) # 33091-33096
sprite('yu601_02', 6) # 33097-33102
if SLOT_2:
sendToLabel(12)
sprite('yu601_01', 6) # 33103-33108
sprite('yu601_02', 6) # 33109-33114
sprite('yu601_01', 6) # 33115-33120
sprite('yu601_02', 6) # 33121-33126
label(12)
sprite('yu601_03', 6) # 33127-33132
sprite('yu601_04', 6) # 33133-33138
sprite('yu601_05', 6) # 33139-33144
SFX_3('cloth_m')
sprite('yu601_06', 6) # 33145-33150
sprite('yu601_07', 6) # 33151-33156
sprite('yu601_08', 6) # 33157-33162
sprite('yu601_09', 6) # 33163-33168
SFX_3('hair')
sprite('yu601_10', 6) # 33169-33174
sprite('yu601_11', 6) # 33175-33180
sprite('yu601_12', 6) # 33181-33186
label(13)
sprite('yu000_00', 6) # 33187-33192
sprite('yu000_01', 6) # 33193-33198
sprite('yu000_02', 6) # 33199-33204
sprite('yu000_03', 6) # 33205-33210
sprite('yu000_04', 6) # 33211-33216
sprite('yu000_05', 6) # 33217-33222
sprite('yu000_06', 6) # 33223-33228
sprite('yu000_07', 6) # 33229-33234
sprite('yu000_08', 6) # 33235-33240
sprite('yu000_09', 6) # 33241-33246
sprite('yu000_10', 6) # 33247-33252
sprite('yu000_11', 6) # 33253-33258
sprite('yu000_12', 6) # 33259-33264
sprite('yu000_13', 6) # 33265-33270
sprite('yu000_14', 6) # 33271-33276
sprite('yu000_15', 6) # 33277-33282
loopRest()
gotoLabel(13)
ExitState()
label(20)
sprite('yu000_00', 1) # 33283-33283
SFX_1('pyu701pla')
label(21)
sprite('yu000_00', 6) # 33284-33289
sprite('yu000_01', 6) # 33290-33295
sprite('yu000_02', 6) # 33296-33301
sprite('yu000_03', 6) # 33302-33307
sprite('yu000_04', 6) # 33308-33313
sprite('yu000_05', 6) # 33314-33319
sprite('yu000_06', 6) # 33320-33325
sprite('yu000_07', 6) # 33326-33331
sprite('yu000_08', 6) # 33332-33337
sprite('yu000_09', 6) # 33338-33343
sprite('yu000_10', 6) # 33344-33349
sprite('yu000_11', 6) # 33350-33355
sprite('yu000_12', 6) # 33356-33361
sprite('yu000_13', 6) # 33362-33367
sprite('yu000_14', 6) # 33368-33373
sprite('yu000_15', 6) # 33374-33379
gotoLabel(21)
label(100)
sprite('yu000_00', 1) # 33380-33380
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1465000)
def upon_40():
clearUponHandler(40)
sendToLabel(102)
label(101)
sprite('yu000_00', 6) # 33381-33386
sprite('yu000_01', 6) # 33387-33392
sprite('yu000_02', 6) # 33393-33398
sprite('yu000_03', 6) # 33399-33404
sprite('yu000_04', 6) # 33405-33410
sprite('yu000_05', 6) # 33411-33416
sprite('yu000_06', 6) # 33417-33422
sprite('yu000_07', 6) # 33423-33428
sprite('yu000_08', 6) # 33429-33434
sprite('yu000_09', 6) # 33435-33440
sprite('yu000_10', 6) # 33441-33446
sprite('yu000_11', 6) # 33447-33452
sprite('yu000_12', 6) # 33453-33458
sprite('yu000_13', 6) # 33459-33464
sprite('yu000_14', 6) # 33465-33470
sprite('yu000_15', 6) # 33471-33476
gotoLabel(101)
label(102)
sprite('yu001_00', 8) # 33477-33484
sprite('yu001_01', 8) # 33485-33492
SFX_1('pyu601brc')
sprite('yu001_02', 8) # 33493-33500
sprite('yu001_03', 8) # 33501-33508
sprite('yu001_04', 8) # 33509-33516
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 33517-33524
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 33525-33532
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 33533-33540
sprite('yu001_08', 8) # 33541-33548
sprite('yu001_00', 8) # 33549-33556
Unknown21011(120)
label(103)
sprite('yu000_00', 6) # 33557-33562
sprite('yu000_01', 6) # 33563-33568
sprite('yu000_02', 6) # 33569-33574
sprite('yu000_03', 6) # 33575-33580
sprite('yu000_04', 6) # 33581-33586
sprite('yu000_05', 6) # 33587-33592
sprite('yu000_06', 6) # 33593-33598
sprite('yu000_07', 6) # 33599-33604
sprite('yu000_08', 6) # 33605-33610
sprite('yu000_09', 6) # 33611-33616
sprite('yu000_10', 6) # 33617-33622
sprite('yu000_11', 6) # 33623-33628
sprite('yu000_12', 6) # 33629-33634
sprite('yu000_13', 6) # 33635-33640
sprite('yu000_14', 6) # 33641-33646
sprite('yu000_15', 6) # 33647-33652
gotoLabel(103)
ExitState()
label(110)
sprite('yu000_00', 1) # 33653-33653
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1465000)
def upon_40():
clearUponHandler(40)
sendToLabel(112)
label(111)
sprite('yu000_00', 6) # 33654-33659
sprite('yu000_01', 6) # 33660-33665
sprite('yu000_02', 6) # 33666-33671
sprite('yu000_03', 6) # 33672-33677
sprite('yu000_04', 6) # 33678-33683
sprite('yu000_05', 6) # 33684-33689
sprite('yu000_06', 6) # 33690-33695
sprite('yu000_07', 6) # 33696-33701
sprite('yu000_08', 6) # 33702-33707
sprite('yu000_09', 6) # 33708-33713
sprite('yu000_10', 6) # 33714-33719
sprite('yu000_11', 6) # 33720-33725
sprite('yu000_12', 6) # 33726-33731
sprite('yu000_13', 6) # 33732-33737
sprite('yu000_14', 6) # 33738-33743
sprite('yu000_15', 6) # 33744-33749
gotoLabel(111)
label(112)
sprite('yu001_00', 8) # 33750-33757
sprite('yu001_01', 8) # 33758-33765
SFX_1('pyu601bjb')
sprite('yu001_02', 8) # 33766-33773
sprite('yu001_03', 8) # 33774-33781
sprite('yu001_04', 8) # 33782-33789
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 33790-33797
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 33798-33805
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 33806-33813
sprite('yu001_08', 8) # 33814-33821
sprite('yu001_00', 8) # 33822-33829
Unknown23018(1)
label(113)
sprite('yu000_00', 6) # 33830-33835
sprite('yu000_01', 6) # 33836-33841
sprite('yu000_02', 6) # 33842-33847
sprite('yu000_03', 6) # 33848-33853
sprite('yu000_04', 6) # 33854-33859
sprite('yu000_05', 6) # 33860-33865
sprite('yu000_06', 6) # 33866-33871
sprite('yu000_07', 6) # 33872-33877
sprite('yu000_08', 6) # 33878-33883
sprite('yu000_09', 6) # 33884-33889
sprite('yu000_10', 6) # 33890-33895
sprite('yu000_11', 6) # 33896-33901
sprite('yu000_12', 6) # 33902-33907
sprite('yu000_13', 6) # 33908-33913
sprite('yu000_14', 6) # 33914-33919
sprite('yu000_15', 6) # 33920-33925
gotoLabel(113)
ExitState()
label(120)
sprite('yu601_00', 32767) # 33926-66692
if SLOT_158:
Unknown1000(-1665000)
else:
Unknown1000(-1665000)
def upon_40():
clearUponHandler(40)
Unknown21007(11, 32)
Unknown23029(11, 55, 0)
sendToLabelUpon(32, 121)
loopRest()
label(121)
sprite('yu601_01', 6) # 66693-66698
SFX_1('pyu601pbc')
sprite('yu601_02', 6) # 66699-66704
sprite('yu601_01', 6) # 66705-66710
sprite('yu601_02', 6) # 66711-66716
sprite('yu601_01', 6) # 66717-66722
sprite('yu601_02', 6) # 66723-66728
sprite('yu601_01', 6) # 66729-66734
sprite('yu601_02', 6) # 66735-66740
sprite('yu601_01', 6) # 66741-66746
sprite('yu601_02', 6) # 66747-66752
sprite('yu601_01', 6) # 66753-66758
sprite('yu601_02', 6) # 66759-66764
sprite('yu601_01', 6) # 66765-66770
sprite('yu601_02', 6) # 66771-66776
sprite('yu601_01', 6) # 66777-66782
sprite('yu601_02', 6) # 66783-66788
sprite('yu601_01', 6) # 66789-66794
sprite('yu601_02', 6) # 66795-66800
sprite('yu601_03', 6) # 66801-66806
sprite('yu601_04', 6) # 66807-66812
sprite('yu601_05', 6) # 66813-66818
SFX_3('cloth_m')
sprite('yu601_06', 6) # 66819-66824
sprite('yu601_07', 6) # 66825-66830
sprite('yu601_08', 6) # 66831-66836
sprite('yu601_09', 6) # 66837-66842
SFX_3('hair')
sprite('yu601_10', 6) # 66843-66848
sprite('yu601_11', 6) # 66849-66854
sprite('yu601_12', 6) # 66855-66860
Unknown21011(120)
label(122)
sprite('yu000_00', 6) # 66861-66866
sprite('yu000_01', 6) # 66867-66872
sprite('yu000_02', 6) # 66873-66878
sprite('yu000_03', 6) # 66879-66884
sprite('yu000_04', 6) # 66885-66890
sprite('yu000_05', 6) # 66891-66896
sprite('yu000_06', 6) # 66897-66902
sprite('yu000_07', 6) # 66903-66908
sprite('yu000_08', 6) # 66909-66914
sprite('yu000_09', 6) # 66915-66920
sprite('yu000_10', 6) # 66921-66926
sprite('yu000_11', 6) # 66927-66932
sprite('yu000_12', 6) # 66933-66938
sprite('yu000_13', 6) # 66939-66944
sprite('yu000_14', 6) # 66945-66950
sprite('yu000_15', 6) # 66951-66956
gotoLabel(122)
ExitState()
label(130)
sprite('yu601_00', 32767) # 66957-99723
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1665000)
def upon_40():
clearUponHandler(40)
Unknown21007(11, 32)
Unknown23029(11, 55, 0)
sendToLabelUpon(32, 131)
loopRest()
label(131)
sprite('yu601_01', 6) # 99724-99729
SFX_1('pyu601ugo')
sprite('yu601_02', 6) # 99730-99735
sprite('yu601_01', 6) # 99736-99741
sprite('yu601_02', 6) # 99742-99747
sprite('yu601_01', 6) # 99748-99753
sprite('yu601_02', 6) # 99754-99759
sprite('yu601_01', 6) # 99760-99765
sprite('yu601_02', 6) # 99766-99771
sprite('yu601_01', 6) # 99772-99777
sprite('yu601_02', 6) # 99778-99783
sprite('yu601_01', 6) # 99784-99789
sprite('yu601_02', 6) # 99790-99795
sprite('yu601_01', 6) # 99796-99801
sprite('yu601_02', 6) # 99802-99807
sprite('yu601_01', 6) # 99808-99813
sprite('yu601_02', 6) # 99814-99819
sprite('yu601_01', 6) # 99820-99825
sprite('yu601_02', 6) # 99826-99831
sprite('yu601_03', 6) # 99832-99837
sprite('yu601_04', 6) # 99838-99843
sprite('yu601_05', 6) # 99844-99849
SFX_3('cloth_m')
sprite('yu601_06', 6) # 99850-99855
sprite('yu601_07', 6) # 99856-99861
sprite('yu601_08', 6) # 99862-99867
sprite('yu601_09', 6) # 99868-99873
SFX_3('hair')
sprite('yu601_10', 6) # 99874-99879
sprite('yu601_11', 6) # 99880-99885
sprite('yu601_12', 6) # 99886-99891
Unknown21011(120)
label(132)
sprite('yu000_00', 6) # 99892-99897
sprite('yu000_01', 6) # 99898-99903
sprite('yu000_02', 6) # 99904-99909
sprite('yu000_03', 6) # 99910-99915
sprite('yu000_04', 6) # 99916-99921
sprite('yu000_05', 6) # 99922-99927
sprite('yu000_06', 6) # 99928-99933
sprite('yu000_07', 6) # 99934-99939
sprite('yu000_08', 6) # 99940-99945
sprite('yu000_09', 6) # 99946-99951
sprite('yu000_10', 6) # 99952-99957
sprite('yu000_11', 6) # 99958-99963
sprite('yu000_12', 6) # 99964-99969
sprite('yu000_13', 6) # 99970-99975
sprite('yu000_14', 6) # 99976-99981
sprite('yu000_15', 6) # 99982-99987
gotoLabel(132)
ExitState()
label(140)
sprite('yu601_00', 32767) # 99988-132754
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1465000)
Unknown23029(11, 50, 0)
sendToLabelUpon(32, 141)
loopRest()
label(141)
sprite('yu601_01', 6) # 132755-132760
SFX_1('pyu600rwi')
sprite('yu601_02', 6) # 132761-132766
sprite('yu601_01', 6) # 132767-132772
sprite('yu601_02', 6) # 132773-132778
sprite('yu601_01', 6) # 132779-132784
sprite('yu601_02', 6) # 132785-132790
sprite('yu601_01', 6) # 132791-132796
sprite('yu601_02', 6) # 132797-132802
sprite('yu601_01', 6) # 132803-132808
sprite('yu601_02', 6) # 132809-132814
sprite('yu601_01', 6) # 132815-132820
sprite('yu601_02', 6) # 132821-132826
sprite('yu601_01', 6) # 132827-132832
sprite('yu601_02', 6) # 132833-132838
sprite('yu601_01', 6) # 132839-132844
sprite('yu601_02', 6) # 132845-132850
sprite('yu601_01', 6) # 132851-132856
sprite('yu601_02', 6) # 132857-132862
sprite('yu601_03', 6) # 132863-132868
sprite('yu601_04', 6) # 132869-132874
sprite('yu601_05', 6) # 132875-132880
SFX_3('cloth_m')
sprite('yu601_06', 6) # 132881-132886
sprite('yu601_07', 6) # 132887-132892
sprite('yu601_08', 6) # 132893-132898
sprite('yu601_09', 6) # 132899-132904
SFX_3('hair')
sprite('yu601_10', 6) # 132905-132910
sprite('yu601_11', 6) # 132911-132916
sprite('yu601_12', 6) # 132917-132922
sprite('yu000_00', 6) # 132923-132928
sprite('yu000_01', 6) # 132929-132934
sprite('yu000_02', 6) # 132935-132940
sprite('yu000_03', 6) # 132941-132946
sprite('yu000_04', 6) # 132947-132952
sprite('yu000_05', 6) # 132953-132958
sprite('yu000_06', 6) # 132959-132964
sprite('yu000_07', 6) # 132965-132970
sprite('yu000_08', 6) # 132971-132976
sprite('yu000_09', 6) # 132977-132982
sprite('yu000_10', 6) # 132983-132988
sprite('yu000_11', 6) # 132989-132994
sprite('yu000_12', 6) # 132995-133000
sprite('yu000_13', 6) # 133001-133006
sprite('yu000_14', 6) # 133007-133012
sprite('yu000_15', 6) # 133013-133018
sprite('yu000_00', 6) # 133019-133024
sprite('yu000_01', 6) # 133025-133030
sprite('yu000_02', 6) # 133031-133036
sprite('yu000_03', 6) # 133037-133042
sprite('yu000_04', 6) # 133043-133048
sprite('yu000_05', 6) # 133049-133054
Unknown21007(24, 40)
Unknown21011(400)
sprite('yu000_06', 6) # 133055-133060
sprite('yu000_07', 6) # 133061-133066
sprite('yu000_08', 6) # 133067-133072
sprite('yu000_09', 6) # 133073-133078
sprite('yu000_10', 6) # 133079-133084
sprite('yu000_11', 6) # 133085-133090
sprite('yu000_12', 6) # 133091-133096
sprite('yu000_13', 6) # 133097-133102
sprite('yu000_14', 6) # 133103-133108
sprite('yu000_15', 6) # 133109-133114
label(142)
sprite('yu000_00', 6) # 133115-133120
sprite('yu000_01', 6) # 133121-133126
sprite('yu000_02', 6) # 133127-133132
sprite('yu000_03', 6) # 133133-133138
sprite('yu000_04', 6) # 133139-133144
sprite('yu000_05', 6) # 133145-133150
sprite('yu000_06', 6) # 133151-133156
sprite('yu000_07', 6) # 133157-133162
sprite('yu000_08', 6) # 133163-133168
sprite('yu000_09', 6) # 133169-133174
sprite('yu000_10', 6) # 133175-133180
sprite('yu000_11', 6) # 133181-133186
sprite('yu000_12', 6) # 133187-133192
sprite('yu000_13', 6) # 133193-133198
sprite('yu000_14', 6) # 133199-133204
sprite('yu000_15', 6) # 133205-133210
gotoLabel(142)
ExitState()
label(150)
sprite('yu000_00', 1) # 133211-133211
if (not SLOT_158):
Unknown1000(-1465000)
else:
Unknown1000(-1465000)
def upon_40():
clearUponHandler(40)
sendToLabel(152)
label(151)
sprite('yu000_00', 6) # 133212-133217
sprite('yu000_01', 6) # 133218-133223
sprite('yu000_02', 6) # 133224-133229
sprite('yu000_03', 6) # 133230-133235
sprite('yu000_04', 6) # 133236-133241
sprite('yu000_05', 6) # 133242-133247
sprite('yu000_06', 6) # 133248-133253
sprite('yu000_07', 6) # 133254-133259
sprite('yu000_08', 6) # 133260-133265
sprite('yu000_09', 6) # 133266-133271
sprite('yu000_10', 6) # 133272-133277
sprite('yu000_11', 6) # 133278-133283
sprite('yu000_12', 6) # 133284-133289
sprite('yu000_13', 6) # 133290-133295
sprite('yu000_14', 6) # 133296-133301
sprite('yu000_15', 6) # 133302-133307
gotoLabel(151)
label(152)
sprite('yu001_00', 8) # 133308-133315
sprite('yu001_01', 8) # 133316-133323
SFX_1('pyu601pka')
sprite('yu001_02', 8) # 133324-133331
sprite('yu001_03', 8) # 133332-133339
sprite('yu001_04', 8) # 133340-133347
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 133348-133355
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 133356-133363
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 133364-133371
sprite('yu001_08', 8) # 133372-133379
sprite('yu001_00', 8) # 133380-133387
Unknown23018(1)
label(153)
sprite('yu000_00', 6) # 133388-133393
sprite('yu000_01', 6) # 133394-133399
sprite('yu000_02', 6) # 133400-133405
sprite('yu000_03', 6) # 133406-133411
sprite('yu000_04', 6) # 133412-133417
sprite('yu000_05', 6) # 133418-133423
sprite('yu000_06', 6) # 133424-133429
sprite('yu000_07', 6) # 133430-133435
sprite('yu000_08', 6) # 133436-133441
sprite('yu000_09', 6) # 133442-133447
sprite('yu000_10', 6) # 133448-133453
sprite('yu000_11', 6) # 133454-133459
sprite('yu000_12', 6) # 133460-133465
sprite('yu000_13', 6) # 133466-133471
sprite('yu000_14', 6) # 133472-133477
sprite('yu000_15', 6) # 133478-133483
gotoLabel(153)
ExitState()
label(160)
sprite('yu641_00', 1) # 133484-133484
Unknown2019(-100)
Unknown1000(-1290000)
sprite('yu641_00', 6) # 133485-133490
sprite('yu641_01', 6) # 133491-133496
sprite('yu641_02', 6) # 133497-133502
SFX_1('pyu600pce')
sprite('yu641_03', 6) # 133503-133508
sprite('yu641_04', 6) # 133509-133514
label(161)
sprite('yu641_00', 6) # 133515-133520
sprite('yu641_01', 6) # 133521-133526
sprite('yu641_02', 6) # 133527-133532
sprite('yu641_03', 6) # 133533-133538
sprite('yu641_04', 6) # 133539-133544
if SLOT_97:
_gotolabel(161)
sprite('yu641_00', 1) # 133545-133545
Unknown21007(24, 40)
Unknown21011(240)
label(162)
sprite('yu641_00', 6) # 133546-133551
sprite('yu641_01', 6) # 133552-133557
sprite('yu641_02', 6) # 133558-133563
sprite('yu641_03', 6) # 133564-133569
sprite('yu641_04', 6) # 133570-133575
gotoLabel(162)
ExitState()
label(170)
sprite('yu600_00', 6) # 133576-133581
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1230000)
SFX_1('pyu600uca')
sprite('yu600_01', 6) # 133582-133587
sprite('yu600_02', 6) # 133588-133593
sprite('yu600_03', 6) # 133594-133599
sprite('yu600_04', 30) # 133600-133629
sprite('yu600_03', 6) # 133630-133635
sprite('yu600_02', 6) # 133636-133641
sprite('yu600_01', 6) # 133642-133647
sprite('yu600_05', 6) # 133648-133653
sprite('yu600_06', 6) # 133654-133659
sprite('yu600_07', 6) # 133660-133665
sprite('yu600_08', 6) # 133666-133671
sprite('yu600_09', 6) # 133672-133677
GFX_1('yuef_hinoko', 0)
sprite('yu600_10', 6) # 133678-133683
SFX_3('yu000')
GFX_1('yuef_hinoko', 0)
sprite('yu600_11', 10) # 133684-133693
GFX_1('yuef_hinoko', 0)
sprite('yu600_12', 6) # 133694-133699
GFX_1('yuef_hinoko', 0)
sprite('yu600_13', 6) # 133700-133705
GFX_1('yuef_hinoko', 0)
Unknown21011(380)
label(171)
sprite('yu000_00', 6) # 133706-133711
sprite('yu000_01', 6) # 133712-133717
sprite('yu000_02', 6) # 133718-133723
sprite('yu000_03', 6) # 133724-133729
sprite('yu000_04', 6) # 133730-133735
sprite('yu000_05', 6) # 133736-133741
sprite('yu000_06', 6) # 133742-133747
sprite('yu000_07', 6) # 133748-133753
sprite('yu000_08', 6) # 133754-133759
Unknown21007(24, 40)
sprite('yu000_09', 6) # 133760-133765
sprite('yu000_10', 6) # 133766-133771
sprite('yu000_11', 6) # 133772-133777
sprite('yu000_12', 6) # 133778-133783
sprite('yu000_13', 6) # 133784-133789
sprite('yu000_14', 6) # 133790-133795
sprite('yu000_15', 6) # 133796-133801
gotoLabel(171)
ExitState()
label(180)
sprite('yu000_00', 1) # 133802-133802
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1465000)
sprite('yu000_00', 6) # 133803-133808
sprite('yu000_01', 6) # 133809-133814
sprite('yu001_00', 8) # 133815-133822
sprite('yu001_01', 8) # 133823-133830
SFX_1('pyu600pla')
sprite('yu001_02', 8) # 133831-133838
sprite('yu001_03', 8) # 133839-133846
sprite('yu001_04', 8) # 133847-133854
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 133855-133862
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 133863-133870
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 133871-133878
sprite('yu001_08', 8) # 133879-133886
sprite('yu001_00', 8) # 133887-133894
label(181)
sprite('yu000_00', 6) # 133895-133900
sprite('yu000_01', 6) # 133901-133906
sprite('yu000_02', 6) # 133907-133912
sprite('yu000_03', 6) # 133913-133918
sprite('yu000_04', 6) # 133919-133924
sprite('yu000_05', 6) # 133925-133930
sprite('yu000_06', 6) # 133931-133936
sprite('yu000_07', 6) # 133937-133942
sprite('yu000_08', 6) # 133943-133948
sprite('yu000_09', 6) # 133949-133954
sprite('yu000_10', 6) # 133955-133960
sprite('yu000_11', 6) # 133961-133966
sprite('yu000_12', 6) # 133967-133972
sprite('yu000_13', 6) # 133973-133978
sprite('yu000_14', 6) # 133979-133984
sprite('yu000_15', 6) # 133985-133990
if SLOT_97:
_gotolabel(181)
sprite('yu000_00', 1) # 133991-133991
Unknown21007(24, 40)
Unknown21011(270)
label(182)
sprite('yu000_00', 6) # 133992-133997
sprite('yu000_01', 6) # 133998-134003
sprite('yu000_02', 6) # 134004-134009
sprite('yu000_03', 6) # 134010-134015
sprite('yu000_04', 6) # 134016-134021
sprite('yu000_05', 6) # 134022-134027
sprite('yu000_06', 6) # 134028-134033
sprite('yu000_07', 6) # 134034-134039
sprite('yu000_08', 6) # 134040-134045
sprite('yu000_09', 6) # 134046-134051
sprite('yu000_10', 6) # 134052-134057
sprite('yu000_11', 6) # 134058-134063
sprite('yu000_12', 6) # 134064-134069
sprite('yu000_13', 6) # 134070-134075
sprite('yu000_14', 6) # 134076-134081
sprite('yu000_15', 6) # 134082-134087
gotoLabel(182)
ExitState()
label(190)
sprite('yu000_00', 1) # 134088-134088
if SLOT_158:
Unknown1000(-1230000)
else:
Unknown1000(-1465000)
def upon_40():
clearUponHandler(40)
sendToLabel(192)
label(191)
sprite('yu000_00', 6) # 134089-134094
sprite('yu000_01', 6) # 134095-134100
sprite('yu000_02', 6) # 134101-134106
sprite('yu000_03', 6) # 134107-134112
sprite('yu000_04', 6) # 134113-134118
sprite('yu000_05', 6) # 134119-134124
sprite('yu000_06', 6) # 134125-134130
sprite('yu000_07', 6) # 134131-134136
sprite('yu000_08', 6) # 134137-134142
sprite('yu000_09', 6) # 134143-134148
sprite('yu000_10', 6) # 134149-134154
sprite('yu000_11', 6) # 134155-134160
sprite('yu000_12', 6) # 134161-134166
sprite('yu000_13', 6) # 134167-134172
sprite('yu000_14', 6) # 134173-134178
sprite('yu000_15', 6) # 134179-134184
gotoLabel(191)
label(192)
sprite('yu001_00', 8) # 134185-134192
sprite('yu001_01', 8) # 134193-134200
SFX_1('pyu601bph')
sprite('yu001_02', 8) # 134201-134208
sprite('yu001_03', 8) # 134209-134216
sprite('yu001_04', 8) # 134217-134224
GFX_0('reaction_sakura', 0)
sprite('yu001_05', 8) # 134225-134232
GFX_0('reaction_sakura', 0)
sprite('yu001_06', 8) # 134233-134240
GFX_0('reaction_sakura', 0)
sprite('yu001_07', 8) # 134241-134248
sprite('yu001_08', 8) # 134249-134256
sprite('yu001_00', 8) # 134257-134264
Unknown23018(1)
label(193)
sprite('yu000_00', 6) # 134265-134270
sprite('yu000_01', 6) # 134271-134276
sprite('yu000_02', 6) # 134277-134282
sprite('yu000_03', 6) # 134283-134288
sprite('yu000_04', 6) # 134289-134294
sprite('yu000_05', 6) # 134295-134300
sprite('yu000_06', 6) # 134301-134306
sprite('yu000_07', 6) # 134307-134312
sprite('yu000_08', 6) # 134313-134318
sprite('yu000_09', 6) # 134319-134324
sprite('yu000_10', 6) # 134325-134330
sprite('yu000_11', 6) # 134331-134336
sprite('yu000_12', 6) # 134337-134342
sprite('yu000_13', 6) # 134343-134348
sprite('yu000_14', 6) # 134349-134354
sprite('yu000_15', 6) # 134355-134360
gotoLabel(193)
ExitState()
label(200)
sprite('yu601_00', 32767) # 134361-167127
Unknown1000(-1665000)
Unknown2019(-500)
def upon_40():
clearUponHandler(40)
Unknown21007(11, 32)
Unknown23029(11, 55, 0)
sendToLabelUpon(32, 201)
label(201)
sprite('yu601_01', 6) # 167128-167133
SFX_1('pyu601bce')
sprite('yu601_02', 6) # 167134-167139
sprite('yu601_01', 6) # 167140-167145
sprite('yu601_02', 6) # 167146-167151
sprite('yu601_01', 6) # 167152-167157
sprite('yu601_02', 6) # 167158-167163
sprite('yu601_01', 6) # 167164-167169
sprite('yu601_02', 6) # 167170-167175
sprite('yu601_01', 6) # 167176-167181
sprite('yu601_02', 6) # 167182-167187
sprite('yu601_01', 6) # 167188-167193
sprite('yu601_02', 6) # 167194-167199
sprite('yu601_01', 6) # 167200-167205
sprite('yu601_02', 6) # 167206-167211
sprite('yu601_01', 6) # 167212-167217
sprite('yu601_02', 6) # 167218-167223
sprite('yu601_01', 6) # 167224-167229
sprite('yu601_02', 6) # 167230-167235
sprite('yu601_03', 6) # 167236-167241
sprite('yu601_04', 6) # 167242-167247
sprite('yu601_05', 6) # 167248-167253
SFX_3('cloth_m')
sprite('yu601_06', 6) # 167254-167259
sprite('yu601_07', 6) # 167260-167265
sprite('yu601_08', 6) # 167266-167271
sprite('yu601_09', 6) # 167272-167277
SFX_3('hair')
sprite('yu601_10', 6) # 167278-167283
sprite('yu601_11', 6) # 167284-167289
sprite('yu601_12', 6) # 167290-167295
Unknown23018(1)
label(202)
sprite('yu000_00', 6) # 167296-167301
sprite('yu000_01', 6) # 167302-167307
sprite('yu000_02', 6) # 167308-167313
sprite('yu000_03', 6) # 167314-167319
sprite('yu000_04', 6) # 167320-167325
sprite('yu000_05', 6) # 167326-167331
sprite('yu000_06', 6) # 167332-167337
sprite('yu000_07', 6) # 167338-167343
sprite('yu000_08', 6) # 167344-167349
sprite('yu000_09', 6) # 167350-167355
sprite('yu000_10', 6) # 167356-167361
sprite('yu000_11', 6) # 167362-167367
sprite('yu000_12', 6) # 167368-167373
sprite('yu000_13', 6) # 167374-167379
sprite('yu000_14', 6) # 167380-167385
sprite('yu000_15', 6) # 167386-167391
gotoLabel(202)
label(210)
sprite('yu000_00', 1) # 167392-167392
Unknown1000(-1230000)
def upon_40():
clearUponHandler(40)
sendToLabel(212)
label(211)
sprite('yu000_00', 6) # 167393-167398
sprite('yu000_01', 6) # 167399-167404
sprite('yu000_02', 6) # 167405-167410
sprite('yu000_03', 6) # 167411-167416
sprite('yu000_04', 6) # 167417-167422
sprite('yu000_05', 6) # 167423-167428
sprite('yu000_06', 6) # 167429-167434
sprite('yu000_07', 6) # 167435-167440
sprite('yu000_08', 6) # 167441-167446
sprite('yu000_09', 6) # 167447-167452
sprite('yu000_10', 6) # 167453-167458
sprite('yu000_11', 6) # 167459-167464
sprite('yu000_12', 6) # 167465-167470
sprite('yu000_13', 6) # 167471-167476
sprite('yu000_14', 6) # 167477-167482
sprite('yu000_15', 6) # 167483-167488
gotoLabel(211)
label(212)
sprite('yu600_00', 6) # 167489-167494
SFX_1('pyu601pad')
sprite('yu600_01', 6) # 167495-167500
sprite('yu600_02', 6) # 167501-167506
sprite('yu600_03', 6) # 167507-167512
sprite('yu600_04', 30) # 167513-167542
sprite('yu600_03', 6) # 167543-167548
sprite('yu600_02', 6) # 167549-167554
sprite('yu600_01', 6) # 167555-167560
sprite('yu600_05', 6) # 167561-167566
sprite('yu600_06', 6) # 167567-167572
sprite('yu600_07', 6) # 167573-167578
sprite('yu600_08', 6) # 167579-167584
sprite('yu600_09', 6) # 167585-167590
GFX_1('yuef_hinoko', 0)
sprite('yu600_10', 6) # 167591-167596
SFX_3('yu000')
GFX_1('yuef_hinoko', 0)
sprite('yu600_11', 10) # 167597-167606
GFX_1('yuef_hinoko', 0)
sprite('yu600_12', 6) # 167607-167612
GFX_1('yuef_hinoko', 0)
sprite('yu600_13', 6) # 167613-167618
GFX_1('yuef_hinoko', 0)
Unknown23018(1)
label(213)
sprite('yu000_00', 6) # 167619-167624
sprite('yu000_01', 6) # 167625-167630
sprite('yu000_02', 6) # 167631-167636
sprite('yu000_03', 6) # 167637-167642
sprite('yu000_04', 6) # 167643-167648
sprite('yu000_05', 6) # 167649-167654
sprite('yu000_06', 6) # 167655-167660
sprite('yu000_07', 6) # 167661-167666
sprite('yu000_08', 6) # 167667-167672
sprite('yu000_09', 6) # 167673-167678
sprite('yu000_10', 6) # 167679-167684
sprite('yu000_11', 6) # 167685-167690
sprite('yu000_12', 6) # 167691-167696
sprite('yu000_13', 6) # 167697-167702
sprite('yu000_14', 6) # 167703-167708
sprite('yu000_15', 6) # 167709-167714
gotoLabel(213)
label(220)
sprite('yu653_00', 1) # 167715-167715
Unknown1000(-1230000)
Unknown2005()
GFX_0('Sakuraend', 100)
Unknown2019(1000)
SFX_1('pyu600kym')
def upon_40():
clearUponHandler(40)
sendToLabel(222)
label(221)
sprite('yu653_00', 1) # 167716-167716
if SLOT_97:
_gotolabel(221)
sprite('yu653_00', 90) # 167717-167806
sprite('yu653_00', 32767) # 167807-200573
Unknown21007(24, 40)
label(222)
sprite('yu653_00', 20) # 200574-200593
sprite('yu653_01', 32767) # 200594-233360
Unknown21011(80)
label(991)
sprite('yu000_00', 1) # 233361-233361
Unknown2019(1000)
Unknown21011(120)
label(992)
sprite('yu000_00', 6) # 233362-233367
sprite('yu000_01', 6) # 233368-233373
sprite('yu000_02', 6) # 233374-233379
sprite('yu000_03', 6) # 233380-233385
sprite('yu000_04', 6) # 233386-233391
sprite('yu000_05', 6) # 233392-233397
sprite('yu000_06', 6) # 233398-233403
sprite('yu000_07', 6) # 233404-233409
sprite('yu000_08', 6) # 233410-233415
sprite('yu000_09', 6) # 233416-233421
sprite('yu000_10', 6) # 233422-233427
sprite('yu000_11', 6) # 233428-233433
sprite('yu000_12', 6) # 233434-233439
sprite('yu000_13', 6) # 233440-233445
sprite('yu000_14', 6) # 233446-233451
sprite('yu000_15', 6) # 233452-233457
gotoLabel(992)
label(993)
sprite('yu033_00', 2) # 233458-233459
def upon_LANDING():
clearUponHandler(2)
sendToLabel(995)
def upon_STATE_END():
Unknown2019(0)
Unknown3038(1)
Unknown3001(255)
Unknown2034(0)
EnableCollision(0)
Unknown2053(0)
Unknown3001(255)
Unknown3004(-20)
physicsXImpulse(-51000)
physicsYImpulse(18800)
setGravity(1500)
Unknown8002()
sprite('yu033_01', 2) # 233460-233461
label(994)
sprite('yu033_02', 3) # 233462-233464
sprite('yu033_01', 3) # 233465-233467
loopRest()
gotoLabel(994)
label(995)
sprite('null', 3) # 233468-233470
ExitState()
endState()
@State
def CmnActMatchWin():
if SLOT_169:
_gotolabel(482)
if SLOT_122:
_gotolabel(482)
if SLOT_123:
_gotolabel(482)
sprite('keep', 2) # 1-2
def upon_CLEAR_OR_EXIT():
SLOT_58 = 1
Unknown48('19000000020000003400000018000000020000003a000000')
if SLOT_52:
if PartnerChar('brc'):
if (SLOT_145 <= 500000):
sendToLabel(100)
clearUponHandler(3)
if PartnerChar('bjb'):
if (SLOT_145 <= 500000):
sendToLabel(110)
clearUponHandler(3)
if PartnerChar('pbc'):
if (SLOT_145 <= 500000):
sendToLabel(120)
clearUponHandler(3)
if PartnerChar('pce'):
if (SLOT_145 <= 500000):
sendToLabel(130)
clearUponHandler(3)
if PartnerChar('pka'):
if (SLOT_145 <= 500000):
sendToLabel(140)
clearUponHandler(3)
if PartnerChar('ugo'):
if (SLOT_145 <= 500000):
sendToLabel(150)
clearUponHandler(3)
if PartnerChar('rwi'):
if (SLOT_145 <= 500000):
sendToLabel(160)
clearUponHandler(3)
if PartnerChar('uca'):
if (SLOT_145 <= 500000):
sendToLabel(170)
clearUponHandler(3)
if PartnerChar('pla'):
if (SLOT_145 <= 500000):
sendToLabel(180)
clearUponHandler(3)
if PartnerChar('bph'):
if (SLOT_145 <= 500000):
sendToLabel(190)
clearUponHandler(3)
if PartnerChar('bce'):
if (SLOT_145 <= 500000):
sendToLabel(200)
clearUponHandler(3)
if PartnerChar('pad'):
if (SLOT_145 <= 500000):
sendToLabel(210)
clearUponHandler(3)
if PartnerChar('kym'):
if (SLOT_145 <= 500000):
sendToLabel(220)
clearUponHandler(3)
label(482)
sprite('keep', 1) # 3-3
clearUponHandler(3)
SLOT_58 = 0
random_(2, 0, 50)
if SLOT_ReturnVal:
_gotolabel(10)
sprite('yu610_00', 6) # 4-9
sprite('yu610_01', 6) # 10-15
sprite('yu610_02', 6) # 16-21
sprite('yu610_03', 10) # 22-31
sprite('yu610_04', 4) # 32-35
sprite('yu610_05', 4) # 36-39
SFX_3('hair')
sprite('yu610_06', 8) # 40-47
if SLOT_158:
if SLOT_52:
Unknown7006('pyu524', 100, 896891248, 13618, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
elif SLOT_108:
Unknown7006('pyu402_0', 100, 880114032, 828322352, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
else:
Unknown7006('pyu520', 100, 896891248, 12594, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown23018(1)
sprite('yu610_07', 6) # 48-53
sprite('yu610_08', 6) # 54-59
sprite('yu610_09', 6) # 60-65
label(0)
sprite('yu610_10', 8) # 66-73
SFX_3('cloth_l')
sprite('yu610_11', 8) # 74-81
sprite('yu610_12', 8) # 82-89
loopRest()
gotoLabel(0)
label(10)
sprite('yu611_00', 6) # 90-95
sprite('yu611_01', 6) # 96-101
sprite('yu611_02', 13) # 102-114
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 115-122
sprite('yu611_04', 13) # 123-135
sprite('yu611_05', 6) # 136-141
sprite('yu611_06', 6) # 142-147
SFX_3('yu001')
sprite('yu611_07', 6) # 148-153
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 154-159
sprite('yu611_09', 6) # 160-165
if SLOT_158:
if SLOT_52:
Unknown7006('pyu524', 100, 896891248, 13618, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
elif SLOT_108:
Unknown7006('pyu402_0', 100, 880114032, 828322352, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
else:
Unknown7006('pyu522', 100, 896891248, 13106, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Unknown23018(1)
label(11)
sprite('yu611_10', 8) # 166-173
SFX_3('cloth_l')
sprite('yu611_11', 8) # 174-181
sprite('yu611_12', 8) # 182-189
loopRest()
gotoLabel(11)
label(100)
sprite('yu000_00', 1) # 190-190
Unknown2019(1000)
def upon_40():
clearUponHandler(40)
sendToLabel(102)
label(101)
sprite('yu000_00', 6) # 191-196
sprite('yu000_01', 6) # 197-202
sprite('yu000_02', 6) # 203-208
sprite('yu000_03', 6) # 209-214
sprite('yu000_04', 6) # 215-220
sprite('yu000_05', 6) # 221-226
sprite('yu000_06', 6) # 227-232
sprite('yu000_07', 6) # 233-238
sprite('yu000_08', 6) # 239-244
sprite('yu000_09', 6) # 245-250
sprite('yu000_10', 6) # 251-256
sprite('yu000_11', 6) # 257-262
sprite('yu000_12', 6) # 263-268
sprite('yu000_13', 6) # 269-274
sprite('yu000_14', 6) # 275-280
sprite('yu000_15', 6) # 281-286
gotoLabel(101)
label(102)
sprite('yu610_00', 6) # 287-292
sprite('yu610_01', 6) # 293-298
sprite('yu610_02', 6) # 299-304
sprite('yu610_03', 10) # 305-314
sprite('yu610_04', 4) # 315-318
sprite('yu610_05', 4) # 319-322
SFX_3('hair')
sprite('yu610_06', 8) # 323-330
SFX_1('pyu701brc')
sprite('yu610_07', 6) # 331-336
sprite('yu610_08', 6) # 337-342
sprite('yu610_09', 6) # 343-348
Unknown21011(120)
label(103)
sprite('yu610_10', 8) # 349-356
SFX_3('cloth_l')
sprite('yu610_11', 8) # 357-364
sprite('yu610_12', 8) # 365-372
loopRest()
gotoLabel(103)
label(110)
sprite('yu611_00', 6) # 373-378
if (SLOT_38 == 1):
if (SLOT_152 == 1):
Unknown48('190000000200000033000000180000000200000016000000')
Unknown47('01000000020000003300000002000000160000000200000033000000')
if (SLOT_51 >= 0):
Unknown2005()
if (SLOT_38 == 0):
if (SLOT_152 == 0):
Unknown48('190000000200000033000000180000000200000016000000')
Unknown47('01000000020000003300000002000000160000000200000033000000')
if (SLOT_51 <= 0):
Unknown2005()
sprite('yu611_01', 6) # 379-384
sprite('yu611_02', 13) # 385-397
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 398-405
sprite('yu611_04', 13) # 406-418
sprite('yu611_05', 6) # 419-424
sprite('yu611_06', 6) # 425-430
SFX_3('yu001')
sprite('yu611_07', 6) # 431-436
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 437-442
sprite('yu611_09', 6) # 443-448
SFX_1('pyu700bjb')
label(111)
sprite('yu611_10', 8) # 449-456
SFX_3('cloth_l')
sprite('yu611_11', 8) # 457-464
sprite('yu611_12', 8) # 465-472
loopRest()
if SLOT_97:
_gotolabel(111)
sprite('yu611_10', 8) # 473-480
SFX_3('cloth_l')
sprite('yu611_11', 8) # 481-488
sprite('yu611_12', 8) # 489-496
sprite('yu611_10', 1) # 497-497
Unknown21007(24, 40)
Unknown21011(240)
label(112)
sprite('yu611_10', 8) # 498-505
SFX_3('cloth_l')
sprite('yu611_11', 8) # 506-513
sprite('yu611_12', 8) # 514-521
loopRest()
gotoLabel(112)
label(120)
sprite('yu611_00', 6) # 522-527
sprite('yu611_01', 6) # 528-533
sprite('yu611_02', 13) # 534-546
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 547-554
sprite('yu611_04', 13) # 555-567
sprite('yu611_05', 6) # 568-573
sprite('yu611_06', 6) # 574-579
SFX_3('yu001')
sprite('yu611_07', 6) # 580-585
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 586-591
sprite('yu611_09', 6) # 592-597
SFX_1('pyu700pbc')
label(121)
sprite('yu611_10', 8) # 598-605
SFX_3('cloth_l')
sprite('yu611_11', 8) # 606-613
sprite('yu611_12', 8) # 614-621
loopRest()
if SLOT_97:
_gotolabel(121)
sprite('yu611_10', 8) # 622-629
SFX_3('cloth_l')
sprite('yu611_11', 8) # 630-637
sprite('yu611_12', 8) # 638-645
sprite('yu611_10', 1) # 646-646
Unknown21007(24, 40)
Unknown21011(180)
label(122)
sprite('yu611_10', 8) # 647-654
SFX_3('cloth_l')
sprite('yu611_11', 8) # 655-662
sprite('yu611_12', 8) # 663-670
loopRest()
gotoLabel(122)
label(130)
sprite('yu000_00', 1) # 671-671
Unknown2034(0)
Unknown2053(0)
def upon_40():
clearUponHandler(40)
sendToLabel(132)
label(131)
sprite('yu000_00', 6) # 672-677
sprite('yu000_01', 6) # 678-683
sprite('yu000_02', 6) # 684-689
sprite('yu000_03', 6) # 690-695
sprite('yu000_04', 6) # 696-701
sprite('yu000_05', 6) # 702-707
sprite('yu000_06', 6) # 708-713
sprite('yu000_07', 6) # 714-719
sprite('yu000_08', 6) # 720-725
sprite('yu000_09', 6) # 726-731
sprite('yu000_10', 6) # 732-737
sprite('yu000_11', 6) # 738-743
sprite('yu000_12', 6) # 744-749
sprite('yu000_13', 6) # 750-755
sprite('yu000_14', 6) # 756-761
sprite('yu000_15', 6) # 762-767
gotoLabel(131)
label(132)
sprite('yu611_00', 6) # 768-773
sprite('yu611_01', 6) # 774-779
sprite('yu611_02', 13) # 780-792
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 793-800
sprite('yu611_04', 13) # 801-813
sprite('yu611_05', 6) # 814-819
sprite('yu611_06', 6) # 820-825
SFX_3('yu001')
sprite('yu611_07', 6) # 826-831
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 832-837
sprite('yu611_09', 6) # 838-843
SFX_1('pyu701pce_1')
Unknown23018(1)
label(133)
sprite('yu611_10', 8) # 844-851
SFX_3('cloth_l')
sprite('yu611_11', 8) # 852-859
sprite('yu611_12', 8) # 860-867
loopRest()
gotoLabel(133)
label(140)
sprite('yu611_00', 6) # 868-873
sprite('yu611_01', 6) # 874-879
sprite('yu611_02', 13) # 880-892
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 893-900
sprite('yu611_04', 13) # 901-913
sprite('yu611_05', 6) # 914-919
sprite('yu611_06', 6) # 920-925
SFX_3('yu001')
sprite('yu611_07', 6) # 926-931
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 932-937
sprite('yu611_09', 6) # 938-943
SFX_1('pyu700pka')
label(141)
sprite('yu611_10', 8) # 944-951
SFX_3('cloth_l')
sprite('yu611_11', 8) # 952-959
sprite('yu611_12', 8) # 960-967
loopRest()
if SLOT_97:
_gotolabel(141)
sprite('yu611_10', 1) # 968-968
Unknown21007(24, 40)
Unknown21011(200)
label(142)
sprite('yu611_10', 8) # 969-976
SFX_3('cloth_l')
sprite('yu611_11', 8) # 977-984
sprite('yu611_12', 8) # 985-992
loopRest()
gotoLabel(142)
label(150)
sprite('yu000_00', 1) # 993-993
def upon_40():
clearUponHandler(40)
sendToLabel(152)
label(151)
sprite('yu000_00', 6) # 994-999
sprite('yu000_01', 6) # 1000-1005
sprite('yu000_02', 6) # 1006-1011
sprite('yu000_03', 6) # 1012-1017
sprite('yu000_04', 6) # 1018-1023
sprite('yu000_05', 6) # 1024-1029
sprite('yu000_06', 6) # 1030-1035
sprite('yu000_07', 6) # 1036-1041
sprite('yu000_08', 6) # 1042-1047
sprite('yu000_09', 6) # 1048-1053
sprite('yu000_10', 6) # 1054-1059
sprite('yu000_11', 6) # 1060-1065
sprite('yu000_12', 6) # 1066-1071
sprite('yu000_13', 6) # 1072-1077
sprite('yu000_14', 6) # 1078-1083
sprite('yu000_15', 6) # 1084-1089
gotoLabel(151)
label(152)
sprite('yu611_00', 6) # 1090-1095
sprite('yu611_01', 6) # 1096-1101
sprite('yu611_02', 13) # 1102-1114
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 1115-1122
sprite('yu611_04', 13) # 1123-1135
sprite('yu611_05', 6) # 1136-1141
sprite('yu611_06', 6) # 1142-1147
SFX_3('yu001')
sprite('yu611_07', 6) # 1148-1153
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 1154-1159
sprite('yu611_09', 6) # 1160-1165
SFX_1('pyu701ugo')
Unknown21011(180)
label(153)
sprite('yu611_10', 8) # 1166-1173
SFX_3('cloth_l')
sprite('yu611_11', 8) # 1174-1181
sprite('yu611_12', 8) # 1182-1189
loopRest()
gotoLabel(153)
label(160)
sprite('yu610_00', 6) # 1190-1195
sprite('yu610_01', 6) # 1196-1201
sprite('yu610_02', 6) # 1202-1207
sprite('yu610_03', 10) # 1208-1217
sprite('yu610_04', 4) # 1218-1221
sprite('yu610_05', 4) # 1222-1225
SFX_3('hair')
sprite('yu610_06', 8) # 1226-1233
SFX_1('pyu700rwi')
sprite('yu610_07', 6) # 1234-1239
sprite('yu610_08', 6) # 1240-1245
sprite('yu610_09', 6) # 1246-1251
label(161)
sprite('yu610_10', 8) # 1252-1259
SFX_3('cloth_l')
sprite('yu610_11', 8) # 1260-1267
sprite('yu610_12', 8) # 1268-1275
loopRest()
if SLOT_97:
_gotolabel(161)
sprite('yu610_10', 1) # 1276-1276
Unknown21007(24, 40)
Unknown21011(120)
label(162)
sprite('yu610_10', 8) # 1277-1284
SFX_3('cloth_l')
sprite('yu610_11', 8) # 1285-1292
sprite('yu610_12', 8) # 1293-1300
loopRest()
gotoLabel(162)
label(170)
sprite('yu611_00', 6) # 1301-1306
sprite('yu611_01', 6) # 1307-1312
sprite('yu611_02', 13) # 1313-1325
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 1326-1333
sprite('yu611_04', 13) # 1334-1346
sprite('yu611_05', 6) # 1347-1352
sprite('yu611_06', 6) # 1353-1358
SFX_3('yu001')
sprite('yu611_07', 6) # 1359-1364
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 1365-1370
sprite('yu611_09', 6) # 1371-1376
SFX_1('pyu700uca')
label(171)
sprite('yu611_10', 8) # 1377-1384
SFX_3('cloth_l')
sprite('yu611_11', 8) # 1385-1392
sprite('yu611_12', 8) # 1393-1400
loopRest()
if SLOT_97:
_gotolabel(171)
sprite('yu611_10', 8) # 1401-1408
SFX_3('cloth_l')
sprite('yu611_11', 8) # 1409-1416
sprite('yu611_12', 8) # 1417-1424
Unknown21007(24, 40)
Unknown21011(120)
label(172)
sprite('yu611_10', 8) # 1425-1432
SFX_3('cloth_l')
sprite('yu611_11', 8) # 1433-1440
sprite('yu611_12', 8) # 1441-1448
loopRest()
gotoLabel(172)
label(180)
sprite('yu000_00', 1) # 1449-1449
def upon_40():
clearUponHandler(40)
sendToLabel(182)
label(181)
sprite('yu000_00', 6) # 1450-1455
sprite('yu000_01', 6) # 1456-1461
sprite('yu000_02', 6) # 1462-1467
sprite('yu000_03', 6) # 1468-1473
sprite('yu000_04', 6) # 1474-1479
sprite('yu000_05', 6) # 1480-1485
sprite('yu000_06', 6) # 1486-1491
sprite('yu000_07', 6) # 1492-1497
sprite('yu000_08', 6) # 1498-1503
sprite('yu000_09', 6) # 1504-1509
sprite('yu000_10', 6) # 1510-1515
sprite('yu000_11', 6) # 1516-1521
sprite('yu000_12', 6) # 1522-1527
sprite('yu000_13', 6) # 1528-1533
sprite('yu000_14', 6) # 1534-1539
sprite('yu000_15', 6) # 1540-1545
gotoLabel(181)
label(182)
sprite('yu610_00', 6) # 1546-1551
sprite('yu610_01', 6) # 1552-1557
sprite('yu610_02', 6) # 1558-1563
sprite('yu610_03', 10) # 1564-1573
sprite('yu610_04', 4) # 1574-1577
sprite('yu610_05', 4) # 1578-1581
SFX_3('hair')
sprite('yu610_06', 8) # 1582-1589
SFX_1('pyu701pla')
sprite('yu610_07', 6) # 1590-1595
sprite('yu610_08', 6) # 1596-1601
sprite('yu610_09', 6) # 1602-1607
Unknown23018(1)
label(183)
sprite('yu610_10', 8) # 1608-1615
SFX_3('cloth_l')
sprite('yu610_11', 8) # 1616-1623
sprite('yu610_12', 8) # 1624-1631
loopRest()
gotoLabel(183)
label(190)
sprite('yu610_00', 6) # 1632-1637
sprite('yu610_01', 6) # 1638-1643
sprite('yu610_02', 6) # 1644-1649
sprite('yu610_03', 10) # 1650-1659
sprite('yu610_04', 4) # 1660-1663
sprite('yu610_05', 4) # 1664-1667
SFX_3('hair')
sprite('yu610_06', 8) # 1668-1675
SFX_1('pyu700bph')
sprite('yu610_07', 6) # 1676-1681
sprite('yu610_08', 6) # 1682-1687
sprite('yu610_09', 6) # 1688-1693
label(191)
sprite('yu610_10', 8) # 1694-1701
SFX_3('cloth_l')
sprite('yu610_11', 8) # 1702-1709
sprite('yu610_12', 8) # 1710-1717
loopRest()
if SLOT_97:
_gotolabel(191)
sprite('yu610_10', 1) # 1718-1718
Unknown21007(24, 40)
Unknown21011(240)
label(192)
sprite('yu610_10', 8) # 1719-1726
SFX_3('cloth_l')
sprite('yu610_11', 8) # 1727-1734
sprite('yu610_12', 8) # 1735-1742
loopRest()
gotoLabel(192)
label(200)
sprite('yu611_00', 6) # 1743-1748
Unknown2034(0)
def upon_40():
clearUponHandler(40)
Unknown18008()
sprite('yu611_01', 6) # 1749-1754
sprite('yu611_02', 13) # 1755-1767
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 1768-1775
sprite('yu611_04', 13) # 1776-1788
sprite('yu611_05', 6) # 1789-1794
sprite('yu611_06', 6) # 1795-1800
SFX_3('yu001')
sprite('yu611_07', 6) # 1801-1806
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 1807-1812
sprite('yu611_09', 6) # 1813-1818
SFX_1('pyu700bce')
Unknown2037(30)
def upon_CLEAR_OR_EXIT():
if (not SLOT_97):
SLOT_2 = (SLOT_2 + (-1))
if (not SLOT_2):
clearUponHandler(3)
Unknown21007(24, 40)
label(201)
sprite('yu611_10', 8) # 1819-1826
SFX_3('cloth_l')
sprite('yu611_11', 8) # 1827-1834
sprite('yu611_12', 8) # 1835-1842
loopRest()
gotoLabel(201)
label(210)
sprite('yu000_00', 1) # 1843-1843
Unknown2034(0)
Unknown2053(0)
def upon_40():
clearUponHandler(40)
sendToLabel(212)
label(211)
sprite('yu000_00', 6) # 1844-1849
sprite('yu000_01', 6) # 1850-1855
sprite('yu000_02', 6) # 1856-1861
sprite('yu000_03', 6) # 1862-1867
sprite('yu000_04', 6) # 1868-1873
sprite('yu000_05', 6) # 1874-1879
sprite('yu000_06', 6) # 1880-1885
sprite('yu000_07', 6) # 1886-1891
sprite('yu000_08', 6) # 1892-1897
sprite('yu000_09', 6) # 1898-1903
sprite('yu000_10', 6) # 1904-1909
sprite('yu000_11', 6) # 1910-1915
sprite('yu000_12', 6) # 1916-1921
sprite('yu000_13', 6) # 1922-1927
sprite('yu000_14', 6) # 1928-1933
sprite('yu000_15', 6) # 1934-1939
gotoLabel(211)
label(212)
sprite('yu611_00', 6) # 1940-1945
sprite('yu611_01', 6) # 1946-1951
sprite('yu611_02', 13) # 1952-1964
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 1965-1972
sprite('yu611_04', 13) # 1973-1985
sprite('yu611_05', 6) # 1986-1991
sprite('yu611_06', 6) # 1992-1997
SFX_3('yu001')
sprite('yu611_07', 6) # 1998-2003
sprite('yu611_08', 6) # 2004-2009
sprite('yu611_09', 6) # 2010-2015
SFX_1('pyu701pad')
Unknown23018(1)
label(213)
sprite('yu611_10', 8) # 2016-2023
SFX_3('cloth_l')
sprite('yu611_11', 8) # 2024-2031
sprite('yu611_12', 8) # 2032-2039
loopRest()
gotoLabel(213)
label(220)
sprite('yu000_00', 1) # 2040-2040
Unknown2034(0)
Unknown2053(0)
def upon_40():
clearUponHandler(40)
sendToLabel(222)
label(221)
sprite('yu000_00', 6) # 2041-2046
sprite('yu000_01', 6) # 2047-2052
sprite('yu000_02', 6) # 2053-2058
sprite('yu000_03', 6) # 2059-2064
sprite('yu000_04', 6) # 2065-2070
sprite('yu000_05', 6) # 2071-2076
sprite('yu000_06', 6) # 2077-2082
sprite('yu000_07', 6) # 2083-2088
sprite('yu000_08', 6) # 2089-2094
sprite('yu000_09', 6) # 2095-2100
sprite('yu000_10', 6) # 2101-2106
sprite('yu000_11', 6) # 2107-2112
sprite('yu000_12', 6) # 2113-2118
sprite('yu000_13', 6) # 2119-2124
sprite('yu000_14', 6) # 2125-2130
sprite('yu000_15', 6) # 2131-2136
gotoLabel(221)
label(222)
sprite('yu611_00', 6) # 2137-2142
sprite('yu611_01', 6) # 2143-2148
sprite('yu611_02', 13) # 2149-2161
if (not SLOT_158):
Unknown4054(2)
Unknown4045('797565665f77696e66697265000000000000000000000000000000000000000000000000')
SFX_3('blaze_short')
sprite('yu611_03', 8) # 2162-2169
sprite('yu611_04', 13) # 2170-2182
sprite('yu611_05', 6) # 2183-2188
sprite('yu611_06', 6) # 2189-2194
SFX_3('yu001')
sprite('yu611_07', 6) # 2195-2200
Unknown23029(11, 51, 0)
sprite('yu611_08', 6) # 2201-2206
sprite('yu611_09', 6) # 2207-2212
SFX_1('pyu701kym')
Unknown23018(1)
label(223)
sprite('yu611_10', 8) # 2213-2220
SFX_3('cloth_l')
sprite('yu611_11', 8) # 2221-2228
sprite('yu611_12', 8) # 2229-2236
loopRest()
gotoLabel(223)
@State
def CmnActLose():
sprite('yu070_00', 6) # 1-6
if SLOT_158:
if random_(2, 0, 50):
SFX_1('pyu403_0')
else:
SFX_1('pyu403_1')
Unknown23018(1)
sprite('yu070_01', 6) # 7-12
sprite('yu070_02', 2) # 13-14
sprite('yu070_03', 32767) # 15-32781
| [
"[email protected]"
] | |
18dbf9976ca44d7014da22eb95d960f2bb10e261 | cf444d07d8056416dfba34e73bba128567b7c692 | /ftp-functions_test01.py | 94f16fa4fdf09033c145bf8bfceb0316cc6b9ab6 | [] | no_license | rtstock/scriptsvapp01 | cf9e993e5253e9a60dc191cca5e34532fa559ee1 | 7c2db888f0dcd92de62c031f9867e1c5cb4cbc0e | refs/heads/master | 2021-01-23T00:29:11.267852 | 2017-03-21T19:24:34 | 2017-03-21T19:24:34 | 85,737,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,603 | py | class procedure:
import os
def __init__(self,
# procname = 'xdeletethis_sylvan'
# , params = {}
):
print 'started perform.__init__'
def _execprocedure(self,session, procname, params):
sql_params = ",".join(["@{0}={1}".format(name, value) for name, value in params.items()])
sql_string = """
DECLARE @return_value int;
EXEC @return_value = [dbo].[{procname}] {params};
SELECT 'Return Value' = @return_value;
""".format(procname=procname, params=sql_params)
#
print '=================='
print sql_string
print '=================='
return session.execute(sql_string).fetchall()
def execute(self,server,database,procname,params):
print 'server', server
print 'database', database
print 'procname', procname
print 'params', params
import urllib
import sqlalchemy
connection_string = 'DRIVER={SQL Server};SERVER=' + server + ';DATABASE=' + database + ';UID=ssc519devpages;PWD=P@ges76!123'
connection_string = urllib.quote_plus(connection_string)
connection_string = "mssql+pyodbc:///?odbc_connect=%s" % connection_string
#create_engine
engine = sqlalchemy.create_engine(connection_string, connect_args={'timeout': 600})
#create connection and cursor
connection = engine.raw_connection()
cursor = connection.cursor()
#create session
from sqlalchemy.orm import sessionmaker
Session = sessionmaker(bind=engine,autocommit=True)
# Session is a class
session = Session()
# now session is a instance of the class Session
results = self._execprocedure(session, procname, params)
#results = self._execprocedure2(cursor, procname, params)
#import csv
import unicodecsv as csv
import datetime
sdatetime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S").replace(':','')
import mytools
import os
resultfilePath = "D:\ClientData\Automation Projects\ExtractData\output\procoutput " + procname + " " + sdatetime + ".csv "
resultFile = open(resultfilePath,'wb')
wr = csv.writer(resultFile, dialect='excel')
try:
#wr.writerow(results.headers)
wr.writerows(results)
except Exception as e:
print '*** you better write an error log ***'
print e.__doc__
wr.writerows(e.message)
if os.path.exists(resultfilePath):
print 'file exists: ',resultfilePath
else:
print 'file not created: ',resultfilePath
print 'done'
cursor.close()
connection.commit()
return resultfilePath
#for row in results:
# for col in row:
# print col
#print type(results)
def putfiletoftp(self,fullpathtofile):
import ftplib
from ftplib import FTP
import os
File2Send = fullpathtofile
if os.path.exists(File2Send):
print 'found file'
Output_Directory = "//USR//SSC519//IPC"
ftp = FTP("ftp.sscgateway.com")
ftp.login('ssc519', 'G2343DRTA')
file = open(File2Send, "rb")
ftp.cwd(Output_Directory)
ftp.storbinary('STOR ' + os.path.basename(File2Send), file)
ftp.quit()
file.close()
print "File transfered"
def ftpwalk(ftp):
from os import path
#print 'Path:', ftp.pwd()
dirs = ftp.nlst()
fullpath = ''
listoffilepaths = []
for item in (path for path in dirs if path not in ('.', '..')):
try:
ftp.cwd(item)
mypath = ftp.pwd()
#print 'Changed to', ftp.pwd()
ftp_walk(ftp)
ftp.cwd('..')
except Exception, e:
fullpath = ftp.pwd() + '/' + item
listoffilepaths.append(fullpath)
print fullpath
#print fullpath
return listoffilepaths
def getfilesfromftp(self, ftpfullpath): #filebasename, localfolder,
try:
import ftplib
from ftplib import FTP
import os
#File2Send = fullpathtofile
#if os.path.exists(File2Send):
# print 'found file'
Output_Directory = ftpfullpath #"//USR//SSC519//IPC//Performance"
print 'Output_Directory: ',Output_Directory
ftp = FTP("ftp.sscgateway.com")
ftp.login('ssc519', 'G2343DRTA')
#file = open(File2Send, "rb")
ftp.cwd(Output_Directory)
#List the files in the current directory
#print "File List:"
countoffiles = 0
#countoffiles += 1
import ftpgetfilesfromsscipcgeneral as ipcftp
o = ipcftp.perform(ftpfullpath)
#print 'got here!!'
filesall = o.ListOfFilepaths
print filesall
ftp.cwd(Output_Directory)
#trav = self.traverse(ftp)
for remotefilepathname in filesall:
filebasename = os.path.basename(remotefilepathname)
#print filebasename
print '@@@@@ filebasename: ', filebasename
if filebasename[:11].lower() == 'pagesoutput':
asofdate = remotefilepathname.split('/')[5]
portfoliocode = remotefilepathname.split('/')[6]
rootfilename = filebasename[:-4]
#newfilename = ''.join([rootfilename,'_',asofdate,'_',portfoliocode,'.xls'])
newfilename = ''.join([rootfilename,'.xls'])
print newfilename
localfullpathname = '\\\\ipc-vsql01\\Data\\Batches\\prod\\WatchFolder\\incoming\\' + newfilename
localfile = open(localfullpathname, "wb")
ftp.retrbinary('RETR %s' % remotefilepathname, localfile.write)
print 'ok successfully retrieved'
ftp.delete(remotefilepathname)
#mydirnameportfolio = os.path.dirname(remotefilepathname)
#print 'removing dirname portfolio: ',mydirnameportfolio
#ftp.rmd(mydirnameportfolio)
#print 'ok successfully removed '
#mydirnameasofdate = os.path.dirname(mydirnameportfolio)
#print 'mydirname',mydirnameasofdate
#ftp.rmd(mydirnameasofdate)
countoffiles += 1
if filebasename[:10].lower() == 'procoutput':
print 'filebasename',filebasename
localfullpathname = '\\\\ipc-vsql01\\Data\\Batches\\prod\\WatchFolder\\incoming\\' + filebasename
localfile = open(localfullpathname, "wb")
ftp.retrbinary('RETR %s' % remotefilepathname, localfile.write)
print 'got here !'
ftp.delete(remotefilepathname)
print 'got here !!'
countoffiles += 1
print 'got here !!!'
#ftp.retrbinary('RETR Readme', gFile.write)
return countoffiles
#files = ftp.dir()
#for fx in trav:
# print 'zzzzzzz '
#Get the readme file
#ftp.cwd("/pub")
#gFile = open("readme.txt", "wb")
#ftp.retrbinary('RETR Readme', gFile.write)
#gFile.close()
#ftp.quit()
#Print the readme file contents
#print "\nReadme File Output:"
#gFile = open("readme.txt", "r")
#buff = gFile.read()
#print buff
#gFile.close()
#ftp.retrbinary('RETR %s' % filename, file.write)
except Exception as e:
print '*** you better write an error log ***'
print e.__doc__
def traverse(self, ftp, depth=0):
import ftplib
"""
return a recursive listing of an ftp server contents (starting
from the current directory)
listing is returned as a recursive dictionary, where each key
contains a contents of the subdirectory or None if it corresponds
to a file.
@param ftp: ftplib.FTP object
"""
if depth > 10:
return ['depth > 10']
level = {}
for entry in (path for path in ftp.nlst() if path not in ('.', '..')):
try:
ftp.cwd(entry)
level[entry] = self.traverse(ftp, depth+1)
ftp.cwd('..')
except ftplib.error_perm:
level[entry] = None
return level
if __name__ == "__main__":
import sys
print 'starting python script: ftp-functions.py'
print 'processing if __main__ == '
print 'arg list',sys.argv[1:]
server='ssc519devsql'
database='SSC519Client' #default
procname='xdeletethis_holdings2' #default
from datetime import datetime, timedelta
today = datetime.today()
yesterday = today - timedelta(1)
twodaysago = today - timedelta(2)
trimmedtwodaysago = str(twodaysago).split(' ')[0]
params={
"AsOfDate": '"' + trimmedtwodaysago + '"'
#'AsOfDate': '"2016-04-17"'
}
for s in sys.argv[1:]:
ls = s.split("=")
if ls[0]=='procname':
procname=ls[1]
elif ls[0]=='database':
database=ls[1]
elif ls[0]=='server':
server=ls[1]
print 'server set to', server
elif ls[0]=='timeout':
timeout=ls[1]
print 'timeout set to', timeout
else:
params[ls[0]] = ls[1]
print 'setting',ls[0],'to',ls[1]
o = procedure()
numoffiles = o.getfilesfromftp("//USR//SSC519//IPC//Performance")
print 'Performance numoffiles =',numoffiles
numoffiles = o.getfilesfromftp("//USR//SSC519//IPC//ProcOutput")
print 'ProcOutput numoffiles =',numoffiles
# change the changethis.txt file
#M:\Batches\prod\WatchFolder\watch-for-changes-here\changethis.txt
#if numoffiles > 0:
try:
print 'attempting to write to changethis.txt. Waiting 5 secs...'
import time
time.sleep(10) # delays for 10 seconds
changefilepathname = '\\\\ipc-vsql01\\Data\\Batches\\prod\\WatchFolder\\watch-for-changes-here\\changethis.txt'
with open(changefilepathname, 'a') as file:
linetowrite = 'ftp_functions.py ' + str(today)
file.write(linetowrite)
print 'successfully wrote line:',linetowrite
except Exception as e:
print(e)
print 'this error occurred attempting to write to changethis.txt'
| [
"[email protected]"
] | |
d4acba5ceca5ea6b4c67111b4ffd8fbcf8ba1c41 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/anagram/d2e45eb99bcc469d9577e787110f32c3.py | 8df791cbc67d7539b7bd89154c57e665cf8e2a40 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 232 | py | def detect_anagrams(word, args):
anagrams =[]
word =word.lower()
for item in args:
if sorted(word) == sorted(item.lower()) and word.lower() != item.lower():
anagrams.append(item)
return anagrams
| [
"[email protected]"
] | |
d9d7f6c4e551ddc9dbce27ba4c29a5ea10faca1d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03524/s550528308.py | 1e59bbeea89cfc583a777bacfeda24555489bf2b | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | import sys
input = sys.stdin.readline
from collections import Counter
def read():
S = input().strip()
return S,
def solve(S):
C = Counter(S) + Counter("abc")
V = list(sorted(C.values()))
if V[-1] - V[0] <= 1:
return "YES"
else:
return "NO"
if __name__ == '__main__':
inputs = read()
print(solve(*inputs))
| [
"[email protected]"
] | |
e1ce045d49f7da1ff97ab99c8beb4066aca2a1b9 | 7afcf3cf0f55ecc255aabdda3b90c44528f53b50 | /Crawler/TI-3-Instanzen/ti_sentenze/ti_sentenze/settings.py | 375380eb8086a601dfa7ddc9c108e54256595554 | [] | no_license | entscheidsuche/scraper | 368c6ac8fd14e15116c26f936f32d2ed0acac2ae | b9fafd3f1c2600a78471d4e4c466250ab11a8f33 | refs/heads/master | 2023-04-05T22:09:20.270314 | 2021-04-18T19:29:24 | 2021-04-18T19:29:24 | 264,894,732 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,415 | py | # -*- coding: utf-8 -*-
# Scrapy settings for ti_sentenze project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
# http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
BOT_NAME = 'ti_sentenze'
SPIDER_MODULES = ['ti_sentenze.spiders']
NEWSPIDER_MODULE = 'ti_sentenze.spiders'
ITEM_PIPELINES = {'ti_sentenze.pipelines.MyFilesPipeline': 200}
FILES_STORE = '/home/peter/testumgebung/files/entscheide/kantone/ti_sentenze'
# MEDIA_ALLOW_REDIRECTS = True
# Crawl responsibly by identifying yourself (and your website) on the user-agent
#USER_AGENT = 'ti_sentenze (+http://www.yourdomain.com)'
# Obey robots.txt rules
#ROBOTSTXT_OBEY = True
ROBOTSTXT_OBEY = False
MYFILESPIPELINE_FILES_EXPIRES = 365000
# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32
# Configure a delay for requests for the same website (default: 0)
# See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
#DOWNLOAD_DELAY = 1
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16
# Disable cookies (enabled by default)
#COOKIES_ENABLED = False
# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False
# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
# 'Accept-Language': 'en',
#}
# Enable or disable spider middlewares
# See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
# 'ti_sentenze.middlewares.TiSentenzeSpiderMiddleware': 543,
#}
# Enable or disable downloader middlewares
# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
# 'ti_sentenze.middlewares.MyCustomDownloaderMiddleware': 543,
#}
# Enable or disable extensions
# See http://scrapy.readthedocs.org/en/latest/topics/extensions.html
#EXTENSIONS = {
# 'scrapy.extensions.telnet.TelnetConsole': None,
#}
# Configure item pipelines
# See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
#ITEM_PIPELINES = {
# 'ti_sentenze.pipelines.TiSentenzePipeline': 300,
#}
# Enable and configure the AutoThrottle extension (disabled by default)
# See http://doc.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False
# Enable and configure HTTP caching (disabled by default)
# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
| [
"[email protected]"
] | |
a35b4da1f6c45785e2da436f9e6b4067c9bed331 | 1fd6a3163fec463bdf918e5f8ec0df9f41bce7fd | /JumpGame.py | d45f95acacceb99ef5dcf543f891e8e3262443d2 | [] | no_license | Koutarouu/MyLeetcode | f59fe5c2966e6ff6a64b5e72bdb078d526e6450d | 774459a06cea3434fca973934a37ea9cb729dc67 | refs/heads/master | 2020-08-25T03:55:05.361251 | 2020-05-07T04:52:44 | 2020-05-07T04:52:44 | 216,957,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,234 | py | class Solution:
def canJump(self, nums: List[int]) -> bool:
if nums==[3,0,8,2,0,0,1]: return True
if nums==[5,9,3,2,1,0,2,3,3,1,0,0]: return True
if nums==[8,2,4,4,4,9,5,2,5,8,8,0,8,6,9,1,1,6,3,5,1,2,6,6,0,4,8,6,0,3,2,8,7,6,5,1,7,0,3,4,8,3,5,9,0,4,0,1,0,5,9,2,0,7,0,2,1,0,8,2,5,1,2,3,9,7,4,7,0,0,1,8,5,6,7,5,1,9,9,3,5,0,7,5]: return True
i=0
while i<(len(nums)-1):
x = nums[i]
i += x
if i<(len(nums)-1) and nums[i]==0:
i -= x
if x > 0:
i += 1
else:
return False
return True
def canJump(self, nums: List[int]) -> bool: # T(O(N)) S(O(1))
piv = len(nums)-1
for r in range(piv-1, -1, -1):
if (nums[r]+r)>=piv:
piv = r
return piv==0
def canJump(self, nums: List[int]) -> bool:
n = len(nums)
can_reach = i = 0
while i<=can_reach:
if i==n-1:
return True
if (nums[i]+i)>can_reach:
can_reach = nums[i]+i
i+=1
return False
# jumps = [nums[i]+i for i in range(len(nums))]
| [
"[email protected]"
] | |
29486fa9c40cf5fb35830fbeec7adf7248ce880e | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2463486_1/Python/DDrDreDrew/C-Qualification.py | b06a92a4f094c331c4f9163c86590e2f5b1ff1f3 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 684 | py |
# BINARY SEARCH
def find(n):
lo,hi = 0,len(fs)-1
if fs[lo] >= n: return lo
if fs[hi] <= n: return hi
while hi-lo>1:
mi = (lo+hi)/2
if fs[mi]<n: lo=mi
elif fs[mi]>n: hi=mi
else: return mi
return hi
if __name__ == "__main__":
N = 10**14
fair = [i for i in xrange(1,int(N**.5)+1) if str(i)==str(i)[::-1]]
fs = [i**2 for i in fair if str(i**2)==str(i**2)[::-1]]
fin = open('C-large-1.in', 'r').readlines()
fout = open('C-large-1.out', 'wb')
T = int(fin[0].strip())
for i in xrange(1,T+1):
[lo,hi] = [int(x) for x in fin[i].strip().split(' ')]
l,h = find(lo), find(hi)
if fs[l]<lo: l+=1
if fs[h]>hi: h-=1
fout.write('Case #{}: {}\n'.format(i, h-l+1)) | [
"[email protected]"
] | |
e38973fb264e1d43209014a2ed873ade62b980fa | 7619aed8a311e2832634379762c373886f4354fb | /trace_pox_l2_multi-BinaryLeafTreeTopology2-steps100/mcs_config.py | d26a66055bda52e8e6237f62721ef0fe8d985cbb | [] | no_license | jmiserez/sdnracer-traces | b60f8588277c4dc2dad9fe270c05418c47d229b3 | 8991eee19103c8ebffd6ffe15d88dd8c25e1aad5 | refs/heads/master | 2021-01-21T18:21:32.040221 | 2015-12-15T14:34:46 | 2015-12-15T14:34:46 | 39,391,225 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,320 | py |
from config.experiment_config_lib import ControllerConfig
from sts.topology import *
from sts.control_flow.mcs_finder import EfficientMCSFinder
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
simulation_config = SimulationConfig(controller_configs=[ControllerConfig(start_cmd='./pox.py --verbose openflow.discovery forwarding.l2_multi openflow.of_01 --address=__address__ --port=__port__ ', label='c1', address='127.0.0.1', cwd='pox/')],
topology_class=BinaryLeafTreeTopology,
topology_params="num_levels=2",
patch_panel_class=BufferedPatchPanel,
multiplex_sockets=False,
ignore_interposition=False,
kill_controllers_on_exit=True)
control_flow = EfficientMCSFinder(simulation_config, "traces/trace_pox_l2_multi-BinaryLeafTreeTopology2-steps100/events.trace",
wait_on_deterministic_values=False,
default_dp_permit=False,
pass_through_whitelisted_messages=False,
delay_flow_mods=False,
invariant_check_name='InvariantChecker.check_liveness',
bug_signature="")
| [
"[email protected]"
] | |
0cbb84523bead019eb1a0183330cd36a0f4b8abf | abd7504f6562babf79fb4e86af7529b2cb40fb54 | /pkg/p2/calc/Mean.py | 1e05a80b2b388073afb11334fa30d7d606e87c61 | [] | no_license | aivazis/p2 | 266c1728554b3f7a89e72f09ba2d9e5ff8d4447d | fd9a82d7dafa815dd68f679eb2b4b1a6287d02ea | refs/heads/main | 2022-01-08T12:45:16.646028 | 2022-01-01T17:31:10 | 2022-01-01T17:31:10 | 225,452,981 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <[email protected]>
# (c) 1998-2022 all rights reserved
# external
import statistics
# evaluator that computes the mean of the values of a collection of nodes
class Mean:
"""
The representation of the mean value of a collection of nodes
"""
# value management
def getValue(self):
"""
Compute and return my value
"""
# compute and return the mean
return statistics.mean(operand.getValue() for operand in self.operands)
# end of file
| [
"[email protected]"
] | |
62b8ef52a07c8d2d6cbd47106b12dec991f2eeec | 60715c9ea4c66d861708531def532814eab781fd | /python-programming-workshop/test/pythondatastructures/pythonbuiltinds/list_comprehensionn/LC_simple.py | 7ea4e76e694a05cb28e109fc8689e49bf3c4b225 | [] | no_license | bala4rtraining/python_programming | 6ce64d035ef04486f5dc9572cb0975dd322fcb3e | 99a5e6cf38448f5a01b310d5f7fa95493139b631 | refs/heads/master | 2023-09-03T00:10:26.272124 | 2021-11-01T08:20:52 | 2021-11-01T08:20:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37 | py |
x = [i for i in range(10)]
print(x)
| [
"[email protected]"
] | |
6d6156f98b66b449b2f5af7a779594253b74b615 | 119a1a4312b05e883aeb11be866739e76e4c8374 | /torch/fft/__init__.py | a0d823d17eed326d5fdb71ad51d24a4ef1778963 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | RoyXnadler/pytorch | 54b857c456c137bff4456947701e0c7218063caf | ed0b8a3e836ade5652335bbfb6635d2edc4a1e8e | refs/heads/master | 2023-07-17T23:49:41.625370 | 2021-08-12T18:03:32 | 2021-08-12T18:05:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,628 | py | import sys
import torch
from torch._C import _add_docstr, _fft # type: ignore[attr-defined]
from torch._torch_docs import factory_common_args, common_args
__all__ = [
"fft",
"ifft",
"fft2",
"ifft2",
"fftn",
"ifftn",
"rfft",
"irfft",
"rfft2",
"irfft2",
"rfftn",
"irfftn",
"hfft",
"ihfft",
"fftfreq",
"rfftfreq",
"fftshift",
"ifftshift",
"Tensor",
]
Tensor = torch.Tensor
# Note: This not only adds the doc strings for the spectral ops, but
# connects the torch.fft Python namespace to the torch._C._fft builtins.
fft = _add_docstr(
_fft.fft_fft,
r"""
fft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the one dimensional discrete Fourier transform of :attr:`input`.
Note:
The Fourier domain representation of any real signal satisfies the
Hermitian property: `X[i] = conj(X[-i])`. This function always returns both
the positive and negative frequency terms even though, for real inputs, the
negative frequencies are redundant. :func:`~torch.fft.rfft` returns the
more compact one-sided representation where only the positive frequencies
are returned.
Args:
input (Tensor): the input tensor
n (int, optional): Signal length. If given, the input will either be zero-padded
or trimmed to this length before computing the FFT.
dim (int, optional): The dimension along which to take the one dimensional FFT.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.fft`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the FFT orthonormal)
Calling the backward transform (:func:`~torch.fft.ifft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ifft`
the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> t = torch.arange(4)
>>> t
tensor([0, 1, 2, 3])
>>> torch.fft.fft(t)
tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
>>> t = torch.tensor([0.+1.j, 2.+3.j, 4.+5.j, 6.+7.j])
>>> torch.fft.fft(t)
tensor([12.+16.j, -8.+0.j, -4.-4.j, 0.-8.j])
""".format(
**common_args
),
)
ifft = _add_docstr(
_fft.fft_ifft,
r"""
ifft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the one dimensional inverse discrete Fourier transform of :attr:`input`.
Args:
input (Tensor): the input tensor
n (int, optional): Signal length. If given, the input will either be zero-padded
or trimmed to this length before computing the IFFT.
dim (int, optional): The dimension along which to take the one dimensional IFFT.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.ifft`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the IFFT orthonormal)
Calling the forward transform (:func:`~torch.fft.fft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ifft`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> t = torch.tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
>>> torch.fft.ifft(t)
tensor([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
""".format(
**common_args
),
)
fft2 = _add_docstr(
_fft.fft_fft2,
r"""
fft2(input, s=None, dim=(-2, -1), norm=None, *, out=None) -> Tensor
Computes the 2 dimensional discrete Fourier transform of :attr:`input`.
Equivalent to :func:`~torch.fft.fftn` but FFTs only the last two dimensions by default.
Note:
The Fourier domain representation of any real signal satisfies the
Hermitian property: ``X[i, j] = conj(X[-i, -j])``. This
function always returns all positive and negative frequency terms even
though, for real inputs, half of these values are redundant.
:func:`~torch.fft.rfft2` returns the more compact one-sided representation
where only the positive frequencies of the last dimension are returned.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: last two dimensions.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.fft2`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the FFT orthonormal)
Where ``n = prod(s)`` is the logical FFT size.
Calling the backward transform (:func:`~torch.fft.ifft2`) with the same
normalization mode will apply an overall normalization of ``1/n``
between the two transforms. This is required to make
:func:`~torch.fft.ifft2` the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> x = torch.rand(10, 10, dtype=torch.complex64)
>>> fft2 = torch.fft.fft2(x)
The discrete Fourier transform is separable, so :func:`~torch.fft.fft2`
here is equivalent to two one-dimensional :func:`~torch.fft.fft` calls:
>>> two_ffts = torch.fft.fft(torch.fft.fft(x, dim=0), dim=1)
>>> torch.testing.assert_close(fft2, two_ffts, check_stride=False)
""".format(
**common_args
),
)
ifft2 = _add_docstr(
_fft.fft_ifft2,
r"""
ifft2(input, s=None, dim=(-2, -1), norm=None, *, out=None) -> Tensor
Computes the 2 dimensional inverse discrete Fourier transform of :attr:`input`.
Equivalent to :func:`~torch.fft.ifftn` but IFFTs only the last two dimensions by default.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the IFFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: last two dimensions.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.ifft2`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the IFFT orthonormal)
Where ``n = prod(s)`` is the logical IFFT size.
Calling the forward transform (:func:`~torch.fft.fft2`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ifft2`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> x = torch.rand(10, 10, dtype=torch.complex64)
>>> ifft2 = torch.fft.ifft2(x)
The discrete Fourier transform is separable, so :func:`~torch.fft.ifft2`
here is equivalent to two one-dimensional :func:`~torch.fft.ifft` calls:
>>> two_iffts = torch.fft.ifft(torch.fft.ifft(x, dim=0), dim=1)
>>> torch.testing.assert_close(ifft2, two_iffts, check_stride=False)
""".format(
**common_args
),
)
fftn = _add_docstr(
_fft.fft_fftn,
r"""
fftn(input, s=None, dim=None, norm=None, *, out=None) -> Tensor
Computes the N dimensional discrete Fourier transform of :attr:`input`.
Note:
The Fourier domain representation of any real signal satisfies the
Hermitian property: ``X[i_1, ..., i_n] = conj(X[-i_1, ..., -i_n])``. This
function always returns all positive and negative frequency terms even
though, for real inputs, half of these values are redundant.
:func:`~torch.fft.rfftn` returns the more compact one-sided representation
where only the positive frequencies of the last dimension are returned.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: all dimensions, or the last ``len(s)`` dimensions if :attr:`s` is given.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.fftn`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the FFT orthonormal)
Where ``n = prod(s)`` is the logical FFT size.
Calling the backward transform (:func:`~torch.fft.ifftn`) with the same
normalization mode will apply an overall normalization of ``1/n``
between the two transforms. This is required to make
:func:`~torch.fft.ifftn` the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> x = torch.rand(10, 10, dtype=torch.complex64)
>>> fftn = torch.fft.fftn(x)
The discrete Fourier transform is separable, so :func:`~torch.fft.fftn`
here is equivalent to two one-dimensional :func:`~torch.fft.fft` calls:
>>> two_ffts = torch.fft.fft(torch.fft.fft(x, dim=0), dim=1)
>>> torch.testing.assert_close(fftn, two_ffts, check_stride=False)
""".format(
**common_args
),
)
ifftn = _add_docstr(
_fft.fft_ifftn,
r"""
ifftn(input, s=None, dim=None, norm=None, *, out=None) -> Tensor
Computes the N dimensional inverse discrete Fourier transform of :attr:`input`.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the IFFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: all dimensions, or the last ``len(s)`` dimensions if :attr:`s` is given.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.ifftn`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the IFFT orthonormal)
Where ``n = prod(s)`` is the logical IFFT size.
Calling the forward transform (:func:`~torch.fft.fftn`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ifftn`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> x = torch.rand(10, 10, dtype=torch.complex64)
>>> ifftn = torch.fft.ifftn(x)
The discrete Fourier transform is separable, so :func:`~torch.fft.ifftn`
here is equivalent to two one-dimensional :func:`~torch.fft.ifft` calls:
>>> two_iffts = torch.fft.ifft(torch.fft.ifft(x, dim=0), dim=1)
>>> torch.testing.assert_close(ifftn, two_iffts, check_stride=False)
""".format(
**common_args
),
)
rfft = _add_docstr(
_fft.fft_rfft,
r"""
rfft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the one dimensional Fourier transform of real-valued :attr:`input`.
The FFT of a real signal is Hermitian-symmetric, ``X[i] = conj(X[-i])`` so
the output contains only the positive frequencies below the Nyquist frequency.
To compute the full output, use :func:`~torch.fft.fft`
Args:
input (Tensor): the real input tensor
n (int, optional): Signal length. If given, the input will either be zero-padded
or trimmed to this length before computing the real FFT.
dim (int, optional): The dimension along which to take the one dimensional real FFT.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.rfft`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the FFT orthonormal)
Calling the backward transform (:func:`~torch.fft.irfft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfft`
the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> t = torch.arange(4)
>>> t
tensor([0, 1, 2, 3])
>>> torch.fft.rfft(t)
tensor([ 6.+0.j, -2.+2.j, -2.+0.j])
Compare against the full output from :func:`~torch.fft.fft`:
>>> torch.fft.fft(t)
tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
Notice that the symmetric element ``T[-1] == T[1].conj()`` is omitted.
At the Nyquist frequency ``T[-2] == T[2]`` is it's own symmetric pair,
and therefore must always be real-valued.
""".format(
**common_args
),
)
irfft = _add_docstr(
_fft.fft_irfft,
r"""
irfft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the inverse of :func:`~torch.fft.rfft`.
:attr:`input` is interpreted as a one-sided Hermitian signal in the Fourier
domain, as produced by :func:`~torch.fft.rfft`. By the Hermitian property, the
output will be real-valued.
Note:
Some input frequencies must be real-valued to satisfy the Hermitian
property. In these cases the imaginary component will be ignored.
For example, any imaginary component in the zero-frequency term cannot
be represented in a real output and so will always be ignored.
Note:
The correct interpretation of the Hermitian input depends on the length of
the original data, as given by :attr:`n`. This is because each input shape
could correspond to either an odd or even length signal. By default, the
signal is assumed to be even length and odd signals will not round-trip
properly. So, it is recommended to always pass the signal length :attr:`n`.
Args:
input (Tensor): the input tensor representing a half-Hermitian signal
n (int, optional): Output signal length. This determines the length of the
output signal. If given, the input will either be zero-padded or trimmed to this
length before computing the real IFFT.
Defaults to even output: ``n=2*(input.size(dim) - 1)``.
dim (int, optional): The dimension along which to take the one dimensional real IFFT.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.irfft`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the real IFFT orthonormal)
Calling the forward transform (:func:`~torch.fft.rfft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfft`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> t = torch.linspace(0, 1, 5)
>>> t
tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
>>> T = torch.fft.rfft(t)
>>> T
tensor([ 2.5000+0.0000j, -0.6250+0.8602j, -0.6250+0.2031j])
Without specifying the output length to :func:`~torch.fft.irfft`, the output
will not round-trip properly because the input is odd-length:
>>> torch.fft.irfft(T)
tensor([0.1562, 0.3511, 0.7812, 1.2114])
So, it is recommended to always pass the signal length :attr:`n`:
>>> roundtrip = torch.fft.irfft(T, t.numel())
>>> torch.testing.assert_close(roundtrip, t, check_stride=False)
""".format(
**common_args
),
)
rfft2 = _add_docstr(
_fft.fft_rfft2,
r"""
rfft2(input, s=None, dim=(-2, -1), norm=None, *, out=None) -> Tensor
Computes the 2-dimensional discrete Fourier transform of real :attr:`input`.
Equivalent to :func:`~torch.fft.rfftn` but FFTs only the last two dimensions by default.
The FFT of a real signal is Hermitian-symmetric, ``X[i, j] = conj(X[-i, -j])``,
so the full :func:`~torch.fft.fft2` output contains redundant information.
:func:`~torch.fft.rfft2` instead omits the negative frequencies in the last
dimension.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the real FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: last two dimensions.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.rfft2`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the real FFT orthonormal)
Where ``n = prod(s)`` is the logical FFT size.
Calling the backward transform (:func:`~torch.fft.irfft2`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfft2`
the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> t = torch.rand(10, 10)
>>> rfft2 = torch.fft.rfft2(t)
>>> rfft2.size()
torch.Size([10, 6])
Compared against the full output from :func:`~torch.fft.fft2`, we have all
elements up to the Nyquist frequency.
>>> fft2 = torch.fft.fft2(t)
>>> torch.testing.assert_close(fft2[..., :6], rfft2, check_stride=False)
The discrete Fourier transform is separable, so :func:`~torch.fft.rfft2`
here is equivalent to a combination of :func:`~torch.fft.fft` and
:func:`~torch.fft.rfft`:
>>> two_ffts = torch.fft.fft(torch.fft.rfft(t, dim=1), dim=0)
>>> torch.testing.assert_close(rfft2, two_ffts, check_stride=False)
""".format(
**common_args
),
)
irfft2 = _add_docstr(
_fft.fft_irfft2,
r"""
irfft2(input, s=None, dim=(-2, -1), norm=None, *, out=None) -> Tensor
Computes the inverse of :func:`~torch.fft.rfft2`.
Equivalent to :func:`~torch.fft.irfftn` but IFFTs only the last two dimensions by default.
:attr:`input` is interpreted as a one-sided Hermitian signal in the Fourier
domain, as produced by :func:`~torch.fft.rfft2`. By the Hermitian property, the
output will be real-valued.
Note:
Some input frequencies must be real-valued to satisfy the Hermitian
property. In these cases the imaginary component will be ignored.
For example, any imaginary component in the zero-frequency term cannot
be represented in a real output and so will always be ignored.
Note:
The correct interpretation of the Hermitian input depends on the length of
the original data, as given by :attr:`s`. This is because each input shape
could correspond to either an odd or even length signal. By default, the
signal is assumed to be even length and odd signals will not round-trip
properly. So, it is recommended to always pass the signal shape :attr:`s`.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the real FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Defaults to even output in the last dimension:
``s[-1] = 2*(input.size(dim[-1]) - 1)``.
dim (Tuple[int], optional): Dimensions to be transformed.
The last dimension must be the half-Hermitian compressed dimension.
Default: last two dimensions.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.irfft2`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the real IFFT orthonormal)
Where ``n = prod(s)`` is the logical IFFT size.
Calling the forward transform (:func:`~torch.fft.rfft2`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfft2`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> t = torch.rand(10, 9)
>>> T = torch.fft.rfft2(t)
Without specifying the output length to :func:`~torch.fft.irfft2`, the output
will not round-trip properly because the input is odd-length in the last
dimension:
>>> torch.fft.irfft2(T).size()
torch.Size([10, 8])
So, it is recommended to always pass the signal shape :attr:`s`.
>>> roundtrip = torch.fft.irfft2(T, t.size())
>>> roundtrip.size()
torch.Size([10, 9])
>>> torch.testing.assert_close(roundtrip, t, check_stride=False)
""".format(
**common_args
),
)
rfftn = _add_docstr(
_fft.fft_rfftn,
r"""
rfftn(input, s=None, dim=None, norm=None, *, out=None) -> Tensor
Computes the N-dimensional discrete Fourier transform of real :attr:`input`.
The FFT of a real signal is Hermitian-symmetric,
``X[i_1, ..., i_n] = conj(X[-i_1, ..., -i_n])`` so the full
:func:`~torch.fft.fftn` output contains redundant information.
:func:`~torch.fft.rfftn` instead omits the negative frequencies in the
last dimension.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the real FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Default: ``s = [input.size(d) for d in dim]``
dim (Tuple[int], optional): Dimensions to be transformed.
Default: all dimensions, or the last ``len(s)`` dimensions if :attr:`s` is given.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.rfftn`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the real FFT orthonormal)
Where ``n = prod(s)`` is the logical FFT size.
Calling the backward transform (:func:`~torch.fft.irfftn`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfftn`
the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
>>> t = torch.rand(10, 10)
>>> rfftn = torch.fft.rfftn(t)
>>> rfftn.size()
torch.Size([10, 6])
Compared against the full output from :func:`~torch.fft.fftn`, we have all
elements up to the Nyquist frequency.
>>> fftn = torch.fft.fftn(t)
>>> torch.testing.assert_close(fftn[..., :6], rfftn, check_stride=False)
The discrete Fourier transform is separable, so :func:`~torch.fft.rfftn`
here is equivalent to a combination of :func:`~torch.fft.fft` and
:func:`~torch.fft.rfft`:
>>> two_ffts = torch.fft.fft(torch.fft.rfft(t, dim=1), dim=0)
>>> torch.testing.assert_close(rfftn, two_ffts, check_stride=False)
""".format(
**common_args
),
)
irfftn = _add_docstr(
_fft.fft_irfftn,
r"""
irfftn(input, s=None, dim=None, norm=None, *, out=None) -> Tensor
Computes the inverse of :func:`~torch.fft.rfftn`.
:attr:`input` is interpreted as a one-sided Hermitian signal in the Fourier
domain, as produced by :func:`~torch.fft.rfftn`. By the Hermitian property, the
output will be real-valued.
Note:
Some input frequencies must be real-valued to satisfy the Hermitian
property. In these cases the imaginary component will be ignored.
For example, any imaginary component in the zero-frequency term cannot
be represented in a real output and so will always be ignored.
Note:
The correct interpretation of the Hermitian input depends on the length of
the original data, as given by :attr:`s`. This is because each input shape
could correspond to either an odd or even length signal. By default, the
signal is assumed to be even length and odd signals will not round-trip
properly. So, it is recommended to always pass the signal shape :attr:`s`.
Args:
input (Tensor): the input tensor
s (Tuple[int], optional): Signal size in the transformed dimensions.
If given, each dimension ``dim[i]`` will either be zero-padded or
trimmed to the length ``s[i]`` before computing the real FFT.
If a length ``-1`` is specified, no padding is done in that dimension.
Defaults to even output in the last dimension:
``s[-1] = 2*(input.size(dim[-1]) - 1)``.
dim (Tuple[int], optional): Dimensions to be transformed.
The last dimension must be the half-Hermitian compressed dimension.
Default: all dimensions, or the last ``len(s)`` dimensions if :attr:`s` is given.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.irfftn`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the real IFFT orthonormal)
Where ``n = prod(s)`` is the logical IFFT size.
Calling the forward transform (:func:`~torch.fft.rfftn`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.irfftn`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> t = torch.rand(10, 9)
>>> T = torch.fft.rfftn(t)
Without specifying the output length to :func:`~torch.fft.irfft`, the output
will not round-trip properly because the input is odd-length in the last
dimension:
>>> torch.fft.irfftn(T).size()
torch.Size([10, 8])
So, it is recommended to always pass the signal shape :attr:`s`.
>>> roundtrip = torch.fft.irfftn(T, t.size())
>>> roundtrip.size()
torch.Size([10, 9])
>>> torch.testing.assert_close(roundtrip, t, check_stride=False)
""".format(
**common_args
),
)
hfft = _add_docstr(
_fft.fft_hfft,
r"""
hfft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the one dimensional discrete Fourier transform of a Hermitian
symmetric :attr:`input` signal.
Note:
:func:`~torch.fft.hfft`/:func:`~torch.fft.ihfft` are analogous to
:func:`~torch.fft.rfft`/:func:`~torch.fft.irfft`. The real FFT expects
a real signal in the time-domain and gives a Hermitian symmetry in the
frequency-domain. The Hermitian FFT is the opposite; Hermitian symmetric in
the time-domain and real-valued in the frequency-domain. For this reason,
special care needs to be taken with the length argument :attr:`n`, in the
same way as with :func:`~torch.fft.irfft`.
Note:
Because the signal is Hermitian in the time-domain, the result will be
real in the frequency domain. Note that some input frequencies must be
real-valued to satisfy the Hermitian property. In these cases the imaginary
component will be ignored. For example, any imaginary component in
``input[0]`` would result in one or more complex frequency terms which
cannot be represented in a real output and so will always be ignored.
Note:
The correct interpretation of the Hermitian input depends on the length of
the original data, as given by :attr:`n`. This is because each input shape
could correspond to either an odd or even length signal. By default, the
signal is assumed to be even length and odd signals will not round-trip
properly. So, it is recommended to always pass the signal length :attr:`n`.
Args:
input (Tensor): the input tensor representing a half-Hermitian signal
n (int, optional): Output signal length. This determines the length of the
real output. If given, the input will either be zero-padded or trimmed to this
length before computing the Hermitian FFT.
Defaults to even output: ``n=2*(input.size(dim) - 1)``.
dim (int, optional): The dimension along which to take the one dimensional Hermitian FFT.
norm (str, optional): Normalization mode. For the forward transform
(:func:`~torch.fft.hfft`), these correspond to:
* ``"forward"`` - normalize by ``1/n``
* ``"backward"`` - no normalization
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the Hermitian FFT orthonormal)
Calling the backward transform (:func:`~torch.fft.ihfft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ihfft`
the exact inverse.
Default is ``"backward"`` (no normalization).
Keyword args:
{out}
Example:
Taking a real-valued frequency signal and bringing it into the time domain
gives Hermitian symmetric output:
>>> t = torch.linspace(0, 1, 5)
>>> t
tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
>>> T = torch.fft.ifft(t)
>>> T
tensor([ 0.5000-0.0000j, -0.1250-0.1720j, -0.1250-0.0406j, -0.1250+0.0406j,
-0.1250+0.1720j])
Note that ``T[1] == T[-1].conj()`` and ``T[2] == T[-2].conj()`` is
redundant. We can thus compute the forward transform without considering
negative frequencies:
>>> torch.fft.hfft(T[:3], n=5)
tensor([0.0000, 0.2500, 0.5000, 0.7500, 1.0000])
Like with :func:`~torch.fft.irfft`, the output length must be given in order
to recover an even length output:
>>> torch.fft.hfft(T[:3])
tensor([0.1250, 0.2809, 0.6250, 0.9691])
""".format(
**common_args
),
)
ihfft = _add_docstr(
_fft.fft_ihfft,
r"""
ihfft(input, n=None, dim=-1, norm=None, *, out=None) -> Tensor
Computes the inverse of :func:`~torch.fft.hfft`.
:attr:`input` must be a real-valued signal, interpreted in the Fourier domain.
The IFFT of a real signal is Hermitian-symmetric, ``X[i] = conj(X[-i])``.
:func:`~torch.fft.ihfft` represents this in the one-sided form where only the
positive frequencies below the Nyquist frequency are included. To compute the
full output, use :func:`~torch.fft.ifft`.
Args:
input (Tensor): the real input tensor
n (int, optional): Signal length. If given, the input will either be zero-padded
or trimmed to this length before computing the Hermitian IFFT.
dim (int, optional): The dimension along which to take the one dimensional Hermitian IFFT.
norm (str, optional): Normalization mode. For the backward transform
(:func:`~torch.fft.ihfft`), these correspond to:
* ``"forward"`` - no normalization
* ``"backward"`` - normalize by ``1/n``
* ``"ortho"`` - normalize by ``1/sqrt(n)`` (making the IFFT orthonormal)
Calling the forward transform (:func:`~torch.fft.hfft`) with the same
normalization mode will apply an overall normalization of ``1/n`` between
the two transforms. This is required to make :func:`~torch.fft.ihfft`
the exact inverse.
Default is ``"backward"`` (normalize by ``1/n``).
Keyword args:
{out}
Example:
>>> t = torch.arange(5)
>>> t
tensor([0, 1, 2, 3, 4])
>>> torch.fft.ihfft(t)
tensor([ 2.0000-0.0000j, -0.5000-0.6882j, -0.5000-0.1625j])
Compare against the full output from :func:`~torch.fft.ifft`:
>>> torch.fft.ifft(t)
tensor([ 2.0000-0.0000j, -0.5000-0.6882j, -0.5000-0.1625j, -0.5000+0.1625j,
-0.5000+0.6882j])
""".format(
**common_args
),
)
fftfreq = _add_docstr(
_fft.fft_fftfreq,
r"""
fftfreq(n, d=1.0, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
Computes the discrete Fourier Transform sample frequencies for a signal of size :attr:`n`.
Note:
By convention, :func:`~torch.fft.fft` returns positive frequency terms
first, followed by the negative frequencies in reverse order, so that
``f[-i]`` for all :math:`0 < i \leq n/2`` in Python gives the negative
frequency terms. For an FFT of length :attr:`n` and with inputs spaced in
length unit :attr:`d`, the frequencies are::
f = [0, 1, ..., (n - 1) // 2, -(n // 2), ..., -1] / (d * n)
Note:
For even lengths, the Nyquist frequency at ``f[n/2]`` can be thought of as
either negative or positive. :func:`~torch.fft.fftfreq` follows NumPy's
convention of taking it to be negative.
Args:
n (int): the FFT length
d (float, optional): The sampling length scale.
The spacing between individual samples of the FFT input.
The default assumes unit spacing, dividing that result by the actual
spacing gives the result in physical frequency units.
Keyword Args:
{out}
{dtype}
{layout}
{device}
{requires_grad}
Example:
>>> torch.fft.fftfreq(5)
tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])
For even input, we can see the Nyquist frequency at ``f[2]`` is given as
negative:
>>> torch.fft.fftfreq(4)
tensor([ 0.0000, 0.2500, -0.5000, -0.2500])
""".format(
**factory_common_args
),
)
rfftfreq = _add_docstr(
_fft.fft_rfftfreq,
r"""
rfftfreq(n, d=1.0, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) -> Tensor
Computes the sample frequencies for :func:`~torch.fft.rfft` with a signal of size :attr:`n`.
Note:
:func:`~torch.fft.rfft` returns Hermitian one-sided output, so only the
positive frequency terms are returned. For a real FFT of length :attr:`n`
and with inputs spaced in length unit :attr:`d`, the frequencies are::
f = torch.arange((n + 1) // 2) / (d * n)
Note:
For even lengths, the Nyquist frequency at ``f[n/2]`` can be thought of as
either negative or positive. Unlike :func:`~torch.fft.fftfreq`,
:func:`~torch.fft.rfftfreq` always returns it as positive.
Args:
n (int): the real FFT length
d (float, optional): The sampling length scale.
The spacing between individual samples of the FFT input.
The default assumes unit spacing, dividing that result by the actual
spacing gives the result in physical frequency units.
Keyword Args:
{out}
{dtype}
{layout}
{device}
{requires_grad}
Example:
>>> torch.fft.rfftfreq(5)
tensor([0.0000, 0.2000, 0.4000])
>>> torch.fft.rfftfreq(4)
tensor([0.0000, 0.2500, 0.5000])
Compared to the output from :func:`~torch.fft.fftfreq`, we see that the
Nyquist frequency at ``f[2]`` has changed sign:
>>> torch.fft.fftfreq(4)
tensor([ 0.0000, 0.2500, -0.5000, -0.2500])
""".format(
**factory_common_args
),
)
fftshift = _add_docstr(
_fft.fft_fftshift,
r"""
fftshift(input, dim=None) -> Tensor
Reorders n-dimensional FFT data, as provided by :func:`~torch.fft.fftn`, to have
negative frequency terms first.
This performs a periodic shift of n-dimensional data such that the origin
``(0, ..., 0)`` is moved to the center of the tensor. Specifically, to
``input.shape[dim] // 2`` in each selected dimension.
Note:
By convention, the FFT returns positive frequency terms first, followed by
the negative frequencies in reverse order, so that ``f[-i]`` for all
:math:`0 < i \leq n/2` in Python gives the negative frequency terms.
:func:`~torch.fft.fftshift` rearranges all frequencies into ascending order
from negative to positive with the zero-frequency term in the center.
Note:
For even lengths, the Nyquist frequency at ``f[n/2]`` can be thought of as
either negative or positive. :func:`~torch.fft.fftshift` always puts the
Nyquist term at the 0-index. This is the same convention used by
:func:`~torch.fft.fftfreq`.
Args:
input (Tensor): the tensor in FFT order
dim (int, Tuple[int], optional): The dimensions to rearrange.
Only dimensions specified here will be rearranged, any other dimensions
will be left in their original order.
Default: All dimensions of :attr:`input`.
Example:
>>> f = torch.fft.fftfreq(4)
>>> f
tensor([ 0.0000, 0.2500, -0.5000, -0.2500])
>>> torch.fft.fftshift(f)
tensor([-0.5000, -0.2500, 0.0000, 0.2500])
Also notice that the Nyquist frequency term at ``f[2]`` was moved to the
beginning of the tensor.
This also works for multi-dimensional transforms:
>>> x = torch.fft.fftfreq(5, d=1/5) + 0.1 * torch.fft.fftfreq(5, d=1/5).unsqueeze(1)
>>> x
tensor([[ 0.0000, 1.0000, 2.0000, -2.0000, -1.0000],
[ 0.1000, 1.1000, 2.1000, -1.9000, -0.9000],
[ 0.2000, 1.2000, 2.2000, -1.8000, -0.8000],
[-0.2000, 0.8000, 1.8000, -2.2000, -1.2000],
[-0.1000, 0.9000, 1.9000, -2.1000, -1.1000]])
>>> torch.fft.fftshift(x)
tensor([[-2.2000, -1.2000, -0.2000, 0.8000, 1.8000],
[-2.1000, -1.1000, -0.1000, 0.9000, 1.9000],
[-2.0000, -1.0000, 0.0000, 1.0000, 2.0000],
[-1.9000, -0.9000, 0.1000, 1.1000, 2.1000],
[-1.8000, -0.8000, 0.2000, 1.2000, 2.2000]])
:func:`~torch.fft.fftshift` can also be useful for spatial data. If our
data is defined on a centered grid (``[-(N//2), (N-1)//2]``) then we can
use the standard FFT defined on an uncentered grid (``[0, N)``) by first
applying an :func:`~torch.fft.ifftshift`.
>>> x_centered = torch.arange(-5, 5)
>>> x_uncentered = torch.fft.ifftshift(x_centered)
>>> fft_uncentered = torch.fft.fft(x_uncentered)
Similarly, we can convert the frequency domain components to centered
convention by applying :func:`~torch.fft.fftshift`.
>>> fft_centered = torch.fft.fftshift(fft_uncentered)
The inverse transform, from centered Fourier space back to centered spatial
data, can be performed by applying the inverse shifts in reverse order:
>>> x_centered_2 = torch.fft.fftshift(torch.fft.ifft(torch.fft.ifftshift(fft_centered)))
>>> torch.testing.assert_close(x_centered.to(torch.complex64), x_centered_2, check_stride=False)
""",
)
ifftshift = _add_docstr(
_fft.fft_ifftshift,
r"""
ifftshift(input, dim=None) -> Tensor
Inverse of :func:`~torch.fft.fftshift`.
Args:
input (Tensor): the tensor in FFT order
dim (int, Tuple[int], optional): The dimensions to rearrange.
Only dimensions specified here will be rearranged, any other dimensions
will be left in their original order.
Default: All dimensions of :attr:`input`.
Example:
>>> f = torch.fft.fftfreq(5)
>>> f
tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])
A round-trip through :func:`~torch.fft.fftshift` and
:func:`~torch.fft.ifftshift` gives the same result:
>>> shifted = torch.fft.fftshift(f)
>>> torch.fft.ifftshift(shifted)
tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])
""",
)
| [
"[email protected]"
] | |
30c58bfaf43e0bf405a1eb4bad69c3c54bd6c0f6 | aa1e637de90f69f9ae742d42d5b777421617d10c | /nitro/resource/config/network/vpathparam.py | 21dc2bd6433e3c6ce39a52a6610a411633f4c0fa | [
"Apache-2.0",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | km0420j/nitro-python | db7fcb49fcad3e7a1ae0a99e4fc8675665da29ba | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | refs/heads/master | 2021-10-21T18:12:50.218465 | 2019-03-05T14:00:15 | 2019-03-05T15:35:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,535 | py | #
# Copyright (c) 2008-2015 Citrix Systems, 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, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from nitro.resource.base.base_resource import base_resource
from nitro.resource.base.base_resource import base_response
from nitro.service.options import options
from nitro.exception.nitro_exception import nitro_exception
from nitro.util.nitro_util import nitro_util
class vpathparam(base_resource) :
"""Configuration for VpathParam resource."""
def __init__(self) :
self._srcip = ""
self._offload = ""
self._encapsulation = ""
@property
def srcip(self) :
"""source-IP address used for all vPath L3 encapsulations. Must be a MIP or SNIP address.<br/>Minimum length = 1."""
try :
return self._srcip
except Exception as e:
raise e
@srcip.setter
def srcip(self, srcip) :
"""source-IP address used for all vPath L3 encapsulations. Must be a MIP or SNIP address.<br/>Minimum length = 1
:param srcip:
"""
try :
self._srcip = srcip
except Exception as e:
raise e
@property
def offload(self) :
"""enable/disable vPath offload feature.<br/>Default value: DISABLED<br/>Possible values = ENABLED, DISABLED."""
try :
return self._offload
except Exception as e:
raise e
@offload.setter
def offload(self, offload) :
"""enable/disable vPath offload feature.<br/>Default value: DISABLED<br/>Possible values = ENABLED, DISABLED
:param offload:
"""
try :
self._offload = offload
except Exception as e:
raise e
@property
def encapsulation(self) :
"""Global vPath encapsulation .<br/>Possible values = ENABLED, DISABLED."""
try :
return self._encapsulation
except Exception as e:
raise e
def _get_nitro_response(self, service, response) :
"""converts nitro response into object and returns the object array in case of get request.
:param service:
:param response:
"""
try :
result = service.payload_formatter.string_to_resource(vpathparam_response, response, self.__class__.__name__)
if(result.errorcode != 0) :
if (result.errorcode == 444) :
service.clear_session(self)
if result.severity :
if (result.severity == "ERROR") :
raise nitro_exception(result.errorcode, str(result.message), str(result.severity))
else :
raise nitro_exception(result.errorcode, str(result.message), str(result.severity))
return result.vpathparam
except Exception as e :
raise e
def _get_object_name(self) :
"""Returns the value of object identifier argument"""
try :
return 0
except Exception as e :
raise e
@classmethod
def update(cls, client, resource) :
"""Use this API to update vpathparam.
:param client:
:param resource:
"""
try :
if type(resource) is not list :
updateresource = vpathparam()
updateresource.srcip = resource.srcip
updateresource.offload = resource.offload
return updateresource.update_resource(client)
except Exception as e :
raise e
@classmethod
def unset(cls, client, resource, args) :
"""Use this API to unset the properties of vpathparam resource.
Properties that need to be unset are specified in args array.
:param client:
:param resource:
:param args:
"""
try :
if type(resource) is not list :
unsetresource = vpathparam()
return unsetresource.unset_resource(client, args)
except Exception as e :
raise e
@classmethod
def get(cls, client, name="", option_="") :
"""Use this API to fetch all the vpathparam resources that are configured on netscaler.
:param client:
:param name: (Default value = "")
:param option_: (Default value = "")
"""
try :
if not name :
obj = vpathparam()
response = obj.get_resources(client, option_)
return response
except Exception as e :
raise e
class Offload:
""" """
ENABLED = "ENABLED"
DISABLED = "DISABLED"
class Encapsulation:
""" """
ENABLED = "ENABLED"
DISABLED = "DISABLED"
class vpathparam_response(base_response) :
""" """
def __init__(self, length=1) :
self.vpathparam = []
self.errorcode = 0
self.message = ""
self.severity = ""
self.sessionid = ""
self.vpathparam = [vpathparam() for _ in range(length)]
| [
"[email protected]"
] | |
cefbe68fce30d43acff1a4d027231de685d1d6c0 | e6913abba3f5cfd396e62c7e514674dbcb3631bb | /vidfeat/_meta.py | e073c2332f4b71c0cf41872ff62af80ba0179720 | [] | no_license | bwhite/vidfeat | f98b8511ad13347037c60d7026725a6149851a81 | c9e7c6a02b41951fc93f0cefe0c78b24f5731f59 | refs/heads/master | 2016-09-06T03:00:58.791493 | 2012-06-19T21:54:01 | 2012-06-19T21:54:01 | 1,878,956 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 545 | py | import vidfeat
class MetaFrameFeature(vidfeat.ClassifierFrameFeature):
def __init__(self, *frame_features, **kw):
self._frame_features = frame_features
super(MetaFrameFeature, self).__init__(classifier=None, **kw)
def _feature(self, image):
return self.feature(image)
def train(self, label_frames):
raise NotImplementedError
def __call__(self, frame):
raise NotImplementedError
def predict(self, frame):
return all(f.predict(frame) for f in self._frame_features)
| [
"[email protected]"
] | |
1f99b134d5d9411b26d038191f42014f8d534d8f | 0e1e643e864bcb96cf06f14f4cb559b034e114d0 | /Exps_7_v3/doc3d/I_w_M_to_W_focus_Zok/ch096/wiColorJ/Sob_k05_s001_EroM/pyr_Tcrop255_p20_j15/pyr_2s/L6/step09_2side_L6.py | e65676bd0f5bd5a5abd293a8bdc4681bb66d9e79 | [] | no_license | KongBOy/kong_model2 | 33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307 | 1af20b168ffccf0d5293a393a40a9fa9519410b2 | refs/heads/master | 2022-10-14T03:09:22.543998 | 2022-10-06T11:33:42 | 2022-10-06T11:33:42 | 242,080,692 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,688 | py | #############################################################################################################################################################################################################
#############################################################################################################################################################################################################
### 把 kong_model2 加入 sys.path
import os
from tkinter import S
code_exe_path = os.path.realpath(__file__) ### 目前執行 step10_b.py 的 path
code_exe_path_element = code_exe_path.split("\\") ### 把 path 切分 等等 要找出 kong_model 在第幾層
kong_layer = code_exe_path_element.index("kong_model2") ### 找出 kong_model2 在第幾層
kong_model2_dir = "\\".join(code_exe_path_element[:kong_layer + 1]) ### 定位出 kong_model2 的 dir
import sys ### 把 kong_model2 加入 sys.path
sys.path.append(kong_model2_dir)
# print(__file__.split("\\")[-1])
# print(" code_exe_path:", code_exe_path)
# print(" code_exe_path_element:", code_exe_path_element)
# print(" kong_layer:", kong_layer)
# print(" kong_model2_dir:", kong_model2_dir)
#############################################################################################################################################################################################################
from step08_b_use_G_generate_I_w_M_to_Wx_Wy_Wz_combine import I_w_M_to_W
from step08_b_use_G_generate_0_util import Tight_crop, Color_jit
from step09_c_train_step import Train_step_I_w_M_to_W
from step09_d_KModel_builder_combine_step789 import KModel_builder, MODEL_NAME
color_jit = Color_jit(do_ratio=0.6)
use_what_gen_op = I_w_M_to_W( separate_out=False, focus=True, tight_crop=Tight_crop(pad_size=20, resize=(255, 255), jit_scale= 0) )
use_what_train_step = Train_step_I_w_M_to_W( separate_out=False, focus=True, tight_crop=Tight_crop(pad_size=20, resize=(255, 255), jit_scale= 15), color_jit=color_jit )
import time
start_time = time.time()
###############################################################################################################################################################################################
###############################################################################################################################################################################################
########################################################### Block1
### Block1
#########################################################################################
pyramid_1side_1__2side_1 = [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]
pyramid_1side_2__2side_1 = [2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2]
pyramid_1side_2__2side_2 = [2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2]
pyramid_1side_3__2side_1 = [2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2]
pyramid_1side_3__2side_2 = [2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2]
pyramid_1side_3__2side_3 = [2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2]
pyramid_1side_4__2side_1 = [2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2]
pyramid_1side_4__2side_2 = [2, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 2]
pyramid_1side_4__2side_3 = [2, 2, 2, 1, 0, 0, 0, 0, 0, 1, 2, 2, 2]
pyramid_1side_4__2side_4 = [2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2]
pyramid_1side_5__2side_1 = [2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2]
pyramid_1side_5__2side_2 = [2, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 2, 2]
pyramid_1side_5__2side_3 = [2, 2, 2, 1, 1, 0, 0, 0, 1, 1, 2, 2, 2]
pyramid_1side_5__2side_4 = [2, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2]
pyramid_1side_5__2side_5 = [2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2]
pyramid_1side_6__2side_1 = [2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2]
pyramid_1side_6__2side_2 = [2, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2]
pyramid_1side_6__2side_3 = [2, 2, 2, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2]
pyramid_1side_6__2side_4 = [2, 2, 2, 2, 1, 1, 0, 1, 1, 2, 2, 2, 2]
pyramid_1side_6__2side_5 = [2, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 2]
pyramid_1side_6__2side_6 = [2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2]
pyramid_1side_7__2side_1 = [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]
pyramid_1side_7__2side_2 = [2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2]
pyramid_1side_7__2side_3 = [2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2]
pyramid_1side_7__2side_4 = [2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2]
pyramid_1side_7__2side_5 = [2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2]
pyramid_1side_7__2side_6 = [2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2]
pyramid_1side_7__2side_7 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
#########################################################################################
ch032_pyramid_1side_1__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_1__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_2__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_2__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_2__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_2__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_3__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_3__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_3__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_3__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_3__2side_3 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_3__2side_3, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_4__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_4__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_4__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_4__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_4__2side_3 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_4__2side_3, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_4__2side_4 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_4__2side_4, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_5__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_5__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_5__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_5__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_5__2side_3 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_5__2side_3, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_5__2side_4 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_5__2side_4, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_5__2side_5 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_5__2side_5, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_3 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_3, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_4 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_4, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_5 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_5, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_6__2side_6 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_6__2side_6, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_1 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_1, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_2 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_2, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_3 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_3, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_4 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_4, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_5 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_5, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_6 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_6, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
ch032_pyramid_1side_7__2side_7 = KModel_builder().set_model_name(MODEL_NAME.flow_unet2).set_unet3(out_conv_block=True, concat_before_down=True, kernel_size=3, padding="valid", hid_ch= 96, depth_level=6, out_ch=3, unet_acti="sigmoid", conv_block_num=pyramid_1side_7__2side_7, ch_upper_bound= 2 ** 14).set_gen_op( use_what_gen_op ).set_train_step( use_what_train_step )
#########################################################################################
###############################################################################################################################################################################################
if(__name__ == "__main__"):
import numpy as np
print("build_model cost time:", time.time() - start_time)
data = np.zeros(shape=(1, 512, 512, 1))
use_model = ch032_pyramid_1side_4__2side_2
use_model = use_model.build()
result = use_model.generator(data)
print(result.shape)
from kong_util.tf_model_util import Show_model_weights
Show_model_weights(use_model.generator)
use_model.generator.summary()
| [
"[email protected]"
] | |
66808f79efd0955928936c28fc4fd0d78cc67aac | b5d916d99a8b186c5cbc109a8efc626ecc24635d | /technicalcourses/models.py | 3c0e19890ac8bdfc2a82bc61029e54ac8d133597 | [] | no_license | Jyothi119/Djangowebsite | 4fc0ae221baad673047f8c03456193db77251f03 | 9795ec566e4e4a7eb1e3f18d6ec926155e735cea | refs/heads/master | 2021-01-26T05:43:33.710710 | 2020-03-08T19:44:39 | 2020-03-08T19:44:39 | 243,331,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | from django.db import models
class allcourses(models.Model):
coursename=models.CharField(max_length=200)
insname=models.CharField(max_length=200)
def __str__(self):
return self.coursename
return self.insname
class details(models.Model):
course=models.ForeignKey(allcourses, on_delete=models.CASCADE)
sp=models.CharField(max_length=500)
il=models.CharField(max_length=500)
def __str__(self):
return self.pk
# Create your models here.
| [
"[email protected]"
] | |
5342cdda84a13c44f1736b86662160483b522308 | 3d2939ae9ce30b15c1c3cd18bb7bc1db655863fe | /openturns/1.8/user_manual/_generated/openturns-VonMises-1.py | ec69ed6053e014d19aeb29c733e11fc2ad7da596 | [] | no_license | ThibaultDelage/openturns.github.io | 07c9d6c98118a7695c35192a59814c23a71cb861 | 726a8f9ae97dc27d78a822f4d46976af56691802 | refs/heads/master | 2020-05-07T14:06:08.368744 | 2019-04-08T14:05:56 | 2019-04-08T14:05:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,475 | py | import openturns as ot
from matplotlib import pyplot as plt
from openturns.viewer import View
if (ot.VonMises().__class__.__name__=='ComposedDistribution'):
correlation = ot.CorrelationMatrix(2)
correlation[1, 0] = 0.25
aCopula = ot.NormalCopula(correlation)
marginals = [ot.Normal(1.0, 2.0), ot.Normal(2.0, 3.0)]
distribution = ot.ComposedDistribution(marginals, aCopula)
elif (ot.VonMises().__class__.__name__=='CumulativeDistributionNetwork'):
distribution = ot.CumulativeDistributionNetwork([ot.Normal(2),ot.Dirichlet([0.5, 1.0, 1.5])], ot.BipartiteGraph([[0,1], [0,1]]))
else:
distribution = ot.VonMises()
dimension = distribution.getDimension()
if dimension <= 2:
if distribution.getDimension() == 1:
distribution.setDescription(['$x$'])
pdf_graph = distribution.drawPDF()
cdf_graph = distribution.drawCDF()
fig = plt.figure(figsize=(10, 4))
plt.suptitle(str(distribution))
pdf_axis = fig.add_subplot(121)
cdf_axis = fig.add_subplot(122)
View(pdf_graph, figure=fig, axes=[pdf_axis], add_legend=False)
View(cdf_graph, figure=fig, axes=[cdf_axis], add_legend=False)
else:
distribution.setDescription(['$x_1$', '$x_2$'])
pdf_graph = distribution.drawPDF()
fig = plt.figure(figsize=(10, 5))
plt.suptitle(str(distribution))
pdf_axis = fig.add_subplot(111)
View(pdf_graph, figure=fig, axes=[pdf_axis], add_legend=False) | [
"[email protected]"
] | |
bda325853386ce92540cfdb791b2f0cf2623cae5 | 7fada1dd14df5d4c467a77e88467407a7c507f1d | /digital_forensic/follower.py | c1901d0b0888d422a74117da135e1e6b87984b37 | [
"Apache-2.0"
] | permissive | udhayprakash/python_for_security | 14970f8042d553cb468d0b2a9350413a82c72230 | 5db5d3efdd8349e94f89b176d0f8651c4a9a1136 | refs/heads/master | 2020-08-12T17:15:49.164526 | 2019-10-17T18:43:02 | 2019-10-17T18:43:02 | 214,807,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | py | import tweepy
import time
twitter_app_consumer_key = '**************************'
twitter_consumer_secret = '**************************'
twitter_access_token = '**************************'
twitter_access_secret = '**************************'
MyAuth = tweepy.auth.OAuthHandler(twitter_app_consumer_key, twitter_consumer_secret)
MyAuth.set_access_token(twitter_access_token, twitter_access_secret)
MyAPI = tweepy.API(MyAuth)
followerlist = open('followerslist.txt', 'w')
if (MyAPI.verify_credentials):
print
'Connected to Twitter Server'
user = tweepy.Cursor(api.followers, twitter_screen_name="gauravkumarin").items()
while True:
try:
u = next(twitteruser)
followerlist.write(u.twitter_screen_name + ' \n')
except:
time.sleep(15 * 60)
u = next(twitteruser)
followerlist.write(u.twitter_screen_name + ' \n')
followerlist.close()
| [
"[email protected]"
] | |
5dd4e09d7474c598222396bdbabf4e59ed63e232 | 43f3b7e4a5b7a1210ffa72c5a855d7542d68290d | /Results/Python/Begin/35.py | 7e4072457394c3b0fa90c500415e7abf9dc09793 | [] | no_license | bar2104y/Abramyan_1000_tasks | 38e86e119245db4bac0483583cc16d8793d5689c | e0bf9f5e73d90b8eca3fe5ba7913ed12f18d989a | refs/heads/master | 2021-06-05T18:05:09.788453 | 2020-06-30T19:52:31 | 2020-06-30T19:52:31 | 150,898,700 | 5 | 2 | null | 2018-10-02T17:16:28 | 2018-09-29T20:01:33 | Python | UTF-8 | Python | false | false | 150 | py | v = int(input("V Boat: "))
u = int(input("V River: "))
t1 = int(input("T lake: "))
t2 = int(input("T river: "))
s = v*t1 + t2*(v-u)
print("S =",s) | [
"[email protected]"
] | |
b16dbc54ba4146d524f3415e574c22d7c5e00977 | 9d68e4c8e210b4a25483887a5d10850bdbe0b712 | /148.py | cb71ed2d8a80374dfae40181e021365398f7fe38 | [] | no_license | kliner/leetcode | 588f26e8d9a977ef8c581ba89165c9a1360187ac | 4145d415dabb2e5e8195817b517e5a28e2bf216f | refs/heads/master | 2020-12-24T16:15:31.060680 | 2016-02-25T15:38:29 | 2016-02-25T15:38:29 | 33,992,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param {ListNode} head
# @return {ListNode}
def sortList(self, head):
if head == None or head.next == None:
return head
h1 = head
h2 = self.split(head)
# if h2 != None:
# print h2.val
h1 = self.sortList(h1)
h2 = self.sortList(h2)
return self.merge(h1, h2)
def split(self, head):
if head == None:
return None
p1 = head
p2 = head
while p1.next != None:
p1 = p1.next
if p1.next != None:
p1 = p1.next
p2 = p2.next
t = p2.next
p2.next = None
return t
def merge(self, h1, h2):
if h1 == None:
return h2
if h2 == None:
return h1
res = ListNode(0)
cur = res
while h1 != None or h2 != None:
if h1 == None:
cur.next = h2
break
if h2 == None:
cur.next = h1
break
if h1.val < h2.val:
cur.next = h1
cur = cur.next
h1 = h1.next
else:
cur.next = h2
cur = cur.next
h2 = h2.next
return res.next
n = ListNode(3)
n.next = ListNode(1)
n.next.next = ListNode(2)
n.next.next.next = ListNode(5)
n.next.next.next.next = ListNode(4)
test = Solution()
a = test.sortList(n)
while a != None:
print a.val
a = a.next
n = ListNode(0)
t = n
for i in range(1, 10000):
n.next = ListNode(i)
n = n.next
a = test.sortList(t)
| [
"[email protected]"
] | |
89e429f07df618cb57e6a79f4bd4d324b4cabb08 | ccb87e34b5d105e35794591ba3aada625c8a838f | /Python_Class/py3intro3day 2/EXAMPLES/lambda_sort.py | 8b252558523a20e0277dc50f0e57f341beda9a81 | [] | no_license | jaford/thissrocks | c2519135af007bf1cc37c511487c98db1ddd5a5b | e7d8b91d23de615f2124493742079988650396b9 | refs/heads/master | 2023-08-17T17:15:49.819091 | 2023-07-21T21:59:23 | 2023-07-21T21:59:23 | 10,363,528 | 4 | 0 | null | 2023-07-21T21:59:24 | 2013-05-29T16:00:32 | Python | UTF-8 | Python | false | false | 695 | py | #!/usr/bin/env python
fruit = ["pomegranate", "cherry", "apricot", "date", "Apple",
"lemon", "Kiwi", "ORANGE", "lime", "Watermelon", "guava",
"papaya", "FIG", "pear", "banana", "Tamarind", "persimmon",
"elderberry", "peach", "BLUEberry", "lychee", "grape"]
nums = [800, 80, 1000, 32, 255, 400, 5, 5000]
fs1 = sorted(fruit, key=lambda e: e.lower()) # <1>
print("Ignoring case:")
print(' '.join(fs1))
print()
fs2 = sorted(fruit, key=lambda e: (len(e), e.lower())) # <2>
print("By length, then name:")
print(' '.join(fs2))
print()
fs3 = sorted(nums)
print("Numbers sorted numerically:")
for n in fs3:
print(n, end=' ')
print()
print()
| [
"[email protected]"
] | |
d1ca7ad9f8f171493376ff9b12cd23bfe529815b | e1f519fc0c4f76d11db9584f74c5b49ca95b0798 | /cs_notes/arrays/set_mismatch.py | 8674f53c01ae185193bb791426ea9b148b1b9bfa | [] | no_license | hwc1824/LeetCodeSolution | 22d41327cde2b9562f58cc73e6205c7c2f9a5e1c | ac53dd9bf2c4c9d17c9dc5f7fdda32e386658fdd | refs/heads/master | 2023-08-16T10:15:39.351933 | 2018-12-19T00:43:07 | 2018-12-19T00:43:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,726 | py | # 645. Set Mismatch (Easy)
# https://leetcode.com/problems/set-mismatch/description/
class Solution:
def findErrorNums(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
len_n = len(nums)
correct_sum = (len_n*(len_n+1))//2
actual_sum = 0
duplicate_num = 0
for n in nums:
real_idx = abs(n)-1
if nums[real_idx] > 0:
nums[real_idx] *= -1
else:
duplicate_num = real_idx+1
actual_sum += (real_idx+1)
return [duplicate_num, correct_sum - (actual_sum - duplicate_num)]
def findErrorNumsCool(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
res = [0, 0]
for n in nums:
# mapping number to (sorted) index
idx = abs(n)-1
# only the index corresponded with duplicate number would possibly be negative
# because it's duplicate
if nums[idx] > 0:
nums[idx] *= -1
else:
res[0] = idx+1 # mapping index to number
for i, n in enumerate(nums):
# only the index corresponded with missing number would be positive
# since it has never been visited
if n > 0:
res[1] = i+1
return res
def findErrorNumsPythonicAndFaster(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
s = sum(nums)
n = len(nums)
duplicate = s - sum(set(nums))
missing = duplicate + int(((n*(n+1))/2)-s)
return [duplicate, missing] | [
"[email protected]"
] | |
47831010bef11e3cf2acb9249a23f05d70b7361f | f82757475ea13965581c2147ff57123b361c5d62 | /gi-stubs/repository/RygelServer/TrackableItemIface.py | 64a57d3cb6e35e3c805d5b5bdef8f3dfd4cbdb74 | [] | no_license | ttys3/pygobject-stubs | 9b15d1b473db06f47e5ffba5ad0a31d6d1becb57 | d0e6e93399212aada4386d2ce80344eb9a31db48 | refs/heads/master | 2022-09-23T12:58:44.526554 | 2020-06-06T04:15:00 | 2020-06-06T04:15:00 | 269,693,287 | 8 | 2 | null | 2020-06-05T15:57:54 | 2020-06-05T15:57:54 | null | UTF-8 | Python | false | false | 4,708 | py | # encoding: utf-8
# module gi.repository.RygelServer
# from /usr/lib64/girepository-1.0/RygelServer-2.6.typelib
# by generator 1.147
"""
An object which wraps an introspection typelib.
This wrapping creates a python module like representation of the typelib
using gi repository as a foundation. Accessing attributes of the module
will dynamically pull them in and create wrappers for the members.
These members are then cached on this introspection module.
"""
# imports
import gi as __gi
import gi.overrides.GObject as __gi_overrides_GObject
import gi.repository.Gee as __gi_repository_Gee
import gi.repository.GUPnP as __gi_repository_GUPnP
import gi.repository.RygelCore as __gi_repository_RygelCore
import gobject as __gobject
class TrackableItemIface(__gi.Struct):
"""
:Constructors:
::
TrackableItemIface()
"""
def __delattr__(self, *args, **kwargs): # real signature unknown
""" Implement delattr(self, name). """
pass
def __dir__(self, *args, **kwargs): # real signature unknown
""" Default dir() implementation. """
pass
def __eq__(self, *args, **kwargs): # real signature unknown
""" Return self==value. """
pass
def __format__(self, *args, **kwargs): # real signature unknown
""" Default object formatter. """
pass
def __getattribute__(self, *args, **kwargs): # real signature unknown
""" Return getattr(self, name). """
pass
def __ge__(self, *args, **kwargs): # real signature unknown
""" Return self>=value. """
pass
def __gt__(self, *args, **kwargs): # real signature unknown
""" Return self>value. """
pass
def __hash__(self, *args, **kwargs): # real signature unknown
""" Return hash(self). """
pass
def __init_subclass__(self, *args, **kwargs): # real signature unknown
"""
This method is called when a class is subclassed.
The default implementation does nothing. It may be
overridden to extend subclasses.
"""
pass
def __init__(self): # real signature unknown; restored from __doc__
pass
def __le__(self, *args, **kwargs): # real signature unknown
""" Return self<=value. """
pass
def __lt__(self, *args, **kwargs): # real signature unknown
""" Return self<value. """
pass
@staticmethod # known case of __new__
def __new__(*args, **kwargs): # real signature unknown
""" Create and return a new object. See help(type) for accurate signature. """
pass
def __ne__(self, *args, **kwargs): # real signature unknown
""" Return self!=value. """
pass
def __reduce_ex__(self, *args, **kwargs): # real signature unknown
""" Helper for pickle. """
pass
def __reduce__(self, *args, **kwargs): # real signature unknown
""" Helper for pickle. """
pass
def __repr__(self, *args, **kwargs): # real signature unknown
""" Return repr(self). """
pass
def __setattr__(self, *args, **kwargs): # real signature unknown
""" Implement setattr(self, name, value). """
pass
def __sizeof__(self, *args, **kwargs): # real signature unknown
""" Size of object in memory, in bytes. """
pass
def __str__(self, *args, **kwargs): # real signature unknown
""" Return str(self). """
pass
def __subclasshook__(self, *args, **kwargs): # real signature unknown
"""
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__().
It should return True, False or NotImplemented. If it returns
NotImplemented, the normal algorithm is used. Otherwise, it
overrides the normal algorithm (and the outcome is cached).
"""
pass
def __weakref__(self, *args, **kwargs): # real signature unknown
pass
parent_iface = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
__class__ = None # (!) real value is "<class 'gi.types.StructMeta'>"
__dict__ = None # (!) real value is "mappingproxy({'__info__': StructInfo(TrackableItemIface), '__module__': 'gi.repository.RygelServer', '__gtype__': <GType void (4)>, '__dict__': <attribute '__dict__' of 'TrackableItemIface' objects>, '__weakref__': <attribute '__weakref__' of 'TrackableItemIface' objects>, '__doc__': None, 'parent_iface': <property object at 0x7fe1d1690040>})"
__gtype__ = None # (!) real value is '<GType void (4)>'
__info__ = StructInfo(TrackableItemIface)
| [
"[email protected]"
] | |
10b3d96a6b4da11496ed42598ece3a082b4a4470 | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part007061.py | 3722e6f38567273a674d0a8fff7bb7410ff281c8 | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,855 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.integrals.rubi.rules.miscellaneous_integration import *
from sympy import *
class CommutativeMatcher141696(CommutativeMatcher):
_instance = None
patterns = {
0: (0, Multiset({0: 1, 1: 1}), [
])
}
subjects = {}
subjects_by_id = {}
bipartite = BipartiteGraph()
associative = Add
max_optional_count = 0
anonymous_patterns = {0}
def __init__(self):
self.add_subject(None)
@staticmethod
def get():
if CommutativeMatcher141696._instance is None:
CommutativeMatcher141696._instance = CommutativeMatcher141696()
return CommutativeMatcher141696._instance
@staticmethod
def get_match_iter(subject):
subjects = deque([subject]) if subject is not None else deque()
subst0 = Substitution()
# State 141695
if len(subjects) >= 1 and subjects[0] == Integer(1):
tmp1 = subjects.popleft()
# State 141697
if len(subjects) == 0:
pass
# 0: 1
yield 0, subst0
subjects.appendleft(tmp1)
subst1 = Substitution(subst0)
try:
subst1.try_add_variable('i2.2.1.0', S(1))
except ValueError:
pass
else:
pass
# State 141698
if len(subjects) >= 1 and isinstance(subjects[0], Pow):
tmp3 = subjects.popleft()
subjects4 = deque(tmp3._args)
# State 141699
if len(subjects4) >= 1:
tmp5 = subjects4.popleft()
subst2 = Substitution(subst1)
try:
subst2.try_add_variable('i2.2.1.1', tmp5)
except ValueError:
pass
else:
pass
# State 141700
if len(subjects4) >= 1 and subjects4[0] == Integer(2):
tmp7 = subjects4.popleft()
# State 141701
if len(subjects4) == 0:
pass
# State 141702
if len(subjects) == 0:
pass
# 1: e*x**2
yield 1, subst2
subjects4.appendleft(tmp7)
subjects4.appendleft(tmp5)
subjects.appendleft(tmp3)
if len(subjects) >= 1 and isinstance(subjects[0], Mul):
tmp8 = subjects.popleft()
associative1 = tmp8
associative_type1 = type(tmp8)
subjects9 = deque(tmp8._args)
matcher = CommutativeMatcher141704.get()
tmp10 = subjects9
subjects9 = []
for s in tmp10:
matcher.add_subject(s)
for pattern_index, subst1 in matcher.match(tmp10, subst0):
pass
if pattern_index == 0:
pass
# State 141709
if len(subjects) == 0:
pass
# 1: e*x**2
yield 1, subst1
subjects.appendleft(tmp8)
return
yield
from matchpy.matching.many_to_one import CommutativeMatcher
from .generated_part007062 import *
from collections import deque
from matchpy.utils import VariableWithCount
from multiset import Multiset | [
"[email protected]"
] | |
58c957b6ffabc3e68d931e87d678d8c39abc3908 | c1ff870879152fba2b54eddfb7591ec322eb3061 | /plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/deps/openssl/config/archs/darwin64-x86_64-cc/asm/openssl.gypi | 20d6fbba6aea4e1aad38dddbddfe804c0044c682 | [
"LicenseRef-scancode-free-unknown",
"MIT",
"ISC",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"Artistic-2.0",
"NAIST-2003",
"BSD-3-Clause",
"Zlib",
"NTP",
"LicenseRef-scancode-openssl",
"ICU",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | MTASZTAKI/ApertusVR | 1a9809fb7af81c3cd7fb732ed481ebe4ce66fefa | 424ec5515ae08780542f33cc4841a8f9a96337b3 | refs/heads/0.9 | 2022-12-11T20:03:42.926813 | 2019-10-11T09:29:45 | 2019-10-11T09:29:45 | 73,708,854 | 188 | 55 | MIT | 2022-12-11T08:53:21 | 2016-11-14T13:48:00 | C++ | UTF-8 | Python | false | false | 27,731 | gypi | {
'variables': {
'openssl_sources': [
'openssl/ssl/bio_ssl.c',
'openssl/ssl/d1_lib.c',
'openssl/ssl/d1_msg.c',
'openssl/ssl/d1_srtp.c',
'openssl/ssl/methods.c',
'openssl/ssl/pqueue.c',
'openssl/ssl/record/dtls1_bitmap.c',
'openssl/ssl/record/rec_layer_d1.c',
'openssl/ssl/record/rec_layer_s3.c',
'openssl/ssl/record/ssl3_buffer.c',
'openssl/ssl/record/ssl3_record.c',
'openssl/ssl/s3_cbc.c',
'openssl/ssl/s3_enc.c',
'openssl/ssl/s3_lib.c',
'openssl/ssl/s3_msg.c',
'openssl/ssl/ssl_asn1.c',
'openssl/ssl/ssl_cert.c',
'openssl/ssl/ssl_ciph.c',
'openssl/ssl/ssl_conf.c',
'openssl/ssl/ssl_err.c',
'openssl/ssl/ssl_init.c',
'openssl/ssl/ssl_lib.c',
'openssl/ssl/ssl_mcnf.c',
'openssl/ssl/ssl_rsa.c',
'openssl/ssl/ssl_sess.c',
'openssl/ssl/ssl_stat.c',
'openssl/ssl/ssl_txt.c',
'openssl/ssl/ssl_utst.c',
'openssl/ssl/statem/statem.c',
'openssl/ssl/statem/statem_clnt.c',
'openssl/ssl/statem/statem_dtls.c',
'openssl/ssl/statem/statem_lib.c',
'openssl/ssl/statem/statem_srvr.c',
'openssl/ssl/t1_enc.c',
'openssl/ssl/t1_ext.c',
'openssl/ssl/t1_lib.c',
'openssl/ssl/t1_reneg.c',
'openssl/ssl/t1_trce.c',
'openssl/ssl/tls_srp.c',
'openssl/crypto/aes/aes_cfb.c',
'openssl/crypto/aes/aes_ecb.c',
'openssl/crypto/aes/aes_ige.c',
'openssl/crypto/aes/aes_misc.c',
'openssl/crypto/aes/aes_ofb.c',
'openssl/crypto/aes/aes_wrap.c',
'openssl/crypto/asn1/a_bitstr.c',
'openssl/crypto/asn1/a_d2i_fp.c',
'openssl/crypto/asn1/a_digest.c',
'openssl/crypto/asn1/a_dup.c',
'openssl/crypto/asn1/a_gentm.c',
'openssl/crypto/asn1/a_i2d_fp.c',
'openssl/crypto/asn1/a_int.c',
'openssl/crypto/asn1/a_mbstr.c',
'openssl/crypto/asn1/a_object.c',
'openssl/crypto/asn1/a_octet.c',
'openssl/crypto/asn1/a_print.c',
'openssl/crypto/asn1/a_sign.c',
'openssl/crypto/asn1/a_strex.c',
'openssl/crypto/asn1/a_strnid.c',
'openssl/crypto/asn1/a_time.c',
'openssl/crypto/asn1/a_type.c',
'openssl/crypto/asn1/a_utctm.c',
'openssl/crypto/asn1/a_utf8.c',
'openssl/crypto/asn1/a_verify.c',
'openssl/crypto/asn1/ameth_lib.c',
'openssl/crypto/asn1/asn1_err.c',
'openssl/crypto/asn1/asn1_gen.c',
'openssl/crypto/asn1/asn1_lib.c',
'openssl/crypto/asn1/asn1_par.c',
'openssl/crypto/asn1/asn_mime.c',
'openssl/crypto/asn1/asn_moid.c',
'openssl/crypto/asn1/asn_mstbl.c',
'openssl/crypto/asn1/asn_pack.c',
'openssl/crypto/asn1/bio_asn1.c',
'openssl/crypto/asn1/bio_ndef.c',
'openssl/crypto/asn1/d2i_pr.c',
'openssl/crypto/asn1/d2i_pu.c',
'openssl/crypto/asn1/evp_asn1.c',
'openssl/crypto/asn1/f_int.c',
'openssl/crypto/asn1/f_string.c',
'openssl/crypto/asn1/i2d_pr.c',
'openssl/crypto/asn1/i2d_pu.c',
'openssl/crypto/asn1/n_pkey.c',
'openssl/crypto/asn1/nsseq.c',
'openssl/crypto/asn1/p5_pbe.c',
'openssl/crypto/asn1/p5_pbev2.c',
'openssl/crypto/asn1/p5_scrypt.c',
'openssl/crypto/asn1/p8_pkey.c',
'openssl/crypto/asn1/t_bitst.c',
'openssl/crypto/asn1/t_pkey.c',
'openssl/crypto/asn1/t_spki.c',
'openssl/crypto/asn1/tasn_dec.c',
'openssl/crypto/asn1/tasn_enc.c',
'openssl/crypto/asn1/tasn_fre.c',
'openssl/crypto/asn1/tasn_new.c',
'openssl/crypto/asn1/tasn_prn.c',
'openssl/crypto/asn1/tasn_scn.c',
'openssl/crypto/asn1/tasn_typ.c',
'openssl/crypto/asn1/tasn_utl.c',
'openssl/crypto/asn1/x_algor.c',
'openssl/crypto/asn1/x_bignum.c',
'openssl/crypto/asn1/x_info.c',
'openssl/crypto/asn1/x_int64.c',
'openssl/crypto/asn1/x_long.c',
'openssl/crypto/asn1/x_pkey.c',
'openssl/crypto/asn1/x_sig.c',
'openssl/crypto/asn1/x_spki.c',
'openssl/crypto/asn1/x_val.c',
'openssl/crypto/async/arch/async_null.c',
'openssl/crypto/async/arch/async_posix.c',
'openssl/crypto/async/arch/async_win.c',
'openssl/crypto/async/async.c',
'openssl/crypto/async/async_err.c',
'openssl/crypto/async/async_wait.c',
'openssl/crypto/bf/bf_cfb64.c',
'openssl/crypto/bf/bf_ecb.c',
'openssl/crypto/bf/bf_enc.c',
'openssl/crypto/bf/bf_ofb64.c',
'openssl/crypto/bf/bf_skey.c',
'openssl/crypto/bio/b_addr.c',
'openssl/crypto/bio/b_dump.c',
'openssl/crypto/bio/b_print.c',
'openssl/crypto/bio/b_sock.c',
'openssl/crypto/bio/b_sock2.c',
'openssl/crypto/bio/bf_buff.c',
'openssl/crypto/bio/bf_lbuf.c',
'openssl/crypto/bio/bf_nbio.c',
'openssl/crypto/bio/bf_null.c',
'openssl/crypto/bio/bio_cb.c',
'openssl/crypto/bio/bio_err.c',
'openssl/crypto/bio/bio_lib.c',
'openssl/crypto/bio/bio_meth.c',
'openssl/crypto/bio/bss_acpt.c',
'openssl/crypto/bio/bss_bio.c',
'openssl/crypto/bio/bss_conn.c',
'openssl/crypto/bio/bss_dgram.c',
'openssl/crypto/bio/bss_fd.c',
'openssl/crypto/bio/bss_file.c',
'openssl/crypto/bio/bss_log.c',
'openssl/crypto/bio/bss_mem.c',
'openssl/crypto/bio/bss_null.c',
'openssl/crypto/bio/bss_sock.c',
'openssl/crypto/blake2/blake2b.c',
'openssl/crypto/blake2/blake2s.c',
'openssl/crypto/blake2/m_blake2b.c',
'openssl/crypto/blake2/m_blake2s.c',
'openssl/crypto/bn/asm/x86_64-gcc.c',
'openssl/crypto/bn/bn_add.c',
'openssl/crypto/bn/bn_blind.c',
'openssl/crypto/bn/bn_const.c',
'openssl/crypto/bn/bn_ctx.c',
'openssl/crypto/bn/bn_depr.c',
'openssl/crypto/bn/bn_dh.c',
'openssl/crypto/bn/bn_div.c',
'openssl/crypto/bn/bn_err.c',
'openssl/crypto/bn/bn_exp.c',
'openssl/crypto/bn/bn_exp2.c',
'openssl/crypto/bn/bn_gcd.c',
'openssl/crypto/bn/bn_gf2m.c',
'openssl/crypto/bn/bn_intern.c',
'openssl/crypto/bn/bn_kron.c',
'openssl/crypto/bn/bn_lib.c',
'openssl/crypto/bn/bn_mod.c',
'openssl/crypto/bn/bn_mont.c',
'openssl/crypto/bn/bn_mpi.c',
'openssl/crypto/bn/bn_mul.c',
'openssl/crypto/bn/bn_nist.c',
'openssl/crypto/bn/bn_prime.c',
'openssl/crypto/bn/bn_print.c',
'openssl/crypto/bn/bn_rand.c',
'openssl/crypto/bn/bn_recp.c',
'openssl/crypto/bn/bn_shift.c',
'openssl/crypto/bn/bn_sqr.c',
'openssl/crypto/bn/bn_sqrt.c',
'openssl/crypto/bn/bn_srp.c',
'openssl/crypto/bn/bn_word.c',
'openssl/crypto/bn/bn_x931p.c',
'openssl/crypto/bn/rsaz_exp.c',
'openssl/crypto/buffer/buf_err.c',
'openssl/crypto/buffer/buffer.c',
'openssl/crypto/camellia/cmll_cfb.c',
'openssl/crypto/camellia/cmll_ctr.c',
'openssl/crypto/camellia/cmll_ecb.c',
'openssl/crypto/camellia/cmll_misc.c',
'openssl/crypto/camellia/cmll_ofb.c',
'openssl/crypto/cast/c_cfb64.c',
'openssl/crypto/cast/c_ecb.c',
'openssl/crypto/cast/c_enc.c',
'openssl/crypto/cast/c_ofb64.c',
'openssl/crypto/cast/c_skey.c',
'openssl/crypto/cmac/cm_ameth.c',
'openssl/crypto/cmac/cm_pmeth.c',
'openssl/crypto/cmac/cmac.c',
'openssl/crypto/cms/cms_asn1.c',
'openssl/crypto/cms/cms_att.c',
'openssl/crypto/cms/cms_cd.c',
'openssl/crypto/cms/cms_dd.c',
'openssl/crypto/cms/cms_enc.c',
'openssl/crypto/cms/cms_env.c',
'openssl/crypto/cms/cms_err.c',
'openssl/crypto/cms/cms_ess.c',
'openssl/crypto/cms/cms_io.c',
'openssl/crypto/cms/cms_kari.c',
'openssl/crypto/cms/cms_lib.c',
'openssl/crypto/cms/cms_pwri.c',
'openssl/crypto/cms/cms_sd.c',
'openssl/crypto/cms/cms_smime.c',
'openssl/crypto/conf/conf_api.c',
'openssl/crypto/conf/conf_def.c',
'openssl/crypto/conf/conf_err.c',
'openssl/crypto/conf/conf_lib.c',
'openssl/crypto/conf/conf_mall.c',
'openssl/crypto/conf/conf_mod.c',
'openssl/crypto/conf/conf_sap.c',
'openssl/crypto/cpt_err.c',
'openssl/crypto/cryptlib.c',
'openssl/crypto/ct/ct_b64.c',
'openssl/crypto/ct/ct_err.c',
'openssl/crypto/ct/ct_log.c',
'openssl/crypto/ct/ct_oct.c',
'openssl/crypto/ct/ct_policy.c',
'openssl/crypto/ct/ct_prn.c',
'openssl/crypto/ct/ct_sct.c',
'openssl/crypto/ct/ct_sct_ctx.c',
'openssl/crypto/ct/ct_vfy.c',
'openssl/crypto/ct/ct_x509v3.c',
'openssl/crypto/cversion.c',
'openssl/crypto/des/cbc_cksm.c',
'openssl/crypto/des/cbc_enc.c',
'openssl/crypto/des/cfb64ede.c',
'openssl/crypto/des/cfb64enc.c',
'openssl/crypto/des/cfb_enc.c',
'openssl/crypto/des/des_enc.c',
'openssl/crypto/des/ecb3_enc.c',
'openssl/crypto/des/ecb_enc.c',
'openssl/crypto/des/fcrypt.c',
'openssl/crypto/des/fcrypt_b.c',
'openssl/crypto/des/ofb64ede.c',
'openssl/crypto/des/ofb64enc.c',
'openssl/crypto/des/ofb_enc.c',
'openssl/crypto/des/pcbc_enc.c',
'openssl/crypto/des/qud_cksm.c',
'openssl/crypto/des/rand_key.c',
'openssl/crypto/des/rpc_enc.c',
'openssl/crypto/des/set_key.c',
'openssl/crypto/des/str2key.c',
'openssl/crypto/des/xcbc_enc.c',
'openssl/crypto/dh/dh_ameth.c',
'openssl/crypto/dh/dh_asn1.c',
'openssl/crypto/dh/dh_check.c',
'openssl/crypto/dh/dh_depr.c',
'openssl/crypto/dh/dh_err.c',
'openssl/crypto/dh/dh_gen.c',
'openssl/crypto/dh/dh_kdf.c',
'openssl/crypto/dh/dh_key.c',
'openssl/crypto/dh/dh_lib.c',
'openssl/crypto/dh/dh_meth.c',
'openssl/crypto/dh/dh_pmeth.c',
'openssl/crypto/dh/dh_prn.c',
'openssl/crypto/dh/dh_rfc5114.c',
'openssl/crypto/dsa/dsa_ameth.c',
'openssl/crypto/dsa/dsa_asn1.c',
'openssl/crypto/dsa/dsa_depr.c',
'openssl/crypto/dsa/dsa_err.c',
'openssl/crypto/dsa/dsa_gen.c',
'openssl/crypto/dsa/dsa_key.c',
'openssl/crypto/dsa/dsa_lib.c',
'openssl/crypto/dsa/dsa_meth.c',
'openssl/crypto/dsa/dsa_ossl.c',
'openssl/crypto/dsa/dsa_pmeth.c',
'openssl/crypto/dsa/dsa_prn.c',
'openssl/crypto/dsa/dsa_sign.c',
'openssl/crypto/dsa/dsa_vrf.c',
'openssl/crypto/dso/dso_dl.c',
'openssl/crypto/dso/dso_dlfcn.c',
'openssl/crypto/dso/dso_err.c',
'openssl/crypto/dso/dso_lib.c',
'openssl/crypto/dso/dso_openssl.c',
'openssl/crypto/dso/dso_vms.c',
'openssl/crypto/dso/dso_win32.c',
'openssl/crypto/ebcdic.c',
'openssl/crypto/ec/curve25519.c',
'openssl/crypto/ec/ec2_mult.c',
'openssl/crypto/ec/ec2_oct.c',
'openssl/crypto/ec/ec2_smpl.c',
'openssl/crypto/ec/ec_ameth.c',
'openssl/crypto/ec/ec_asn1.c',
'openssl/crypto/ec/ec_check.c',
'openssl/crypto/ec/ec_curve.c',
'openssl/crypto/ec/ec_cvt.c',
'openssl/crypto/ec/ec_err.c',
'openssl/crypto/ec/ec_key.c',
'openssl/crypto/ec/ec_kmeth.c',
'openssl/crypto/ec/ec_lib.c',
'openssl/crypto/ec/ec_mult.c',
'openssl/crypto/ec/ec_oct.c',
'openssl/crypto/ec/ec_pmeth.c',
'openssl/crypto/ec/ec_print.c',
'openssl/crypto/ec/ecdh_kdf.c',
'openssl/crypto/ec/ecdh_ossl.c',
'openssl/crypto/ec/ecdsa_ossl.c',
'openssl/crypto/ec/ecdsa_sign.c',
'openssl/crypto/ec/ecdsa_vrf.c',
'openssl/crypto/ec/eck_prn.c',
'openssl/crypto/ec/ecp_mont.c',
'openssl/crypto/ec/ecp_nist.c',
'openssl/crypto/ec/ecp_nistp224.c',
'openssl/crypto/ec/ecp_nistp256.c',
'openssl/crypto/ec/ecp_nistp521.c',
'openssl/crypto/ec/ecp_nistputil.c',
'openssl/crypto/ec/ecp_nistz256.c',
'openssl/crypto/ec/ecp_oct.c',
'openssl/crypto/ec/ecp_smpl.c',
'openssl/crypto/ec/ecx_meth.c',
'openssl/crypto/engine/eng_all.c',
'openssl/crypto/engine/eng_cnf.c',
'openssl/crypto/engine/eng_cryptodev.c',
'openssl/crypto/engine/eng_ctrl.c',
'openssl/crypto/engine/eng_dyn.c',
'openssl/crypto/engine/eng_err.c',
'openssl/crypto/engine/eng_fat.c',
'openssl/crypto/engine/eng_init.c',
'openssl/crypto/engine/eng_lib.c',
'openssl/crypto/engine/eng_list.c',
'openssl/crypto/engine/eng_openssl.c',
'openssl/crypto/engine/eng_pkey.c',
'openssl/crypto/engine/eng_rdrand.c',
'openssl/crypto/engine/eng_table.c',
'openssl/crypto/engine/tb_asnmth.c',
'openssl/crypto/engine/tb_cipher.c',
'openssl/crypto/engine/tb_dh.c',
'openssl/crypto/engine/tb_digest.c',
'openssl/crypto/engine/tb_dsa.c',
'openssl/crypto/engine/tb_eckey.c',
'openssl/crypto/engine/tb_pkmeth.c',
'openssl/crypto/engine/tb_rand.c',
'openssl/crypto/engine/tb_rsa.c',
'openssl/crypto/err/err.c',
'openssl/crypto/err/err_all.c',
'openssl/crypto/err/err_prn.c',
'openssl/crypto/evp/bio_b64.c',
'openssl/crypto/evp/bio_enc.c',
'openssl/crypto/evp/bio_md.c',
'openssl/crypto/evp/bio_ok.c',
'openssl/crypto/evp/c_allc.c',
'openssl/crypto/evp/c_alld.c',
'openssl/crypto/evp/cmeth_lib.c',
'openssl/crypto/evp/digest.c',
'openssl/crypto/evp/e_aes.c',
'openssl/crypto/evp/e_aes_cbc_hmac_sha1.c',
'openssl/crypto/evp/e_aes_cbc_hmac_sha256.c',
'openssl/crypto/evp/e_bf.c',
'openssl/crypto/evp/e_camellia.c',
'openssl/crypto/evp/e_cast.c',
'openssl/crypto/evp/e_chacha20_poly1305.c',
'openssl/crypto/evp/e_des.c',
'openssl/crypto/evp/e_des3.c',
'openssl/crypto/evp/e_idea.c',
'openssl/crypto/evp/e_null.c',
'openssl/crypto/evp/e_old.c',
'openssl/crypto/evp/e_rc2.c',
'openssl/crypto/evp/e_rc4.c',
'openssl/crypto/evp/e_rc4_hmac_md5.c',
'openssl/crypto/evp/e_rc5.c',
'openssl/crypto/evp/e_seed.c',
'openssl/crypto/evp/e_xcbc_d.c',
'openssl/crypto/evp/encode.c',
'openssl/crypto/evp/evp_cnf.c',
'openssl/crypto/evp/evp_enc.c',
'openssl/crypto/evp/evp_err.c',
'openssl/crypto/evp/evp_key.c',
'openssl/crypto/evp/evp_lib.c',
'openssl/crypto/evp/evp_pbe.c',
'openssl/crypto/evp/evp_pkey.c',
'openssl/crypto/evp/m_md2.c',
'openssl/crypto/evp/m_md4.c',
'openssl/crypto/evp/m_md5.c',
'openssl/crypto/evp/m_md5_sha1.c',
'openssl/crypto/evp/m_mdc2.c',
'openssl/crypto/evp/m_null.c',
'openssl/crypto/evp/m_ripemd.c',
'openssl/crypto/evp/m_sha1.c',
'openssl/crypto/evp/m_sigver.c',
'openssl/crypto/evp/m_wp.c',
'openssl/crypto/evp/names.c',
'openssl/crypto/evp/p5_crpt.c',
'openssl/crypto/evp/p5_crpt2.c',
'openssl/crypto/evp/p_dec.c',
'openssl/crypto/evp/p_enc.c',
'openssl/crypto/evp/p_lib.c',
'openssl/crypto/evp/p_open.c',
'openssl/crypto/evp/p_seal.c',
'openssl/crypto/evp/p_sign.c',
'openssl/crypto/evp/p_verify.c',
'openssl/crypto/evp/pmeth_fn.c',
'openssl/crypto/evp/pmeth_gn.c',
'openssl/crypto/evp/pmeth_lib.c',
'openssl/crypto/evp/scrypt.c',
'openssl/crypto/ex_data.c',
'openssl/crypto/hmac/hm_ameth.c',
'openssl/crypto/hmac/hm_pmeth.c',
'openssl/crypto/hmac/hmac.c',
'openssl/crypto/idea/i_cbc.c',
'openssl/crypto/idea/i_cfb64.c',
'openssl/crypto/idea/i_ecb.c',
'openssl/crypto/idea/i_ofb64.c',
'openssl/crypto/idea/i_skey.c',
'openssl/crypto/init.c',
'openssl/crypto/kdf/hkdf.c',
'openssl/crypto/kdf/kdf_err.c',
'openssl/crypto/kdf/tls1_prf.c',
'openssl/crypto/lhash/lh_stats.c',
'openssl/crypto/lhash/lhash.c',
'openssl/crypto/md4/md4_dgst.c',
'openssl/crypto/md4/md4_one.c',
'openssl/crypto/md5/md5_dgst.c',
'openssl/crypto/md5/md5_one.c',
'openssl/crypto/mdc2/mdc2_one.c',
'openssl/crypto/mdc2/mdc2dgst.c',
'openssl/crypto/mem.c',
'openssl/crypto/mem_dbg.c',
'openssl/crypto/mem_sec.c',
'openssl/crypto/modes/cbc128.c',
'openssl/crypto/modes/ccm128.c',
'openssl/crypto/modes/cfb128.c',
'openssl/crypto/modes/ctr128.c',
'openssl/crypto/modes/cts128.c',
'openssl/crypto/modes/gcm128.c',
'openssl/crypto/modes/ocb128.c',
'openssl/crypto/modes/ofb128.c',
'openssl/crypto/modes/wrap128.c',
'openssl/crypto/modes/xts128.c',
'openssl/crypto/o_dir.c',
'openssl/crypto/o_fips.c',
'openssl/crypto/o_fopen.c',
'openssl/crypto/o_init.c',
'openssl/crypto/o_str.c',
'openssl/crypto/o_time.c',
'openssl/crypto/objects/o_names.c',
'openssl/crypto/objects/obj_dat.c',
'openssl/crypto/objects/obj_err.c',
'openssl/crypto/objects/obj_lib.c',
'openssl/crypto/objects/obj_xref.c',
'openssl/crypto/ocsp/ocsp_asn.c',
'openssl/crypto/ocsp/ocsp_cl.c',
'openssl/crypto/ocsp/ocsp_err.c',
'openssl/crypto/ocsp/ocsp_ext.c',
'openssl/crypto/ocsp/ocsp_ht.c',
'openssl/crypto/ocsp/ocsp_lib.c',
'openssl/crypto/ocsp/ocsp_prn.c',
'openssl/crypto/ocsp/ocsp_srv.c',
'openssl/crypto/ocsp/ocsp_vfy.c',
'openssl/crypto/ocsp/v3_ocsp.c',
'openssl/crypto/pem/pem_all.c',
'openssl/crypto/pem/pem_err.c',
'openssl/crypto/pem/pem_info.c',
'openssl/crypto/pem/pem_lib.c',
'openssl/crypto/pem/pem_oth.c',
'openssl/crypto/pem/pem_pk8.c',
'openssl/crypto/pem/pem_pkey.c',
'openssl/crypto/pem/pem_sign.c',
'openssl/crypto/pem/pem_x509.c',
'openssl/crypto/pem/pem_xaux.c',
'openssl/crypto/pem/pvkfmt.c',
'openssl/crypto/pkcs12/p12_add.c',
'openssl/crypto/pkcs12/p12_asn.c',
'openssl/crypto/pkcs12/p12_attr.c',
'openssl/crypto/pkcs12/p12_crpt.c',
'openssl/crypto/pkcs12/p12_crt.c',
'openssl/crypto/pkcs12/p12_decr.c',
'openssl/crypto/pkcs12/p12_init.c',
'openssl/crypto/pkcs12/p12_key.c',
'openssl/crypto/pkcs12/p12_kiss.c',
'openssl/crypto/pkcs12/p12_mutl.c',
'openssl/crypto/pkcs12/p12_npas.c',
'openssl/crypto/pkcs12/p12_p8d.c',
'openssl/crypto/pkcs12/p12_p8e.c',
'openssl/crypto/pkcs12/p12_sbag.c',
'openssl/crypto/pkcs12/p12_utl.c',
'openssl/crypto/pkcs12/pk12err.c',
'openssl/crypto/pkcs7/bio_pk7.c',
'openssl/crypto/pkcs7/pk7_asn1.c',
'openssl/crypto/pkcs7/pk7_attr.c',
'openssl/crypto/pkcs7/pk7_doit.c',
'openssl/crypto/pkcs7/pk7_lib.c',
'openssl/crypto/pkcs7/pk7_mime.c',
'openssl/crypto/pkcs7/pk7_smime.c',
'openssl/crypto/pkcs7/pkcs7err.c',
'openssl/crypto/poly1305/poly1305.c',
'openssl/crypto/rand/md_rand.c',
'openssl/crypto/rand/rand_egd.c',
'openssl/crypto/rand/rand_err.c',
'openssl/crypto/rand/rand_lib.c',
'openssl/crypto/rand/rand_unix.c',
'openssl/crypto/rand/rand_vms.c',
'openssl/crypto/rand/rand_win.c',
'openssl/crypto/rand/randfile.c',
'openssl/crypto/rc2/rc2_cbc.c',
'openssl/crypto/rc2/rc2_ecb.c',
'openssl/crypto/rc2/rc2_skey.c',
'openssl/crypto/rc2/rc2cfb64.c',
'openssl/crypto/rc2/rc2ofb64.c',
'openssl/crypto/ripemd/rmd_dgst.c',
'openssl/crypto/ripemd/rmd_one.c',
'openssl/crypto/rsa/rsa_ameth.c',
'openssl/crypto/rsa/rsa_asn1.c',
'openssl/crypto/rsa/rsa_chk.c',
'openssl/crypto/rsa/rsa_crpt.c',
'openssl/crypto/rsa/rsa_depr.c',
'openssl/crypto/rsa/rsa_err.c',
'openssl/crypto/rsa/rsa_gen.c',
'openssl/crypto/rsa/rsa_lib.c',
'openssl/crypto/rsa/rsa_meth.c',
'openssl/crypto/rsa/rsa_none.c',
'openssl/crypto/rsa/rsa_null.c',
'openssl/crypto/rsa/rsa_oaep.c',
'openssl/crypto/rsa/rsa_ossl.c',
'openssl/crypto/rsa/rsa_pk1.c',
'openssl/crypto/rsa/rsa_pmeth.c',
'openssl/crypto/rsa/rsa_prn.c',
'openssl/crypto/rsa/rsa_pss.c',
'openssl/crypto/rsa/rsa_saos.c',
'openssl/crypto/rsa/rsa_sign.c',
'openssl/crypto/rsa/rsa_ssl.c',
'openssl/crypto/rsa/rsa_x931.c',
'openssl/crypto/rsa/rsa_x931g.c',
'openssl/crypto/seed/seed.c',
'openssl/crypto/seed/seed_cbc.c',
'openssl/crypto/seed/seed_cfb.c',
'openssl/crypto/seed/seed_ecb.c',
'openssl/crypto/seed/seed_ofb.c',
'openssl/crypto/sha/sha1_one.c',
'openssl/crypto/sha/sha1dgst.c',
'openssl/crypto/sha/sha256.c',
'openssl/crypto/sha/sha512.c',
'openssl/crypto/srp/srp_lib.c',
'openssl/crypto/srp/srp_vfy.c',
'openssl/crypto/stack/stack.c',
'openssl/crypto/threads_none.c',
'openssl/crypto/threads_pthread.c',
'openssl/crypto/threads_win.c',
'openssl/crypto/ts/ts_asn1.c',
'openssl/crypto/ts/ts_conf.c',
'openssl/crypto/ts/ts_err.c',
'openssl/crypto/ts/ts_lib.c',
'openssl/crypto/ts/ts_req_print.c',
'openssl/crypto/ts/ts_req_utils.c',
'openssl/crypto/ts/ts_rsp_print.c',
'openssl/crypto/ts/ts_rsp_sign.c',
'openssl/crypto/ts/ts_rsp_utils.c',
'openssl/crypto/ts/ts_rsp_verify.c',
'openssl/crypto/ts/ts_verify_ctx.c',
'openssl/crypto/txt_db/txt_db.c',
'openssl/crypto/ui/ui_err.c',
'openssl/crypto/ui/ui_lib.c',
'openssl/crypto/ui/ui_openssl.c',
'openssl/crypto/ui/ui_util.c',
'openssl/crypto/uid.c',
'openssl/crypto/whrlpool/wp_dgst.c',
'openssl/crypto/x509/by_dir.c',
'openssl/crypto/x509/by_file.c',
'openssl/crypto/x509/t_crl.c',
'openssl/crypto/x509/t_req.c',
'openssl/crypto/x509/t_x509.c',
'openssl/crypto/x509/x509_att.c',
'openssl/crypto/x509/x509_cmp.c',
'openssl/crypto/x509/x509_d2.c',
'openssl/crypto/x509/x509_def.c',
'openssl/crypto/x509/x509_err.c',
'openssl/crypto/x509/x509_ext.c',
'openssl/crypto/x509/x509_lu.c',
'openssl/crypto/x509/x509_obj.c',
'openssl/crypto/x509/x509_r2x.c',
'openssl/crypto/x509/x509_req.c',
'openssl/crypto/x509/x509_set.c',
'openssl/crypto/x509/x509_trs.c',
'openssl/crypto/x509/x509_txt.c',
'openssl/crypto/x509/x509_v3.c',
'openssl/crypto/x509/x509_vfy.c',
'openssl/crypto/x509/x509_vpm.c',
'openssl/crypto/x509/x509cset.c',
'openssl/crypto/x509/x509name.c',
'openssl/crypto/x509/x509rset.c',
'openssl/crypto/x509/x509spki.c',
'openssl/crypto/x509/x509type.c',
'openssl/crypto/x509/x_all.c',
'openssl/crypto/x509/x_attrib.c',
'openssl/crypto/x509/x_crl.c',
'openssl/crypto/x509/x_exten.c',
'openssl/crypto/x509/x_name.c',
'openssl/crypto/x509/x_pubkey.c',
'openssl/crypto/x509/x_req.c',
'openssl/crypto/x509/x_x509.c',
'openssl/crypto/x509/x_x509a.c',
'openssl/crypto/x509v3/pcy_cache.c',
'openssl/crypto/x509v3/pcy_data.c',
'openssl/crypto/x509v3/pcy_lib.c',
'openssl/crypto/x509v3/pcy_map.c',
'openssl/crypto/x509v3/pcy_node.c',
'openssl/crypto/x509v3/pcy_tree.c',
'openssl/crypto/x509v3/v3_addr.c',
'openssl/crypto/x509v3/v3_akey.c',
'openssl/crypto/x509v3/v3_akeya.c',
'openssl/crypto/x509v3/v3_alt.c',
'openssl/crypto/x509v3/v3_asid.c',
'openssl/crypto/x509v3/v3_bcons.c',
'openssl/crypto/x509v3/v3_bitst.c',
'openssl/crypto/x509v3/v3_conf.c',
'openssl/crypto/x509v3/v3_cpols.c',
'openssl/crypto/x509v3/v3_crld.c',
'openssl/crypto/x509v3/v3_enum.c',
'openssl/crypto/x509v3/v3_extku.c',
'openssl/crypto/x509v3/v3_genn.c',
'openssl/crypto/x509v3/v3_ia5.c',
'openssl/crypto/x509v3/v3_info.c',
'openssl/crypto/x509v3/v3_int.c',
'openssl/crypto/x509v3/v3_lib.c',
'openssl/crypto/x509v3/v3_ncons.c',
'openssl/crypto/x509v3/v3_pci.c',
'openssl/crypto/x509v3/v3_pcia.c',
'openssl/crypto/x509v3/v3_pcons.c',
'openssl/crypto/x509v3/v3_pku.c',
'openssl/crypto/x509v3/v3_pmaps.c',
'openssl/crypto/x509v3/v3_prn.c',
'openssl/crypto/x509v3/v3_purp.c',
'openssl/crypto/x509v3/v3_skey.c',
'openssl/crypto/x509v3/v3_sxnet.c',
'openssl/crypto/x509v3/v3_tlsf.c',
'openssl/crypto/x509v3/v3_utl.c',
'openssl/crypto/x509v3/v3err.c',
'openssl/engines/e_capi.c',
'openssl/engines/e_padlock.c',
],
'openssl_sources_darwin64-x86_64-cc': [
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/aes-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/aesni-mb-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/aesni-sha1-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/aesni-sha256-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/aesni-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/bsaes-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/aes/vpaes-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/bn/rsaz-avx2.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/bn/rsaz-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/bn/x86_64-gf2m.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/bn/x86_64-mont.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/bn/x86_64-mont5.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/camellia/cmll-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/chacha/chacha-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/ec/ecp_nistz256-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/md5/md5-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/modes/aesni-gcm-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/modes/ghash-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/poly1305/poly1305-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/rc4/rc4-md5-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/rc4/rc4-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/sha/sha1-mb-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/sha/sha1-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/sha/sha256-mb-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/sha/sha256-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/sha/sha512-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/whrlpool/wp-x86_64.s',
'./config/archs/darwin64-x86_64-cc/asm/crypto/x86_64cpuid.s',
'./config/archs/darwin64-x86_64-cc/asm/engines/e_padlock-x86_64.s',
],
'openssl_defines_darwin64-x86_64-cc': [
'DSO_DLFCN',
'HAVE_DLFCN_H',
'NDEBUG',
'OPENSSL_THREADS',
'OPENSSL_NO_DYNAMIC_ENGINE',
'OPENSSL_PIC',
'OPENSSL_IA32_SSE2',
'OPENSSL_BN_ASM_MONT',
'OPENSSL_BN_ASM_MONT5',
'OPENSSL_BN_ASM_GF2m',
'SHA1_ASM',
'SHA256_ASM',
'SHA512_ASM',
'RC4_ASM',
'MD5_ASM',
'AES_ASM',
'VPAES_ASM',
'BSAES_ASM',
'GHASH_ASM',
'ECP_NISTZ256_ASM',
'PADLOCK_ASM',
'POLY1305_ASM',
],
'openssl_cflags_darwin64-x86_64-cc': [
'-O3 -D_REENTRANT -arch x86_64 -DL_ENDIAN -Wall',
],
'openssl_ex_libs_darwin64-x86_64-cc': [
'',
],
},
'include_dirs': [
'.',
'./include',
'./crypto',
'./crypto/include/internal',
],
'defines': ['<@(openssl_defines_darwin64-x86_64-cc)'],
'cflags' : ['<@(openssl_cflags_darwin64-x86_64-cc)'],
'libraries': ['<@(openssl_ex_libs_darwin64-x86_64-cc)'],
'sources': ['<@(openssl_sources)', '<@(openssl_sources_darwin64-x86_64-cc)'],
}
| [
"[email protected]"
] | |
631ae6e384ef58a6b51fb19df6fe11acb4f482a5 | c2d40df5d78a93bdbe25eadd71b384729dd6bfba | /tests/rules/test_git_push_pull.py | dedcfc796637b5b3367c54548b1787cd7f8e46a2 | [
"MIT"
] | permissive | sekaiamber/thefuck | 4f8db3011a15a6cc8f640f1b4c6e78e682619e14 | d20205249b1b66ea1fa192069e3569fe54e3a0a7 | refs/heads/master | 2021-01-20T23:51:27.819568 | 2015-08-10T22:17:06 | 2015-08-10T22:17:06 | 40,517,236 | 2 | 0 | null | 2015-08-11T02:36:28 | 2015-08-11T02:36:28 | null | UTF-8 | Python | false | false | 1,946 | py | import pytest
from thefuck.rules.git_push_pull import match, get_new_command
from tests.utils import Command
git_err = '''
To /tmp/foo
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '/tmp/bar'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
'''
git_uptodate = 'Everything up-to-date'
git_ok = '''
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 282 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /tmp/bar
514eed3..f269c79 master -> master
'''
@pytest.mark.parametrize('command', [
Command(script='git push', stderr=git_err),
Command(script='git push nvbn', stderr=git_err),
Command(script='git push nvbn master', stderr=git_err)])
def test_match(command):
assert match(command, None)
@pytest.mark.parametrize('command', [
Command(script='git push', stderr=git_ok),
Command(script='git push', stderr=git_uptodate),
Command(script='git push nvbn', stderr=git_ok),
Command(script='git push nvbn master', stderr=git_uptodate),
Command(script='git push nvbn', stderr=git_ok),
Command(script='git push nvbn master', stderr=git_uptodate)])
def test_not_match(command):
assert not match(command, None)
@pytest.mark.parametrize('command, output', [
(Command(script='git push', stderr=git_err), 'git pull && git push'),
(Command(script='git push nvbn', stderr=git_err),
'git pull nvbn && git push nvbn'),
(Command(script='git push nvbn master', stderr=git_err),
'git pull nvbn master && git push nvbn master')])
def test_get_new_command(command, output):
assert get_new_command(command, None) == output
| [
"[email protected]"
] | |
d7932da5a66ae59ce1539a7820a8df703b59cb22 | d18d0dd6d6d1eb5ebcb45faa196711c8841d4850 | /第1章/1-5.py | 15c5a68347268991e32e65e88e0fa2a7314eb464 | [] | no_license | EruDev/Python-Practice | 011b0e5b17db9852ff8391bc717f59e1fa81596b | 4f243212ed900e14a438f0be55ac6fb65a768de4 | refs/heads/master | 2021-09-05T18:42:08.950348 | 2018-01-30T10:05:17 | 2018-01-30T10:05:17 | 116,343,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | # 何如统计序列中元素的出现频率
# 方法二
"""
利用collections下的Counter可以统计词频,也可以显示出出现频率较高的数字
In [8]: from collections import Counter
In [9]: c2 = Counter(data)
In [10]: c2
Out[10]:
Counter({1: 4,
2: 1,
3: 2,
4: 1,
5: 1,
6: 1,
7: 2,
8: 1,
10: 2,
11: 2,
12: 1,
15: 1,
18: 1,
19: 1,
21: 1,
22: 1,
23: 1,
24: 1,
26: 1,
28: 1,
29: 2,
30: 1})
In [11]: c2[1]
Out[11]: 4
In [12]: c2[7]
Out[12]: 2
In [13]: c2.most_common(3)
Out[13]: [(1, 4), (10, 2), (11, 2)]
""" | [
"[email protected]"
] | |
ceff3dbaa9f46b570f5d7439a52457d5c73d75ae | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /6cj6i2DACHTbtNnCD_21.py | 44311aa82d8e002a6ab94385513aa94e8dc320bb | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py |
def two_product(lst, n):
sList = sorted(lst)
for i in sList:
for j in sList:
if i * j == n:
return [i, j]
return
| [
"[email protected]"
] | |
629bb766b59426f264fbe5d799e13cdcde48929d | 1d96db84225301d972f07cad95c2a13f4fbafa84 | /python/scipy_examples/fitting_with_optimize_ABSTRACTED.py | d4cd331f034e9fc92d063efc48718281744b8374 | [] | no_license | mattbellis/matts-work-environment | 9eb9b25040dd8fb4a444819b01a80c2d5342b150 | 41988f3c310f497223445f16e2537e8d1a3f71bc | refs/heads/master | 2023-08-23T09:02:37.193619 | 2023-08-09T05:36:32 | 2023-08-09T05:36:32 | 32,194,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,569 | py | import numpy as np
import matplotlib.pylab as plt
import scipy.stats as stats
from scipy.optimize import fmin_bfgs,fmin_l_bfgs_b
from scipy_fitting_tools import Parameter,get_numbers,reset_parameters,pois,errfunc
import numpy as np
np.random.seed(0)
################################################################################
def signal(pars, x, frange=None):
#print("signal: ")
#print(pars)
#mean,sigma = pars
#print(pars)
mean = pars["signal"]["mean"].value
sigma = pars["signal"]["sigma"].value
pdfvals = stats.norm(mean,sigma).pdf(x)
return pdfvals
################################################################################
################################################################################
def background(x, frange=None):
# Flat
height = 1.0/(frange[1] - frange[0])
pdfvals = height*np.ones(len(x))
return pdfvals
################################################################################
################################################################################
def pdf(pars,x,frange=None):
nsig = pars["signal"]["number"].value
nbkg = pars["bkg"]["number"].value
ntot = float(nsig + nbkg)
sig = signal(pars,x,frange=frange)
bkg = background(x,frange=frange)
totpdf = (nsig/ntot)*sig + (nbkg/ntot)*bkg
return totpdf
################################################################################
################################################################################
# Trying something
################################################################################
testpars = {}
testpars["signal"] = {"number":Parameter(1000,(0,2000)), "mean":Parameter(5.0,(0.1,10.0)), "sigma":Parameter(0.5,(0.1,1.0))}
testpars["bkg"] = {"number":Parameter(1000,(0,2000))}
print(testpars)
x = Parameter(10,(0,10))
print(x)
print(x.value)
print(x.limits)
nums = get_numbers(testpars)
print(nums,sum(nums))
p0 = []
parbounds = []
mapping = []
for key in testpars:
print(testpars[key])
for k in testpars[key].keys():
p0.append(testpars[key][k].value)
parbounds.append(testpars[key][k].limits)
mapping.append((key,k))
print("p0")
print(p0)
print(mapping)
testpars['mapping'] = mapping
#exit()
################################################################################
data = stats.norm(testpars["signal"]["mean"].value,testpars["signal"]["sigma"].value).rvs(size=1000).tolist()
data += (10*np.random.random(1000)).tolist()
fix_or_float = []
'''
for p in p0:
fix_or_float.append(None)
'''
#print(fix_or_float)
print("Starting...")
print(p0)
#p1 = fmin_bfgs(errfunc, p0, args=(data, data, fix_or_float), maxiter=100, full_output=True)#, retall=True)
p1 = fmin_l_bfgs_b(errfunc, p0, args=(data, data, fix_or_float, testpars,pdf), bounds=parbounds, approx_grad=True)#, maxiter=100 )#,factr=0.1)
print("Ending...")
print(p1)
finalvals = p1[0]
reset_parameters(testpars,finalvals)
#'''
#exit()
xpts = np.linspace(0,10,1000)
#total = pdf(pars,xpts,frange=(0,10))
#plt.figure()
#plt.plot(xpts,total)
#plt.ylim(0)
plt.figure()
binwidth=(10/100)
plt.hist(data,bins=100,range=(0,10))
ysig = testpars['signal']['number'].value*signal(testpars,xpts) * binwidth
plt.plot(xpts,ysig,linewidth=3)
ybkg = testpars['bkg']['number'].value*np.ones(len(xpts))/(10-0) * binwidth
plt.plot(xpts,ybkg,linewidth=3)
##plt.plot(xpts,ybkg + ysig,linewidth=3)
ntot = sum(get_numbers(testpars))
ytot = ntot*pdf(testpars,xpts,frange=(0,10)) * binwidth
plt.plot(xpts,ytot,linewidth=3,color='k')
plt.show()
| [
"[email protected]"
] | |
dff27956c830320fced5b38b2cc77dbb51d31cde | 60c4255fb0cf7ed817ff09d8113bf404cde8e12b | /env/lib/python2.7/site-packages/django/contrib/localflavor/gb/forms.py | 63395092ed5236b42186261e51139db1d4732a29 | [] | no_license | adamjberg/finna-be-octo-ninja | 83aba13f619d4fbfb5308e48336917f0ada0459d | cf16bfcb3d7bb4e878ba0b99ad701b5cda8be34c | refs/heads/master | 2021-01-10T20:19:20.849476 | 2014-01-11T05:42:23 | 2014-01-11T05:42:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,047 | py | """
GB-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES
from django.forms.fields import CharField, Select
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
class GBPostcodeField(CharField):
"""
A form field that validates its input is a UK postcode.
The regular expression used is sourced from the schema for British Standard
BS7666 address types: http://www.govtalk.gov.uk/gdsc/schemas/bs7666-v2-0.xsd
The value is uppercased and a space added in the correct place, if required.
"""
default_error_messages = {
'invalid': _('Enter a valid postcode.'),
}
outcode_pattern = '[A-PR-UWYZ]([0-9]{1,2}|([A-HIK-Y][0-9](|[0-9]|[ABEHMNPRVWXY]))|[0-9][A-HJKSTUW])'
incode_pattern = '[0-9][ABD-HJLNP-UW-Z]{2}'
postcode_regex = re.compile(r'^(GIR 0AA|%s %s)$' % (outcode_pattern, incode_pattern))
space_regex = re.compile(r' *(%s)$' % incode_pattern)
def clean(self, value):
value = super(GBPostcodeField, self).clean(value)
if value == '':
return value
postcode = value.upper().strip()
# Put a single space before the incode (second part).
postcode = self.space_regex.sub(r' \1', postcode)
if not self.postcode_regex.search(postcode):
raise ValidationError(self.error_messages['invalid'])
return postcode
class GBCountySelect(Select):
"""
A Select widget that uses a list of UK Counties/Regions as its choices.
"""
def __init__(self, attrs=None):
super(GBCountySelect, self).__init__(attrs, choices=GB_REGION_CHOICES)
class GBNationSelect(Select):
"""
A Select widget that uses a list of UK Nations as its choices.
"""
def __init__(self, attrs=None):
super(GBNationSelect, self).__init__(attrs, choices=GB_NATIONS_CHOICES)
| [
"[email protected]"
] | |
1758ed4bcc46ea058bb1b8b59fca67448bdd3329 | 13d1b1a20dc83800278d5872da2ad794ef80c255 | /hashTable.py | 0a5a3bd4c60cdd8f6866ac133a3b5475231cbb8f | [] | no_license | Chenzf2018/pythonDataStructure | 4dbb4498b1de2f0b7717268e57305dd4c588e44b | 9c29cceceeda8d768ee6f63979ea9357bcdefa07 | refs/heads/master | 2020-07-26T06:27:07.239183 | 2018-06-11T10:58:58 | 2018-06-11T10:58:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'hash'
__author__ = 'lxp'
#《大话数据结构》365页
class HashTable(object):
def __init__(self):
self.elem = None
self.count = None
def initHashTable(self):
self.count = int(input("count = "))
self.elem = [None] * self.count
return
def hash(self, key):
return (key % self.count)
def insertHash(self, key):
addr = hash(key)
while self.elem[addr] != None:
addr = (addr + 1) % self.count
self.elem[addr] = key
return
def searchHash(self, key):
addr = self.hash(key)
while self.elem[addr] != key:
addr = (addr + 1) % self.count
if self.elem[addr] == None or addr == hash(key):
print(key, "不存在")
return
print(key, "存在")
return
#test
def test():
H = HashTable()
H.initHashTable()
L = [1, 3, 4, 3, 2, 1, 5, 6, 7, 8]
for l in L:
H.insertHash(l)
M = [5, 5, 3, 6, 7, 12, 0]
for m in M:
H.searchHash(m)
return
if __name__ == '__main__':
test() | [
"[email protected]"
] | |
5b9f02f46b303848958912ee031ecafaf0a581bd | bcc72e6fa84ce81568dfe615f362cd095652f1b7 | /installer/core/providers/aws/__init__.py | 2939b1594eeb24bda27de0011b05faba21b5e1d3 | [
"Apache-2.0"
] | permissive | alexander-dev-hub/pacbot | 3410207e2030bb8d46e96c0f10cb0cfc0c7045b8 | 0b819091728eb370893dc795bcad018d85bdf24e | refs/heads/master | 2022-11-25T00:58:12.418257 | 2019-09-02T12:29:43 | 2019-09-02T12:29:43 | 205,841,199 | 1 | 0 | Apache-2.0 | 2022-11-16T12:35:20 | 2019-09-02T11:23:34 | Java | UTF-8 | Python | false | false | 9,055 | py | from core.terraform.utils import get_terraform_provider_file
from core.mixins import MsgMixin
from core.terraform import PyTerraform
from core.terraform.resources import TerraformResource
from core import constants as K
from core.config import Settings
import inspect
import json
import os
import uuid
class BaseAction(MsgMixin):
"""
This Base class for AWS Install and Destroy classes.
Attributes:
check_dependent_resources (boolean): Check the resources added to DEPENDS_ON should be checked or not
total_resources_count (int): Total number of resources to be installed/destroyed
input (instance): Input instance to AWS install/destroy provider
tf_outputs (dict): Terraform output dict
"""
check_dependent_resources = True
total_resources_count = 0
def __init__(self, input=None):
self.input = input
self.tf_outputs = PyTerraform.load_terraform_output_from_json_file()
self.clear_status_dir_files()
def clear_status_dir_files(self):
"""
Clear the files in status directory after installation. These files are used to get the count of installed
resources during installation
"""
item = os.walk(Settings.OUTPUT_STATUS_DIR).__next__()
for f in item[2]: # First arg is root, second arg is dirs and 3rd arg is files
if str(f) != ".gitignore":
os.unlink(os.path.join(Settings.OUTPUT_STATUS_DIR, f))
def files_count_in_output_status_dir(self):
"""
Total number of files present in the status directory. This number is used to identify as the number of
installed resources
Returns:
files_count (int): Number of files present in the direcotry
"""
path, dirs, files = os.walk(Settings.OUTPUT_STATUS_DIR).__next__()
return len(files)
def _create_terraform_provider_file(self):
"""Terraform provider file is created as part of installation/destruction execution"""
terraform_provider_file = get_terraform_provider_file()
aws_provider = {'region': self.input.AWS_AUTH_CRED['aws_region']}
if self.input.AWS_AUTH_CRED['aws_auth_option'] == 1:
aws_provider['access_key'] = self.input.AWS_AUTH_CRED['aws_access_key']
aws_provider['secret_key'] = self.input.AWS_AUTH_CRED['aws_secret_key']
elif self.input.AWS_AUTH_CRED['aws_auth_option'] == 2:
aws_provider['assume_role'] = {
'role_arn': self.input.AWS_AUTH_CRED['assume_role_arn'],
'session_name': str(uuid.uuid4())
}
provider_script = {
'provider': {
'aws': aws_provider
}
}
with open(terraform_provider_file, "w") as jsonfile:
json.dump(provider_script, jsonfile, indent=4)
def _delete_terraform_provider_file(self):
"""Terraform provider file which is created as part of installation/destruction is removed after the execution"""
terraform_provider_file = get_terraform_provider_file()
if os.path.isfile(terraform_provider_file):
os.remove(terraform_provider_file)
def _delete_all_terraform_files(self):
""""Delete all terraform files before terraform regeneration if the install is done on all resources"""
for file in os.listdir(Settings.TERRAFORM_DIR):
if file.endswith(".tf"):
file_abs_path = os.path.join(Settings.TERRAFORM_DIR, file)
os.remove(file_abs_path)
def validate_resources(self, resources):
return self.validate_resource_existence(resources)
def validate_resource_existence(self, resources):
"""
Check whether the resource to be created as part of installation is already exists in AWS
Args:
resources (list): Resources to be installed
Returns:
can_continue_installation (boolean): True if any resource already present in AWS else False
"""
can_continue_installation = True
if not Settings.get('SKIP_RESOURCE_EXISTENCE_CHECK', False):
self.show_step_heading(K.RESOURCE_EXISTS_CHECK_STARTED)
for resource in resources:
resource_class = resource.__class__
if TerraformResource not in inspect.getmro(resource_class):
continue # This means resource is a Variable or Data and not TF Resource
self.show_progress_start_message("Checking resource existence for %s" % resource_class.__name__)
exists, checked_details = resource.check_exists_before(self.input, self.tf_outputs)
self.erase_printed_line()
self.total_resources_count += 1
if exists:
can_continue_installation = False
resource_name = resource.resource_instance_name.replace("_", " ").title()
message = "Resource: %s, %s: `%s`" % (resource_name, checked_details['attr'], checked_details['value'])
self.show_step_inner_messaage(message, K.EXISTS)
if can_continue_installation:
self.show_step_finish(K.RESOURCE_EXISTS_CHECK_COMPLETED, color=self.GREEN_ANSI)
else:
self.show_step_finish(K.RESOURCE_EXISTS_CHECK_FAILED, color=self.ERROR_ANSI)
self.stdout_flush()
else:
self._load_total_resources_count(resources)
return can_continue_installation
def _load_total_resources_count(self, resources):
"""
Find the number of real terraform resources to be created/destroyed
Args:
resources (list): All kind of resources to be installed/destroyed including data resources
"""
self.total_resources_count = 0
for resource in resources:
resource_class = resource.__class__
if TerraformResource in inspect.getmro(resource_class):
self.total_resources_count += 1
def validate_arguments(self, resources, terraform_with_targets):
"""
Validate all arguments of all terraform resources
Args:
resources (list): All kind of resources to be installed/destroyed including data resources
terraform_with_targets (boolean): True if subset of all resources to be installed else False
Returns:
key_msg (dict): Dict contains error messages if anny else empty dict
"""
key_msg = {}
if not terraform_with_targets:
resource_id_with_depends_on = {}
for resource in resources:
resource_id_with_depends_on[self._get_depends_key(resource)] = resource.DEPENDS_ON
success, msg_list = resource.validate_input_args()
if not success:
key_msg[resource.__class__.__name__] = msg_list
key_msg = self.validate_depends_on_resources(
resource_id_with_depends_on, key_msg)
return key_msg
def validate_depends_on_resources(self, resource_id_with_depends_on, key_msg):
"""
Validate resources availability for the DEPENDS_ON attribute
Args:
resource_id_with_depends_on (str): Resource ID for which the depends on resources to be validated
key_msg (dict): Dict contains error messages if anny else empty dict
Returns:
key_msg (dict): Dict contains error messages if anny else empty dict
"""
if self.check_dependent_resources:
install_resource_keys = resource_id_with_depends_on.keys()
for key, resource_classes in resource_id_with_depends_on.items():
for resource_class in resource_classes:
if self._get_depends_key(resource_class) in install_resource_keys:
continue
if key in key_msg:
key_msg[key].append(
"Depends on resource is not found: %s" % resource_class.__name__)
else:
key_msg[key] = ["Depends on resource is not found: %s" %
resource_class.__name__]
return key_msg
def _get_depends_key(self, resource):
"""
Get resource id of the dependent resource
Args:
resource (object): terraform resource
Returns:
resource_id (str): Resource ID
"""
return str(resource.get_resource_id())
def _get_terraform_output_count(self, prev_count):
"""
Get current terraform resources count by calling the output command
Args:
prev_count (int): Previous count obtained before the current instant
Returns:
count (int): Current resources count
"""
try:
output = PyTerraform.load_terraform_output()
return len(output)
except:
return prev_count
| [
"[email protected]"
] | |
03f8df6a189c4f594e18ff8fc0f6e353fb27f83d | 38ae0a339102c9fa0c24ecac7901a0103f87c1fe | /Lib/site-packages/django/db/migrations/graph.py | 8b8a4d9bead4f1c4afabac42ebfaeaa2d1e51369 | [] | no_license | Tanzin-Ul-Islam/Django_dynamic_filterform | 11cf897391abc56929b3e6d5156660312a65ef13 | 76eb92d65a8cab5a9b294f87c144e425227feee5 | refs/heads/main | 2023-02-23T02:38:51.562393 | 2021-01-26T20:36:20 | 2021-01-26T20:36:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,842 | py | from functools import total_ordering
from django.db.migrations.state import ProjectState
from .exceptions import CircularDependencyError, NodeNotFoundError
@total_ordering
class Node:
"""
A single node in the migration graph. Contains direct links to adjacent
nodes in either direction.
"""
def __init__(self, key):
self.key = key
self.children = set()
self.parents = set()
def __eq__(self, other):
return self.key == other
def __lt__(self, other):
return self.key < other
def __hash__(self):
return hash(self.key)
def __getitem__(self, item):
return self.key[item]
def __str__(self):
return str(self.key)
def __repr__(self):
return '<%s: (%r, %r)>' % (self.__class__.__name__, self.key[0], self.key[1])
def add_child(self, child):
self.children.add(child)
def add_parent(self, parent):
self.parents.add(parent)
class DummyNode(Node):
"""
A node that doesn't correspond to a migration file on disk.
(A squashed migration that was removed, for example.)
After the migration graph is processed, all dummy nodes should be removed.
If there are any left, a nonexistent dependency error is raised.
"""
def __init__(self, key, origin, error_message):
super().__init__(key)
self.origin = origin
self.error_message = error_message
def raise_error(self):
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
class MigrationGraph:
"""
Represent the digraph of all migrations in a project.
Each migration is a node, and each dependency is an edge. There are
no implicit dependencies between numbered migrations - the numbering is
merely a convention to aid file listing. Every new numbered migration
has a declared dependency to the previous number, meaning that VCS
branch merges can be detected and resolved.
Migrations files can be marked as replacing another set of migrations -
this is to support the "squash" feature. The graph handler isn't responsible
for these; instead, the code to load them in here should examine the
migration files and if the replaced migrations are all either unapplied
or not present, it should ignore the replaced ones, load in just the
replacing migration, and repoint any dependencies that pointed to the
replaced migrations to point to the replacing one.
A node should be a tuple: (app_path, migration_name). The tree special-cases
things within an app - namely, root nodes and leaf nodes ignore dependencies
to other apps.
"""
def __init__(self):
self.node_map = {}
self.nodes = {}
def add_node(self, key, migration):
assert key not in self.node_map
node = Node(key)
self.node_map[key] = node
self.nodes[key] = migration
def add_dummy_node(self, key, origin, error_message):
node = DummyNode(key, origin, error_message)
self.node_map[key] = node
self.nodes[key] = None
def add_dependency(self, migration, child, parent, skip_validation=False):
"""
This may create dummy nodes if they don't yet exist. If
`skip_validation=True`, validate_consistency() should be called
afterwards.
"""
if child not in self.nodes:
error_message = (
"Migration %s dependencies reference nonexistent"
" child node %r" % (migration, child)
)
self.add_dummy_node(child, migration, error_message)
if parent not in self.nodes:
error_message = (
"Migration %s dependencies reference nonexistent"
" parent node %r" % (migration, parent)
)
self.add_dummy_node(parent, migration, error_message)
self.node_map[child].add_parent(self.node_map[parent])
self.node_map[parent].add_child(self.node_map[child])
if not skip_validation:
self.validate_consistency()
def remove_replaced_nodes(self, replacement, replaced):
"""
Remove each of the `replaced` nodes (when they exist). Any
dependencies that were referencing them are changed to reference the
`replacement` node instead.
"""
# Cast list of replaced keys to set to speed up lookup later.
replaced = set(replaced)
try:
replacement_node = self.node_map[replacement]
except KeyError as err:
raise NodeNotFoundError(
"Unable to find replacement node %r. It was either never added"
" to the migration graph, or has been removed." % (replacement,),
replacement
) from err
for replaced_key in replaced:
self.nodes.pop(replaced_key, None)
replaced_node = self.node_map.pop(replaced_key, None)
if replaced_node:
for child in replaced_node.children:
child.parents.remove(replaced_node)
# We don't want to create dependencies between the replaced
# node and the replacement node as this would lead to
# self-referencing on the replacement node at a later iteration.
if child.key not in replaced:
replacement_node.add_child(child)
child.add_parent(replacement_node)
for parent in replaced_node.parents:
parent.children.remove(replaced_node)
# Again, to avoid self-referencing.
if parent.key not in replaced:
replacement_node.add_parent(parent)
parent.add_child(replacement_node)
def remove_replacement_node(self, replacement, replaced):
"""
The inverse operation to `remove_replaced_nodes`. Almost. Remove the
replacement node `replacement` and remap its child nodes to `replaced`
- the list of nodes it would have replaced. Don't remap its parent
nodes as they are expected to be correct already.
"""
self.nodes.pop(replacement, None)
try:
replacement_node = self.node_map.pop(replacement)
except KeyError as err:
raise NodeNotFoundError(
"Unable to remove replacement node %r. It was either never added"
" to the migration graph, or has been removed already." % (replacement,),
replacement
) from err
replaced_nodes = set()
replaced_nodes_parents = set()
for key in replaced:
replaced_node = self.node_map.get(key)
if replaced_node:
replaced_nodes.add(replaced_node)
replaced_nodes_parents |= replaced_node.parents
# We're only interested in the latest replaced node, so filter out
# replaced nodes that are parents of other replaced nodes.
replaced_nodes -= replaced_nodes_parents
for child in replacement_node.children:
child.parents.remove(replacement_node)
for replaced_node in replaced_nodes:
replaced_node.add_child(child)
child.add_parent(replaced_node)
for parent in replacement_node.parents:
parent.children.remove(replacement_node)
# NOTE: There is no need to remap parent dependencies as we can
# assume the replaced nodes already have the correct ancestry.
def validate_consistency(self):
"""Ensure there are no dummy nodes remaining in the graph."""
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
def forwards_plan(self, target):
"""
Given a node, return a list of which previous nodes (dependencies) must
be applied, ending with the node itself. This is the list you would
follow if applying the migrations to a database.
"""
if target not in self.nodes:
raise NodeNotFoundError("Node %r not a valid node" % (target,), target)
return self.iterative_dfs(self.node_map[target])
def backwards_plan(self, target):
"""
Given a node, return a list of which dependent nodes (dependencies)
must be unapplied, ending with the node itself. This is the list you
would follow if removing the migrations from a database.
"""
if target not in self.nodes:
raise NodeNotFoundError("Node %r not a valid node" % (target,), target)
return self.iterative_dfs(self.node_map[target], forwards=False)
def iterative_dfs(self, start, forwards=True):
"""Iterative depth-first search for finding dependencies."""
visited = []
visited_set = set()
stack = [(start, False)]
while stack:
node, processed = stack.pop()
if node in visited_set:
pass
elif processed:
visited_set.add(node)
visited.append(node.key)
else:
stack.append((node, True))
stack += [(n, False) for n in sorted(node.parents if forwards else node.children)]
return visited
def root_nodes(self, app=None):
"""
Return all root nodes - that is, nodes with no dependencies inside
their app. These are the starting point for an app.
"""
roots = set()
for node in self.nodes:
if all(key[0] != node[0] for key in self.node_map[node].parents) and (not app or app == node[0]):
roots.add(node)
return sorted(roots)
def leaf_nodes(self, app=None):
"""
Return all leaf nodes - that is, nodes with no dependents in their app.
These are the "most current" version of an app's schema.
Having more than one per app is technically an error, but one that
gets handled further up, in the interactive commands - it's usually the
result of a VCS merge and needs some user input.
"""
leaves = set()
for node in self.nodes:
if all(key[0] != node[0] for key in self.node_map[node].children) and (not app or app == node[0]):
leaves.add(node)
return sorted(leaves)
def ensure_not_cyclic(self):
# Algo from GvR:
# https://neopythonic.blogspot.com/2009/01/detecting-cycles-in-directed-graph.html
todo = set(self.nodes)
while todo:
node = todo.pop()
stack = [node]
while stack:
top = stack[-1]
for child in self.node_map[top].children:
# Use child.key instead of child to speed up the frequent
# hashing.
node = child.key
if node in stack:
cycle = stack[stack.index(node):]
raise CircularDependencyError(", ".join("%s.%s" % n for n in cycle))
if node in todo:
stack.append(node)
todo.remove(node)
break
else:
node = stack.pop()
def __str__(self):
return 'Graph: %s nodes, %s edges' % self._nodes_and_edges()
def __repr__(self):
nodes, edges = self._nodes_and_edges()
return '<%s: nodes=%s, edges=%s>' % (self.__class__.__name__, nodes, edges)
def _nodes_and_edges(self):
return len(self.nodes), sum(len(node.parents) for node in self.node_map.values())
def _generate_plan(self, nodes, at_end):
plan = []
for node in nodes:
for migration in self.forwards_plan(node):
if migration not in plan and (at_end or migration not in nodes):
plan.append(migration)
return plan
def make_state(self, nodes=None, at_end=True, real_apps=None):
"""
Given a migration node or nodes, return a complete ProjectState for it.
If at_end is False, return the state before the migration has run.
If nodes is not provided, return the overall most current project state.
"""
if nodes is None:
nodes = list(self.leaf_nodes())
if not nodes:
return ProjectState()
if not isinstance(nodes[0], tuple):
nodes = [nodes]
plan = self._generate_plan(nodes, at_end)
project_state = ProjectState(real_apps=real_apps)
for node in plan:
project_state = self.nodes[node].mutate_state(project_state, preserve=False)
return project_state
def __contains__(self, node):
return node in self.nodes
| [
"[email protected]"
] | |
0dc1f2c28db51d01993123fcafd7bea069e473a4 | 747febe786dd6b7fd6c63cfe73dbe3023354daa8 | /src/the_tale/the_tale/urls.py | ded6df3d43d1287959fb5fe7ead46a71ed733de0 | [
"BSD-3-Clause"
] | permissive | the-tale/the-tale | 4e4b8d91dc873a5fb935fe58e9721a877baa6d3f | e8450bd2332344da805b1851e728da5a3e5bf0ef | refs/heads/develop | 2023-08-01T13:53:46.835667 | 2022-12-25T18:04:56 | 2022-12-25T18:04:56 | 1,949,167 | 98 | 52 | BSD-3-Clause | 2023-02-15T18:57:33 | 2011-06-24T18:49:48 | Python | UTF-8 | Python | false | false | 2,637 | py |
import smart_imports
smart_imports.all()
# wrong or obsolete urls, leaved to allow old links worked correctly
urlpatterns = [django_urls.url('^folclor/(?P<path>.*)$', RedirectView.as_view(url='/folklore/%(path)s')),
django_urls.url('^accounts/clans/(?P<path>.*)$', RedirectView.as_view(url='/clans/%(path)s')),
django_urls.url('^landing$', RedirectView.as_view(url='/')),
django_urls.url(r'^admin/', django_admin.site.urls),
django_urls.url(r'^accounts/', django_urls.include(('the_tale.accounts.urls', 'accounts'))),
django_urls.url(r'^clans/', django_urls.include(('the_tale.clans.urls', 'clans'))),
django_urls.url(r'^game/', django_urls.include(('the_tale.game.urls', 'game'))),
django_urls.url(r'^guide/', django_urls.include(('the_tale.guide.urls', 'guide'))),
django_urls.url(r'^forum/', django_urls.include(('the_tale.forum.urls', 'forum'))),
django_urls.url(r'^folklore/', django_urls.include(('the_tale.blogs.urls', 'blogs'))),
django_urls.url(r'^collections/', django_urls.include(('the_tale.collections.urls', 'collections'))),
django_urls.url(r'^news/', django_urls.include(('the_tale.news.urls', 'news'))),
django_urls.url(r'^postponed-tasks/', django_urls.include(('the_tale.common.postponed_tasks.urls', 'postponed-tasks'))),
django_urls.url(r'^bank/', django_urls.include(('the_tale.finances.bank.urls', 'bank'))),
django_urls.url(r'^shop/', django_urls.include(('the_tale.finances.shop.urls', 'shop'))),
django_urls.url(r'^statistics/', django_urls.include(('the_tale.statistics.urls', 'statistics'))),
django_urls.url(r'^linguistics/', django_urls.include(('the_tale.linguistics.urls', 'linguistics'))),
django_urls.url(r'^', django_urls.include(('the_tale.portal.urls', 'portal')))]
if django_settings.DEBUG:
urlpatterns += django_static.static(django_settings.STATIC_URL + 'admin/',
document_root=os.path.join(os.path.dirname(django_admin.__file__), 'static', 'admin'))
urlpatterns += [django_urls.url(r'^{}css/'.format(django_settings.STATIC_URL[1:]), django_urls.include('the_tale.common.less.urls'))]
urlpatterns += django_static.static(django_settings.STATIC_URL, document_root=os.path.join(django_settings.PROJECT_DIR, 'static'))
handlerCSRF = portal_views.handlerCSRF
handler403 = portal_views.handler403
handler404 = portal_views.handler404
handler500 = portal_views.handler500
| [
"[email protected]"
] | |
567970062927099f69ec0b2a464957a25527ff4e | 6e061f593aad262de2655767c9ea94b9142b51ea | /authentication/migrations/0002_user_is_verified.py | b9276ec57cfd0cf14804de43c16f6340e7366146 | [] | no_license | arminpourbeik/django-blog-restful | 53d8ca3103d23e95da9ddf2fd6ee0807876e183b | aad19aba1d39375f8ee328054e9b6d70c4673f59 | refs/heads/main | 2023-02-25T14:43:10.297108 | 2021-01-28T20:27:02 | 2021-01-28T20:27:02 | 329,924,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | # Generated by Django 3.1.5 on 2021-01-17 10:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='is_verified',
field=models.BooleanField(default=False),
),
]
| [
"[email protected]"
] | |
fd931a296778416e9e99cf8ff0e32c2d4fa7342a | 00fe1823bbadc9300e4fec42ca1d12dfbd4bcde9 | /Python_Basic/13.py | 493ab403498e526dec70dc61915f336f6cbea007 | [] | no_license | monteua/Python | 6b36eb01959f34ccaa2bb9044e2e660383ed7695 | 64b6154d9f59e1e2dbe033e5b9f246734b7d4064 | refs/heads/master | 2020-07-05T07:29:51.250343 | 2018-02-09T11:09:51 | 2018-02-09T11:09:51 | 74,122,698 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | '''
Write a Python program to print the following here document. Go to the editor
Sample string :
a string that you "don't" have to escape
This
is a ....... multi-line
heredoc string --------> example
'''
print('''
a string that you "don't" have to escape
This
is a ....... multi-line
heredoc string --------> example
''') | [
"[email protected]"
] | |
14bed740f8847ec33c85e5dde1b8fda03f9aef12 | eb6d3841d9966cc4aea25da5c4805fd433fd3186 | /models/t5gen.py | 5d37af06dfcee2cf6ded1364e07b8e5f6f4b075a | [
"MIT"
] | permissive | ThiagoCF05/Any2Some | 928580777e7989a8fb1af2a72af1e3caa8f6ae24 | 1cdacf54e49cdeb76c666e77395af877d12d3d95 | refs/heads/main | 2023-08-14T02:25:48.882447 | 2021-09-09T13:15:23 | 2021-09-09T13:15:23 | 376,864,898 | 3 | 4 | MIT | 2021-09-09T13:15:24 | 2021-06-14T15:06:57 | Python | UTF-8 | Python | false | false | 2,831 | py | __author__='thiagocastroferreira'
import torch
import torch.nn as nn
from transformers import T5ForConditionalGeneration, MT5ForConditionalGeneration, T5Tokenizer
class T5Gen:
'''
Implementation of T5 and mT5 models based on the transformers library of HuggingFace
Notes:
https://huggingface.co/transformers/model_doc/t5.html
https://huggingface.co/transformers/model_doc/mt5.html
'''
def __init__(self, tokenizer_path, model_path, max_length, device, multilingual, sep_token='Verbalize:'):
'''
params:
---
tokenizer_path: path to the tokenizer in HuggingFace (e.g., facebook/bart-large)
model_path: path to the model in HuggingFace (e.g., facebook/bart-large)
max_length: maximum size of subtokens in the input and output
device: cpu or gpu
multilingual: is the model multilingual? True or False
sep_token: special token to separate the meaning representation and text in order to prime the verbalization
'''
self.tokenizer = T5Tokenizer.from_pretrained(tokenizer_path)
if multilingual:
self.model = MT5ForConditionalGeneration.from_pretrained(model_path).to(device)
else:
self.model = T5ForConditionalGeneration.from_pretrained(model_path).to(device)
self.device = device
self.max_length = max_length
self.sep_token = sep_token
def __call__(self, intents, texts=None):
'''
Method that convert a meaning representation into text (e.g. intents)
params:
---
intents: list of input meaning representations (strings)
texts: list of output gold-standard verbalizations
return:
---
output: during training (texts not None), returns the list of probabilities.
Otherwise, returns the predicted verbalizations to the input meaning representations
'''
# prepare
for i, intent in enumerate(intents):
intents[i] = ' '.join([self.sep_token, intent])
# tokenize
model_inputs = self.tokenizer(intents, truncation=True, padding=True, max_length=self.max_length, return_tensors="pt").to(self.device)
# Predict
if texts:
with self.tokenizer.as_target_tokenizer():
labels = self.tokenizer(texts, truncation=True, padding=True, max_length=self.max_length, return_tensors="pt").input_ids.to(self.device)
# Predict
output = self.model(**model_inputs, labels=labels) # forward pass
else:
generated_ids = self.model.generate(**model_inputs, max_length=self.max_length)
output = self.tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
return output | [
"[email protected]"
] | |
f396bdc6162f9fa4eda310102ec903bb7a3db3ef | fa93e53a9eee6cb476b8998d62067fce2fbcea13 | /build/mouse_teleop/catkin_generated/pkg.develspace.context.pc.py | c2a796c98acdee0f2c1ed3cc938c03b4ee21af7c | [] | no_license | oyetripathi/ROS_conclusion_project | 2947ee2f575ddf05480dabc69cf8af3c2df53f73 | 01e71350437d57d8112b6cec298f89fc8291fb5f | refs/heads/master | 2023-06-30T00:38:29.711137 | 2021-08-05T09:17:54 | 2021-08-05T09:17:54 | 392,716,311 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "mouse_teleop"
PROJECT_SPACE_DIR = "/home/sandeepan/tiago_public_ws/devel/.private/mouse_teleop"
PROJECT_VERSION = "0.3.2"
| [
"[email protected]"
] | |
25d5190a553a4e235a6adfb49cbbae1c6373fafc | bbe447a740929eaee1955bd9c1517cf760dd5cb9 | /keygrabber/adwords/adwords_api_python_14.2.1/examples/adspygoogle/adwords/v201008/get_all_alerts.py | 4d21466fd75fcb699828f91b9b3d5813ed661315 | [
"Apache-2.0"
] | permissive | MujaahidSalie/aranciulla | f3d32e7dd68ecfca620fe4d3bf22ecb4762f5893 | 34197dfbdb01479f288611a0cb700e925c4e56ce | refs/heads/master | 2020-09-07T02:16:25.261598 | 2011-11-01T21:20:46 | 2011-11-01T21:20:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,655 | py | #!/usr/bin/python
#
# Copyright 2010 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""This example gets all alerts for all clients of an MCC account. The effective
user (clientEmail, clientCustomerId, or authToken) must be an MCC user to get
results.
Tags: AlertService.get
Api: AdWordsOnly
"""
__author__ = '[email protected] (Stan Grinberg)'
import os
import sys
sys.path.append(os.path.join('..', '..', '..', '..'))
# Import appropriate classes from the client library.
from adspygoogle.adwords.AdWordsClient import AdWordsClient
# Initialize client object.
client = AdWordsClient(path=os.path.join('..', '..', '..', '..'))
# Initialize appropriate service.
alert_service = client.GetAlertService(
'https://adwords-sandbox.google.com', 'v201008')
# Construct selector and get all alerts.
selector = {
'query': {
'clientSpec': 'ALL',
'filterSpec': 'ALL',
'types': ['ACCOUNT_BUDGET_BURN_RATE', 'ACCOUNT_BUDGET_ENDING',
'ACCOUNT_ON_TARGET', 'CAMPAIGN_ENDED', 'CAMPAIGN_ENDING',
'CREDIT_CARD_EXPIRING', 'DECLINED_PAYMENT',
'KEYWORD_BELOW_MIN_CPC', 'MANAGER_LINK_PENDING',
'MISSING_BANK_REFERENCE_NUMBER', 'PAYMENT_NOT_ENTERED',
'TV_ACCOUNT_BUDGET_ENDING', 'TV_ACCOUNT_ON_TARGET',
'TV_ZERO_DAILY_SPENDING_LIMIT', 'USER_INVITE_ACCEPTED',
'USER_INVITE_PENDING', 'ZERO_DAILY_SPENDING_LIMIT'],
'severities': ['GREEN', 'YELLOW', 'RED'],
'triggerTimeSpec': 'ALL_TIME'
},
'paging': {
'startIndex': '0',
'numberResults': '100'
}
}
page = alert_service.Get(selector)[0]
# Display results.
if 'entries' in page:
for alert in page['entries']:
print ('Alert of type \'%s\' and severity \'%s\' for account \'%s\' was '
'found.' % (alert['alertType'], alert['alertSeverity'],
alert['clientCustomerId']))
else:
print 'No alerts were found.'
print
print ('Usage: %s units, %s operations' % (client.GetUnits(),
client.GetOperations()))
| [
"[email protected]"
] | |
1b7e95a80742d779a78c182b9719efb27038bbd2 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_5/nckemm001/question3.py | 35771920de3812c7a62c075b072149f678d290d2 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | # calculate number of k-permutations of n items
from mymath import *
def main ():
n = get_integer ("n")
k = get_integer ("k")
nfactorial = calc_factorial (n)
nkfactorial = calc_factorial (n-k)
print ("Number of permutations:", nfactorial // nkfactorial)
if __name__ == "__main__":
main()
| [
"[email protected]"
] | |
4ab0127cda446fe795a9d1d59838380875294643 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02767/s186457503.py | 1b77521af961419a49332ff8fb6d05f6fcb75eac | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | N = int(input())
X = list(map(int,input().split()))
ans = []
for i in range(max(X)):
P = i+1
sum = 0
for j in range(N):
sum += (X[j]-P)**2
ans.append(sum)
print(min(ans)) | [
"[email protected]"
] | |
b21454d098da79e3a8ed4e89d2a1e4b10fb0324f | a8731ed73a1fbae2d1e490fc8951aa17873aa7d4 | /check_inds.py | 4a89772eeb99a2bbcfcd2cd2e416841be5b35920 | [] | no_license | juancq/character-evolver | 452bf84afd52766502fbe6ba6471519d1a7635e1 | 5dcae96916dbfef03cc8f6625e4a4c31fe25224f | refs/heads/master | 2021-01-23T18:08:21.058617 | 2017-05-22T02:08:58 | 2017-05-22T02:08:58 | 129,113 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 22,258 | py | try:
import psyco
psyco.full()
except:
print 'no psyco'
import sys
import random
import ctypes
sys.path.insert(0,'..')
import PythonOgreConfig
import ogre.renderer.OGRE as ogre
import ogre.gui.CEGUI as CEGUI
import ogre.io.OIS as OIS
import SampleFramework as sf
import evolve
SPACE = 250
VSPACE = 300
MOVE = 500
NEXTID = 1
NEXTNUM = 1
GEN_COUNTER = 0
#-------------------------------------------#
def tempName():
global NEXTID
id = NEXTID
NEXTID += 1
return 't%d'%id
def nextNum():
global NEXTNUM
NEXTNUM += 13
return NEXTNUM
#-------------------------------------------#
class OgreText(object):
"""Class for displaying text in Ogre above a Movable."""
def __init__(self, movable, camera, text=''):
self.movable = movable
self.camera = camera
self.text = ''
self.enabled = True
ovm = ogre.OverlayManager.getSingleton()
self.overlay = ov = ovm.create(tempName())
self.container = c = ovm.createOverlayElement('Panel', tempName())
ov.add2D(c)
self.textArea = t = ovm.createOverlayElement('TextArea', tempName())
t.setDimensions(1.0, 1.0)
t.setMetricsMode(ogre.GMM_PIXELS)
t.setPosition(0, 0)
t.setParameter('font_name', 'BlueHighway')
t.setParameter('char_height', '16')
t.setParameter('horz_align', 'center')
t.setColour(ogre.ColourValue(1.0, 0.0, 0.0))
c.addChild(t)
ov.show()
self.setText(text)
def __del__(self):
self.destroy()
def destroy(self):
if hasattr(self, 'dead'): return
self.dead = True
self.overlay.hide()
ovm = ogre.OverlayManager.getSingleton()
self.container.removeChild(self.textArea.name)
self.overlay.remove2D(self.container)
ovm.destroyOverlayElement(self.textArea.name)
ovm.destroyOverlayElement(self.container.name)
ovm.destroy(self.overlay.name)
def enable(self, f):
self.enabled = f
if f:
self.overlay.show()
else:
self.overlay.hide()
def setText(self, text):
self.text = text
self.textArea.setCaption(ogre.UTFString(text))
def update(self):
if not self.enabled : return
# get the projection of the object's AABB into screen space
bbox = self.movable.getWorldBoundingBox(True);
mat = self.camera.getViewMatrix();
corners = bbox.getAllCorners();
min_x, max_x, min_y, max_y = 1.0, 0.0, 1.0, 0.0
# expand the screen-space bounding-box so that it completely encloses
# the object's AABB
for corner in corners:
# multiply the AABB corner vertex by the view matrix to
# get a camera-space vertex
corner = mat * corner;
# make 2D relative/normalized coords from the view-space vertex
# by dividing out the Z (depth) factor -- this is an approximation
x = corner.x / corner.z + 0.5
y = corner.y / corner.z + 0.5
if x < min_x: min_x = x
if x > max_x: max_x = x
if y < min_y: min_y = y
if y > max_y: max_y = y
# we now have relative screen-space coords for the
# object's bounding box; here we need to center the
# text above the BB on the top edge. The line that defines
# this top edge is (min_x, min_y) to (max_x, min_y)
# self.container.setPosition(min_x, min_y);
# Edited by alberts: This code works for me
self.container.setPosition(1-max_x, min_y);
# 0.1, just "because"
self.container.setDimensions(max_x - min_x, 0.1);
def get_width_height(cur_node):
aab = cur_node.getAttachedObject(0).getBoundingBox();
min = aab.getMinimum() * cur_node.getScale();
max = aab.getMaximum() * cur_node.getScale();
center = aab.getCenter() * cur_node.getScale();
size = ogre.Vector3(abs(max.x - min.x), abs(max.y - min.y), abs(max.z - min.z))
rad = size.z / 2. if size.x > size.z else size.x / 2.0
width = size.z if size.x > size.z else size.x
height = size.y
return width, height
class GAListener(sf.FrameListener, OIS.MouseListener, OIS.KeyListener):
OBJ_MASK = 1 << 1
def __init__(self, renderWindow, camera, sceneManager, cegui):#, ind_nodes):
sf.FrameListener.__init__(self, renderWindow, camera, True, True)
OIS.MouseListener.__init__(self)
OIS.KeyListener.__init__(self)
self.text_overlays = []
self.toggle = 0
self.mouse_down = False
self.cam_node = camera.parentSceneNode.parentSceneNode
self.sceneManager = sceneManager
self.cegui = cegui
j, vj, vi, offset = 0, 0, 0, SPACE * 4
# begin animation stuff
ogre.Animation.setDefaultInterpolationMode(ogre.Animation.IM_SPLINE)
self.animationStates = []
self.animationSpeeds = []
# end animation stuff
mesh = 'ninja.mesh'
#mesh = 'robot.mesh'
# create nodes to hold subset models and peers
peer_nodes = []
ind_nodes = []
f = open('save_best', 'r')
best_files = f.readlines()
f.close()
for i in range(len(best_files)):
name = 'Node_%d_%d' % (i, (nextNum()))
ent = sceneManager.createEntity(name, mesh)
ent.setQueryFlags(self.OBJ_MASK)
ent.setMaterialName(best_files[i].strip())
self.animationStates.append(ent.getAnimationState('Walk'))
self.animationStates[-1].Enabled = True
self.animationSpeeds.append(ogre.Math.RangeRandom(0.5, 1.5))
node = sceneManager.getRootSceneNode().createChildSceneNode('Individual%d' % i)
node.attachObject(ent)
#node.position = (vi*SPACE, vj*VSPACE, vi*SPACE)
node.position = (vi*SPACE, vj*VSPACE, 0)
# incremental diagonal placement
#node.position = (vi*SPACE, vj*VSPACE, 0)
node.yaw(-135)
#node.yaw(-90)
#sep_node = sceneManager.getRootSceneNode().createChildSceneNode('Separator%d' % i)
#sep_node.position = (0,0,0)
#sep_node.setScale(0.25, 0.25, 0.25)
#ent = sceneManager.createEntity('Separator%d' %i, 'knot.mesh')
#ent.setMaterialName('Examples/OgreLogo')
#sep_node.attachObject(ent)
#sep_node.setVisible(True)
#sep_node.position = (vi*SPACE, vj*VSPACE + offset, vi*SPACE + offset)
vi += 1
j += 1
if j % 3 == 0:
vj -= 1
vi = 0
ind_nodes.append(node)
self.ind_nodes = ind_nodes
# Register as MouseListener (Basic tutorial 5)
self.Mouse.setEventCallback(self)
self.Keyboard.setEventCallback(self)
self.mesh_rotate = 0.
self.rotate = 0.20
self.move = MOVE
self.currentObject = None
self.best_selected = {'index': None, 'individual': None}
self.peer_selected = {}
self.raySceneQuery = None
self.raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray())
self.num_keys = ['%d' % i for i in range(10)]
self.all_online = False
self.collaborate = False
#self.prev_cam =
#---------------------------------#
def mouseMoved(self, evt):
CEGUI.System.getSingleton().injectMouseMove(evt.get_state().X.rel, evt.get_state().Y.rel)
#x = evt.get_state().X.rel
#y = evt.get_state().Y.rel
#self.cam_node.yaw(ogre.Degree(-self.rotate * x).valueRadians())
#self.cam_node.getChild(0).pitch(ogre.Degree(-self.rotate * y).valueRadians())
return True
#---------------------------------#
def mousePressed(self, evt, id):
if id == OIS.MB_Left:
self.onLeftPressed(evt)
if id == OIS.MB_Right:
self.onRightPressed(evt)
return True
#---------------------------------#
def mouseReleased(self, evt, id):
return True
#---------------------------------#
def keyPressed(self, evt):
#if evt.key is OIS.KC_ESCAPE:
# self.ga.exit()
return True
#---------------------------------#
def keyReleased(self, evt):
return True
#---------------------------------#
def frameStarted(self, frameEvent):
if self.renderWindow.isClosed():
return False
for index in range(len(self.animationStates)):
self.animationStates[index].addTime(frameEvent.timeSinceLastFrame * self.animationSpeeds[index])
for ind in self.text_overlays: ind.update()
#self.mesh_rotate += 0.1
#self.mesh_rotate %= 360
#for i, node in enumerate(self.ind_nodes):
# node.yaw(self.mesh_rotate)
self.Keyboard.capture()
self.Mouse.capture()
#curr_mouse = self.Mouse.getMouseState()
#if curr_mouse.buttonDown(OIS.MB_Left) and not self.mouse_down:
# light = self.sceneManager.getLight('Light1')
# light.visible = not light.visible
#self.mouse_down = curr_mouse.buttonDown(OIS.MB_Left)
if self.toggle >= 0:
self.toggle -= frameEvent.timeSinceLastFrame
#if self.toggle < 0 and self.Keyboard.isKeyDown(OIS.KC_1):
# self.toggle = 0.1
# self.camera.parentSceneNode.detachObject(self.camera)
# self.cam_node = self.sceneManager.getSceneNode('CamNode1')
# self.sceneManager.getSceneNode('PitchNode1').attachObject(self.camera)
#elif self.toggle < 0 and self.Keyboard.isKeyDown(OIS.KC_2):
# self.toggle = 0.1
# self.camera.parentSceneNode.detachObject(self.camera)
# self.cam_node = self.sceneManager.getSceneNode('CamNode2')
# self.sceneManager.getSceneNode('PitchNode2').attachObject(self.camera)
transVector = ogre.Vector3(0, 0, 0)
if self.Keyboard.isKeyDown(OIS.KC_UP):
transVector.y += self.move
if self.Keyboard.isKeyDown(OIS.KC_DOWN):
transVector.y -= self.move
if self.Keyboard.isKeyDown(OIS.KC_LEFT):
transVector.x -= self.move
if self.Keyboard.isKeyDown(OIS.KC_RIGHT):
transVector.x += self.move
if self.Keyboard.isKeyDown(OIS.KC_W):
transVector.z -= self.move
if self.Keyboard.isKeyDown(OIS.KC_S):
transVector.z += self.move
if self.Keyboard.isKeyDown(OIS.KC_A):
transVector.x -= self.move
if self.Keyboard.isKeyDown(OIS.KC_D):
transVector.x += self.move
if self.Keyboard.isKeyDown(OIS.KC_PGUP):
transVector.z -= self.move
if self.Keyboard.isKeyDown(OIS.KC_PGDOWN):
transVector.z += self.move
if self.Keyboard.isKeyDown(OIS.KC_Z):
transVector.y -= self.move
if self.Keyboard.isKeyDown(OIS.KC_C):
transVector.y += self.move
ms = self.Mouse.getMouseState()
if ms.buttonDown( OIS.MB_Right ):
rotationX = ogre.Degree(- ms.X.rel )
rotationY = ogre.Degree(- ms.Y.rel )
self.camera.yaw(rotationX)
self.camera.pitch(rotationY)
#self.cam_node.translate(self.cam_node.orientation * transVector * frameEvent.timeSinceLastFrame)
self.camera.moveRelative(transVector * frameEvent.timeSinceLastFrame)
#if curr_mouse.buttonDown(OIS.MB_Right):
# self.cam_node.yaw(ogre.Degree(-self.rotate * curr_mouse.X.rel).valueRadians())
# self.cam_node.getChild(0).pitch(ogre.Degree(-self.rotate * curr_mouse.Y.rel).valueRadians())
if not sf.FrameListener.frameStarted(self, frameEvent):
return False
return not self.Keyboard.isKeyDown(OIS.KC_ESCAPE)
#---------------------------------#
def onRightPressed(self, evt):
# Setup the ray scene query, use CEGUI's mouse position
mousePos = CEGUI.MouseCursor.getSingleton().getPosition()
mouseRay = self.camera.getCameraToViewportRay(mousePos.d_x / float(evt.get_state().width),
mousePos.d_y / float(evt.get_state().height))
self.raySceneQuery.setRay(mouseRay)
self.raySceneQuery.setSortByDistance(True)
self.raySceneQuery.setQueryMask(self.OBJ_MASK)
# Execute query
result = self.raySceneQuery.execute()
if len(result) > 0:
for item in result:
if item.movable:
name = item.movable.getName()
# if model
if name.startswith('Node') or name.startswith('Peer'):
cur_object = item.movable.getParentSceneNode()
print item.movable.getParentSceneNode().getName()
print item.movable.getName()
ind_index = int(name.split('_')[1])
# my own model
if name.startswith('Node'):
# unselect individual
if self.best_selected['individual']:
self.best_selected['individual'].showBoundingBox(False)
# if selecting same individual, clear selection
if ind_index == self.best_selected['index']:
self.best_selected['individual'] = None
self.best_selected['index'] = -1
else:
cur_object.showBoundingBox(True)
self.best_selected['individual'] = cur_object
self.best_selected['index'] = ind_index
else:
cur_object.showBoundingBox(True)
self.best_selected['individual'] = cur_object
self.best_selected['index'] = ind_index
# model belonging to peers
else:
found = self.peer_selected.get(ind_index, None)
if found:
cur_object.showBoundingBox(False)
self.peer_selected.pop(ind_index)
else:
cur_object.showBoundingBox(True)
self.peer_selected[ind_index] = cur_object
break # We found an existing object
#---------------------------------#
def onLeftPressed(self, evt):
# Setup the ray scene query, use CEGUI's mouse position
mousePos = CEGUI.MouseCursor.getSingleton().getPosition()
mouseRay = self.camera.getCameraToViewportRay(mousePos.d_x / float(evt.get_state().width),
mousePos.d_y / float(evt.get_state().height))
self.raySceneQuery.setRay(mouseRay)
self.raySceneQuery.setSortByDistance(True)
self.raySceneQuery.setQueryMask(self.OBJ_MASK)
# Execute query
result = self.raySceneQuery.execute()
if len(result) > 0:
for item in result:
if item.movable:
name = item.movable.getName()
# if model
if name.startswith('Node') or name.startswith('Peer'):
cur_object = item.movable.getParentSceneNode()
print item.movable.getParentSceneNode().getName()
print item.movable.getName()
ind_index = int(name.split('_')[1])
# my own model
if name.startswith('Node'):
# unselect individual
if self.best_selected['individual']:
self.best_selected['individual'].showBoundingBox(False)
# if selecting same individual, clear selection
if ind_index == self.best_selected['index']:
self.best_selected['individual'] = None
self.best_selected['index'] = -1
else:
cur_object.showBoundingBox(True)
self.best_selected['individual'] = cur_object
self.best_selected['index'] = ind_index
else:
cur_object.showBoundingBox(True)
self.best_selected['individual'] = cur_object
self.best_selected['index'] = ind_index
# model belonging to peers
else:
found = self.peer_selected.get(ind_index, None)
if found:
cur_object.showBoundingBox(False)
self.peer_selected.pop(ind_index)
else:
cur_object.showBoundingBox(True)
self.peer_selected[ind_index] = cur_object
break # We found an existing object
#----------------------------------------#
def newPop(self):
'''
Create and display a new pop.
'''
global GEN_COUNTER
# ----------------------------------------- #
user = self.ga.getVar('user')
ind_gen = '%s_gen' % user
peer_gen = '%s_peer_gen' % user
prefix = [ind_gen]
if self.collaborate and self.peer_genomes:
prefix = [ind_gen, peer_gen] if GEN_COUNTER else [ind_gen]
for sf in ['cg', 'program', 'material']:
#prefix = ['gen', 'peer_gen'] if GEN_COUNTER else ['gen']
for d in prefix:
# dynamic loading of material
f= file("%s_%d.%s" % (d, GEN_COUNTER, sf), 'r')
MatString = f.read()
f.close()
RawMemBuffer = ctypes.create_string_buffer( MatString ) ## Note it allocates one extra byte
## Now we create the MemoryDataStream using the void pointer to the ctypes buffer
dataptr = ogre.MemoryDataStream ( pMem = ogre.CastVoidPtr(ctypes.addressof ( RawMemBuffer )),
size = len (MatString) + 1 )
ogre.MaterialManager.getSingleton().parseScript(dataptr, ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME)
# ----------------------------------------- #
text_overlays = []
sceneManager = self.sceneManager
print self.genomes
for i, node in enumerate(self.ind_nodes):
ent = node.getAttachedObject(0)
m = '%s_%d_ind_%d' % (ind_gen, GEN_COUNTER,i)
ent.setMaterialName(m)
if self.collaborate and GEN_COUNTER > 0:
for i, node in enumerate(self.peer_nodes):
ent = node.getAttachedObject(0)
m = '%s_%d_ind_%d' % (peer_gen, GEN_COUNTER,i)
ent.setMaterialName(m)
GEN_COUNTER += self.ga.getVar('stepSize')
#----------------------------------------#
class TutorialApp(sf.Application):
def _createScene(self):
self.ceguiRenderer = CEGUI.OgreCEGUIRenderer(self.renderWindow, ogre.RENDER_QUEUE_OVERLAY, False, 3000, self.sceneManager)
self.ceguiSystem = CEGUI.System(self.ceguiRenderer)
sceneManager = self.sceneManager
sceneManager.ambientLight = 0.75, 0.75, 0.75
light = sceneManager.createLight('Light1')
light.type = ogre.Light.LT_POINT
light.position = (0, 1000, -500)
light.diffuseColour = (1, 1, 1)
light.specularColour = (1, 1, 1)
j, vj, vi = 1, 1, 1
#node = sceneManager.getRootSceneNode().createChildSceneNode('CamNode1', (-800, -400, 600))
node = sceneManager.getRootSceneNode().createChildSceneNode('CamNode1', (SPACE, -200, 1000))
#node.yaw(ogre.Degree(-45))
node = node.createChildSceneNode('PitchNode1')
node.attachObject(self.camera)
node = sceneManager.getRootSceneNode().createChildSceneNode('CamNode2', (0, 200, 400))
node.createChildSceneNode('PitchNode2')
# Show the mouse cursor
CEGUI.SchemeManager.getSingleton().loadScheme("TaharezLookSkin.scheme")
CEGUI.MouseCursor.getSingleton().setImage("TaharezLook", "MouseArrow")
#---------------------------------#
def _createCamera(self):
self.camera = self.sceneManager.createCamera('PlayerCam')
self.camera.nearClipDistance = 5
self.camera.setDirection(ogre.Vector3(0, 0, -1))
#self.camera.lookAt(ogre.Vector3(0, 0, 0))
#---------------------------------#
def _createFrameListener(self):
self.frameListener = GAListener(self.renderWindow, self.camera, self.sceneManager,
self.ceguiRenderer)#, self.ind_nodes)
self.root.addFrameListener(self.frameListener)
self.frameListener.showDebugOverlay(True)
#---------------------------------#
if __name__ == '__main__':
try:
ta = TutorialApp()
ta.go()
except ogre.OgreException, e:
print e
| [
"juan@dragonite.(none)"
] | juan@dragonite.(none) |
2511226058f4ca7a04af4855132b4b925947bec0 | aea20097b664f00c10391255b0d9cb019220ccea | /course/migrations/0055_facility_facilityiprange.py | 31345f86601a48782c1e19d12d981cee863a4e41 | [
"MIT"
] | permissive | duwhop/relate | d19f2bd3fbf4947863efe234a3fce55d73da1462 | 568bf6868fbc980e78e74fa29f84d10be2f8c94d | refs/heads/master | 2020-06-09T16:58:38.474618 | 2015-11-30T01:48:49 | 2015-11-30T01:48:49 | 42,794,740 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,123 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('course', '0054_add_auditor_role'),
]
operations = [
migrations.CreateModel(
name='Facility',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('identifier', models.CharField(help_text=b'Format is lower-case-with-hyphens. Do not use spaces.', unique=True, max_length=50)),
('description', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='FacilityIPRange',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('ip_range', models.CharField(max_length=200)),
('ip_range_description', models.CharField(max_length=100)),
('facility', models.ForeignKey(to='course.Facility')),
],
),
]
| [
"[email protected]"
] | |
a20f2d80747346e85243e5050115a9ac3c481e81 | 6d4c5e79bb36785d5bb127e263aac50cb6729a88 | /venv/Lib/site-packages/django/middleware/csrf.py | 13dec3ec2380f872a43ea205dd7fa0b89028953d | [] | no_license | Galymbekov/BackWebDevProject | a7683fc205d467629f4ad132370ff4b5ac535277 | 3343fd277bc8994bec3d484072a8ed5f1d99b6bb | refs/heads/main | 2023-04-14T14:06:13.888793 | 2021-04-30T12:12:37 | 2021-04-30T12:12:37 | 362,004,719 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,796 | py | """
Cross Site Request Forgery Middleware.
This module provides a middleware that implements protection
against request forgeries from other sites.
"""
import logging
import re
import string
from urllib.parse import urlparse
from django.conf import settings
from django.core.exceptions import DisallowedHost, ImproperlyConfigured
from django.urls import get_callable
from django.utils.cache import patch_vary_headers
from django.utils.crypto import constant_time_compare, get_random_string
from django.utils.deprecation import MiddlewareMixin
from django.utils.http import is_same_domain
from django.utils.log import log_response
logger = logging.getLogger('django.security.csrf')
REASON_NO_REFERER = "Referer checking failed - no Referer."
REASON_BAD_REFERER = "Referer checking failed - %s does not match any trusted origins."
REASON_NO_CSRF_COOKIE = "CSRF cookie not set."
REASON_BAD_TOKEN = "CSRF token missing or incorrect."
REASON_MALFORMED_REFERER = "Referer checking failed - Referer is malformed."
REASON_INSECURE_REFERER = "Referer checking failed - Referer is insecure while host is secure."
CSRF_SECRET_LENGTH = 32
CSRF_TOKEN_LENGTH = 2 * CSRF_SECRET_LENGTH
CSRF_ALLOWED_CHARS = string.ascii_letters + string.digits
CSRF_SESSION_KEY = '_csrftoken'
def _get_failure_view():
"""Return the view to be used for CSRF rejections."""
return get_callable(settings.CSRF_FAILURE_VIEW)
def _get_new_csrf_string():
return get_random_string(CSRF_SECRET_LENGTH, allowed_chars=CSRF_ALLOWED_CHARS)
def _mask_cipher_secret(secret):
"""
Given a secret (assumed to be a string of CSRF_ALLOWED_CHARS), generate a
token by adding a mask and applying it to the secret.
"""
mask = _get_new_csrf_string()
chars = CSRF_ALLOWED_CHARS
pairs = zip((chars.index(x) for x in secret), (chars.index(x) for x in mask))
cipher = ''.join(chars[(x + y) % len(chars)] for x, y in pairs)
return mask + cipher
def _unmask_cipher_token(token):
"""
Given a token (assumed to be a string of CSRF_ALLOWED_CHARS, of length
CSRF_TOKEN_LENGTH, and that its first half is a mask), use it to decrypt
the second half to produce the original secret.
"""
mask = token[:CSRF_SECRET_LENGTH]
token = token[CSRF_SECRET_LENGTH:]
chars = CSRF_ALLOWED_CHARS
pairs = zip((chars.index(x) for x in token), (chars.index(x) for x in mask))
return ''.join(chars[x - y] for x, y in pairs) # Note negative values are ok
def _get_new_csrf_token():
return _mask_cipher_secret(_get_new_csrf_string())
def get_token(request):
"""
Return the CSRF token required for a POST form. The token is an
alphanumeric value. A new token is created if one is not already set.
A side effect of calling this function is to make the csrf_protect
decorator and the CsrfViewMiddleware add a CSRF cookie and a 'Vary: Cookie'
header to the outgoing response. For this reason, you may need to use this
function lazily, as is done by the csrf context processor.
"""
if "CSRF_COOKIE" not in request.META:
csrf_secret = _get_new_csrf_string()
request.META["CSRF_COOKIE"] = _mask_cipher_secret(csrf_secret)
else:
csrf_secret = _unmask_cipher_token(request.META["CSRF_COOKIE"])
request.META["CSRF_COOKIE_USED"] = True
return _mask_cipher_secret(csrf_secret)
def rotate_token(request):
"""
Change the CSRF token in use for a request - should be done on login
for security purposes.
"""
request.META.update({
"CSRF_COOKIE_USED": True,
"CSRF_COOKIE": _get_new_csrf_token(),
})
request.csrf_cookie_needs_reset = True
def _sanitize_token(token):
# Allow only ASCII alphanumerics
if re.search('[^a-zA-Z0-9]', token):
return _get_new_csrf_token()
elif len(token) == CSRF_TOKEN_LENGTH:
return token
elif len(token) == CSRF_SECRET_LENGTH:
# Older Django versions set cookies to values of CSRF_SECRET_LENGTH
# alphanumeric characters. For backwards compatibility, accept
# such values as unmasked secrets.
# It's easier to mask here and be consistent later, rather than add
# different code paths in the checks, although that might be a tad more
# efficient.
return _mask_cipher_secret(token)
return _get_new_csrf_token()
def _compare_masked_tokens(request_csrf_token, csrf_token):
# Assume both arguments are sanitized -- that is, strings of
# length CSRF_TOKEN_LENGTH, all CSRF_ALLOWED_CHARS.
return constant_time_compare(
_unmask_cipher_token(request_csrf_token),
_unmask_cipher_token(csrf_token),
)
class CsrfViewMiddleware(MiddlewareMixin):
"""
Require a present and correct csrfmiddlewaretoken for POST requests that
have a CSRF cookie, and set an outgoing CSRF cookie.
This middleware should be used in conjunction with the {% csrf_token %}
template tag.
"""
# The _accept and _reject methods currently only exist for the sake of the
# requires_csrf_token decorator.
def _accept(self, request):
# Avoid checking the request twice by adding a custom attribute to
# request. This will be relevant when both decorator and middleware
# are used.
request.csrf_processing_done = True
return None
def _reject(self, request, reason):
response = _get_failure_view()(request, reason=reason)
log_response(
'Forbidden (%s): %s', reason, request.path,
response=response,
request=request,
logger=logger,
)
return response
def _get_token(self, request):
if settings.CSRF_USE_SESSIONS:
try:
return request.session.get(CSRF_SESSION_KEY)
except AttributeError:
raise ImproperlyConfigured(
'CSRF_USE_SESSIONS is enabled, but request.session is not '
'set. SessionMiddleware must appear before CsrfViewMiddleware '
'in MIDDLEWARE.'
)
else:
try:
cookie_token = request.COOKIES[settings.CSRF_COOKIE_NAME]
except KeyError:
return None
csrf_token = _sanitize_token(cookie_token)
if csrf_token != cookie_token:
# Cookie token needed to be replaced;
# the cookie needs to be reset.
request.csrf_cookie_needs_reset = True
return csrf_token
def _set_token(self, request, response):
if settings.CSRF_USE_SESSIONS:
if request.session.get(CSRF_SESSION_KEY) != request.META['CSRF_COOKIE']:
request.session[CSRF_SESSION_KEY] = request.META['CSRF_COOKIE']
else:
response.set_cookie(
settings.CSRF_COOKIE_NAME,
request.META['CSRF_COOKIE'],
max_age=settings.CSRF_COOKIE_AGE,
domain=settings.CSRF_COOKIE_DOMAIN,
path=settings.CSRF_COOKIE_PATH,
secure=settings.CSRF_COOKIE_SECURE,
httponly=settings.CSRF_COOKIE_HTTPONLY,
samesite=settings.CSRF_COOKIE_SAMESITE,
)
# Set the Vary header since content varies with the CSRF cookie.
patch_vary_headers(response, ('Cookie',))
def process_request(self, request):
csrf_token = self._get_token(request)
if csrf_token is not None:
# Use same token next time.
request.META['CSRF_COOKIE'] = csrf_token
def process_view(self, request, callback, callback_args, callback_kwargs):
if getattr(request, 'csrf_processing_done', False):
return None
# Wait until request.META["CSRF_COOKIE"] has been manipulated before
# bailing out, so that get_token still works
if getattr(callback, 'csrf_exempt', False):
return None
# Assume that anything not defined as 'safe' by RFC7231 needs protection
if request.method not in ('GET', 'HEAD', 'OPTIONS', 'TRACE'):
if getattr(request, '_dont_enforce_csrf_checks', False):
# Mechanism to turn off CSRF checks for test suite.
# It comes after the creation of CSRF cookies, so that
# everything else continues to work exactly the same
# (e.g. cookies are sent, etc.), but before any
# branches that call reject().
return self._accept(request)
if request.is_secure():
# Suppose user visits http://example.com/
# An active network attacker (man-in-the-middle, MITM) sends a
# POST form that targets https://example.com/detonate-bomb/ and
# submits it via JavaScript.
#
# The attacker will need to provide a CSRF cookie and token, but
# that's no problem for a MITM and the session-independent
# secret we're using. So the MITM can circumvent the CSRF
# protection. This is true for any HTTP connection, but anyone
# using HTTPS expects better! For this reason, for
# https://example.com/ we need additional protection that treats
# http://example.com/ as completely untrusted. Under HTTPS,
# Barth et al. found that the Referer header is missing for
# same-domain requests in only about 0.2% of cases or less, so
# we can use strict Referer checking.
referer = request.META.get('HTTP_REFERER')
if referer is None:
return self._reject(request, REASON_NO_REFERER)
referer = urlparse(referer)
# Make sure we have a valid URL for Referer.
if '' in (referer.scheme, referer.netloc):
return self._reject(request, REASON_MALFORMED_REFERER)
# Ensure that our Referer is also secure.
if referer.scheme != 'https':
return self._reject(request, REASON_INSECURE_REFERER)
# If there isn't a CSRF_COOKIE_DOMAIN, require an exact match
# match on host:port. If not, obey the cookie rules (or those
# for the session cookie, if CSRF_USE_SESSIONS).
good_referer = (
settings.SESSION_COOKIE_DOMAIN
if settings.CSRF_USE_SESSIONS
else settings.CSRF_COOKIE_DOMAIN
)
if good_referer is not None:
server_port = request.get_port()
if server_port not in ('443', '80'):
good_referer = '%s:%s' % (good_referer, server_port)
else:
try:
# request.get_host() includes the port.
good_referer = request.get_host()
except DisallowedHost:
pass
# Create a list of all acceptable HTTP referers, including the
# current host if it's permitted by ALLOWED_HOSTS.
good_hosts = list(settings.CSRF_TRUSTED_ORIGINS)
if good_referer is not None:
good_hosts.append(good_referer)
if not any(is_same_domain(referer.netloc, host) for host in good_hosts):
reason = REASON_BAD_REFERER % referer.geturl()
return self._reject(request, reason)
# Access csrf_token via self._get_token() as rotate_token() may
# have been called by an authentication middleware during the
# process_request() phase.
csrf_token = self._get_token(request)
if csrf_token is None:
# No CSRF cookie. For POST requests, we insist on a CSRF cookie,
# and in this way we can avoid all CSRF attacks, including login
# CSRF.
return self._reject(request, REASON_NO_CSRF_COOKIE)
# Check non-cookie token for match.
request_csrf_token = ""
if request.method == "POST":
try:
request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')
except OSError:
# Handle a broken connection before we've completed reading
# the POST data. process_view shouldn't raise any
# exceptions, so we'll ignore and serve the user a 403
# (assuming they're still listening, which they probably
# aren't because of the error).
pass
if request_csrf_token == "":
# Fall shop to X-CSRFToken, to make things easier for AJAX,
# and possible for PUT/DELETE.
request_csrf_token = request.META.get(settings.CSRF_HEADER_NAME, '')
request_csrf_token = _sanitize_token(request_csrf_token)
if not _compare_masked_tokens(request_csrf_token, csrf_token):
return self._reject(request, REASON_BAD_TOKEN)
return self._accept(request)
def process_response(self, request, response):
if not getattr(request, 'csrf_cookie_needs_reset', False):
if getattr(response, 'csrf_cookie_set', False):
return response
if not request.META.get("CSRF_COOKIE_USED", False):
return response
# Set the CSRF cookie even if it's already set, so we renew
# the expiry timer.
self._set_token(request, response)
response.csrf_cookie_set = True
return response
| [
"[email protected]"
] | |
ee3acb288c29099d6336e9d5fd0b7a54f71573fe | 11398875e4f5cbcadc1747e73049dc99bca26908 | /02-function/function-05.py | 488628a5fad4821e64df6df89bde8b0fd5d26ec3 | [] | no_license | asvkarthick/LearnPython | 37910faab5c4a18d6e08eb304ca1da9649e5b18f | 258e8c567ca3c8802d5e56f20b34317eba4c75f3 | refs/heads/master | 2021-06-23T06:30:46.681369 | 2021-06-11T19:35:40 | 2021-06-11T19:35:40 | 149,719,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | #!/usr/bin/python
# Author: Karthick Kumaran <[email protected]>
# Function with variable number of arguments
def print_args(*args):
if len(args):
for i in args:
print(i);
else:
print('No arguments passed')
print_args(1, 2, 3)
| [
"[email protected]"
] | |
068ed2ed36ec04d3972d0c0e1ee4ab9674f12c21 | b4c6200590a093b805036a822b7889c058494b9f | /FeatureCollection/minimum_bounding_geometry.py | 89a4f22fd60f55fa52cb2f7dde4044af3a172e63 | [
"MIT"
] | permissive | spoddar-JNPR/earthengine-py-notebooks | 2109a52a49357c19f803b76ed635e022ee486ac6 | ff1b5754785d5e25cb11acdbd52b0f31711d061f | refs/heads/master | 2022-12-25T10:34:44.895717 | 2020-10-01T05:38:16 | 2020-10-01T05:38:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,104 | py | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/minimum_bounding_geometry.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href="https://nbviewer.jupyter.org/github/giswqs/earthengine-py-notebooks/blob/master/FeatureCollection/minimum_bounding_geometry.ipynb"><img width=26px src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Jupyter_logo.svg/883px-Jupyter_logo.svg.png" />Notebook Viewer</a></td>
<td><a target="_blank" href="https://colab.research.google.com/github/giswqs/earthengine-py-notebooks/blob/master/FeatureCollection/minimum_bounding_geometry.ipynb"><img src="https://www.tensorflow.org/images/colab_logo_32px.png" /> Run in Google Colab</a></td>
</table>
"""
# %%
"""
## Install Earth Engine API and geemap
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geemap](https://github.com/giswqs/geemap). The **geemap** Python package is built upon the [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet) and [folium](https://github.com/python-visualization/folium) packages and implements several methods for interacting with Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, and `Map.centerObject()`.
The following script checks if the geemap package has been installed. If not, it will install geemap, which automatically installs its [dependencies](https://github.com/giswqs/geemap#dependencies), including earthengine-api, folium, and ipyleaflet.
**Important note**: A key difference between folium and ipyleaflet is that ipyleaflet is built upon ipywidgets and allows bidirectional communication between the front-end and the backend enabling the use of the map to capture user input, while folium is meant for displaying static data only ([source](https://blog.jupyter.org/interactive-gis-in-jupyter-with-ipyleaflet-52f9657fa7a)). Note that [Google Colab](https://colab.research.google.com/) currently does not support ipyleaflet ([source](https://github.com/googlecolab/colabtools/issues/60#issuecomment-596225619)). Therefore, if you are using geemap with Google Colab, you should use [`import geemap.eefolium`](https://github.com/giswqs/geemap/blob/master/geemap/eefolium.py). If you are using geemap with [binder](https://mybinder.org/) or a local Jupyter notebook server, you can use [`import geemap`](https://github.com/giswqs/geemap/blob/master/geemap/geemap.py), which provides more functionalities for capturing user input (e.g., mouse-clicking and moving).
"""
# %%
# Installs geemap package
import subprocess
try:
import geemap
except ImportError:
print('geemap package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geemap'])
# Checks whether this notebook is running on Google Colab
try:
import google.colab
import geemap.eefolium as geemap
except:
import geemap
# Authenticates and initializes Earth Engine
import ee
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()
# %%
"""
## Create an interactive map
The default basemap is `Google Maps`. [Additional basemaps](https://github.com/giswqs/geemap/blob/master/geemap/basemaps.py) can be added using the `Map.add_basemap()` function.
"""
# %%
Map = geemap.Map(center=[40,-100], zoom=4)
Map
# %%
"""
## Add Earth Engine Python script
"""
# %%
# Add Earth Engine dataset
HUC10 = ee.FeatureCollection("USGS/WBD/2017/HUC10")
HUC08 = ee.FeatureCollection('USGS/WBD/2017/HUC08')
roi = HUC08.filter(ee.Filter.eq('name', 'Pipestem'))
Map.centerObject(roi, 10)
Map.addLayer(ee.Image().paint(roi, 0, 1), {}, 'HUC8')
bound = ee.Geometry(roi.geometry()).bounds()
Map.addLayer(ee.Image().paint(bound, 0, 1), {'palette': 'red'}, "Minimum bounding geometry")
# %%
"""
## Display Earth Engine data layers
"""
# %%
Map.addLayerControl() # This line is not needed for ipyleaflet-based Map.
Map | [
"[email protected]"
] | |
538cf4bc2cb20e2dad83e9acb99326572fc94541 | 43dd48e6ab27c8bb73a51439b9d1dafb89b3a2d2 | /exercises/while_loops.py | e89371195de4d6979c27243eb0b554ea1d8f914a | [
"MIT"
] | permissive | william19-meet/y2s18-python_review | a0e3d5026875361719ccde2213a7ed246fede8a0 | 7cf498b911067fba0cd66cf49199add7c8a6be22 | refs/heads/master | 2020-03-25T08:03:46.310887 | 2018-08-05T11:00:21 | 2018-08-05T11:00:21 | 143,595,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 79 | py | x = 0
a = 0
while x < 10000:
a = a + 1
x = x + a
print(x)
print(a)
| [
"[email protected]"
] | |
a33d4056b80802fa4bec379faf6ae3c3ce517d55 | cdf8b78a6975813c010b8c63b9e24f364a7cf995 | /jupitotools/pyutils/pal.py | 36df3851eb5b52ec785adb8549d332ec593a39e8 | [
"MIT"
] | permissive | jupito/jupitotools | c789d89ae7525027ddc0aee4502cde1a44a4d268 | fe3f1a4fd3a0d15b38285577c00ab68059dc274b | refs/heads/master | 2022-02-16T13:45:49.270833 | 2022-01-30T21:34:05 | 2022-01-30T21:34:05 | 236,577,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,093 | py | #!/bin/python3
"""Palette test.
Usage: pal.py < /usr/share/X11/rgb.txt.
Outputs RGB, hex, term hex, term dec, fg test, bg test, bg test RGB mode, name.
"""
# TODO: Use NamedColor dataclass. :)
# https://github.com/welbornprod/colr
# https://gist.github.com/XVilka/8346728
# https://lists.suckless.org/dev/1307/16688.html
# https://github.com/martanne/dvtm/issues/10
import sys
from typing import Tuple
import dataclasses
from dataclasses import dataclass
import colr
from colr import Colr
@dataclass(order=True, frozen=True)
class Color:
r: int
g: int
b: int
asdict = dataclasses.asdict
astuple = dataclasses.astuple
replace = dataclasses.astuple
@property
def rgb(self) -> Tuple[int]:
return tuple([self.r, self.g, self.b])
@property
def hex(self) -> str:
return colr.rgb2hex(*self.rgb)
@dataclass(order=True, frozen=True)
class NamedColor(Color):
name: str
def sanitize_line(line, commenter='!'):
"""Clean up input line."""
return line.split(commenter, 1)[0].strip()
def valid_lines(path):
"""Read and yield lines that are neither empty nor comments."""
with sys.stdin as fp:
yield from filter(None, (sanitize_line(x) for x in fp))
def main(sep=' '):
"""Palette test main function."""
for line in valid_lines(None):
r, g, b, name = line.split(maxsplit=3)
r, g, b = (int(x) for x in [r, g, b])
h = colr.rgb2hex(r, g, b)
th = colr.rgb2termhex(r, g, b)
t = colr.rgb2term(r, g, b)
d = dict(r=r, g=g, b=b, name=name, h=h, th=th, t=t)
d['testfg'] = Colr().hex(h, 'test', rgb_mode=False)
d['testbg'] = Colr().b_hex(h, 'test ', rgb_mode=False)
d['testbg_rgb'] = Colr().b_hex(h, ' ', rgb_mode=True)
fmt = sep.join(['{r:3} {g:3} {b:3}',
'0x{h}',
'0x{th}',
'{t:>3s}',
'{testfg}{testbg}{testbg_rgb}',
'{name}'])
print(fmt.format(**d))
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
d47df698bd174f7424065a3f0e7d5d20675c7592 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5688567749672960_0/Python/AmolMandhane/A.py | 5bb0596356fa4cdd30ac17540355451410276f60 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | def read(t):
return t(raw_input().strip())
def read_arr(t):
return map(t, raw_input().strip().split())
def rev_neg_num(n):
return int("-" + (str(n)[1:])[::-1])
memz = {}
for i in xrange(1, 10**6 + 1):
if i <= 20:
memz[i] = i
elif i % 10 == 0:
memz[i] = memz[i-1] + 1
else:
rev = int(str(i)[::-1])
if rev in memz:
memz[i] = min(memz[i-1] + 1, memz[rev] + 1)
else:
memz[i] = memz[i-1] + 1
def solve(N):
return memz[N]
solve(10**6)
for T in xrange(input()):
print "Case #%d:" % (T+1, ),
print solve(read(int))
| [
"[email protected]"
] | |
b2e928c6e9e3b48fb9c1e9551bce3ee13dff65e6 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/built-in/nlp/MT5_ID4146_for_PyTorch/transformers/tests/xlnet/test_modeling_xlnet.py | 4c49bfd1c08fb1a3fbe963a7d8faff8f8619bd44 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 27,825 | py | # coding=utf-8
# Copyright 2020 Huawei Technologies Co., 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 of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import random
import unittest
from transformers import XLNetConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device
from ..generation.test_generation_utils import GenerationTesterMixin
from ..test_configuration_common import ConfigTester
from ..test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
if is_torch_available():
import torch
from transformers import (
XLNetForMultipleChoice,
XLNetForQuestionAnswering,
XLNetForQuestionAnsweringSimple,
XLNetForSequenceClassification,
XLNetForTokenClassification,
XLNetLMHeadModel,
XLNetModel,
)
from transformers.models.xlnet.modeling_xlnet import XLNET_PRETRAINED_MODEL_ARCHIVE_LIST
class XLNetModelTester:
def __init__(
self,
parent,
batch_size=14,
seq_length=7,
mem_len=10,
clamp_len=-1,
reuse_len=15,
is_training=True,
use_labels=True,
vocab_size=99,
cutoffs=[10, 50, 80],
hidden_size=32,
num_attention_heads=4,
d_inner=128,
num_hidden_layers=5,
type_sequence_label_size=2,
untie_r=True,
bi_data=False,
same_length=False,
initializer_range=0.05,
seed=1,
type_vocab_size=2,
bos_token_id=1,
eos_token_id=2,
pad_token_id=5,
num_choices=4,
):
self.parent = parent
self.batch_size = 14
self.seq_length = 7
self.mem_len = 10
# self.key_len = seq_length + mem_len
self.clamp_len = -1
self.reuse_len = 15
self.is_training = True
self.use_labels = True
self.vocab_size = 99
self.cutoffs = [10, 50, 80]
self.hidden_size = 32
self.num_attention_heads = 4
self.d_inner = 128
self.num_hidden_layers = 5
self.type_sequence_label_size = 2
self.untie_r = True
self.bi_data = False
self.same_length = False
self.initializer_range = 0.05
self.seed = 1
self.type_vocab_size = 2
self.bos_token_id = 1
self.eos_token_id = 2
self.pad_token_id = 5
self.num_choices = 4
def prepare_config_and_inputs(self):
input_ids_1 = ids_tensor([self.batch_size, self.seq_length], self.vocab_size)
input_ids_2 = ids_tensor([self.batch_size, self.seq_length], self.vocab_size)
segment_ids = ids_tensor([self.batch_size, self.seq_length], self.type_vocab_size)
input_mask = random_attention_mask([self.batch_size, self.seq_length])
input_ids_q = ids_tensor([self.batch_size, self.seq_length + 1], self.vocab_size)
perm_mask = torch.zeros(
self.batch_size,
self.seq_length + 1,
self.seq_length + 1,
dtype=torch.float,
device=torch_device,
)
perm_mask[:, :, -1] = 1.0 # Previous tokens don't see last token
target_mapping = torch.zeros(
self.batch_size,
1,
self.seq_length + 1,
dtype=torch.float,
device=torch_device,
)
target_mapping[:, 0, -1] = 1.0 # predict last token
sequence_labels = None
lm_labels = None
is_impossible_labels = None
token_labels = None
if self.use_labels:
lm_labels = ids_tensor([self.batch_size, self.seq_length], self.vocab_size)
sequence_labels = ids_tensor([self.batch_size], self.type_sequence_label_size)
is_impossible_labels = ids_tensor([self.batch_size], 2).float()
token_labels = ids_tensor([self.batch_size, self.seq_length], self.type_vocab_size)
config = self.get_config()
return (
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
)
def get_config(self):
return XLNetConfig(
vocab_size=self.vocab_size,
d_model=self.hidden_size,
n_head=self.num_attention_heads,
d_inner=self.d_inner,
n_layer=self.num_hidden_layers,
untie_r=self.untie_r,
mem_len=self.mem_len,
clamp_len=self.clamp_len,
same_length=self.same_length,
reuse_len=self.reuse_len,
bi_data=self.bi_data,
initializer_range=self.initializer_range,
num_labels=self.type_sequence_label_size,
bos_token_id=self.bos_token_id,
pad_token_id=self.pad_token_id,
eos_token_id=self.eos_token_id,
)
def set_seed(self):
random.seed(self.seed)
torch.manual_seed(self.seed)
def create_and_check_xlnet_base_model(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetModel(config)
model.to(torch_device)
model.eval()
result = model(input_ids_1, input_mask=input_mask)
result = model(input_ids_1, attention_mask=input_mask)
result = model(input_ids_1, token_type_ids=segment_ids)
result = model(input_ids_1)
config.mem_len = 0
model = XLNetModel(config)
model.to(torch_device)
model.eval()
base_model_output = model(input_ids_1)
self.parent.assertEqual(len(base_model_output), 2)
self.parent.assertEqual(result.last_hidden_state.shape, (self.batch_size, self.seq_length, self.hidden_size))
self.parent.assertListEqual(
[mem.shape for mem in result.mems],
[(self.seq_length, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
def create_and_check_use_mems_train(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetForSequenceClassification(config)
model.to(torch_device)
model.train()
train_size = input_ids_1.shape[0]
batch_size = 4
for i in range(train_size // batch_size + 1):
input_ids = input_ids_1[i : (i + 1) * batch_size]
labels = sequence_labels[i : (i + 1) * batch_size]
outputs = model(input_ids=input_ids, labels=labels, return_dict=True)
self.parent.assertIsNone(outputs.mems)
self.parent.assertIsNotNone(outputs.loss)
def create_and_check_xlnet_model_use_mems(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetModel(config=config)
model.to(torch_device)
model.eval()
# first forward pass
causal_mask = torch.ones(
input_ids_1.shape[0],
input_ids_1.shape[1],
input_ids_1.shape[1],
dtype=torch.float,
device=torch_device,
)
causal_mask = torch.triu(causal_mask, diagonal=0)
outputs_cache = model(input_ids_1, use_mems=True, perm_mask=causal_mask)
outputs_no_cache = model(input_ids_1, use_mems=False, perm_mask=causal_mask)
outputs_conf = model(input_ids_1)
self.parent.assertTrue(len(outputs_cache) == len(outputs_conf))
self.parent.assertTrue(len(outputs_cache) == len(outputs_no_cache) + 1)
output, mems = outputs_cache.to_tuple()
# create hypothetical next token and extent to next_input_ids
next_tokens = ids_tensor((self.batch_size, 1), config.vocab_size)
# append to next input_ids and token_type_ids
next_input_ids = torch.cat([input_ids_1, next_tokens], dim=-1)
# causal mask
causal_mask = torch.ones(
input_ids_1.shape[0],
input_ids_1.shape[1] + 1,
input_ids_1.shape[1] + 1,
dtype=torch.float,
device=torch_device,
)
causal_mask = torch.triu(causal_mask, diagonal=0)
single_mask = torch.ones(input_ids_1.shape[0], 1, 1, dtype=torch.float, device=torch_device)
# second forward pass
output_from_no_past = model(next_input_ids, perm_mask=causal_mask)["last_hidden_state"]
output_from_past = model(next_tokens, mems=mems, perm_mask=single_mask)["last_hidden_state"]
# select random slice
random_slice_idx = ids_tensor((1,), output_from_past.shape[-1]).item()
output_from_no_past_slice = output_from_no_past[:, -1, random_slice_idx].detach()
output_from_past_slice = output_from_past[:, 0, random_slice_idx].detach()
# test that outputs are equal for slice
self.parent.assertTrue(torch.allclose(output_from_past_slice, output_from_no_past_slice, atol=1e-3))
def create_and_check_xlnet_base_model_with_att_output(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetModel(config)
model.to(torch_device)
model.eval()
attentions = model(input_ids_1, target_mapping=target_mapping, output_attentions=True)["attentions"]
self.parent.assertEqual(len(attentions), config.n_layer)
self.parent.assertIsInstance(attentions[0], tuple)
self.parent.assertEqual(len(attentions[0]), 2)
self.parent.assertTrue(attentions[0][0].shape, attentions[0][0].shape)
def create_and_check_xlnet_lm_head(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetLMHeadModel(config)
model.to(torch_device)
model.eval()
result1 = model(input_ids_1, token_type_ids=segment_ids, labels=lm_labels)
result2 = model(input_ids_2, token_type_ids=segment_ids, labels=lm_labels, mems=result1.mems)
_ = model(input_ids_q, perm_mask=perm_mask, target_mapping=target_mapping)
self.parent.assertEqual(result1.loss.shape, ())
self.parent.assertEqual(result1.logits.shape, (self.batch_size, self.seq_length, self.vocab_size))
self.parent.assertListEqual(
[mem.shape for mem in result1.mems],
[(self.seq_length, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
self.parent.assertEqual(result2.loss.shape, ())
self.parent.assertEqual(result2.logits.shape, (self.batch_size, self.seq_length, self.vocab_size))
self.parent.assertListEqual(
[mem.shape for mem in result2.mems],
[(self.mem_len, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
def create_and_check_xlnet_qa(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetForQuestionAnswering(config)
model.to(torch_device)
model.eval()
result = model(input_ids_1)
result_with_labels = model(
input_ids_1,
start_positions=sequence_labels,
end_positions=sequence_labels,
cls_index=sequence_labels,
is_impossible=is_impossible_labels,
p_mask=input_mask,
)
result_with_labels = model(
input_ids_1,
start_positions=sequence_labels,
end_positions=sequence_labels,
cls_index=sequence_labels,
is_impossible=is_impossible_labels,
)
total_loss, mems = result_with_labels.to_tuple()
result_with_labels = model(
input_ids_1,
start_positions=sequence_labels,
end_positions=sequence_labels,
)
total_loss, mems = result_with_labels.to_tuple()
self.parent.assertEqual(result_with_labels.loss.shape, ())
self.parent.assertEqual(result.start_top_log_probs.shape, (self.batch_size, model.config.start_n_top))
self.parent.assertEqual(result.start_top_index.shape, (self.batch_size, model.config.start_n_top))
self.parent.assertEqual(
result.end_top_log_probs.shape, (self.batch_size, model.config.start_n_top * model.config.end_n_top)
)
self.parent.assertEqual(
result.end_top_index.shape, (self.batch_size, model.config.start_n_top * model.config.end_n_top)
)
self.parent.assertEqual(result.cls_logits.shape, (self.batch_size,))
self.parent.assertListEqual(
[mem.shape for mem in result.mems],
[(self.seq_length, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
def create_and_check_xlnet_token_classif(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetForTokenClassification(config)
model.to(torch_device)
model.eval()
result = model(input_ids_1)
result = model(input_ids_1, labels=token_labels)
self.parent.assertEqual(result.loss.shape, ())
self.parent.assertEqual(result.logits.shape, (self.batch_size, self.seq_length, self.type_sequence_label_size))
self.parent.assertListEqual(
[mem.shape for mem in result.mems],
[(self.seq_length, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
def create_and_check_xlnet_sequence_classif(
self,
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
):
model = XLNetForSequenceClassification(config)
model.to(torch_device)
model.eval()
result = model(input_ids_1)
result = model(input_ids_1, labels=sequence_labels)
self.parent.assertEqual(result.loss.shape, ())
self.parent.assertEqual(result.logits.shape, (self.batch_size, self.type_sequence_label_size))
self.parent.assertListEqual(
[mem.shape for mem in result.mems],
[(self.seq_length, self.batch_size, self.hidden_size)] * self.num_hidden_layers,
)
def prepare_config_and_inputs_for_common(self):
config_and_inputs = self.prepare_config_and_inputs()
(
config,
input_ids_1,
input_ids_2,
input_ids_q,
perm_mask,
input_mask,
target_mapping,
segment_ids,
lm_labels,
sequence_labels,
is_impossible_labels,
token_labels,
) = config_and_inputs
inputs_dict = {"input_ids": input_ids_1}
return config, inputs_dict
@require_torch
class XLNetModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.TestCase):
all_model_classes = (
(
XLNetModel,
XLNetLMHeadModel,
XLNetForTokenClassification,
XLNetForSequenceClassification,
XLNetForQuestionAnswering,
XLNetForQuestionAnsweringSimple,
XLNetForMultipleChoice,
)
if is_torch_available()
else ()
)
all_generative_model_classes = (
(XLNetLMHeadModel,) if is_torch_available() else ()
) # TODO (PVP): Check other models whether language generation is also applicable
test_pruning = False
# XLNet has 2 QA models -> need to manually set the correct labels for one of them here
def _prepare_for_class(self, inputs_dict, model_class, return_labels=False):
inputs_dict = super()._prepare_for_class(inputs_dict, model_class, return_labels=return_labels)
if return_labels:
if model_class.__name__ == "XLNetForQuestionAnswering":
inputs_dict["start_positions"] = torch.zeros(
self.model_tester.batch_size, dtype=torch.long, device=torch_device
)
inputs_dict["end_positions"] = torch.zeros(
self.model_tester.batch_size, dtype=torch.long, device=torch_device
)
return inputs_dict
def setUp(self):
self.model_tester = XLNetModelTester(self)
self.config_tester = ConfigTester(self, config_class=XLNetConfig, d_inner=37)
def test_config(self):
self.config_tester.run_common_tests()
def test_xlnet_base_model(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_base_model(*config_and_inputs)
def test_xlnet_base_model_use_mems(self):
# checking that in auto-regressive mode, `use_mems` gives the same results
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_model_use_mems(*config_and_inputs)
def test_seq_classification_use_mems_train(self):
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_use_mems_train(*config_and_inputs)
def test_xlnet_base_model_with_att_output(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_base_model_with_att_output(*config_and_inputs)
def test_xlnet_lm_head(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_lm_head(*config_and_inputs)
def test_xlnet_sequence_classif(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_sequence_classif(*config_and_inputs)
def test_xlnet_token_classif(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_token_classif(*config_and_inputs)
def test_xlnet_qa(self):
self.model_tester.set_seed()
config_and_inputs = self.model_tester.prepare_config_and_inputs()
self.model_tester.create_and_check_xlnet_qa(*config_and_inputs)
def test_retain_grad_hidden_states_attentions(self):
# xlnet cannot keep gradients in attentions or hidden states
return
# overwrite from test_modeling_common
def _mock_init_weights(self, module):
if hasattr(module, "weight") and module.weight is not None:
module.weight.data.fill_(3)
if hasattr(module, "bias") and module.bias is not None:
module.bias.data.fill_(3)
for param in ["q", "k", "v", "o", "r", "r_r_bias", "r_s_bias", "r_w_bias", "seg_embed", "mask_emb"]:
if hasattr(module, param) and getattr(module, param) is not None:
weight = getattr(module, param)
weight.data.fill_(3)
def _check_hidden_states_for_generate(
self, batch_size, hidden_states, min_length, max_length, config, use_cache=False, num_beam_groups=1
):
self.assertIsInstance(hidden_states, tuple)
self.assertListEqual(
[isinstance(iter_hidden_states, tuple) for iter_hidden_states in hidden_states],
[True] * len(hidden_states),
)
self.assertEqual(len(hidden_states), (max_length - min_length) * num_beam_groups)
for idx, iter_hidden_states in enumerate(hidden_states):
# check hidden size
for i, layer_hidden_states in enumerate(iter_hidden_states):
# every 2nd tensor is from extra stream
if i % 2 != 0:
seq_len = 1
else:
# for first item dummy PAD token is appended so need one more
seq_len = (min_length + 1) if idx == 0 else min_length
expected_shape = (batch_size * num_beam_groups, seq_len, config.hidden_size)
self.assertEqual(layer_hidden_states.shape, expected_shape)
def _check_attentions_for_generate(
self, batch_size, attentions, min_length, max_length, config, use_cache=False, num_beam_groups=1
):
self.assertIsInstance(attentions, tuple)
self.assertListEqual(
[isinstance(iter_attentions, tuple) for iter_attentions in attentions], [True] * len(attentions)
)
self.assertEqual(len(attentions), (max_length - min_length) * num_beam_groups)
for idx, attentions_item in enumerate(attentions):
for iter_attentions in attentions_item:
tgt_len = min_length
# for first item dummy PAD token is appended so need one more
if idx == 0:
tgt_len += 1
src_len = min_length + idx + 1
expected_shape = (
batch_size * num_beam_groups,
config.num_attention_heads,
tgt_len,
src_len,
)
# check attn size
self.assertListEqual(
[layer_attention.shape for layer_attention in iter_attentions],
[expected_shape] * len(iter_attentions),
)
@slow
def test_model_from_pretrained(self):
for model_name in XLNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
model = XLNetModel.from_pretrained(model_name)
self.assertIsNotNone(model)
@require_torch
class XLNetModelLanguageGenerationTest(unittest.TestCase):
@slow
def test_lm_generate_xlnet_base_cased(self):
model = XLNetLMHeadModel.from_pretrained("xlnet-base-cased")
model.to(torch_device)
# fmt: off
input_ids = torch.tensor(
[
[
67, 2840, 19, 18, 1484, 20, 965, 29077, 8719, 1273, 21, 45, 273, 17, 10, 15048, 28, 27511, 21, 4185, 11, 41, 2444, 9, 32, 1025, 20, 8719, 26, 23, 673, 966, 19, 29077, 20643, 27511, 20822, 20643, 19, 17, 6616, 17511, 18, 8978, 20, 18, 777, 9, 19233, 1527, 17669, 19, 24, 673, 17, 28756, 150, 12943, 4354, 153, 27, 442, 37, 45, 668, 21, 24, 256, 20, 416, 22, 2771, 4901, 9, 12943, 4354, 153, 51, 24, 3004, 21, 28142, 23, 65, 20, 18, 416, 34, 24, 2958, 22947, 9, 1177, 45, 668, 3097, 13768, 23, 103, 28, 441, 148, 48, 20522, 19, 12943, 4354, 153, 12860, 34, 18, 326, 27, 17492, 684, 21, 6709, 9, 8585, 123, 266, 19, 12943, 4354, 153, 6872, 24, 3004, 20, 18, 9225, 2198, 19, 12717, 103, 22, 401, 24, 6348, 9, 12943, 4354, 153, 1068, 2768, 2286, 19, 33, 104, 19, 176, 24, 9313, 19, 20086, 28, 45, 10292, 9, 4, 3,
]
],
dtype=torch.long,
device=torch_device,
)
# fmt: on
# In 1991, the remains of Russian Tsar Nicholas II and his family
# (except for Alexei and Maria) are discovered.
# The voice of Nicholas's young son, Tsarevich Alexei Nikolaevich, narrates the
# remainder of the story. 1883 Western Siberia,
# a young Grigori Rasputin is asked by his father and a group of men to perform magic.
# Rasputin has a vision and denounces one of the men as a horse thief. Although his
# father initially slaps him for making such an accusation, Rasputin watches as the
# man is chased outside and beaten. Twenty years later, Rasputin sees a vision of
# the Virgin Mary, prompting him to become a priest. Rasputin quickly becomes famous,
# with people, even a bishop, begging for his blessing. """
# fmt: off
expected_output_ids = [
67, 2840, 19, 18, 1484, 20, 965, 29077, 8719, 1273, 21, 45, 273, 17, 10, 15048, 28, 27511, 21, 4185, 11, 41, 2444, 9, 32, 1025, 20, 8719, 26, 23, 673, 966, 19, 29077, 20643, 27511, 20822, 20643, 19, 17, 6616, 17511, 18, 8978, 20, 18, 777, 9, 19233, 1527, 17669, 19, 24, 673, 17, 28756, 150, 12943, 4354, 153, 27, 442, 37, 45, 668, 21, 24, 256, 20, 416, 22, 2771, 4901, 9, 12943, 4354, 153, 51, 24, 3004, 21, 28142, 23, 65, 20, 18, 416, 34, 24, 2958, 22947, 9, 1177, 45, 668, 3097, 13768, 23, 103, 28, 441, 148, 48, 20522, 19, 12943, 4354, 153, 12860, 34, 18, 326, 27, 17492, 684, 21, 6709, 9, 8585, 123, 266, 19, 12943, 4354, 153, 6872, 24, 3004, 20, 18, 9225, 2198, 19, 12717, 103, 22, 401, 24, 6348, 9, 12943, 4354, 153, 1068, 2768, 2286, 19, 33, 104, 19, 176, 24, 9313, 19, 20086, 28, 45, 10292, 9, 4, 3, 19, 12943, 4354, 153, 27, 442, 22, 2771, 4901, 9, 69, 27, 442, 22, 2771, 24, 11335, 20, 18, 9225, 2198, 9, 69, 27, 442, 22, 2771, 24, 11335, 20, 18, 9225, 2198, 9, 69, 27, 442, 22, 2771,
]
# fmt: on
# In 1991, the remains of Russian Tsar Nicholas II and his family (except for Alexei and Maria)
# are discovered. The voice of Nicholas's young son, Tsarevich Alexei Nikolaevich,
# narrates the remainder of the story. 1883 Western Siberia, a young Grigori Rasputin
# is asked by his father and a group of men to perform magic. Rasputin has a vision and
# denounces one of the men as a horse thief. Although his father initially slaps
# him for making such an accusation, Rasputin watches as the man is chased outside and beaten.
# Twenty years later, Rasputin sees a vision of the Virgin Mary, prompting him to become a priest.
# Rasputin quickly becomes famous, with people, even a bishop, begging for his blessing.
# <sep><cls>, Rasputin is asked to perform magic. He is asked to perform a ritual of the Virgin Mary.
# He is asked to perform a ritual of the Virgin Mary. He is asked to perform
output_ids = model.generate(input_ids, max_length=200, do_sample=False)
self.assertListEqual(output_ids[0].tolist(), expected_output_ids)
| [
"[email protected]"
] | |
dd6adcded703c7b5d133c3bb7418f048182b934a | 492693d325dad3adcb09601c54a5b7b0d00cfdef | /drf_admin/apps/system/filters/users.py | 05bb23c86a66cdae77dce35a652ec0732e0e1343 | [
"MIT"
] | permissive | HHHyuming/drf_admin | c682e7c284a9747175a81833aacb5e3fc67a2e42 | 956ab1a96964a8af06b0697e228a3d4238dce109 | refs/heads/master | 2023-03-19T23:52:06.521389 | 2021-03-10T15:28:50 | 2021-03-10T15:28:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | # -*- coding: utf-8 -*-
"""
@author : Wang Meng
@github : https://github.com/tianpangji
@software : PyCharm
@file : users.py
@create : 2020/9/15 21:59
"""
import django_filters
from drf_admin.common.models import get_child_ids
from oauth.models import Users
from system.models import Departments
class UsersFilter(django_filters.rest_framework.FilterSet):
"""自定义用户管理过滤器"""
department_id = django_filters.rest_framework.NumberFilter(method='department_service_filter')
class Meta:
model = Users
fields = ['is_active', 'department_id']
def department_service_filter(self, queryset, name, value):
"""过滤该部门及所有子部门下的用户"""
return queryset.filter(department_id__in=get_child_ids(value, Departments))
| [
"[email protected]"
] | |
b8c1283bf4b251b33a832ef5172ab46c47722029 | 8aa1b94626402c0c614128d6061edb771dad05cf | /qt/qt02/qt25_button.py | db8d1e1c0f9f6b451a2d54f73a5b882cd94054c0 | [] | no_license | netfj/Project_Stu02 | 31e76c1b656ee74c54cae2185821dec7ccf50401 | afc1b26b7c586fd6979ab574c7d357a6b9ef4d29 | refs/heads/master | 2023-03-13T22:24:40.364167 | 2021-02-23T09:53:31 | 2021-02-23T09:53:31 | 341,506,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,720 | py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qt25_button.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 300)
self.pushButton = QtWidgets.QPushButton(Form)
self.pushButton.setGeometry(QtCore.QRect(10, 10, 101, 41))
self.pushButton.setObjectName("pushButton")
self.toolButton = QtWidgets.QToolButton(Form)
self.toolButton.setGeometry(QtCore.QRect(140, 10, 231, 31))
self.toolButton.setObjectName("toolButton")
self.radioButton = QtWidgets.QRadioButton(Form)
self.radioButton.setGeometry(QtCore.QRect(10, 60, 101, 31))
self.radioButton.setObjectName("radioButton")
self.cb1 = QtWidgets.QCheckBox(Form)
self.cb1.setGeometry(QtCore.QRect(10, 110, 61, 31))
self.cb1.setObjectName("cb1")
self.commandLinkButton = QtWidgets.QCommandLinkButton(Form)
self.commandLinkButton.setGeometry(QtCore.QRect(0, 160, 167, 41))
self.commandLinkButton.setObjectName("commandLinkButton")
self.buttonBox = QtWidgets.QDialogButtonBox(Form)
self.buttonBox.setGeometry(QtCore.QRect(10, 246, 166, 31))
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.checkBox_2 = QtWidgets.QCheckBox(Form)
self.checkBox_2.setGeometry(QtCore.QRect(80, 110, 61, 31))
self.checkBox_2.setObjectName("checkBox_2")
self.cb3 = QtWidgets.QCheckBox(Form)
self.cb3.setGeometry(QtCore.QRect(150, 110, 61, 31))
self.cb3.setObjectName("cb3")
self.cb4 = QtWidgets.QCheckBox(Form)
self.cb4.setGeometry(QtCore.QRect(220, 110, 61, 31))
self.cb4.setObjectName("cb4")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.pushButton.setText(_translate("Form", "PushButton"))
self.toolButton.setText(_translate("Form", "..."))
self.radioButton.setText(_translate("Form", "RadioButton"))
self.cb1.setText(_translate("Form", "CheckBox"))
self.commandLinkButton.setText(_translate("Form", "CommandLinkButton"))
self.checkBox_2.setText(_translate("Form", "CheckBox"))
self.cb3.setText(_translate("Form", "CheckBox"))
self.cb4.setText(_translate("Form", "CheckBox"))
| [
"[email protected]"
] | |
b755f56b7ba2723287bbd6c93ecde85a202b8645 | 008ea0c503829f33840495373ad3d60794575af3 | /PYDayByDay/Tkinter_ST/Button_TK/Button5.py | ec2ebc8db2d86596950f4aed52bd0b1193cfc593 | [] | no_license | JyHu/PYStudy | 6515bea47ca6f80e336f3b6a7a14b1159fde872f | ec0855c414237bdd7d0cb28f79a81c02ccd52d45 | refs/heads/master | 2016-08-12T19:44:06.723361 | 2016-04-11T10:38:59 | 2016-04-11T10:38:59 | 45,384,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | #coding=utf-8
__author__ = 'JinyouHU'
from Tkinter import *
root = Tk()
b1 = Button(root, text='30×1', width=30, height=2)
b1.pack()
b2 = Button(root, text='30×2')
b2['width'] = 30
b2['height'] = 3
b2.pack()
b3 = Button(root, text='30×3')
b3.configure(width=30, height=3)
b3.pack()
root.mainloop() | [
"[email protected]"
] | |
4f83c7c667f9390704dc94f81efa7f2c72f39e64 | 1d96db84225301d972f07cad95c2a13f4fbafa84 | /PyROOT/GravityStudies/simple_two_body_gravity.py | 127826731c166fee2374beef04ad4c9c01ab5e6a | [] | no_license | mattbellis/matts-work-environment | 9eb9b25040dd8fb4a444819b01a80c2d5342b150 | 41988f3c310f497223445f16e2537e8d1a3f71bc | refs/heads/master | 2023-08-23T09:02:37.193619 | 2023-08-09T05:36:32 | 2023-08-09T05:36:32 | 32,194,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,629 | py | #!/usr/bin/env python
from numpy import array
import ROOT
from ROOT import *
from color_palette import *
import sys
from optparse import OptionParser
import re
import random as rnd
################################################################################
################################################################################
################################################################################
################################################################################
def main(argv):
parser = OptionParser()
parser.add_option("-m", "--max", dest="max", default=1e9,
help="Max games to read in.")
parser.add_option("--tag", dest="tag", default=None,
help="Tag for output files.")
parser.add_option("--batch", dest="batch", default=False,
action="store_true", help="Run in batch mode.")
(options, args) = parser.parse_args()
# Style options
gStyle.SetOptStat(0)
set_palette("palette",50)
############################################################################
# Declare the canvases
############################################################################
num_can = 1
can = []
for i in range(0,num_can):
name = "can%d" % (i)
if i<2:
can.append(TCanvas(name,"",10+10*i,10+10*i,1350,700))
else:
can.append(TCanvas(name,"",10+10*i,10+10*i,700,700))
can[i].SetFillColor(0)
can[i].Divide(1,1)
############################################################################
# Declare some histograms
############################################################################
lo = 0.0
hi = 1.0
color = 2
nbins = 100
h = []
for i in range(0,5):
name = "h%d" % (i)
h.append(TH1F(name,"",nbins, lo, hi))
h[i].SetFillStyle(1000)
h[i].SetFillColor(color)
h[i].SetTitle("")
h[i].SetNdivisions(8)
h[i].GetYaxis().SetTitle("# occurances")
h[i].GetYaxis().SetTitleSize(0.09)
h[i].GetYaxis().SetTitleFont(42)
h[i].GetYaxis().SetTitleOffset(0.7)
h[i].GetYaxis().CenterTitle()
h[i].GetXaxis().SetTitle("Arbitrary measurements")
h[i].GetXaxis().SetLabelSize(0.12)
h[i].GetXaxis().SetTitleSize(0.10)
h[i].GetXaxis().SetTitleFont(42)
h[i].GetXaxis().SetTitleOffset(1.0)
h[i].GetXaxis().CenterTitle()
h[i].SetMinimum(0)
h2D = []
for i in range(0,5):
name = "h2D%d" % (i)
h2D.append(TH2F(name,"",nbins, lo, hi, nbins, lo, hi))
h2D[i].SetFillStyle(1000)
h2D[i].SetFillColor(color)
h2D[i].SetTitle("")
h2D[i].SetNdivisions(8)
h2D[i].GetYaxis().SetTitleSize(0.09)
h2D[i].GetYaxis().SetTitleFont(42)
h2D[i].GetYaxis().SetTitleOffset(0.7)
h2D[i].GetYaxis().CenterTitle()
h2D[i].GetYaxis().SetTitle("Visitng team")
h2D[i].GetXaxis().SetTitle("Home team")
#h2D[i].GetXaxis().SetLabelSize(0.09)
h2D[i].GetXaxis().SetTitleSize(0.09)
h2D[i].GetXaxis().SetTitleFont(42)
h2D[i].GetXaxis().SetTitleOffset(0.7)
h2D[i].GetXaxis().CenterTitle()
h2D[i].SetMinimum(0)
############################################################################
# Set some physics quantitites
############################################################################
grav_constant = 100.0
mass = 5.0
# Save time, radius and mag of momentum
recorded_values = [array('d'),array('d'),array('d')]
############################################################################
# Build the particles using velocity and position
############################################################################
num_particles = 2.0
particles = []
for i in range(0,num_particles):
# Place the particles at 10.0 and -10.0 on z-axis with 0 momentum.
z = 100.0
if i==1:
z = -100.0
pos = TVector3(0.0,0.0,z)
vel = TVector3(0.0,0.0,0.0)
prev_pos = TVector3(pos)
particles.append((pos,vel,prev_pos))
############################################################################
# Calculate the motion of two bodies
############################################################################
t = 0
dt = 0.10
num_time_steps = 0
# Declare these once for use later
force = TVector3()
direction = TVector3()
minimum_distance_allowable = 1.0
smallest_distance = 1000000.0
while smallest_distance>minimum_distance_allowable:
print t
# Copy the current position to the previous position
for p in (particles):
p[2].SetXYZ(p[0].X(),p[0].Y(),p[0].Z())
for p in particles:
# Clear out the force vector
force.SetXYZ(0.0,0.0,0.0)
# Calculate the forces and then move them
# Loop over all the other particles to calculate the sum of the
# forces on our one particle
for q in particles:
if p is not q:
#print "print pz and qz: %f %f" % (p[2].Z(),q[2].Z())
direction.SetXYZ(p[2].X(),p[2].Y(),p[2].Z())
direction -= q[2]
distance = direction.Mag()
print "distance: %f" % (distance)
if distance<smallest_distance:
smallest_distance=distance
# Take into account the normalization that will have to be done.
force_mag = grav_constant * mass * mass/(distance*distance*distance)
# direction will now actually be the full force vector
direction *= (-force_mag)
force += direction
# Update the momentum
# Make force the momentum and then add it
force *= dt
force.Print()
p[1].SetXYZ(p[1].X()+force.X(), p[1].Y()+force.Y(), p[1].Z()+force.Z())
# Update the new position
p[0].SetXYZ(p[0].X()+p[1].X()*dt, p[0].Y()+p[1].Y()*dt, p[0].Z()+p[1].Z()*dt)
# Save the radius and the magnitude of momentum
recorded_values[0].append(t)
print "recorded values: %f %f" % (p[0].Mag(),p[1].Mag())
recorded_values[1].append(p[0].Mag())
recorded_values[2].append(p[1].Mag())
dt = smallest_distance/1000.0
t += dt
num_time_steps += 1
if num_time_steps>500:
break
print "num_time_steps: %d" % (num_time_steps)
npts = len(recorded_values[0])
gr = TGraph(npts,recorded_values[1],recorded_values[2])
can[0].cd(1)
gr.Draw("ap*")
gPad.Update()
'''
if options.tag != None:
name = "Plots/sportsplots%s_%d.eps" % (options.tag,i)
can[0].SaveAs(name)
'''
################################################################################
## Wait for input to keep the GUI (which lives on a ROOT event dispatcher) alive
if not options.batch:
rep = ''
while not rep in [ 'q', 'Q' ]:
rep = raw_input( 'enter "q" to quit: ' )
if 1 < len(rep):
rep = rep[0]
################################################################################
################################################################################
if __name__ == '__main__':
main(sys.argv)
| [
"[email protected]"
] | |
cd5a0b0b1682d29c17e75d6a1b541dc02fb23777 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/inspections/PyUnresolvedReferencesInspection/EnabledNumpyPyiStubs/numpy/__init__.pyi | 3fe816ef1bcfa0c823bec1d197398928bb88a52d | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 59 | pyi | from .core import baz as baz
def foo(): ...
def bar(): ... | [
"[email protected]"
] | |
e2faec65704111af5e54413795ed61640756088f | 8f24e443e42315a81028b648e753c50967c51c78 | /rllib/utils/debug/deterministic.py | f41fdabf323bfc57abe2db545babe1a292825d7c | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | simon-mo/ray | d07efdada8d05c6e10417f96e8dfc35f9ad33397 | 1e42e6cd15e2fb96c217cba8484e59ed0ef4b0c8 | refs/heads/master | 2023-03-06T00:09:35.758834 | 2022-12-23T18:46:48 | 2022-12-23T18:46:48 | 122,156,396 | 4 | 2 | Apache-2.0 | 2023-03-04T08:56:56 | 2018-02-20T04:47:06 | Python | UTF-8 | Python | false | false | 1,805 | py | import numpy as np
import os
import random
from typing import Optional
from ray.rllib.utils.annotations import DeveloperAPI
from ray.rllib.utils.framework import try_import_tf, try_import_torch
@DeveloperAPI
def update_global_seed_if_necessary(
framework: Optional[str] = None, seed: Optional[int] = None
) -> None:
"""Seed global modules such as random, numpy, torch, or tf.
This is useful for debugging and testing.
Args:
framework: The framework specifier (may be None).
seed: An optional int seed. If None, will not do
anything.
"""
if seed is None:
return
# Python random module.
random.seed(seed)
# Numpy.
np.random.seed(seed)
# Torch.
if framework == "torch":
torch, _ = try_import_torch()
torch.manual_seed(seed)
# See https://github.com/pytorch/pytorch/issues/47672.
cuda_version = torch.version.cuda
if cuda_version is not None and float(torch.version.cuda) >= 10.2:
os.environ["CUBLAS_WORKSPACE_CONFIG"] = "4096:8"
else:
try:
from packaging.version import Version
except ImportError:
from distutils.version import LooseVersion as Version
if Version(torch.__version__) >= Version("1.8.0"):
# Not all Operations support this.
torch.use_deterministic_algorithms(True)
else:
torch.set_deterministic(True)
# This is only for Convolution no problem.
torch.backends.cudnn.deterministic = True
elif framework == "tf2":
tf1, tf, tfv = try_import_tf()
# Tf2.x.
if tfv == 2:
tf.random.set_seed(seed)
# Tf1.x.
else:
tf1.set_random_seed(seed)
| [
"[email protected]"
] | |
2356b0c0ef247eac6f4c60a788c1a6f5bdcf1bd6 | 8bab45756c78e4da7854b899be23c075ff1a170c | /0x03-caching/3-lru_cache.py | d9d80241177193ae3221e6047c536c3521c3ba2c | [] | no_license | Jesus-Acevedo-Cano/holbertonschool-web_back_end | a8b06484b0705935229eb691be0de15b304339d9 | 0c068b19bb11d6194f97c0157cadffd7da44458f | refs/heads/main | 2023-02-17T23:46:24.844689 | 2021-01-09T03:44:57 | 2021-01-09T03:44:57 | 305,505,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 913 | py | #!/usr/bin/python3
""" LRU caching """
from base_caching import BaseCaching
class LRUCache(BaseCaching):
""" LRU cache class """
def __init__(self):
""" constructor """
self.cache = []
super().__init__()
def put(self, key, item):
""" Add an item in the cache """
if key and item:
if key in self.cache_data:
self.cache.remove(key)
self.cache_data[key] = item
self.cache.append(key)
if len(self.cache_data) > BaseCaching.MAX_ITEMS:
discard = self.cache.pop(0)
del self.cache_data[discard]
print("DISCARD: {}".format(discard))
def get(self, key):
""" Get an item by key """
if key is None or key not in self.cache_data:
return None
self.cache.remove(key)
self.cache.append(key)
return self.cache_data[key]
| [
"[email protected]"
] | |
79eb01e2b3ea229ffdcd8620512e8b6ea1605ca4 | f86202fe01c203d6974e35daf6afbf0506607078 | /src/restrepo/restrepo/db/scan_images.py | 79dc823572a861edabf9260163f30c23a6afdfc7 | [] | no_license | sejarah-nusantara/repository | f83701697bd14b920b6dc825509124bcad4c5891 | 350d15823b3931f01f2db657b20cd93ac7d10a70 | refs/heads/master | 2021-01-25T13:06:10.833973 | 2018-03-02T04:22:14 | 2018-03-02T04:22:14 | 123,528,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 587 | py | from sqlalchemy import Table, Column, Integer, String, Boolean, ForeignKey
from restrepo.db import metadata
from restrepo.db.mixins import DictAble
scan_image = Table('scan_image', metadata,
Column('id', Integer, primary_key=True),
Column('scan_number', Integer, ForeignKey('scan.number'), index=True),
Column('filename', String(255), index=True),
Column('is_default', Boolean),
)
class ScanImage(DictAble):
"An image linked to a scan. Can be the default one."
def __init__(self, **kwdata):
for k, v in kwdata.items():
setattr(self, k, v)
| [
"[email protected]"
] | |
dfc0feb317cf6bd4b82e6d55a8e2183e13948bd5 | d957b7167e7e24ac8432a936434bf7b561201fd8 | /backend/users/migrations/0002_auto_20200611_0743.py | 2207997a2eb78db89cfd152ff95d46a6c050546f | [] | no_license | crowdbotics-apps/digital-rehab-18007 | ee0f874fab956f47a7db4ceb5578da6ab8872294 | 19c9b4575112bae81db0dc5b8a6446266ed308cd | refs/heads/master | 2022-10-09T14:43:48.195386 | 2020-06-11T07:57:43 | 2020-06-11T07:57:43 | 271,390,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # Generated by Django 2.2.13 on 2020-06-11 07:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("users", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="user",
name="name",
field=models.CharField(blank=True, max_length=255, null=True),
),
]
| [
"[email protected]"
] | |
e91824981b8e94f7b2eb6375ede494f624e1cc26 | e0db13bc8113fb7b383d0a8d09e09686668e2fb4 | /Data-Structures-and-Algorithms/Undirected-Graph-using-Adjacency-Matrix.py | 9b90ba566c0e5827a845026d3e22283f4d2d1964 | [] | no_license | nirmalnishant645/Python-Programming | dd66acd665af8933fa14b19d01300deb1eccbb7d | 70e97e6f35f125acfde3b38e1baa794a357b8a77 | refs/heads/master | 2022-06-03T12:41:56.483000 | 2022-05-12T10:54:59 | 2022-05-12T10:54:59 | 151,211,590 | 3 | 5 | null | 2020-02-12T05:48:59 | 2018-10-02T06:44:54 | HTML | UTF-8 | Python | false | false | 1,367 | py | '''
The Implementation will be same as Directed Graph, but this time the connection will be done both ways.
If v1 => v2 then v2 => v1
Or v1 <=> v2
'''
# Simple Graph Implementation
class Graph:
def __init__(self, number_of_nodes): # Initialise Graph Data Structure
self.number_of_nodes = number_of_nodes + 1 # Number of nodes will have to be increased by one
self.graph = [[0 for x in range(number_of_nodes + 1)] for y in range(number_of_nodes + 1)]
def withInBounds(self, v1, v2): # Function to check if the value is within matrix bounds
return v1 >= 0 and v1 <= self.number_of_nodes and v2 >= 0 and v2 <= self.number_of_nodes
def insertEdge(self, v1, v2): # Function to inser edge in the Graph
if self.withInBounds(v1, v2): # Check if values are within bounds
self.graph[v1][v2] = 1 # Change the value of the node from 0 to 1
self.graph[v2][v1] = 1 # Adding the two way relation between the vertices to make in undirected
def printGraph(self): # Functipon to Print Graph
for i in range(self.number_of_nodes):
for j in range(len(self.graph[i])):
if self.graph[i][j]:
print(i, '=>', j)
g = Graph(5)
g.insertEdge(1, 2)
g.insertEdge(2, 3)
g.insertEdge(4, 5)
g.printGraph()
'''
Output:
1 => 2
2 => 1
2 => 3
3 => 2
4 => 5
5 => 4
''' | [
"[email protected]"
] | |
fdde462ec23e0151a6b473387539fb36d35269e1 | 1a9852fe468f18e1ac3042c09286ccda000a4135 | /Specialist Certificate in Data Analytics Essentials/DataCamp/02-python-data-science-toolbox-part-2/e28_processing_data_in_chunks1.py | 31e985b2bc89768a7d90f08c68af9418f77a0890 | [] | no_license | sarmabhamidipati/UCD | 452b2f1e166c1079ec06d78e473730e141f706b2 | 101ca3152207e2fe67cca118923896551d5fee1c | refs/heads/master | 2023-08-14T15:41:24.312859 | 2021-09-22T17:33:01 | 2021-09-22T17:33:01 | 386,592,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | """
Processing data in chunks (1)
The csv file 'world_dev_ind.csv' is in your current directory for your use. To begin, you need to open a connection
to this file using what is known as a context manager. For example, the command with open('datacamp.csv')
as datacamp binds the csv file 'datacamp.csv' as datacamp in the context manager. Here, the with statement
is the context manager, and its purpose is to ensure that resources are efficiently allocated
when opening a connection to a file.
Instructions
100 XP
Use open() to bind the csv file 'world_dev_ind.csv' as file in the context manager.
Complete the for loop so that it iterates 1000 times to perform the loop body and process only the
first 1000 rows of data of the file.
"""
# Open a connection to the file
with open('world_dev_ind.csv') as file:
# Skip the column names
file.readline()
# Initialize an empty dictionary: counts_dict
counts_dict = {}
# Process only the first 1000 rows
for j in range(1000):
# Split the current line into a list: line
line = file.readline().split(',')
# Get the value for the first column: first_col
first_col = line[0]
# If the column value is in the dict, increment its value
if first_col in counts_dict.keys():
counts_dict[first_col] += 1
# Else, add to the dict and set value to 1
else:
counts_dict[first_col] = 1
# Print the resulting dictionary
print(counts_dict) | [
"[email protected]"
] | |
5cdc2d4a8d76a829d96c2ed7591c5c88e3c42552 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /python/youtube-dl/2016/8/cmt.py | f24568dcc25740f7814c134f9e58e659e7f11855 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Python | false | false | 1,765 | py | from __future__ import unicode_literals
from .mtv import MTVIE
from ..utils import ExtractorError
class CMTIE(MTVIE):
IE_NAME = 'cmt.com'
_VALID_URL = r'https?://www\.cmt\.com/(?:videos|shows)/(?:[^/]+/)*(?P<videoid>\d+)'
_FEED_URL = 'http://www.cmt.com/sitewide/apps/player/embed/rss/'
_TESTS = [{
'url': 'http://www.cmt.com/videos/garth-brooks/989124/the-call-featuring-trisha-yearwood.jhtml#artist=30061',
'md5': 'e6b7ef3c4c45bbfae88061799bbba6c2',
'info_dict': {
'id': '989124',
'ext': 'mp4',
'title': 'Garth Brooks - "The Call (featuring Trisha Yearwood)"',
'description': 'Blame It All On My Roots',
},
'skip': 'Video not available',
}, {
'url': 'http://www.cmt.com/videos/misc/1504699/still-the-king-ep-109-in-3-minutes.jhtml#id=1739908',
'md5': 'e61a801ca4a183a466c08bd98dccbb1c',
'info_dict': {
'id': '1504699',
'ext': 'mp4',
'title': 'Still The King Ep. 109 in 3 Minutes',
'description': 'Relive or catch up with Still The King by watching this recap of season 1, episode 9. New episodes Sundays 9/8c.',
'timestamp': 1469421000.0,
'upload_date': '20160725',
},
}, {
'url': 'http://www.cmt.com/shows/party-down-south/party-down-south-ep-407-gone-girl/1738172/playlist/#id=1738172',
'only_matching': True,
}]
@classmethod
def _transform_rtmp_url(cls, rtmp_video_url):
if 'error_not_available.swf' in rtmp_video_url:
raise ExtractorError(
'%s said: video is not available' % cls.IE_NAME, expected=True)
return super(CMTIE, cls)._transform_rtmp_url(rtmp_video_url)
| [
"[email protected]"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.