id
stringlengths
3
8
content
stringlengths
100
981k
173327
from time import sleep import gevent from pitop import LED, Button, Pitop, UltrasonicSensor from pitop.labs import WebController robot = Pitop() robot.add_component(Button("D1")) robot.add_component(LED("D2")) robot.add_component(UltrasonicSensor("D3")) dashboard_server = WebController() def broadcast_state(): while True: sleep(0.1) dashboard_server.broadcast(robot.state) hub = gevent.get_hub() hub.threadpool.spawn(broadcast_state) dashboard_server.serve_forever()
173367
s = input() vowels = "AEIOU" kevin, stuart = 0, 0 for i in range(len(s)): if s[i] in vowels: kevin += len(s) - i else: stuart += len(s) - i if kevin > stuart: print("Kevin " + str(kevin)) elif stuart > kevin: print("Stuart " + str(stuart)) else: print("Draw")
173372
import json from typing import Dict, Union from django.forms import ClearableFileInput from django.http import QueryDict from django.utils.datastructures import MultiValueDict from django.utils.translation import gettext as _ from django_file_form.util import compact from .uploaded_file import PlaceholderUploadedFile, S3UploadedFileWithId TRANSLATIONS = { "Cancel": _("Cancel"), "Delete": _("Delete"), "Delete failed": _("Delete failed"), "Upload failed": _("Upload failed"), "Drop your files here": _("Drop your files here"), } def get_upload(upload_data: Dict): upload_type = upload_data["type"] if upload_type == "placeholder": return PlaceholderUploadedFile( file_id=upload_data["id"], name=upload_data["name"], size=upload_data["size"], ) elif upload_type == "s3": return S3UploadedFileWithId( file_id=upload_data["id"], name=upload_data["name"], original_name=upload_data["original_name"], size=upload_data["size"], ) else: return None def get_uploads(data: QueryDict, prefixed_field_name: str): placeholder_field_name = prefixed_field_name + "-uploads" value = data.get(placeholder_field_name) if not value: return [] else: return compact([get_upload(upload_data) for upload_data in json.loads(value)]) def get_file_meta(data: QueryDict, prefixed_field_name: str): meta_field_name = prefixed_field_name + "-metadata" value = data.get(meta_field_name) if not value: return {} try: res = json.loads(value) if not isinstance(res, dict): return {} return res except Exception: return {} class BaseUploadWidget(ClearableFileInput): template_name = "django_file_form/upload_widget.html" def get_context(self, name, value, attrs): context = super().get_context(name, value, attrs) context["translations"] = json.dumps(TRANSLATIONS) return context class UploadWidget(BaseUploadWidget): def value_from_datadict( self, data: QueryDict, files: MultiValueDict, prefixed_field_name: str ): upload = super().value_from_datadict(data, files, prefixed_field_name) if upload: return upload else: uploads = get_uploads(data, prefixed_field_name) upload = uploads[0] if uploads else None metadata = get_file_meta(data, prefixed_field_name) if upload and upload.name in metadata: upload.metadata = metadata[upload.name] return upload class UploadMultipleWidget(BaseUploadWidget): def value_from_datadict( self, data: QueryDict, files: Union[Dict, MultiValueDict], prefixed_field_name: str, ): def get_uploads_from_files(): if hasattr(files, "getlist"): return files.getlist(prefixed_field_name) else: # NB: django-formtools wizard uses dict instead of MultiValueDict return ( super(UploadMultipleWidget, self).value_from_datadict( data, files, prefixed_field_name ) or [] ) uploads = get_uploads_from_files() + get_uploads(data, prefixed_field_name) metadata = get_file_meta(data, prefixed_field_name) for upload in uploads: if upload.name in metadata: upload.metadata = metadata[upload.name] return uploads
173384
from __future__ import print_function import pytest from hashlib import sha256 import json import re import sys import numpy as np import flowpipe.utilities as util class WeirdObject(object): """An object that is not json serializable and has no bytes() interface.""" foo = "bar" def test_node_encoder(): """Test the custom JSONEncoder.""" valid_object = {"key": "value", "other_key": [1, 2, 3]} json_string = json.dumps(valid_object) recovered_json = json.loads(json_string) for k, v in valid_object.items(): assert v == recovered_json[k] bytes_object = {"key": "value", "other_key": bytes(42)} json_string = json.dumps(bytes_object, cls=util.NodeEncoder) recovered_json = json.loads(json_string) for k, v in bytes_object.items(): assert v == recovered_json[k] \ or sha256(v).hexdigest() == recovered_json[k] weird_object = {"key": "value", "other_key": WeirdObject()} json_string = json.dumps(weird_object, cls=util.NodeEncoder) recovered_json = json.loads(json_string) for k, v in weird_object.items(): assert v == recovered_json[k] \ or re.search('WeirdObject object at', str(recovered_json[k])) \ or sha256(v).hexdigest() == recovered_json[k] weird_np_array = {"key": "value", "other_key": np.arange(10)[::2]} json_string = json.dumps(weird_np_array, cls=util.NodeEncoder) recovered_json = json.loads(json_string) for k, v in weird_np_array.items(): assert v == recovered_json[k]\ or sha256(bytes(v)).hexdigest() == recovered_json[k] def test_get_hash(): """Test the hashing function.""" number = 42 assert util.get_hash(number) == '73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049' js = {"foo": "bar", "baz": {"zoom": "zulu"}} assert util.get_hash(js) == '8336ea0f6e482df0c7a738c83a2b8d3357cf0234c29cfd232fa6627bdc54289e' invalid_js = "kazoo{" # A generic string that's not json if sys.version_info.major > 2: assert util.get_hash(invalid_js) == 'c21e3435e752b72514e34139f116afee1f72cf496c1cc94c9087088c139dfb7d' else: assert util.get_hash(invalid_js) == '5324bcf2641f119108d1f99b92687b0af513e572c68dfed217344ffeff1f35a9' x = WeirdObject() assert util.get_hash(x) is None
173385
from django.apps import AppConfig class DjangoJsonplusConfig(AppConfig): name = 'django_jsonplus'
173394
import FWCore.ParameterSet.Config as cms from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9 process = cms.Process('HGCAL',Phase2C11M9) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.Geometry.GeometryExtended2026D83Reco_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) # Input source process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring('file:step3.root'), secondaryFileNames = cms.untracked.vstring() ) process.options = cms.untracked.PSet( SkipEvent = cms.untracked.vstring('ProductNotFound') ) # Production Info process.configurationMetadata = cms.untracked.PSet( annotation = cms.untracked.string('step3 nevts:10'), name = cms.untracked.string('Applications'), version = cms.untracked.string('$Revision: 1.19 $') ) process.DQMoutput = cms.OutputModule("DQMRootOutputModule", dataset = cms.untracked.PSet( dataTier = cms.untracked.string('DQMIO'), filterName = cms.untracked.string('') ), fileName = cms.untracked.string('file:step3_inDQM.root'), outputCommands = process.DQMEventContent.outputCommands, splitLevel = cms.untracked.int32(0) ) # Additional output definition from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '') process.load("Validation.HGCalValidation.hgcalHitValidation_cfi") process.load("Validation.HGCalValidation.hgcalHitCalibration_cfi") process.load("Validation.HGCalValidation.caloparticlevalidation_cfi") process.dqmoffline_step = cms.EndPath(process.hgcalHitValidation+process.hgcalHitCalibration+process.caloparticlevalidation) process.DQMoutput_step = cms.EndPath(process.DQMoutput) # Schedule definition process.schedule = cms.Schedule(process.dqmoffline_step,process.DQMoutput_step) #Setup FWK for multithreaded process.options.numberOfThreads=cms.untracked.uint32(6) process.options.numberOfStreams=cms.untracked.uint32(0) # customisation of the process.
173403
import unittest from tests.test_utils import get_sample_pdf_with_labels, get_sample_pdf, get_sample_sdf, get_sample_pdf_with_extra_cols, get_sample_pdf_with_no_text_col ,get_sample_spark_dataframe from nlu import * class TestYake(unittest.TestCase): def test_yake_model(self): #setting meta to true will output scores for keywords. Lower scores are better df = nlu.load('yake',verbose=True).predict('What a wonderful day! <NAME> is the Terminator and he wants to get to the American chopper', output_level='sentence',drop_irrelevant_cols=False, metadata=True, ) for c in df.columns: print(df[c]) df = nlu.load('yake',verbose=True).predict('What a wonderful day! <NAME> is the Terminator and he wants to get to the American chopper', metadata=False) for c in df.columns: print(df[c]) df = nlu.load('yake',verbose=True).predict('What a wonderful day! <NAME> is the Terminator and he wants to get to the American chopper', output_level='token') for c in df.columns: print(df[c]) df = nlu.load('yake',verbose=True).predict('What a wonderful day! <NAME> is the Terminator and he wants to get to the American chopper', output_level='chunk') for c in df.columns: print(df[c]) #Column name of confidence changed if yake at same or not at same output level! df = nlu.load('yake',verbose=True).predict('What a wonderful day! <NAME> is the Terminator and he wants to get to the American chopper', output_level='document') for c in df.columns: print(df[c]) if __name__ == '__main__': unittest.main()
173411
import os import urllib.request import urllib.error import json import hashlib class Scraper: def __init__(self, log_file): self._errors = {} # Set default log path self.log_file = log_file def download(self, url, file_path, header={}): self.log("Starting download: " + url) if not os.path.exists(os.path.dirname(file_path)): os.makedirs(os.path.dirname(file_path)) try: with urllib.request.urlopen( urllib.request.Request(url, headers=header)) as response, \ open(file_path, 'wb') as out_file: data = response.read() out_file.write(data) except urllib.error.HTTPError as e: # Something went wrong, abort self.error(e.code, url) self.log("Error [download]: " + str(e.code) + " " + url) # TODO: Check if dl was successful return True def get_file_ext(self, url): file_name, file_extension = os.path.splitext(url) return file_extension def create_save_path(self, base_path, name): """ Create a directory structure using the hashed filename :return: string of the path to save to not including filename/ext """ name_hash = hashlib.md5(name.encode('utf-8')).hexdigest() if base_path.endswith('/') or base_path.endswith('\\'): save_path = base_path else: save_path = base_path + "/" depth = 2 # will have depth of n dirs (MAX of 16 because length of md5 hash) for i in range(1, depth+1): end = i*2 start = end-2 save_path += name_hash[start:end] + "/" return save_path, name_hash def get_html(self, url, header={}): html = False request = urllib.request.Request(url, headers=header) try: response = urllib.request.urlopen(request) except urllib.error.HTTPError as e: # Something went wrong, abort self.error(e.code, url) self.log("Error [get_html]: " + str(e.code) + " " + url) else: try: html = response.read().decode('utf-8') except UnicodeDecodeError as e: self.log("Error [get_html][UnicodeDecodeError]:" + str(e) + " " + url ) return html def sanitize(self, string): """ Catch and replace and invalid path chars """ replace_chars = [ ['\\', '-'], [':', '-'], ['/', '-'], ['?', ''], ['<', '>'], ['`', '`'], ['|', '-'], ['*', '`'], ['"', '\''] ] for ch in replace_chars: string = string.replace(ch[0], ch[1]) return string def save_props(self, data): self.log("Saving metadata: " + data['id']) data['save_path'] = data['save_path'] with open(data['save_path'] + ".json", 'w') as outfile: json.dump(data, outfile, sort_keys=True, indent=4) def error(self, error, data): """ Save error to self._errors dict :param error: Error name :param data: Command/value that caused the error :return: """ if error not in self._errors.keys(): self._errors[error] = [] self._errors[error].append(data) def save_errors(self, file): """ Save errors into json file for review :return: """ if self._errors: if not os.path.exists(os.path.dirname(file)): os.makedirs(os.path.dirname(file)) with open(file + ".json", 'a') as errorfile: json.dump(self._errors, errorfile, sort_keys=True, indent=4) def log(self, data): if not os.path.exists(os.path.dirname(self.log_file)): os.makedirs(os.path.dirname(self.log_file)) with open(self.log_file, 'a') as log_file: log_file.write(str(data) + "\n") return str(data) def save_progress(self, file, count): """ Save the last id checked :return: """ if not os.path.exists(os.path.dirname(file)): os.makedirs(os.path.dirname(file)) with open(file, 'w') as outfile: if count < 0: count = 0 outfile.write(str(count))
173461
import numpy as np import torch import gtimer as gt import lifelong_rl.torch.pytorch_util as ptu from lifelong_rl.trainers.lisp.mb_skill import MBSkillTrainer import lifelong_rl.util.pythonplusplus as ppp from lifelong_rl.util.eval_util import create_stats_ordered_dict class LiSPTrainer(MBSkillTrainer): """ Lifelong Skill-Space Planning (Lu et al. 2020). Learning skills using model-based rollouts with a skill-practice distribution. Should be combined with an MPC planner for acting. """ def __init__( self, skill_practice_dist, # Associated skill-practice distribution for generating latents skill_practice_trainer, # Associated trainer for skill-practice distribution (ex. SAC) practice_train_steps=32, # Number of training steps for skill-practice distribution practice_batch_size=256, # Batch size of training skill-practice distribution num_unif_train_calls=0, # Optionally, don't use skill practice distribution early on epsilon_greedy=0., # Optionally, sample latents from uniform with probability eps *args, **kwargs, ): super().__init__(*args, **kwargs) self.skill_practice_dist = skill_practice_dist self.skill_practice_trainer = skill_practice_trainer self.practice_train_steps = practice_train_steps self.practice_batch_size = practice_batch_size self.num_unif_train_calls = num_unif_train_calls self.epsilon_greedy = epsilon_greedy def generate_latents(self, obs): if self._train_calls < self.num_unif_train_calls: return super().generate_latents(obs) latents, *_ = self.skill_practice_dist(ptu.from_numpy(obs)) latents = ptu.get_numpy(latents) if self.epsilon_greedy > 0: unif_r = np.random.uniform(0, 1, size=latents.shape[0]) eps_replace = unif_r < self.epsilon_greedy unif_latents = super().generate_latents(obs[eps_replace]) latents[eps_replace] = unif_latents return latents def train_from_torch(self, batch): super().train_from_torch(batch) if self._train_calls % self.train_every > 0: return for _ in range(self.practice_train_steps): batch = ppp.sample_batch( self.practice_batch_size, observations=self._obs[:self._cur_replay_size], next_observations=self._next_obs[:self._cur_replay_size], actions=self._latents[:self._cur_replay_size], rewards=self._rewards[:self._cur_replay_size], ) batch = ptu.np_to_pytorch_batch(batch) self.skill_practice_trainer.train_from_torch(batch) for k, v in self.skill_practice_trainer.get_diagnostics().items(): self.eval_statistics['prior_trainer/' + k] = v def train_from_buffer(self, reward_kwargs=None): """ Compute intrinsic reward: approximate lower bound to I(s'; z | s) """ if self.relabel_rewards: rewards, (logp, logp_altz, denom), reward_diagnostics = self.calculate_intrinsic_rewards( self._obs[:self._cur_replay_size], self._next_obs[:self._cur_replay_size], self._latents[:self._cur_replay_size], reward_kwargs=reward_kwargs ) orig_rewards = rewards.copy() rewards, postproc_dict = self.reward_postprocessing(rewards, reward_kwargs=reward_kwargs) reward_diagnostics.update(postproc_dict) self._rewards[:self._cur_replay_size] = np.expand_dims(rewards, axis=-1) gt.stamp('intrinsic reward calculation', unique=False) """ Train policy """ state_latents = np.concatenate([self._obs, self._latents], axis=-1)[:self._cur_replay_size] next_state_latents = np.concatenate( [self._true_next_obs, self._latents], axis=-1)[:self._cur_replay_size] for _ in range(self.num_policy_updates): batch = ppp.sample_batch( self.policy_batch_size, observations=state_latents, next_observations=next_state_latents, actions=self._actions[:self._cur_replay_size], rewards=self._rewards[:self._cur_replay_size], ) batch = ptu.np_to_pytorch_batch(batch) self.policy_trainer.train_from_torch(batch) gt.stamp('policy training', unique=False) """ Diagnostics """ if self._need_to_update_eval_statistics: self.eval_statistics.update(self.policy_trainer.eval_statistics) if self.relabel_rewards: self.eval_statistics.update(reward_diagnostics) self.eval_statistics.update(create_stats_ordered_dict( 'Discriminator Log Pis', logp, )) self.eval_statistics.update(create_stats_ordered_dict( 'Discriminator Alt Log Pis', logp_altz, )) self.eval_statistics.update(create_stats_ordered_dict( 'Intrinsic Reward Denominator', denom, )) # Adjustment so intrinsic rewards are over last epoch if self._ptr < self._epoch_size: if self._ptr == 0: inds = np.r_[len(rewards)-self._epoch_size:len(rewards)] else: inds = np.r_[0:self._ptr,len(rewards)-self._ptr:len(rewards)] else: inds = np.r_[self._ptr-self._epoch_size:self._ptr] self.eval_statistics.update(create_stats_ordered_dict( 'Intrinsic Rewards (Original)', orig_rewards[inds], )) self.eval_statistics.update(create_stats_ordered_dict( 'Intrinsic Rewards (Processed)', rewards[inds], )) self._n_train_steps_total += 1 def end_epoch(self, epoch): super().end_epoch(epoch) self.skill_practice_trainer.end_epoch(epoch) @property def networks(self): return self.skill_practice_trainer.networks + self.policy_trainer.networks + [ self.discriminator, self.skill_practice_dist, ] def get_snapshot(self): snapshot = super().get_snapshot() snapshot['skill_practice'] = self.skill_practice_dist for k, v in self.skill_practice_trainer.get_snapshot().items(): snapshot['skill_practice_trainer/' + k] = v return snapshot
173466
from torch_base.torch_model import * from torch_base.torch_sac import * from torch_base.torch_agent import *
173487
import utils # Container 1A (mm and kg) CONTAINER_WIDTH = 2330 CONTAINER_HEIGHT = 2200 CONTAINER_DEPTH = 12000 CONTAINER_LOAD = 26480 # Pallet EUR 1 (mm and kg) PALLET_WIDTH = 1200 PALLET_DEPTH = 800 PALLET_HEIGHT = CONTAINER_HEIGHT - 145 # 145 is the height of the pallet itself PALLET_LOAD = 2490 PALLET_DIMS = utils.Dimension(PALLET_WIDTH, PALLET_DEPTH, PALLET_HEIGHT, PALLET_LOAD) # Product dimension ranges (mm and kg) NUM_PRODUCTS = int(1e6) MIN_PRODUCT_WIDTH = 50 MAX_PRODUCT_WIDTH = PALLET_WIDTH MIN_PRODUCT_DEPTH = 50 MAX_PRODUCT_DEPTH = PALLET_DEPTH MIN_PRODUCT_HEIGHT = 50 MAX_PRODUCT_HEIGHT = PALLET_HEIGHT MIN_PRODUCT_WEIGHT = 2 MAX_PRODUCT_WEIGHT = PALLET_LOAD # Numpy RANDOM_SEED = 42
173497
import pandas as pd import numpy as np from sklearn import datasets, linear_model from __future__ import division class LRPI: def __init__(self, normalize=False, n_jobs=1, t_value = 2.13144955): self.normalize = normalize self.n_jobs = n_jobs self.LR = linear_model.LinearRegression(normalize=self.normalize, n_jobs= self.n_jobs) self.t_value = t_value def fit(self, X_train, y_train): self.X_train = pd.DataFrame(X_train.values) self.y_train = pd.DataFrame(y_train.values) self.LR.fit(self.X_train, self.y_train) X_train_fit = self.LR.predict(self.X_train) self.MSE = np.power(self.y_train.subtract(X_train_fit), 2).sum(axis=0) / (self.X_train.shape[0] - self.X_train.shape[1] - 1) self.X_train.loc[:, 'const_one'] = 1 self.XTX_inv = np.linalg.inv(np.dot(np.transpose(self.X_train.values) , self.X_train.values)) def predict(self, X_test): self.X_test = pd.DataFrame(X_test.values) self.pred = self.LR.predict(self.X_test) self.X_test.loc[: , 'const_one'] =1 SE = [np.dot(np.transpose(self.X_test.values[i]) , np.dot(self.XTX_inv, self.X_test.values[i]) ) for i in range(len(self.X_test)) ] results = pd.DataFrame(self.pred , columns=['Pred']) results.loc[:,"lower"] = results['Pred'].subtract((self.t_value)* (np.sqrt(self.MSE.values + np.multiply(SE,self.MSE.values) )), axis=0) results.loc[:,"upper"] = results['Pred'].add((self.t_value)* (np.sqrt(self.MSE.values + np.multiply(SE,self.MSE.values) )), axis=0) return results
173531
import unittest import os import numpy as np import pandas as pd from pyinterpolate.semivariance.semivariogram_fit.fit_semivariance import TheoreticalSemivariogram from pyinterpolate.semivariance.semivariogram_estimation.calculate_semivariance import calculate_semivariance from pyinterpolate.semivariance.semivariogram_estimation.calculate_semivariance import calculate_weighted_semivariance class TestFitSemivariance(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestFitSemivariance, self).__init__(*args, **kwargs) my_dir = os.path.dirname(__file__) path = os.path.join(my_dir, '../sample_data/armstrong_data.npy') self.dataset = np.load(path) self.step_size = 1.1 self.max_range = 10 def test_fit_semivariance(self): new_col = np.arange(1, len(self.dataset) + 1) dataset_weights = np.zeros((self.dataset.shape[0], self.dataset.shape[1] + 1)) dataset_weights[:, :-1] = self.dataset dataset_weights[:, -1] = new_col # Calculate weighted and non-weighted semivariance gamma_w = calculate_weighted_semivariance(dataset_weights, self.step_size, self.max_range) gamma_non = calculate_semivariance(self.dataset, self.step_size, self.max_range) # Fit semivariance - find optimal models t_non_weighted = TheoreticalSemivariogram(self.dataset, gamma_non) t_weighted = TheoreticalSemivariogram(dataset_weights[:, :-1], gamma_w) model_non_weighted = t_non_weighted.find_optimal_model(weighted=False, number_of_ranges=8) # linear model_weighted = t_weighted.find_optimal_model(weighted=False, number_of_ranges=8) # linear self.assertEqual(model_non_weighted, 'exponential', "Non-weighted model should be exponential") self.assertEqual(model_weighted, 'spherical', "Weighted model should be spherical") def test_fit_semivariance_io(self): # Prepare fake model for fit semivariance class fake_theoretical_smv = TheoreticalSemivariogram(None, None, False) nugget = 0 sill = 20 srange = 40 fake_theoretical_smv.nugget = nugget fake_theoretical_smv.sill = sill fake_theoretical_smv.range = srange fmn = 'linear' fake_theoretical_smv.chosen_model_name = fmn my_dir = os.path.dirname(__file__) file_path = os.path.join(my_dir, '../sample_data/mock_model.csv') fake_theoretical_smv.export_model(file_path) # Clear model paramas and name fake_theoretical_smv.nugget = None fake_theoretical_smv.sill = None fake_theoretical_smv.range = None fake_theoretical_smv.chosen_model_name = None # Check if now model is not the same assert fake_theoretical_smv.nugget != nugget assert fake_theoretical_smv.range != srange assert fake_theoretical_smv.sill != sill assert fake_theoretical_smv.chosen_model_name != fmn # Import params fake_theoretical_smv.import_model(file_path) # Check if params are the same as at the beginning self.assertEqual(fake_theoretical_smv.nugget, nugget, "Problem with import/export of semivariogram nugget") self.assertEqual(fake_theoretical_smv.sill, sill, "Problem with import/export of semivariogram sill") self.assertEqual(fake_theoretical_smv.range, srange, "Problem with import/export of semivariogram range") self.assertEqual(fake_theoretical_smv.chosen_model_name, fmn, "Problem with import/export of semivariogram " "name") def test_semivariance_export(self): gamma = calculate_semivariance(self.dataset, self.step_size, self.max_range) theo_model = TheoreticalSemivariogram(self.dataset, gamma) theo_model.find_optimal_model(number_of_ranges=8) my_dir = os.path.dirname(__file__) filepath = os.path.join(my_dir, '../sample_data/test_semivariance_export.csv') theo_model.export_semivariance(filepath) df = pd.read_csv(filepath) columns = ['lag', 'experimental', 'theoretical'] for c in columns: self.assertIn(c, df.columns, f'DataFrame is corrupted, missing {c} column') EXPECTED_LEN = 9 self.assertEqual(len(df), EXPECTED_LEN, f'DataFrame len should be {EXPECTED_LEN} but it is {len(df)}') if __name__ == '__main__': unittest.main()
173564
import pyspark from packaging import version from pyspark import sql _3_0_0_VERSION = version.Version("3.0.0") _spark_version = version.parse(pyspark.__version__) def configure_session(sess: sql.SparkSession, arrow=True): if arrow: if _spark_version >= _3_0_0_VERSION: sess.conf.set("spark.sql.execution.arrow.pyspark.enabled", "true") else: sess.conf.set("spark.sql.execution.arrow.enabled", "true") return sess def make_session(name: str, arrow: bool = True): sess_builder = sql.SparkSession.builder sess_builder = sess_builder.appName(name) sess = sess_builder.getOrCreate() sess = configure_session(sess, arrow=arrow) return sess
173588
import numpy as np import cv2 import os import sys sys.path.insert(0, os.getcwd()) import os.path as osp import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle from tools.auto_anno_movie import AnnoationBase, AnnoationSub, get_landmark_annotation, get_face_annotation, LANDMARKS from easydict import EasyDict import glob import json from typing import List, Dict, AnyStr, Any, Tuple import argparse from enum import Enum plt.rcParams['font.sans-serif'] = ['STZhongsong'] # 用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 plt.rcParams['keymap.save'].remove('s') plt.rcParams['keymap.quit'].remove('q') class RetrunState(Enum): delete = 1 last = 2 next = 3 class Annotate(object): def __init__(self, anno: AnnoationBase, plabels: List[str]): self.anno = anno self.ax = plt.gca() self.circles: List = [] # lanmark对应的matplotlib对象 self.rects: List = [] # face对应的matplotlib对象 self.modes = ['Point', 'Face'] self.retrun = RetrunState.next self.nlandm = len(plabels) self.plabels = plabels self.group_id: int = 0 self.is_press = False self.ax.figure.canvas.mpl_connect('button_press_event', self.on_press) self.ax.figure.canvas.mpl_connect('button_release_event', self.on_release) self.ax.figure.canvas.mpl_connect('key_press_event', self.on_key_press) self.ax.figure.canvas.mpl_connect('motion_notify_event', self.on_move) self.colors = ['b', 'g', 'r', 'c', 'm'] self.circles_idx = 0 self.rects_idx = 0 self.rect_point_idx = 0 self.faces: List[AnnoationSub] = [] # 保存已有的人脸标注 self.landmarks: List[AnnoationSub] = [] # 保存已有的坐标标注 """ 根据group_ids构建对应数量的矩形框 """ self.faces = [sub for sub in anno.shapes if sub.label == 'face'] # sort face by group id self.faces: List[AnnoationSub] = sorted(self.faces, key=lambda sub: sub.group_id) """ 绘制rect标注 """ for i in range(len(self.faces)): xmin, ymin = self.faces[i].points[0] xmax, ymax = self.faces[i].points[1] rect = Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, edgecolor='b', fill=None) self.rects.append(rect) self.ax.add_patch(rect) text = plt.text(xmin, ymin, f'{self.faces[i].group_id:02d}', fontsize=20, c='r') """ 绘制landmark标注 """ for i in range(len(self.faces)): for j, label in enumerate(plabels): landmark_idx = self.find_landmark_index(anno.shapes, self.faces[i].group_id, label) landmark = anno.shapes[landmark_idx] circle = Circle((0, 0), 3, color=self.colors[j]) circle.set_center(tuple(landmark['points'][0])) self.landmarks.append(landmark) self.circles.append(circle) self.ax.add_patch(circle) """ 初始化标题 """ self.ax.set_title( f'点编辑模式 第{self.circles_idx//self.nlandm}张脸 第{self.circles_idx%self.nlandm}个点') @staticmethod def find_landmark_index(shapes: List[AnnoationBase], t_group_id: int, t_label: str): for idx, sub in enumerate(shapes): if (sub.group_id == t_group_id) and (sub.label == t_label): return idx return None def on_key_press(self, event): if event.key == 's': self.modes.reverse() elif event.key == 'q': if self.modes[0] == 'Point': self.sub_circle_idx() else: self.sub_rect_idx() elif event.key == 'e': if self.modes[0] == 'Point': self.add_circle_idx() else: self.add_rect_idx() elif event.key == 'w': self.retrun = RetrunState.delete plt.close(self.ax.figure) elif event.key == 'a': self.retrun = RetrunState.last plt.close(self.ax.figure) elif event.key == 'd': self.retrun = RetrunState.next plt.close(self.ax.figure) elif event.key == 'z': self.add_face(event) self.update_title() def add_face(self, event): """ 增加一个人脸 """ x, y = event.xdata, event.ydata newface = EasyDict(get_face_annotation(x, y, x + 100, y + 100, len(self.faces))) self.anno.shapes.append(newface) self.faces.append(newface) rect = Rectangle((x, y), 100, 100, edgecolor='b', fill=None) self.rects.append(rect) self.ax.add_patch(rect) text = plt.text(x, y, f'{self.faces[-1].group_id:02d}', fontsize=20, c='r') """ 绘制landmark标注 """ for j, label in enumerate(self.plabels): landmark = EasyDict(get_landmark_annotation(x + 50, y + 50, label, self.faces[-1].group_id)) circle = Circle((x + 50, y + 50), 3, color=self.colors[j]) self.anno.shapes.append(landmark) self.landmarks.append(landmark) self.circles.append(circle) self.ax.add_patch(circle) def on_press(self, event): self.is_press = True def on_move(self, event): if self.is_press and self.modes[0] == 'Face': self.change_rect(event) self.update_title() def update_title(self): if self.modes[0] == 'Point': if self.circles_idx >= len(self.circles): self.ax.set_title('点已经分配完毕') else: self.ax.set_title( f'点编辑模式 第{self.circles_idx//self.nlandm}张脸 第{self.circles_idx%self.nlandm}个点') else: if self.rects_idx >= len(self.rects): self.ax.set_title('没有更多人脸了') else: self.ax.set_title(f'脸编辑模式 第{self.rects_idx}张脸 第{self.rect_point_idx%2}个点') self.ax.figure.canvas.draw() def on_release(self, event): if self.modes[0] == 'Point': self.change_circle(event) self.add_circle_idx() else: self.change_rect(event) self.add_rect_idx() self.is_press = False self.update_title() def add_rect_idx(self): self.rect_point_idx = min(2, self.rect_point_idx + 1) if self.rect_point_idx == 2: self.rects_idx = min(len(self.rects), self.rects_idx + 1) self.rect_point_idx = 0 def add_circle_idx(self): self.circles_idx = min(len(self.circles), self.circles_idx + 1) def sub_circle_idx(self): self.circles_idx = max(0, self.circles_idx - 1) def sub_rect_idx(self): self.rect_point_idx -= 1 if self.rect_point_idx < 0: if self.rects_idx >= 1: self.rect_point_idx = 1 self.rects_idx = max(0, self.rects_idx - 1) def change_rect(self, event): if self.rects_idx < len(self.rects): rect = self.rects[self.rects_idx] x, y = event.xdata, event.ydata if self.rect_point_idx == 0: rect.set_xy((x, y)) elif self.rect_point_idx == 1: x0, y0 = rect.get_xy() rect.set_width(x - x0) rect.set_height(y - y0) def change_circle(self, event): if self.circles_idx < len(self.circles): self.circles[self.circles_idx].set_center((event.xdata, event.ydata)) def load_json(json_path: str) -> AnnoationBase: with open(json_path, 'r+') as f: anno: AnnoationBase = EasyDict(json.load(f)) return anno def save_json(anno: AnnoationBase, json_path: str): with open(json_path, 'w') as f: text = json.dumps(anno, indent=4) f.write(text) def main(dataset_path, start_item): # dataset_path = '/media/zqh/Documents/jojo-face-landmark/01' json_list = list(glob.glob(dataset_path + '/*.json')) number = len(json_list) idx = -1 if start_item != '': idx = json_list.index(f'{dataset_path}/{start_item}.json') remove_list = [] retrunstate = RetrunState.next while True: # get next if retrunstate == RetrunState.next: idx += 1 elif retrunstate == RetrunState.last: idx -= 1 if idx < 0 or idx >= number: print("Json files over") break if idx in remove_list: continue json_path = json_list[idx] print("Load", json_path) anno = load_json(json_path) img_path = osp.join(dataset_path, anno.imagePath) ims = cv2.cvtColor(cv2.imread(img_path), cv2.COLOR_RGB2BGR) plt.figure(figsize=(16, 9)) plt.imshow(ims) handler = Annotate(anno, LANDMARKS) plt.tight_layout(True) plt.show() # refush annotation for i, rect in enumerate(handler.rects): handler.faces[i].points = [[rect._x0, rect._y0], [rect._x1, rect._y1]] for i, circle in enumerate(handler.circles): x, y = circle.center handler.landmarks[i].points = [[x, y]] if handler.retrun == RetrunState.delete: print("Delete", img_path) os.remove(img_path) os.remove(json_path) remove_list.append(idx) else: retrunstate = handler.retrun save_json(handler.anno, json_path) print("Rewrite", json_path) if __name__ == "__main__": parse = argparse.ArgumentParser() parse.add_argument('--dataset', default='/media/zqh/Documents/jojo-face-landmark/01') parse.add_argument('--id', default='') args = parse.parse_args() main(args.dataset, args.id) """ python tools/manual_anno_movie.py --dataset="/media/zqh/Documents/jojo-face-landmark/03" """
173694
from sys import argv from re import sub, finditer, VERBOSE def gen(defs): indent = 0 enum = False def p(s): print(" " * (indent * 4) + s) for item in finditer(""" (?P<type> message|enum) \\s+ (?P<name> \\w+) \\s* \\{ | (?P<var> \\w+) \\s* = \\s* (?P<val> \\w+) \\s* ; | \\} """, defs, flags=VERBOSE): if item.group(0) == "}": indent = indent - 1 p("};" if enum else "}") enum = False; elif item.group('type') == 'enum': p("enum class %s {" % item.group('name')) indent = indent + 1 enum = True elif item.group('type') == 'message': p("namespace %s {" % item.group('name')) indent = indent + 1 enum = False else: if enum: p("%s = %s," % (item.group('var'), item.group('val'))) print("// Auto-generated by reql/gen.py") print("#pragma once") print("namespace RethinkDB { namespace Protocol {") gen(sub("//.*", "", open(argv[1]).read())) print("} }")
173709
from insights.parsers.limits_conf import LimitsConf from insights.tests import context_wrap LIMITS_CONF = """ #oracle soft nproc 2047 #oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 3276 root soft nproc unlimited """.strip() LIMITS_CONF_PATH = "/etc/security/limits.conf" BAD_LIMITS_CONF = """ oracle oracle soft oracle soft nofile root soft nproc unlimitied """ FULL_OPTS_LIMITS_CONF = """ # ** Domain variations ** # 0: User domain oracle soft nofile 1024 # 1: Group domain @dbadmins soft nofile 1024 # 2: Wildcard domain * soft nofile 2048 # 3: :maxuid - exact match :1001 soft nofile 3072 # 4: minuid: - from that number up 1000: soft nofile 1536 # 5: minuid:maxuid - range 2000:2020 soft nofile 1600 # 6: @:maxgid - exact match @:101 soft nofile 4096 # 7: @mingid: - from that number up @100: soft nofile 2560 # 8: @minuid:maxuid - range @200:202 soft nofile 2800 # ** Type variations ** # 9: Hard type oracle hard nofile 8192 # 10: Both types managers - nofile 10240 """ def test_class_conf(): # The tests handle only a single file at this point... ctx = context_wrap(LIMITS_CONF, path=LIMITS_CONF_PATH) data = LimitsConf(ctx) assert data.domains == \ sorted(['oracle', 'root']) def test_class_bad(): # The tests handle only a single file at this point... ctx = context_wrap(BAD_LIMITS_CONF, path=LIMITS_CONF_PATH) data = LimitsConf(ctx) assert data.domains == [] bad_lines = BAD_LIMITS_CONF.strip().splitlines() assert data.bad_lines == bad_lines def test_class_complete(): # The tests handle only a single file at this point... ctx = context_wrap(FULL_OPTS_LIMITS_CONF, path=LIMITS_CONF_PATH) data = LimitsConf(ctx) assert data.domains == \ sorted( ['oracle', '@dbadmins', '*', ':1001', '1000:', '2000:2020', '@:101', '@100:', '@200:202', 'managers'] ) # Data check assert data.rules[0] == \ {'domain': 'oracle', 'type': 'soft', 'item': 'nofile', 'value': 1024, 'file': LIMITS_CONF_PATH} # User domain match # oracle soft, wildcard, and oracle hard assert data.find_all(domain='oracle') == \ [data.rules[x] for x in [0, 2, 9]] # Group domain match # dbadmins group and wildcard assert data.find_all(domain='@dbadmins') == \ [data.rules[x] for x in [1, 2]] # UID domain match # wildcard, uid 1001 exact, and uid range 1000: assert data.find_all(domain=1001) == \ [data.rules[x] for x in [2, 3, 4]] # UID min range domain match # wildcard and uid range 1000: assert data.find_all(domain=1002) == \ [data.rules[x] for x in [2, 4]] # UID min:max range match # wildcard, uid range 1000:, and uid range 2000:2020 assert data.find_all(domain=2001) == \ [data.rules[x] for x in [2, 4, 5]] # GID domain match # wildcard, gid 101 exact, and gid range 100: assert data.find_all(domain='@101') == \ [data.rules[x] for x in [2, 6, 7]] # GID min range domain match # wildcard and gid range 100: assert data.find_all(domain='@102') == \ [data.rules[x] for x in [2, 7]] # GID min:max range match # wildcard, gid range 100:, and gid range 200:202 assert data.find_all(domain='@201') == \ [data.rules[x] for x in [2, 7, 8]] # soft type match # most rules but not the hard rule assert data.find_all(type='soft') == \ [data.rules[x] for x in [0, 1, 2, 3, 4, 5, 6, 7, 8, 10]] # hard type match # hard and both assert data.find_all(type='hard') == \ [data.rules[x] for x in [9, 10]] # No match at all assert data.find_all(domain='postgres', type='hard') == \ [] # No rules to match assert data.find_all() == \ []
173767
import os.path class _NotSet(object): instance = None def __init__(self): if self.__class__.instance is not None: raise RuntimeError('An instance of {} already initialised'.format(self.__class__.__name__)) self.__class__.instance = self def __eq__(self, other): return self is other def __nonzero__(self): return False def __bool__(self): return False def __str__(self): return '' def __repr__(self): return '<NotSet>' def __deepcopy__(self, memodict): return self def __copy__(self): return self not_set = _NotSet() _file_ext_to_adapter_name = { '.json': 'json', '.yaml': 'yaml', '.yml': 'yaml', '.ini': 'configparser', '.toml': 'toml', # not really supported yet '.xml': 'xml', # not really supported yet } def _get_persistence_adapter_for(filename): _, ext = os.path.splitext(filename) ext = ext.lower() if ext not in _file_ext_to_adapter_name: raise ValueError('Unrecognised config file extension for file {!r}'.format(filename)) return _file_ext_to_adapter_name[ext]
173796
import os import subprocess import siliconcompiler import pytest @pytest.mark.eda @pytest.mark.quick def test_py(setup_example_test): setup_example_test('blinky') import blinky blinky.main() assert os.path.isfile('build/blinky/job0/bitstream/0/outputs/blinky.bit') @pytest.mark.eda @pytest.mark.quick def test_cli(setup_example_test): ex_dir = setup_example_test('blinky') proc = subprocess.run(['bash', os.path.join(ex_dir, 'run.sh')]) assert proc.returncode == 0 assert os.path.isfile('build/blinky/job0/bitstream/0/outputs/blinky.bit')
173822
from setuptools import setup import os # df = [] # for m in os.listdir('modules'): # for f in os.listdir('modules/%s' % m): # if f.endswith('.py') or f.endswith('.pl'): # df.append(('share/zamia-ai/modules/%s' % m, ['modules/%s/%s' % (m, f)])) # print repr(df) setup( name = 'zamia-ai', version = '0.2.4', description = 'Free and open source A.I. system based on Python, TensorFlow and Prolog.', long_description = open('README.md').read(), author = '<NAME>', author_email = '<EMAIL>', maintainer = '<NAME>', maintainer_email = '<EMAIL>', url = 'https://github.com/gooofy/zamia-ai', packages = ['zamiaai'], install_requires = [ 'py-nltools', 'pyxsb', 'cmdln', 'pytz', 'tzlocal', 'six', 'sqlalchemy', 'scipy', 'codegen', 'dateutil' ], scripts = [ 'zaicli' ], classifiers = [ 'Operating System :: POSIX :: Linux', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Intended Audience :: Developers', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Multimedia :: Sound/Audio :: Speech' 'Topic :: Scientific/Engineering :: Artificial Intelligence' ], license = 'Apache', keywords = 'natural language processing tokenizer nlp tts asr speech synthesis recognition tensorflow artificial-intelligence natural-language-processing prolog knowledgebase semantic-web', # data_files = df package_data = {'zamiaai': ['skills/*/*.py', 'skills/*/*.pl', 'skills/*/*.xwam']}, include_package_data = True )
173848
import datetime import pytz from django.urls import reverse from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait from wkz import configuration, models def test_all_sports_page_accessible(live_server, webdriver): webdriver.get(live_server.url + reverse("sports")) # first time running workoutizer will lead to the dashboard page with no data card_title = webdriver.find_element_by_class_name("card-title") assert card_title.text == "Sports Overview" assert "Sports" in webdriver.find_element_by_class_name("navbar-brand").text def test_adding_new_sport(live_server, webdriver): models.default_sport() # verify that the only available sport is the default 'unknown' sport sports = models.Sport.objects.all() assert len(sports) == 1 assert sports[0].name == "unknown" # webdriver.get(live_server.url + reverse("sports")) webdriver.get(live_server.url + reverse("add-sport")) # fill out form to add new sport sport_name_input_field = webdriver.find_element_by_css_selector("#id_name") sport_name_input_field.clear() sport_name_input_field.send_keys("UltimateFrisbee") icon_input_field = webdriver.find_element_by_css_selector("#id_icon") icon_input_field.clear() icon_input_field.send_keys("compact-disc") # TODO: color seems not to work that way, will leave it for now... color_input_field = webdriver.find_element_by_css_selector("#id_color") color_input_field.clear() color_input_field.send_keys("#FF1F3D") # find button and submit button = webdriver.find_element_by_id("button") button.click() # check that a new sport was added sports = models.Sport.objects.all() assert len(sports) == 2 new_sport = models.Sport.objects.get(name="UltimateFrisbee") assert new_sport.icon == "compact-disc" # TODO check why color can not be changed that way # assert new_sport.color == "#FF1F3D" def test_sport_page__complete(import_demo_data, live_server, webdriver): # import demo activity and check that all expected elements are available on the sport page webdriver.get(live_server.url + "/sport/cycling") table_header = [cell.text for cell in webdriver.find_elements_by_tag_name("th")] assert "DATE" in table_header assert "ACTIVITY" in table_header assert "TRACK" in table_header assert "SPORT" in table_header assert "DURATION" in table_header assert "DISTANCE" in table_header # the sport name should be unknown assert "Cycling" in webdriver.find_element_by_class_name("navbar-brand").text card_category = [a.text for a in webdriver.find_elements_by_class_name("card-category")] assert "Trend" in card_category assert "Distance" in card_category assert "Duration" in card_category assert "Count" in card_category card_title = [a.text for a in webdriver.find_elements_by_class_name("card-title")] # assert "0h 0m" in card_title # fails in CI assert "169 km" in card_title assert "13h" in card_title assert "3" in card_title links = [a.text for a in webdriver.find_elements_by_tag_name("a")] assert "CYCLING" in links card_title = [p.text for p in webdriver.find_elements_by_class_name("card-title")] assert "Overview" in card_title paragraph = [p.text for p in webdriver.find_elements_by_tag_name("p")] assert "DASHBOARD" in paragraph assert "AWARDS" in paragraph assert "SPORTS" in paragraph assert "CYCLING" in paragraph assert "HIKING" in paragraph assert "JOGGING" in paragraph assert "ADD SPORT" in paragraph # wait until loading image is present WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "loading-bar"))) # wait until activity row is present WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "activities-table-row"))) table_data = [cell.text for cell in webdriver.find_elements_by_tag_name("td")] assert "Noon Cycling in Bad Schandau" in table_data assert "Early Morning Cycling in Kochel am See" in table_data assert "Noon Cycling in Hinterzarten" in table_data assert len(webdriver.find_elements_by_class_name("fa-chart-line")) > 0 assert len(webdriver.find_elements_by_class_name("fa-trophy")) > 0 assert len(webdriver.find_elements_by_class_name("fa-road")) > 0 assert len(webdriver.find_elements_by_class_name("fa-history")) > 0 assert len(webdriver.find_elements_by_class_name("fa-hashtag")) > 0 # check that map is displayed map_text = webdriver.find_element_by_id("leaflet_map").text assert "Streets" in map_text assert "Leaflet | Map data: © OpenStreetMap" in map_text assert "−" in map_text assert "+" in map_text assert "Satellite" in map_text assert "Terrain" in map_text assert "Topo" in map_text # check that bokeh plot is available assert len(webdriver.find_elements_by_class_name("bk-canvas")) == 1 # check that it is possible to click on the fullscreen toggle using leaflet-ui webdriver.find_element_by_css_selector(".leaflet-control-zoom-fullscreen").click() # check that streets is the default map layer default_layer = [ span.text for span in webdriver.find_elements_by_css_selector( ".leaflet-control-layers-inline .leaflet-control-layers-base input:checked+span" ) ] assert len(default_layer) == 1 assert "Streets" in default_layer def test_sport_page__infinite_scroll(live_server, webdriver, insert_activity, insert_sport): rows_per_page = configuration.number_of_rows_per_page_in_table # insert more activities than the currently configured value of rows # per page in order to be able to trigger the htmx ajax request sport = insert_sport(name="Skiing") nr_of_inserted_activities = rows_per_page + 5 for i in range(nr_of_inserted_activities): insert_activity(name=f"Dummy Activity {i}", sport=sport) assert models.Activity.objects.filter(sport__name="Skiing").count() == nr_of_inserted_activities webdriver.get(live_server.url + "/sport/skiing") # number of rows equals the number of rows per page, since only one page is loaded WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "activities-table-row"))) table_rows = [cell.text for cell in webdriver.find_elements_by_id("activities-table-row")] assert len(table_rows) + 1 == rows_per_page webdriver.execute_script("window.scrollTo(0, document.body.scrollHeight);") # wait until loading image is present WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "loading-bar"))) # wait until final row indicating that no more activities are available is present WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "end-of-activities"))) # again check number of table rows table_rows = [cell.text for cell in webdriver.find_elements_by_id("activities-table-row")] assert len(table_rows) + 1 == nr_of_inserted_activities def test_sport_page__no_activities_selected_for_plot(live_server, webdriver, insert_activity, insert_sport): sport = insert_sport(name="Bungee Jumping") for i in range(5): date = datetime.datetime(1900, 1, 1, tzinfo=pytz.UTC) + datetime.timedelta(days=i) insert_activity(name=f"Dummy Activity {i}", sport=sport, date=date) assert models.Activity.objects.filter(sport__slug="bungee-jumping").count() == 5 webdriver.get(live_server.url + "/sport/bungee-jumping") # even though the activity data is far in the past, the rows will be shown in the table WebDriverWait(webdriver, 3).until(EC.presence_of_element_located((By.ID, "activities-table-row"))) table_rows = [cell.text for cell in webdriver.find_elements_by_id("activities-table-row")] assert len(table_rows) == 5 paragraph = [p.text for p in webdriver.find_elements_by_tag_name("p")] assert "BUNGEE JUMPING" in paragraph # because the activity was added has dates far in the past, there is no activity data available for plotting assert ( "Either increase the selected time range, or do some sports and add it to Workoutizer.\n" "The activity plot will appear here " ) in paragraph links = [a.text for a in webdriver.find_elements_by_tag_name("a")] assert "WORKOUTIZER" in links # verify leaflet elements are present assert "+" in links assert "−" in links assert "Leaflet" in links assert "OpenStreetMap" in links spans = [a.text for a in webdriver.find_elements_by_tag_name("span")] assert "Streets" in spans assert "Topo" in spans assert "Terrain" in spans assert "Satellite" in spans # check that streets is the default map layer default_layer = [ span.text for span in webdriver.find_elements_by_css_selector( ".leaflet-control-layers-inline .leaflet-control-layers-base input:checked+span" ) ] assert len(default_layer) == 1 assert "Streets" in default_layer
173850
from backpack.core.derivatives.conv1d import Conv1DDerivatives from .base import GradBaseModule class GradConv1d(GradBaseModule): def __init__(self): super().__init__(derivatives=Conv1DDerivatives(), params=["bias", "weight"])
173869
from psy.utils.probs import inverse_logistic, get_log_beta_pd, get_log_lognormal_pd, get_log_normal_pd, get_nodes_weights, \ r4beta from psy.utils.tools import cached_property from psy.utils.randoms import gen_item_bank
173874
from airflow import DAG from airflow.operators.dummy_operator import DummyOperator from airflow.utils import timezone default_args = { 'owner': 'ODDS', } dag = DAG( 'my_dummy_dag', schedule_interval='*/5 * * * *', default_args=default_args, start_date=timezone.datetime(2020, 8, 1), catchup=False ) start = DummyOperator(task_id='start', dag=dag) do_something = DummyOperator(task_id='do_something', dag=dag) end = DummyOperator(task_id='end', dag=dag) start >> do_something >> end
173875
import math import random import numpy as np from OpenGL.GL import * from OpenGL.GL.ARB.framebuffer_object import * from OpenGL.GL.EXT.framebuffer_object import * from PyEngine3D.Utilities import * from PyEngine3D.Common import logger, COLOR_BLACK from PyEngine3D.OpenGLContext import Texture2D, Texture2DArray, Texture2DMultiSample, TextureCube, RenderBuffer, CreateTexture from .Ocean import Constants as OceanConstants class Option: NONE = 0 MSAA = 1 << 1 SSAA = 1 << 2 class RenderTargets: SCREENBUFFER = None BACKBUFFER = None DEPTH = None DEPTH_STENCIL = None OBJECT_ID = None OBJECT_ID_DEPTH = None HDR = None HDR_TEMP = None HDR_BACKUP = None BLOOM_0 = None BLOOM_1 = None BLOOM_2 = None BLOOM_3 = None BLOOM_4 = None LIGHT_SHAFT = None LIGHT_PROBE_ATMOSPHERE = None ATMOSPHERE = None ATMOSPHERE_INSCATTER = None TAA_RESOLVE = None DIFFUSE = None MATERIAL = None WORLD_NORMAL = None STATIC_SHADOWMAP = None DYNAMIC_SHADOWMAP = None COMPOSITE_SHADOWMAP = None LINEAR_DEPTH = None FOCUS_DISTANCE = None SCREEN_SPACE_REFLECTION = None SCREEN_SPACE_REFLECTION_RESOLVED_PREV = None SCREEN_SPACE_REFLECTION_RESOLVED = None SSAO = None VELOCITY = None FFT_A = None FFT_B = None TEMP_RENDER_BUFFER_MULTISAMPLE = None TEMP_RGBA8 = None TEMP_2D_ARRAY = None TEMP_MULTISAMPLE_X4 = None TEMP_HEIGHT_MAP = None class RenderTargetManager(Singleton): name = "RenderTargetManager" def __init__(self): self.core_manager = None self.viewport_manager = None self.renderer = None self.rendertargets = dict() self.immutable_rendertarget_names = [] self.temp_rendertargets = dict() self.first_time = True self.texture_lod_in_ssao = 1.0 def initialize(self, core_manager): logger.info("initialize " + GetClassName(self)) self.core_manager = core_manager self.viewport_manager = core_manager.viewport_manager self.renderer = core_manager.renderer self.clear() def clear(self, force=False): self.clear_rendertargets(force) self.clear_temp_rendertargets() def clear_rendertargets(self, force=False): delete_list = [] for key, rendertarget in self.rendertargets.items(): if force or key not in self.immutable_rendertarget_names: rendertarget.delete() delete_list.append(key) for key in delete_list: self.rendertargets.pop(key) if key in self.immutable_rendertarget_names: self.immutable_rendertarget_names.pop(key) self.core_manager.gc_collect() def clear_temp_rendertargets(self): for key, rendertarget in self.temp_rendertargets.items(): rendertarget.delete() self.temp_rendertargets = dict() self.core_manager.gc_collect() def find_rendertarget(self, rendertarget_index, rendertarget_name): if rendertarget_index < len(self.rendertargets) and rendertarget_name in self.rendertargets: return self.rendertargets[rendertarget_name] elif rendertarget_name in self.temp_rendertargets: return self.temp_rendertargets[rendertarget_name] return None def get_rendertarget(self, rendertarget_name): return self.rendertargets[rendertarget_name] if rendertarget_name in self.rendertargets else None def get_temporary(self, rendertarget_name, reference_rendertarget=None, scale=1.0): temp_rendertarget = None if rendertarget_name in self.temp_rendertargets: temp_rendertarget = self.temp_rendertargets[rendertarget_name] elif reference_rendertarget: rendertarget_datas = reference_rendertarget.get_texture_info() rendertarget_datas['width'] = int(rendertarget_datas['width'] * scale) rendertarget_datas['height'] = int(rendertarget_datas['height'] * scale) rendertarget_type = rendertarget_datas['texture_type'] if type(rendertarget_type) is str: rendertarget_type = eval(rendertarget_type) temp_rendertarget = rendertarget_type(name=rendertarget_name, **rendertarget_datas) if temp_rendertarget: self.temp_rendertargets[rendertarget_name] = temp_rendertarget # send rendertarget info to GUI self.core_manager.send_render_target_info(temp_rendertarget.name) if temp_rendertarget is None: logger.warn("Failed to get temporary %s render target." % rendertarget_name) return temp_rendertarget def create_rendertarget(self, rendertarget_name, **datas): option = datas.get('option', Option.NONE) rendertarget_type = datas.get('texture_type', Texture2D) if (Option.MSAA & option) and self.renderer.postprocess.enable_MSAA(): if rendertarget_type == Texture2D: rendertarget_type = Texture2DMultiSample datas['multisample_count'] = self.renderer.postprocess.get_msaa_multisample_count() elif (Option.SSAA & option) and self.renderer.postprocess.is_SSAA(): datas['width'] = datas.get('width', 1) * 2 datas['height'] = datas.get('height', 1) * 2 immutable = datas.get('immutable', False) rendertarget = None if rendertarget_name in self.rendertargets: rendertarget = self.rendertargets[rendertarget_name] if not immutable or rendertarget_name not in self.rendertargets: # Create RenderTarget if rendertarget_type == RenderBuffer: rendertarget = RenderBuffer(name=rendertarget_name, **datas) else: rendertarget = CreateTexture(name=rendertarget_name, **datas) if rendertarget_name not in self.rendertargets: self.rendertargets[rendertarget_name] = rendertarget if immutable: self.immutable_rendertarget_names.append(rendertarget_name) # send rendertarget info to GUI self.core_manager.send_render_target_info(rendertarget_name) if rendertarget is None: logger.error("Failed to crate a render target. %s" % rendertarget_name) return rendertarget def create_rendertargets(self): self.clear() # Note : # clear rendertarget infos in GUI self.core_manager.clear_render_target_list() screen_width = self.viewport_manager.root.width screen_height = self.viewport_manager.root.height width = self.viewport_manager.main_viewport.width height = self.viewport_manager.main_viewport.height fullsize_x = width fullsize_y = height halfsize_x = int(width / 2) halfsize_y = int(height / 2) quatersize_x = int(width / 4) quatersize_y = int(height / 4) hdr_internal_format = GL_RGBA16F hdr_data_type = GL_FLOAT RenderTargets.SCREENBUFFER = self.create_rendertarget( "SCREENBUFFER", texture_type=Texture2D, width=screen_width, height=screen_height, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.BACKBUFFER = self.create_rendertarget( "BACKBUFFER", texture_type=Texture2D, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) # NOTE : bind render target self.viewport_manager.main_viewport.bind_texture(RenderTargets.BACKBUFFER) RenderTargets.DEPTH = self.create_rendertarget( "DEPTH", texture_type=Texture2D, option=Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=GL_DEPTH_COMPONENT32F, texture_format=GL_DEPTH_COMPONENT, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) # RenderTargets.DEPTH_STENCIL = self.create_rendertarget( # "DEPTH_STENCIL", # texture_type=Texture2D, # option=Option.SSAA, # width=fullsize_x, # height=fullsize_y, # internal_format=GL_DEPTH24_STENCIL8, # texture_format=GL_DEPTH_STENCIL, # data_type=GL_UNSIGNED_INT_24_8, # min_filter=GL_NEAREST, # mag_filter=GL_NEAREST, # wrap=GL_CLAMP # ) object_id_size = 512 RenderTargets.OBJECT_ID = self.create_rendertarget( "OBJECT_ID", texture_type=Texture2D, option=Option.NONE, width=object_id_size, height=object_id_size, internal_format=GL_R32F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) RenderTargets.OBJECT_ID_DEPTH = self.create_rendertarget( "OBJECT_ID_DEPTH", texture_type=Texture2D, option=Option.NONE, width=object_id_size, height=object_id_size, internal_format=GL_DEPTH_COMPONENT32F, texture_format=GL_DEPTH_COMPONENT, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) hdr_options = dict( texture_type=Texture2D, option=Option.MSAA | Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR_MIPMAP_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, clear_color=COLOR_BLACK, wrap=GL_CLAMP ) RenderTargets.HDR = self.create_rendertarget("HDR", **hdr_options) RenderTargets.HDR_TEMP = self.create_rendertarget("HDR_TEMP", **hdr_options) RenderTargets.HDR_BACKUP = self.create_rendertarget("HDR_BACKUP", **hdr_options) bloom_options = dict( texture_type=Texture2D, option=Option.SSAA, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP ) RenderTargets.BLOOM_0 = self.create_rendertarget( "BLOOM_0", width=fullsize_x / 2, height=fullsize_y / 2, **bloom_options ) RenderTargets.BLOOM_1 = self.create_rendertarget( "BLOOM_1", width=fullsize_x / 4, height=fullsize_y / 4, **bloom_options ) RenderTargets.BLOOM_2 = self.create_rendertarget( "BLOOM_2", width=fullsize_x / 8, height=fullsize_y / 8, **bloom_options ) RenderTargets.BLOOM_3 = self.create_rendertarget( "BLOOM_3", width=fullsize_x / 16, height=fullsize_y / 16, **bloom_options ) RenderTargets.BLOOM_4 = self.create_rendertarget( "BLOOM_4", width=fullsize_x / 32, height=fullsize_y / 32, **bloom_options ) RenderTargets.LIGHT_SHAFT = self.create_rendertarget( "LIGHT_SHAFT", texture_type=Texture2D, width=halfsize_x, height=halfsize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP ) RenderTargets.LIGHT_PROBE_ATMOSPHERE = self.create_rendertarget( "LIGHT_PROBE_ATMOSPHERE", texture_type=TextureCube, width=512, height=512, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR_MIPMAP_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP_TO_EDGE, immutable=True ) RenderTargets.ATMOSPHERE = self.create_rendertarget( "ATMOSPHERE", texture_type=Texture2D, width=quatersize_x, height=quatersize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP_TO_EDGE, immutable=True ) RenderTargets.ATMOSPHERE_INSCATTER = self.create_rendertarget( "ATMOSPHERE_INSCATTER", texture_type=Texture2D, width=quatersize_x, height=quatersize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP_TO_EDGE, immutable=True ) RenderTargets.TAA_RESOLVE = self.create_rendertarget( "TAA Resolve", texture_type=Texture2D, option=Option.MSAA | Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, data_type=hdr_data_type, wrap=GL_CLAMP ) RenderTargets.DIFFUSE = self.create_rendertarget( "DIFFUSE", texture_type=Texture2D, option=Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.MATERIAL = self.create_rendertarget( "MATERIAL", texture_type=Texture2D, option=Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) RenderTargets.WORLD_NORMAL = self.create_rendertarget( "WORLD_NORMAL", texture_type=Texture2D, option=Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) # It must attach to depth render target shadow_map_size = 2048 RenderTargets.STATIC_SHADOWMAP = self.create_rendertarget( "STATIC_SHADOWMAP", texture_type=Texture2D, width=shadow_map_size, height=shadow_map_size, internal_format=GL_DEPTH_COMPONENT32, texture_format=GL_DEPTH_COMPONENT, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) RenderTargets.DYNAMIC_SHADOWMAP = self.create_rendertarget( "DYNAMIC_SHADOWMAP", texture_type=Texture2D, width=shadow_map_size, height=shadow_map_size, internal_format=GL_DEPTH_COMPONENT32, texture_format=GL_DEPTH_COMPONENT, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) RenderTargets.COMPOSITE_SHADOWMAP = self.create_rendertarget( "COMPOSITE_SHADOWMAP", texture_type=Texture2D, width=shadow_map_size, height=shadow_map_size, internal_format=GL_R32F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) # It must attach to color render target RenderTargets.LINEAR_DEPTH = self.create_rendertarget( "LINEAR_DEPTH", texture_type=Texture2D, width=fullsize_x, height=fullsize_y, internal_format=GL_R32F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_NEAREST_MIPMAP_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) data = np.zeros(1, dtype=np.float32) RenderTargets.FOCUS_DISTANCE = self.create_rendertarget( "FOCUS_DISTANCE", texture_type=Texture2D, width=1, height=1, internal_format=GL_R32F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP, data=data ) ssr_options = dict( texture_type=Texture2D, width=halfsize_x, height=halfsize_y, internal_format=hdr_internal_format, texture_format=GL_RGBA, data_type=hdr_data_type, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, clear_color=COLOR_BLACK, wrap=GL_CLAMP ) RenderTargets.SCREEN_SPACE_REFLECTION = self.create_rendertarget("SCREEN_SPACE_REFLECTION", **ssr_options) RenderTargets.SCREEN_SPACE_REFLECTION_RESOLVED_PREV = self.create_rendertarget("SCREEN_SPACE_REFLECTION_RESOLVED_PREV", **ssr_options) RenderTargets.SCREEN_SPACE_REFLECTION_RESOLVED = self.create_rendertarget("SCREEN_SPACE_REFLECTION_RESOLVED", **ssr_options) RenderTargets.SSAO = self.create_rendertarget( "SSAO", texture_type=Texture2D, width=halfsize_x, height=halfsize_y, internal_format=GL_R16F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.VELOCITY = self.create_rendertarget( "VELOCITY", texture_type=Texture2D, option=Option.SSAA, width=fullsize_x, height=fullsize_y, internal_format=GL_RG32F, texture_format=GL_RG, data_type=GL_FLOAT, min_filter=GL_NEAREST, mag_filter=GL_NEAREST, wrap=GL_CLAMP ) RenderTargets.FFT_A = self.create_rendertarget( 'FFT_A', texture_type=Texture2DArray, image_mode='RGBA', width=OceanConstants.FFT_SIZE, height=OceanConstants.FFT_SIZE, depth=5, internal_format=GL_RGBA16F, texture_format=GL_RGBA, min_filter=GL_LINEAR_MIPMAP_LINEAR, mag_filter=GL_LINEAR, data_type=GL_FLOAT, wrap=GL_REPEAT, immutable=True ) RenderTargets.FFT_B = self.create_rendertarget( 'FFT_B', texture_type=Texture2DArray, image_mode='RGBA', width=OceanConstants.FFT_SIZE, height=OceanConstants.FFT_SIZE, depth=5, internal_format=GL_RGBA16F, texture_format=GL_RGBA, min_filter=GL_LINEAR_MIPMAP_LINEAR, mag_filter=GL_LINEAR, data_type=GL_FLOAT, wrap=GL_REPEAT, immutable=True ) RenderTargets.TEMP_RGBA8 = self.create_rendertarget( "TEMP_RGBA8", texture_type=Texture2D, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.TEMP_2D_ARRAY = self.create_rendertarget( "TEMP_2D_ARRAY", texture_type=Texture2DArray, width=fullsize_x, height=fullsize_y, depth=5, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.TEMP_MULTISAMPLE_X4 = self.create_rendertarget( "TEMP_MULTISAMPLE_X4", texture_type=Texture2DMultiSample, multisample_count=4, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, texture_format=GL_RGBA, data_type=GL_UNSIGNED_BYTE, min_filter=GL_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) RenderTargets.TEMP_RENDER_BUFFER_MULTISAMPLE = self.create_rendertarget( "TEMP_RENDER_BUFFER_MULTISAMPLE", texture_type=RenderBuffer, multisample_count=4, width=fullsize_x, height=fullsize_y, internal_format=GL_RGBA8, wrap=GL_CLAMP ) RenderTargets.TEMP_HEIGHT_MAP = self.create_rendertarget( "TEMP_HEIGHT_MAP", texture_type=Texture2D, width=1024, height=1024, internal_format=GL_R32F, texture_format=GL_RED, data_type=GL_FLOAT, min_filter=GL_LINEAR_MIPMAP_LINEAR, mag_filter=GL_LINEAR, wrap=GL_CLAMP ) self.texture_lod_in_ssao = math.log2(RenderTargets.LINEAR_DEPTH.width) - math.log2(RenderTargets.SSAO.width) self.core_manager.gc_collect()
173902
def add_model_specific_args(parser, root_dir): parser.add_argument( "--train_data_file", default=None, type=str, required=True, help="The input training data file (a text file).", ) parser.add_argument( "--output_dir", type=str, required=True, help="The output directory where the model predictions and checkpoints will be written.", ) parser.add_argument( "--model_type", type=str, required=False, help="The model architecture to be trained or fine-tuned.", ) parser.add_argument( "--data_dir", type=str, required=True, help="The data directory", ) # Other parameters parser.add_argument( "--eval_data_file", default=None, type=str, help="An optional input evaluation data file to evaluate the perplexity on (a text file).", ) parser.add_argument( "--test_data_file", default=None, type=str, help="An optional input evaluation data file to evaluate the perplexity on (a text file).", ) parser.add_argument( "--model_name_or_path", default=None, type=str, help="The model checkpoint for weights initialization. Leave None if you want to train a model from scratch.", ) parser.add_argument( "--config_name", default=None, type=str, help="Optional pretrained config name or path if not the same as model_name_or_path. If both are None, initialize a new config.", ) parser.add_argument( "--tokenizer_name_or_path", default=None, type=str, help="Optional pretrained tokenizer name or path if not the same as model_name_or_path. If both are None, initialize a new tokenizer.", ) parser.add_argument( "--cache_dir", default=None, type=str, help="Optional directory to store the pre-trained models downloaded from s3 (instead of the default one)", ) parser.add_argument( "--src_block_size", default=512, type=int, help="Optional input sequence length after tokenization.", ) parser.add_argument( "--tgt_block_size", default=512, type=int, help="Optional input sequence length after tokenization.", ) parser.add_argument( "--src_prefix", default="", type=str, help="Source prefix", ) parser.add_argument( "--tgt_prefix", default="", type=str, help="Target prefix", ) parser.add_argument( "--val_metric", default="bleu", type=str, help="validation metric", required=False, choices=["bleu", "rouge2", "loss", "smatch", None], ) parser.add_argument( "--eval_beam", default=5, type=int, help="validation beams", ) parser.add_argument( "--eval_lenpen", default=1.0, type=float, help="validation length penity", ) parser.add_argument( "--eval_max_length", default=512, type=int, help="Max tgt generated length", ) parser.add_argument( "--label_smoothing", default=0.0, type=float, help="Label smoothed Cross Entorpy Loss", ) parser.add_argument( "--dropout", default=None, type=float, help="Dropout for model", ) parser.add_argument("--unified_input", action="store_true", help="Whether to use unified input for finetuning.") parser.add_argument("--smart_init", action="store_true", help="Whether to initialize AMR word embeddings smartly.") parser.add_argument("--do_train", action="store_true", help="Whether to run training.") parser.add_argument( "--do_predict", action="store_true", help="Whether to run eval on the dev set." ) parser.add_argument( "--do_eval", action="store_true", help="Whether to run eval on the dev set." ) parser.add_argument( "--evaluate_during_training", action="store_true", help="Run evaluation during training at each logging step.", ) parser.add_argument( "--per_gpu_train_batch_size", default=4, type=int, help="Batch size per GPU/CPU for training.", ) parser.add_argument( "--per_gpu_eval_batch_size", default=4, type=int, help="Batch size per GPU/CPU for evaluation.", ) parser.add_argument( "--train_num_workers", default=4, type=int, help="Batch size per GPU/CPU for training.", ) parser.add_argument( "--eval_num_workers", default=4, type=int, help="Batch size per GPU/CPU for evaluation.", ) parser.add_argument( "--process_num_workers", default=1, type=int, help="Batch size per GPU/CPU for evaluation.", ) parser.add_argument( "--early_stopping_patience", type=int, default=0, help="Number of updates steps to control early stop", ) parser.add_argument( "--lr_scheduler", default="linear", type=str, help="The initial learning rate for Adam." ) parser.add_argument( "--learning_rate", default=5e-5, type=float, help="The initial learning rate for Adam." ) parser.add_argument( "--weight_decay", default=0.0, type=float, help="Weight decay if we apply some." ) parser.add_argument( "--adam_epsilon", default=1e-8, type=float, help="Epsilon for Adam optimizer." ) parser.add_argument("--max_grad_norm", default=1.0, type=float, help="Max gradient norm.") parser.add_argument( "--warmup_steps", default=0, type=int, help="Linear warmup over warmup_steps." ) parser.add_argument( "--overwrite_output_dir", action="store_true", help="Overwrite the content of the output directory", ) parser.add_argument("--seed", type=int, default=42, help="random seed for initialization") parser.add_argument( "--fp16", action="store_true", help="Whether to use 16-bit (mixed) precision (through NVIDIA apex) instead of 32-bit", ) parser.add_argument( "--fp16_opt_level", type=str, default="O2", help="For fp16: Apex AMP optimization level selected in ['O0', 'O1', 'O2', and 'O3']." "See details at https://nvidia.github.io/apex/amp.html", ) parser.add_argument( "--save_total_limit", type=int, default=1, help="Limit the total amount of checkpoints, delete the older checkpoints in the output_dir, does not delete by default", ) parser.add_argument( "--save_interval", type=int, default=-1, help="save step interval", ) parser.add_argument("--resume", action="store_true", help="Whether to continue run training.") return parser
173926
from os import path, listdir, remove import platform import io from datetime import datetime, timedelta import time import json import pandas as pd from tinymongo import TinyMongoClient import pytest from flask import url_for import publicAPI.exceptions as exceptions import publicAPI.config as api_utils import helpers HERE = path.abspath(path.dirname(__file__)) ROOT = path.dirname(HERE) CONFIG_FILENAME = path.join(HERE, 'test_config.cfg') CONFIG = helpers.get_config(CONFIG_FILENAME) ROOT_CONFIG = helpers.get_config( path.join(ROOT, 'scripts', 'app.cfg') ) TEST_CACHE_PATH = path.join(HERE, 'cache') CACHE_PATH = path.join(ROOT, 'publicAPI', 'cache') BASE_URL = 'http://localhost:8000' def test_clear_caches(): """remove cache files for test""" helpers.clear_caches(True) VIRGIN_RUNTIME = None @pytest.mark.usefixtures('client_class') class TestODBCcsv: """test framework for collecting endpoint stats""" def test_odbc_happypath(self): """exercise `collect_stats`""" global VIRGIN_RUNTIME fetch_start = time.time() req = self.client.get( url_for('ohlc_endpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id') ) ) fetch_end = time.time() VIRGIN_RUNTIME = fetch_end - fetch_start print(req.__dict__) data = None with io.StringIO(req.data.decode()) as buff: data = pd.read_csv(buff) assert req._status_code == 200 expected_headers = [ 'date', 'open', 'high', 'low', 'close', 'volume' ] assert set(expected_headers) == set(data.columns.values) def test_odbc_happypath_cached(self): """rerun test with cached values""" fetch_start = time.time() req = self.client.get( url_for('ohlc_endpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id') ) ) fetch_end = time.time() runtime = fetch_end - fetch_start if runtime > VIRGIN_RUNTIME/1.5: pytest.xfail('cached performance slower than expected') def test_odbc_bad_typeid(self): """make sure expected errors happen on bad typeid""" req = self.client.get( url_for('ohlc_endpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'bad_typeid'), region_id=CONFIG.get('TEST', 'region_id') ) ) assert req._status_code == 404 def test_odbc_bad_regionid(self): """make sure expected errors happen on bad typeid""" req = self.client.get( url_for('ohlc_endpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'bad_regionid') ) ) assert req._status_code == 404 def test_odbc_bad_format(self): """make sure expected errors happen on bad typeid""" req = self.client.get( url_for('ohlc_endpoint', return_type='butts') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id') ) ) assert req._status_code == 405 @pytest.mark.usefixtures('client_class') class TestODBCjson: """test framework for collecting endpoint stats""" def test_odbc_happypath(self): """exercise `collect_stats`""" test_clear_caches() global VIRGIN_RUNTIME fetch_start = time.time() req = self.client.get( url_for('ohlc_endpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id') ) ) fetch_end = time.time() VIRGIN_RUNTIME = fetch_end - fetch_start raw_data = json.loads(req.data.decode()) data = pd.DataFrame(raw_data) assert req._status_code == 200 expected_headers = [ 'date', 'open', 'high', 'low', 'close', 'volume' ] assert set(expected_headers) == set(data.columns.values) def test_odbc_bad_typeid(self): """make sure expected errors happen on bad typeid""" req = self.client.get( url_for('ohlc_endpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'bad_typeid'), region_id=CONFIG.get('TEST', 'region_id') ) ) assert req._status_code == 404 def test_odbc_bad_regionid(self): """make sure expected errors happen on bad typeid""" req = self.client.get( url_for('ohlc_endpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'bad_regionid') ) ) assert req._status_code == 404 TEST_API_KEY = '' def test_get_api_key(): """fetch api key from cache for testing""" global TEST_API_KEY connection = TinyMongoClient(CACHE_PATH) api_db = connection.prosperAPI.users vals = api_db.find() if not vals: pytest.xfail('Unable to test without test keys') test_key = vals['api_key'] connection.close() TEST_API_KEY = test_key @pytest.mark.prophet @pytest.mark.usefixtures('client_class') class TestProphetcsv: """test framework for collecting endpoint stats""" def test_prophet_happypath(self): """exercise `collect_stats`""" test_clear_caches() assert TEST_API_KEY != '' global VIRGIN_RUNTIME fetch_start = time.time() req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) fetch_end = time.time() VIRGIN_RUNTIME = fetch_end - fetch_start data = None with io.StringIO(req.data.decode()) as buff: data = pd.read_csv(buff) assert req._status_code == 200 expected_headers = [ 'date', 'avgPrice', 'yhat', 'yhat_low', 'yhat_high', 'prediction' ] assert set(expected_headers) == set(data.columns.values) ##TODO: validate ranges? def test_prophet_happypath_cached(self): """exercise `collect_stats`""" fetch_start = time.time() req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) fetch_end = time.time() runtime = fetch_end - fetch_start if runtime > VIRGIN_RUNTIME/1.5: pytest.xfail('cached performance slower than expected') def test_prophet_bad_regionid(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'bad_regionid'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 404 def test_prophet_bad_typeid(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'bad_typeid'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 404 def test_prophet_bad_api(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key='IMAHUGEBUTT', range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 401 def test_prophet_bad_range(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='csv') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=9001 ) ) assert req._status_code == 413 def test_prophet_bad_format(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='butts') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 405 @pytest.mark.prophet @pytest.mark.usefixtures('client_class') class TestProphetjson: """test framework for collecting endpoint stats""" def test_prophet_happypath(self): """exercise `collect_stats`""" test_clear_caches() global VIRGIN_RUNTIME fetch_start = time.time() req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) fetch_end = time.time() VIRGIN_RUNTIME = fetch_end - fetch_start raw_data = json.loads(req.data.decode()) data = pd.DataFrame(raw_data) assert req._status_code == 200 expected_headers = [ 'date', 'avgPrice', 'yhat', 'yhat_low', 'yhat_high', 'prediction' ] assert set(expected_headers) == set(data.columns.values) ##TODO: validate ranges? def test_prophet_happypath_cached(self): """exercise `collect_stats`""" fetch_start = time.time() req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) fetch_end = time.time() runtime = fetch_end - fetch_start if runtime > VIRGIN_RUNTIME/1.5: pytest.xfail('cached performance slower than expected') def test_prophet_bad_regionid(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'bad_regionid'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 404 def test_prophet_bad_typeid(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'bad_typeid'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 404 def test_prophet_bad_api(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key='IMAHUGEBUTT', range=CONFIG.get('TEST', 'forecast_range') ) ) assert req._status_code == 401 def test_prophet_bad_range(self): """exercise `collect_stats`""" req = self.client.get( url_for('prophetendpoint', return_type='json') + '?typeID={type_id}&regionID={region_id}&api={api_key}&range={range}'.format( type_id=CONFIG.get('TEST', 'nosplit_id'), region_id=CONFIG.get('TEST', 'region_id'), api_key=TEST_API_KEY, range=9000 ) ) assert req._status_code == 413
173930
import graphene from fastapi import FastAPI from starlette.graphql import GraphQLApp class Query(graphene.ObjectType): hello = graphene.String(name=graphene.String(default_value="stranger")) def resolve_hello(self, info, name): return "Hello " + name app = FastAPI() app.add_route("/", GraphQLApp(schema=graphene.Schema(query=Query)))
173932
from copy import deepcopy import torch import cv2 import time import pickle import os import numpy as np import ctypes from _path_init import * from visualDet3D.utils.timer import Timer from visualDet3D.utils.utils import cfg_from_file from visualDet3D.data.kitti.kittidata import KittiData def read_one_split(cfg, index_names, data_root_dir, output_dict, data_split='training', time_display_inter=100): N = len(index_names) frames = [None] * N print("start reading {} data".format(data_split)) timer = Timer() for i, index_name in enumerate(index_names): # read data with dataloader api data_frame = KittiData(data_root_dir, index_name, output_dict) calib, _, _, _ = data_frame.read_data() # store the list of kittiObjet and kittiCalib data_frame.calib = calib frames[i] = data_frame if (i+1) % time_display_inter == 0: avg_time = timer.compute_avg_time(i+1) eta = timer.compute_eta(i+1, N) print("{} iter:{}/{}, avg-time:{}, eta:{}".format( data_split, i+1, N, avg_time, eta), end='\r') save_dir = os.path.join(cfg.path.preprocessed_path, data_split) if not os.path.isdir(save_dir): os.makedirs(save_dir) pkl_file = os.path.join(save_dir, 'imdb.pkl') pickle.dump(frames, open(pkl_file, 'wb')) print("{} split finished precomputing".format(data_split)) def main(config="config/config.py"): cfg = cfg_from_file(config) torch.cuda.set_device(cfg.trainer.gpu) time_display_inter = 100 # define the inverval displaying time consumed in loop data_root_dir = cfg.path.test_path # the base directory of training dataset calib_path = os.path.join(data_root_dir, 'calib') list_calib = os.listdir(calib_path) N = len(list_calib) # no need for image, could be modified for extended use output_dict = { "calib": True, "image": False, "label": False, "velodyne": False, } num_test_file = N test_names = ["%06d" % i for i in range(num_test_file)] read_one_split(cfg, test_names, data_root_dir, output_dict, 'test', time_display_inter) print("Preprocessing finished") if __name__ == '__main__': from fire import Fire Fire(main)
173938
from configs.channel_configs import ChannelConfigs def get_configs(config_name): if config_name == 'channels-48': return ChannelConfigs(n_channels=[[48, 40, 32], [48, 40, 32], [48, 40, 32], [48, 40, 32], [48, 40, 32], [48, 40, 32, 24], [48, 40, 32, 24], [48, 40, 32, 24]]) elif config_name == 'channels-64': return ChannelConfigs(n_channels=[[64, 48, 40, 32], [64, 48, 40, 32], [64, 48, 40, 32], [64, 48, 40, 32], [64, 48, 40, 32], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24]]) elif config_name == 'channels-64-coco': return ChannelConfigs(n_channels=[[64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24], [64, 48, 40, 32, 24]]) elif config_name == 'channels-64_2': return ChannelConfigs( n_channels=[[64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16], [64, 56, 48, 40, 32, 24, 16]]) raise NotImplementedError('Unknown configuration [%s]!!!' % config_name)
173976
from typing import Iterable from pandas import DataFrame from recipe_db.analytics.recipe import RecipesPopularityAnalysis, CommonStylesAnalysis, RecipesTrendAnalysis, \ RecipesListAnalysis from recipe_db.analytics.scope import RecipeScope, YeastProjection, YeastScope from recipe_db.models import Yeast, Recipe USE_FILTER_ALE = 'ale' USE_FILTER_LAGER = 'lager' USE_FILTER_WHEAT = 'wheat' USE_FILTER_BRETT_BACTERIA = 'brett-bacteria' YEAST_FILTER_TO_TYPES = { USE_FILTER_ALE: [Yeast.ALE], USE_FILTER_LAGER: [Yeast.LAGER], USE_FILTER_WHEAT: [Yeast.WHEAT], USE_FILTER_BRETT_BACTERIA: [Yeast.BRETT_BACTERIA], } class YeastAnalysis: def __init__(self, yeast: Yeast) -> None: self.yeast = yeast self.recipe_scope = RecipeScope() self.recipe_scope.yeast_scope = YeastScope() self.recipe_scope.yeast_scope.yeasts = [yeast] self.yeast_projection = YeastProjection() self.yeast_projection.yeasts = [yeast] def popularity(self) -> DataFrame: analysis = RecipesPopularityAnalysis(RecipeScope()) return analysis.popularity_per_yeast(self.yeast_projection) def common_styles_absolute(self) -> DataFrame: analysis = CommonStylesAnalysis(self.recipe_scope) return analysis.common_styles_absolute(num_top=20) def common_styles_relative(self) -> DataFrame: analysis = CommonStylesAnalysis(self.recipe_scope) return analysis.common_styles_relative(num_top=20) def trending_hops(self) -> DataFrame: analysis = RecipesTrendAnalysis(self.recipe_scope) return analysis.trending_hops() def popular_hops(self) -> DataFrame: analysis = RecipesPopularityAnalysis(self.recipe_scope) return analysis.popularity_per_hop(num_top=8) def random_recipes(self, num_recipes: int) -> Iterable[Recipe]: analysis = RecipesListAnalysis(self.recipe_scope) return analysis.random(num_recipes)
174005
import pytest from chemml.chem import tensorise_molecules from chemml.chem import Molecule @pytest.fixture() def mols(): m1 = Molecule('c1ccc1', 'smiles') m2 = Molecule('CNC', 'smiles') molecules = [m1, m2] return molecules def test_exception(): # not a molecule with pytest.raises(ValueError): tensorise_molecules('mol') # not a list of molecules with pytest.raises(Exception): tensorise_molecules(['mol1', 'mol2']) def test_tensorise_molecules(mols): a,b,d = tensorise_molecules(mols, batch_size=1) assert a.shape[0] == 2 assert b.shape[1] == 4 assert d.shape[2] == 5
174046
from typing import Optional def try_convert_float(float_str: str) -> Optional[float]: try: return float(float_str) except ValueError: return None
174074
from urllib.parse import urljoin from flask import current_app from server.apis.base_api import BaseApi class NasdaqUrl: def __init__(self, root): self.root = root def make(self, *args): return urljoin(self.root, *args) def info(self, symbol): if not symbol: raise Exception("Symbol is required") return self.make(f"/api/quote/{symbol.upper()}/info") def news(self, symbol): return self.make( f"/api/v1/news-headlines-fetcher/{symbol.upper()}/0/4" ) # first four def movers(self): return self.make("/api/marketmovers") class NasdaqApi(BaseApi): def __init__(self): BaseApi.__init__(self) self._session = None self._apikey = None self._url = None @property def session(self): if self._session is None: self._session = BaseApi.create_session() return self._session @property def url(self): if self._url is None: self._url = NasdaqUrl(current_app.config.get("NASDAQ_API_URL")) return self._url def stock_info(self, symbol, params={}): params.update({"assetclass": "stocks"}) resp = self.get(self.url.info(symbol), params=params) resp.raise_for_status() return resp.json() def get_headlines(self, symbol): url = self.url.news(symbol).replace("api", "www", 1) resp = self.get( url, headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36", "Referer": f"https://www.nasdaq.com/market-activity/stocks/{symbol.lower()}/press-releases", }, ) resp.raise_for_status() return resp def get_market_movers(self, params={}): params.update( {"assetclass": "STOCKS", "exchangestatus": "currentMarket", "limit": 5} ) resp = self.get(self.url.movers(), params=params) resp.raise_for_status() return resp.json() Nasdaq = NasdaqApi()
174092
from rest_framework import serializers from demo.models import Lock class LockerSerializer(serializers.ModelSerializer): actions = serializers.SerializerMethodField() class Meta: model = Lock fields = ('id', 'actions', 'status') readonly = ('id', 'status') def get_actions(self, instance): return sorted(set([transition.action_name for transition in instance.process.get_available_transitions()]))
174127
from argparse import ArgumentParser from collections import Counter from json import JSONDecodeError, loads from typing import Counter as CounterType, Optional from typing import Dict from commode_utils.vocabulary import BaseVocabulary, build_from_scratch from embeddings_for_trees.utils.common import AST class Vocabulary(BaseVocabulary): NODE = "nodeType" @staticmethod def process_raw_sample(raw_sample: str, counters: Dict[str, CounterType[str]]): try: sample = loads(raw_sample) except JSONDecodeError: with open(Vocabulary._log_filename, "a") as log_file: log_file.write(raw_sample + "\n") return counters[Vocabulary.LABEL].update(sample[Vocabulary.LABEL].split(Vocabulary._separator)) for node in sample[AST]: counters[Vocabulary.TOKEN].update(node[Vocabulary.TOKEN].split(Vocabulary._separator)) counters[Vocabulary.NODE].update([node[Vocabulary.NODE]]) class TypedVocabulary(Vocabulary): TYPE = "tokenType" def __init__( self, vocabulary_file: str, max_labels: Optional[int] = None, max_tokens: Optional[int] = None, max_types: Optional[int] = None, ): super().__init__(vocabulary_file, max_labels, max_tokens) self._type_to_id = {self.PAD: 0, self.UNK: 1, self.SOS: 2, self.EOS: 3} self._type_to_id.update( (token[0], i + 4) for i, token in enumerate(self._counters[self.TYPE].most_common(max_types)) ) @property def type_to_id(self) -> Dict[str, int]: return self._type_to_id @staticmethod def process_raw_sample(raw_sample: str, counters: Dict[str, CounterType[str]]): try: sample = loads(raw_sample) except JSONDecodeError: with open(TypedVocabulary._log_filename, "a") as log_file: log_file.write(raw_sample + "\n") return if TypedVocabulary.TYPE not in counters: counters[TypedVocabulary.TYPE] = Counter() counters[TypedVocabulary.LABEL].update(sample[TypedVocabulary.LABEL].split(TypedVocabulary._separator)) for node in sample[AST]: counters[TypedVocabulary.TOKEN].update(node[TypedVocabulary.TOKEN].split(TypedVocabulary._separator)) counters[TypedVocabulary.NODE].update([node[TypedVocabulary.NODE]]) counters[TypedVocabulary.TYPE].update(node[TypedVocabulary.TYPE].split(TypedVocabulary._separator)) if __name__ == "__main__": arg_parse = ArgumentParser() arg_parse.add_argument("data", type=str, help="Path to file with data") arg_parse.add_argument("--typed", action="store_true", help="Use typed vocabulary") args = arg_parse.parse_args() _vocab_cls = TypedVocabulary if args.typed else Vocabulary build_from_scratch(args.data, _vocab_cls)
174134
import json from nose.tools import assert_greater from .... import make from ...ut import need_scrapyd from .. import Gist @need_scrapyd def test_spy_id(): app = make() with app.app_context(): d = Gist.instance.spy(json.dumps(dict(method='id', id='5566446')), 60) assert_greater(len(d.files), 0) assert d.files[0].content
174137
from .request import BoxRestRequest from .exceptions import BoxError, BoxHttpResponseError class BoxAuthenticateFlow(object): """From the Client ID and Client Secret from Box, get the Access Token and the Refresh Token. Usage: >>> flow = BoxAuthenticateFlow('my_id', 'my_secret') >>> url = flow.get_authorization_url() ... ... >>> access_token, refresh_token = flow.get_access_tokens('generated_auth_code') """ def __init__(self, client_id, client_secret): """Constructor Args: client_id (str): Client ID provided by Box. client_secret (str): Client Secret provided by Box. """ self.box_request = BoxRestRequest(client_id, client_secret) self.client_id = client_id self.client_secret = client_secret def get_authorization_url(self, redirect_uri=None): """Get the url used to get an authorization code. Args: redirect_uri (str): Https url where Box will redirect the user with the authorization code in the querystring. If None the value stored in the Box application settings will be used. Returns: str. Url used to get an authorization code. """ return self.box_request.get_authorization_url(redirect_uri) def get_access_tokens(self, authorization_code): """From the authorization code, get the "access token" and the "refresh token" from Box. Args: authorization_code (str). Authorisation code emitted by Box at the url provided by the function :func:`get_authorization_url`. Returns: tuple. (access_token, refresh_token) Raises: BoxError: An error response is returned from Box (status_code >= 400). BoxHttpResponseError: Response from Box is malformed. requests.exceptions.*: Any connection related problem. """ response = self.box_request.get_access_token(authorization_code) try: att = response.json() except Exception, ex: raise BoxHttpResponseError(ex) if response.status_code >= 400: raise BoxError(response.status_code, att) return att['access_token'], att['refresh_token']
174146
from django.contrib import messages from django.contrib.auth import authenticate, login from django.shortcuts import redirect, render from vendor.forms import VendorSignUpForm from vendor.utils import service def VendorSignUpView(request): ''' Sign up a new vendor ''' if request.method == 'POST': form = VendorSignUpForm(request.POST, request.FILES) if form.is_valid(): form.save() user = authenticate(email=form.cleaned_data['email'], password=form.cleaned_data['<PASSWORD>']) ''' auto sign in after sign up ''' login(request, user) messages.success(request, f'Account has been successfully created as {request.user.vendor.email} ') service.send_welcome_mail(request, request.user.vendor.email) return redirect('vendor:root_path') else: form = VendorSignUpForm() return render(request, 'vendor/sign_up.html', {'form': form})
174160
import unittest from arekit.contrib.source.rusentrel.io_utils import RuSentRelIOUtils, RuSentRelVersions class TestRuSentRel(unittest.TestCase): rsr_version = RuSentRelVersions.V11 def test_iter_train_indices(self): train_indices = list(RuSentRelIOUtils.iter_train_indices(self.rsr_version)) for i in train_indices: print(i, end=' ') for i in range(1, 46): if i in [9, 22, 26]: continue self.assertIn(i, train_indices) def test_iter_test_indices(self): test_indices = list(RuSentRelIOUtils.iter_test_indices(self.rsr_version)) for i in range(46, 76): if i in [70]: continue self.assertIn(i, test_indices) if __name__ == '__main__': unittest.main()
174254
from collections import namedtuple from .command import Command from .utils import update_termination_protection, \ is_stack_does_not_exist_exception class StackDeleteOptions(namedtuple('StackDeleteOptions', ['no_wait', 'ignore_missing'])): pass class StackDeleteCommand(Command): SKIP_UPDATE_REFERENCES = True def run(self, stack_context): # stack contexts session = stack_context.session parameters = stack_context.parameters metadata = stack_context.metadata self.ppt.pprint_stack_name(stack_context.stack_key, parameters['StackName'], 'Deleting stack ') # create boto3 cfn resource cfn = session.resource('cloudformation') self.ppt.pprint_session(session) self.ppt.pprint_parameters(parameters) # call boto3 stack = cfn.Stack(parameters['StackName']) try: update_termination_protection( session, parameters.pop('EnableTerminationProtection', None), parameters['StackName'], self.ppt) self.ppt.pprint_stack(stack) stack.delete() except Exception as ex: if self.options.ignore_missing and \ is_stack_does_not_exist_exception(ex): self.ppt.secho(str(ex), fg='red') return else: raise # wait until delete complete if self.options.no_wait: self.ppt.secho('Stack is being deleted.') else: self.ppt.wait_until_delete_complete(session, stack) self.ppt.secho('Stack delete complete.', fg='green')
174268
from __future__ import absolute_import import torch import torch.nn as nn import torch.nn.functional as F import pdb _func_conv_nd_table = { 1: F.conv1d, 2: F.conv2d, 3: F.conv3d } def spatial_filter_nd(x, kernel, mode='replicate'): """ N-dimensional spatial filter with padding. Args: x (~torch.Tensor): Input tensor. kernel (~torch.Tensor): Weight tensor (e.g., Gaussain kernel). mode (str, optional): Padding mode. Defaults to 'replicate'. Returns: ~torch.Tensor: Output tensor """ n_dim = x.dim() - 2 conv = _func_conv_nd_table[n_dim] pad = [None,None]*n_dim pad[0::2] = kernel.shape[2:] pad[1::2] = kernel.shape[2:] pad = [k//2 for k in pad] return conv(F.pad(x, pad=pad, mode=mode), kernel) def normalized_cross_correlation(x, y, return_map, reduction='mean', eps=1e-8): """ N-dimensional normalized cross correlation (NCC) Args: x (~torch.Tensor): Input tensor. y (~torch.Tensor): Input tensor. return_map (bool): If True, also return the correlation map. reduction (str, optional): Specifies the reduction to apply to the output: ``'mean'`` | ``'sum'``. Defaults to ``'sum'``. eps (float, optional): Epsilon value for numerical stability. Defaults to 1e-8. Returns: ~torch.Tensor: Output scalar ~torch.Tensor: Output tensor """ shape = x.shape b = shape[0] # reshape x = x.view(b, -1) y = y.view(b, -1) # mean x_mean = torch.mean(x, dim=1, keepdim=True) y_mean = torch.mean(y, dim=1, keepdim=True) # deviation x = x - x_mean y = y - y_mean dev_xy = torch.mul(x,y) dev_xx = torch.mul(x,x) dev_yy = torch.mul(y,y) dev_xx_sum = torch.sum(dev_xx, dim=1, keepdim=True) dev_yy_sum = torch.sum(dev_yy, dim=1, keepdim=True) ncc = torch.div(dev_xy + eps / dev_xy.shape[1], torch.sqrt( torch.mul(dev_xx_sum, dev_yy_sum)) + eps) ncc_map = ncc.view(b, *shape[1:]) # reduce if reduction == 'mean': # ncc = torch.mean(torch.sum(ncc, dim=1)) # pdb.set_trace() ncc = torch.sum(ncc, dim=1) elif reduction == 'sum': ncc = torch.sum(ncc) else: raise KeyError('unsupported reduction type: %s' % reduction) if not return_map: return ncc return ncc, ncc_map def local_contrast_norm_nd(x, kernel, eps=1e-8): """ N-dimensional local contrast normalization (LCN). Args: x (~torch.Tensor): Input tensor. kernel (~torch.Tensor): Weight tensor (e.g., Gaussain kernel). eps (float, optional): Epsilon value for numerical stability. Defaults to 1e-8. Returns: ~torch.Tensor: Output tensor """ # reshape b, c = x.shape[:2] spatial_shape = x.shape[2:] x = x.view(b*c, 1, *spatial_shape) # local mean x_mean = spatial_filter_nd(x, kernel) # subtractive normalization x_sub = x - x_mean # local deviation x_dev = spatial_filter_nd(x_sub.pow(2), kernel) x_dev = x_dev.sqrt() x_dev_mean = x_dev.mean() # divisive normalization x_dev = torch.max(x_dev_mean, x_dev) x_dev = torch.clamp(x_dev, eps) ret = x_sub / x_dev ret = ret.view(b, c, *spatial_shape) return ret
174271
from DCWorkflowGraph import getGraph from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition from Products.PageTemplates.PageTemplateFile import PageTemplateFile import os # Import "MessageFactory" to create messages in the DCWorkflowGraph domain from zope.i18nmessageid import MessageFactory _ = MessageFactory('DCWorkflowGraph') manage_workflowGraph = PageTemplateFile(os.path.join('www','manage_workflowGraph'), globals()) manage_workflowGraph.__name__ = 'manage_workflowGraph' manage_workflowGraph._need__name__ = 0 DCWorkflowDefinition.getGraph=getGraph DCWorkflowDefinition.manage_workflowGraph=manage_workflowGraph DCWorkflowDefinition.manage_options=tuple(DCWorkflowDefinition.manage_options)+({'label': _(u'Graph'), 'action': 'manage_workflowGraph'},)
174276
import logging import os import shutil import sys import tempfile import click import numpy as np import tensorflow as tf import tensorflow_hub as hub from word_embeddings import embeddings def non_zero_tokens(tokens): """Receives a batch of vectors of tokens (float) which are zero-padded. Returns a vector of the same size, which has the value 1.0 in positions with actual tokens and 0.0 in positions with zero-padding. :param tokens: :return: """ return tf.ceil(tokens / tf.reduce_max(tf.maximum(tokens, 1.0), [1], keepdims=True)) def p_mean(values, p, n_toks): n_toks = tf.cast(tf.maximum(tf.constant(1.0), n_toks), tf.complex64) p_tf = tf.constant(float(p), dtype=tf.complex64) values = tf.cast(values, dtype=tf.complex64) res = tf.pow( tf.reduce_sum( tf.pow(values, p_tf), axis=1, keepdims=False ) / n_toks, 1.0 / p_tf ) return tf.real(res) def mean(token_embeddings, non_oov_tokens, non_oov_count): return tf.reduce_sum(token_embeddings, axis=1, keepdims=False) / tf.maximum(non_oov_count, 1.0) def max(token_embeddings, non_oov_tokens, non_oov_count): non_oov_tokens = tf.expand_dims(non_oov_tokens, -1) # the last term ensures that we do not set OOV embeddings to very low values to ignore in the maximum if there is # ONLY OOV values token_embeddings = token_embeddings + ((non_oov_tokens - 1) * 10) * tf.minimum(1.0, tf.expand_dims(non_oov_count, -1)) return tf.reduce_max(token_embeddings, axis=1, keepdims=False) def min(token_embeddings, non_oov_tokens, non_oov_count): non_oov_tokens = tf.expand_dims(non_oov_tokens, -1) token_embeddings = token_embeddings + ((non_oov_tokens - 1) * -10) * tf.minimum(1.0, tf.expand_dims(non_oov_count, -1)) return tf.reduce_min(token_embeddings, axis=1, keepdims=False) operations = dict([ ('mean', mean), ('max', max), ('min', min), ('p_mean_3', lambda token_embeddings, non_oov_tokens, non_oov_count: p_mean(token_embeddings, p=3, n_toks=non_oov_count)), ]) def make_module_spec(model, p_means, names, vocab_files, vocab_sizes): def module_fn(): """Spec function for a token embedding module.""" sentences = tf.placeholder(shape=[None], dtype=tf.string, name='sentences') tokens = tf.string_split(sentences, ' ') averaged_embeddings = [] for i, (name, vocab_file, vocab_size) in enumerate(zip(names, vocab_files, vocab_sizes)): embs = embeddings[model][i] assert embs.alias == name embeddings_var = tf.get_variable( initializer=tf.zeros([vocab_size + 1, embs.embeddings_dimensionality]), name='embeddings_{}'.format(name), dtype=tf.float32) lookup_table = tf.contrib.lookup.index_table_from_file( vocabulary_file=vocab_file, num_oov_buckets=1, ) tokens_dense = tf.sparse_tensor_to_dense(tokens, default_value='') token_ids = lookup_table.lookup(tokens_dense) non_oov_tokens = non_zero_tokens(tf.abs(tf.to_float(token_ids) - vocab_size)) non_oov_count = tf.reduce_sum(non_oov_tokens, axis=1, keepdims=True) token_embeddings = tf.nn.embedding_lookup(params=embeddings_var, ids=token_ids) for p_mean in p_means: op_embedding = operations[p_mean](token_embeddings, non_oov_tokens, non_oov_count) averaged_embeddings.append(op_embedding) sentence_embedding = tf.concat(averaged_embeddings, axis=1) hub.add_signature("default", {"sentences": sentences}, {"default": sentence_embedding}) return hub.create_module_spec(module_fn) def export(export_path, model, p_means, names, vocabs, vecs, logger): tmpdir = tempfile.mkdtemp() vocab_files, vocab_sizes = [], [] for name, vocab in zip(names, vocabs): vocab_file = os.path.join(tmpdir, '{}.txt'.format(name)) with tf.gfile.GFile(vocab_file, "w") as f: f.write("\n".join(vocab)) vocab_files.append(vocab_file) vocab_sizes.append(len(vocab)) spec = make_module_spec(model, p_means, names, vocab_files, vocab_sizes) try: with tf.Graph().as_default(): m = hub.Module(spec) # see https://github.com/tensorflow/hub/blob/r0.1/examples/text_embeddings/export.py load_embeddings = [] feed_dict = {} for name, vec in zip(names, vecs): p_embeddings = tf.placeholder(tf.float32) load_embeddings.append(tf.assign(m.variable_map['embeddings_{}'.format(name)], p_embeddings)) feed_dict[p_embeddings] = vec with tf.Session() as sess: sess.run(load_embeddings, feed_dict=feed_dict) m.export(export_path, sess) finally: shutil.rmtree(tmpdir) def export_hub_module(export_path, model, p_means, embeddings_folder, logger): logger.info('Now loading all embeddings') names, vocabs, vecs = [], [], [] for emb in embeddings[model]: emb.download_file(embeddings_folder, logger) for emb in embeddings[model]: emb.load_vectors(embeddings_folder, logger) names.append(emb.alias) vocabs.append(list(emb.vectors.keys())) vecs.append(list(emb.vectors.values())) vecs[-1].append(np.zeros(len(vecs[-1][0]), dtype=np.float32)) # Export the embedding vectors into a TF-Hub module. export(export_path, model, p_means, names, vocabs, vecs, logger) @click.command() @click.option('--export-path', help='export path of the tf hub module') @click.option('--model', default='en-de', help='en-de, en-fr, or monolingual') @click.option('--p-means', default='mean,max,min,p_mean_3', help='comma separated p-means/operations') @click.option('--embeddings-folder', default='data', help='path where the word embeddings will be stored') def main(export_path, model, p_means, embeddings_folder): logger = logging.getLogger('xling_sentence_embeddings') formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler_stdout = logging.StreamHandler(sys.stdout) handler_stdout.setLevel('DEBUG') handler_stdout.setFormatter(formatter) logger.addHandler(handler_stdout) logger.setLevel('DEBUG') if not os.path.exists(embeddings_folder): os.mkdir(embeddings_folder) p_means = p_means.split(',') export_hub_module(export_path, model, p_means, embeddings_folder, logger) if __name__ == "__main__": main()
174295
from random import randint, random def throw_rigged(): if random() < 0.22: return 6 return randint(1, 5)
174317
import argparse import pandas as pd import matplotlib matplotlib.use('Agg') # NOQA import matplotlib.pyplot as plt import seaborn as sns from example import Results def process_results(results, verbose=False): baseline = results.best_baseline() def like_baseline(x): for key in ('n_iter', 'batch_size', 'l2', 'learning_rate', 'loss', 'embedding_dim'): if x[key] != baseline[key]: return False return True data = pd.DataFrame([x for x in results if like_baseline(x)]) best = (data.sort_values('test_mrr', ascending=False) .groupby('compression_ratio', as_index=False).first()) # Normalize per iteration best['elapsed'] = best['elapsed'] / best['n_iter'] if verbose: print(best) baseline_mrr = (best[best['compression_ratio'] == 1.0] ['validation_mrr'].values[0]) baseline_time = (best[best['compression_ratio'] == 1.0] ['elapsed'].values[0]) compression_ratio = best['compression_ratio'].values mrr = best['validation_mrr'].values / baseline_mrr elapsed = best['elapsed'].values / baseline_time return compression_ratio[:-1], mrr[:-1], elapsed[:-1] def plot_results(model, movielens, amazon): sns.set_style("darkgrid") for name, result in (('Movielens', movielens), ('Amazon', amazon)): print('Dataset: {}'.format(name)) (compression_ratio, mrr, elapsed) = process_results(result, verbose=True) plt.plot(compression_ratio, mrr, label=name) plt.ylabel("MRR ratio to baseline") plt.xlabel("Compression ratio") plt.title("Compression ratio vs MRR ratio") plt.legend(loc='lower right') plt.savefig('{}_plot.png'.format(model)) plt.close() for name, result in (('Movielens', movielens), ('Amazon', amazon)): (compression_ratio, mrr, elapsed) = process_results(result) plt.plot(compression_ratio, elapsed, label=name) plt.ylabel("Time ratio to baseline") plt.xlabel("Compression ratio") plt.title("Compression ratio vs time ratio") plt.legend(loc='lower right') plt.savefig('{}_time.png'.format(model)) plt.close() if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('model', type=str) args = parser.parse_args() plot_results(args.model, Results('movielens_{}_results.txt'.format(args.model)), Results('amazon_{}_results.txt'.format(args.model)))
174325
import glob import xml.etree.ElementTree as ET from unittest import TestCase import numpy as np from kmeans import kmeans, avg_iou ANNOTATIONS_PATH = "Annotations" class TestVoc2007(TestCase): def __load_dataset(self): dataset = [] for xml_file in glob.glob("{}/*xml".format(ANNOTATIONS_PATH)): tree = ET.parse(xml_file) height = int(tree.findtext("./size/height")) width = int(tree.findtext("./size/width")) for obj in tree.iter("object"): xmin = int(obj.findtext("bndbox/xmin")) / width ymin = int(obj.findtext("bndbox/ymin")) / height xmax = int(obj.findtext("bndbox/xmax")) / width ymax = int(obj.findtext("bndbox/ymax")) / height dataset.append([xmax - xmin, ymax - ymin]) return np.array(dataset) def test_kmeans_5(self): dataset = self.__load_dataset() out = kmeans(dataset, 5) percentage = avg_iou(dataset, out) np.testing.assert_almost_equal(percentage, 0.61, decimal=2) def test_kmeans_9(self): dataset = self.__load_dataset() out = kmeans(dataset, 9) percentage = avg_iou(dataset, out) np.testing.assert_almost_equal(percentage, 0.672, decimal=2)
174330
set_name(0x80079AEC, "GetTpY__FUs", SN_NOWARN) set_name(0x80079B08, "GetTpX__FUs", SN_NOWARN) set_name(0x80079B14, "Remove96__Fv", SN_NOWARN) set_name(0x80079B4C, "AppMain", SN_NOWARN) set_name(0x80079BF4, "MAIN_RestartGameTask__Fv", SN_NOWARN) set_name(0x80079C20, "GameTask__FP4TASK", SN_NOWARN) set_name(0x80079CB8, "MAIN_MainLoop__Fv", SN_NOWARN) set_name(0x80079D0C, "CheckMaxArgs__Fv", SN_NOWARN) set_name(0x80079D40, "GPUQ_InitModule__Fv", SN_NOWARN) set_name(0x80079D4C, "GPUQ_FlushQ__Fv", SN_NOWARN) set_name(0x80079EC0, "GPUQ_LoadImage__FP4RECTli", SN_NOWARN) set_name(0x80079F74, "GPUQ_DiscardHandle__Fl", SN_NOWARN) set_name(0x8007A014, "GPUQ_LoadClutAddr__FiiiPv", SN_NOWARN) set_name(0x8007A0B0, "GPUQ_MoveImage__FP4RECTii", SN_NOWARN) set_name(0x8007A150, "PRIM_Open__FiiiP10SCREEN_ENVUl", SN_NOWARN) set_name(0x8007A26C, "InitPrimBuffer__FP11PRIM_BUFFERii", SN_NOWARN) set_name(0x8007A348, "PRIM_Clip__FP4RECTi", SN_NOWARN) set_name(0x8007A470, "PRIM_FullScreen__Fi", SN_NOWARN) set_name(0x8007A4AC, "PRIM_Flush__Fv", SN_NOWARN) set_name(0x8007A6B4, "ClearPbOnDrawSync", SN_NOWARN) set_name(0x8007A6F0, "ClearedYet__Fv", SN_NOWARN) set_name(0x8007A6FC, "PrimDrawSycnCallBack", SN_NOWARN) set_name(0x8007A71C, "SendDispEnv__Fv", SN_NOWARN) set_name(0x8007A740, "PRIM_GetNextPolyF4__Fv", SN_NOWARN) set_name(0x8007A758, "PRIM_GetNextPolyFt4__Fv", SN_NOWARN) set_name(0x8007A770, "PRIM_GetNextPolyGt4__Fv", SN_NOWARN) set_name(0x8007A788, "PRIM_GetNextPolyG4__Fv", SN_NOWARN) set_name(0x8007A7A0, "PRIM_GetNextPolyF3__Fv", SN_NOWARN) set_name(0x8007A7B8, "PRIM_GetNextDrArea__Fv", SN_NOWARN) set_name(0x8007A7D0, "ClipRect__FRC4RECTR4RECT", SN_NOWARN) set_name(0x8007A8E4, "IsColiding__FRC4RECTT0", SN_NOWARN) set_name(0x8007A94C, "VID_AfterDisplay__Fv", SN_NOWARN) set_name(0x8007A96C, "VID_ScrOn__Fv", SN_NOWARN) set_name(0x8007A994, "VID_DoThisNextSync__FPFv_v", SN_NOWARN) set_name(0x8007A9EC, "VID_NextSyncRoutHasExecuted__Fv", SN_NOWARN) set_name(0x8007A9F8, "VID_GetTick__Fv", SN_NOWARN) set_name(0x8007AA04, "VID_DispEnvSend", SN_NOWARN) set_name(0x8007AA40, "VID_SetXYOff__Fii", SN_NOWARN) set_name(0x8007AA50, "VID_GetXOff__Fv", SN_NOWARN) set_name(0x8007AA5C, "VID_GetYOff__Fv", SN_NOWARN) set_name(0x8007AA68, "VID_SetDBuffer__Fb", SN_NOWARN) set_name(0x8007ABDC, "MyFilter__FUlUlPCc", SN_NOWARN) set_name(0x8007ABE4, "SlowMemMove__FPvT0Ul", SN_NOWARN) set_name(0x8007AC04, "GetTpY__FUs_addr_8007AC04", SN_NOWARN) set_name(0x8007AC20, "GetTpX__FUs_addr_8007AC20", SN_NOWARN) set_name(0x8007AC2C, "SYSI_GetFs__Fv", SN_NOWARN) set_name(0x8007AC38, "SYSI_GetOverlayFs__Fv", SN_NOWARN) set_name(0x8007AC44, "SortOutFileSystem__Fv", SN_NOWARN) set_name(0x8007AD80, "MemCb__FlPvUlPCcii", SN_NOWARN) set_name(0x8007ADA0, "Spanker__Fv", SN_NOWARN) set_name(0x8007ADE0, "GaryLiddon__Fv", SN_NOWARN) set_name(0x8007ADE8, "ReadPad__Fi", SN_NOWARN) set_name(0x8007AE48, "DummyPoll__Fv", SN_NOWARN) set_name(0x8007AE50, "DaveOwens__Fv", SN_NOWARN) set_name(0x8007AE78, "GetCur__C4CPad", SN_NOWARN) set_name(0x8007AEA0, "GetTpY__FUs_addr_8007AEA0", SN_NOWARN) set_name(0x8007AEBC, "GetTpX__FUs_addr_8007AEBC", SN_NOWARN) set_name(0x8007AEC8, "TimSwann__Fv", SN_NOWARN) set_name(0x8007AED0, "stub__FPcPv", SN_NOWARN) set_name(0x8007AED8, "eprint__FPcT0i", SN_NOWARN) set_name(0x8007AF0C, "leighbird__Fv", SN_NOWARN) set_name(0x8007AF34, "__6FileIOUl", SN_NOWARN) set_name(0x8007AF84, "___6FileIO", SN_NOWARN) set_name(0x8007AFD8, "Read__6FileIOPCcUl", SN_NOWARN) set_name(0x8007B140, "FileLen__6FileIOPCc", SN_NOWARN) set_name(0x8007B1A4, "FileNotFound__6FileIOPCc", SN_NOWARN) set_name(0x8007B1C4, "StreamFile__6FileIOPCciPFPUciib_bii", SN_NOWARN) set_name(0x8007B2A4, "ReadAtAddr__6FileIOPCcPUci", SN_NOWARN) set_name(0x8007B368, "DumpOldPath__6FileIO", SN_NOWARN) set_name(0x8007B3CC, "SetSearchPath__6FileIOPCc", SN_NOWARN) set_name(0x8007B4A8, "FindFile__6FileIOPCcPc", SN_NOWARN) set_name(0x8007B5BC, "CopyPathItem__6FileIOPcPCc", SN_NOWARN) set_name(0x8007B664, "LockSearchPath__6FileIO", SN_NOWARN) set_name(0x8007B6BC, "UnlockSearchPath__6FileIO", SN_NOWARN) set_name(0x8007B714, "SearchPathExists__6FileIO", SN_NOWARN) set_name(0x8007B728, "Save__6FileIOPCcPUci", SN_NOWARN) set_name(0x8007B764, "__4PCIOUl", SN_NOWARN) set_name(0x8007B7CC, "___4PCIO", SN_NOWARN) set_name(0x8007B824, "FileExists__4PCIOPCc", SN_NOWARN) set_name(0x8007B868, "LoReadFileAtAddr__4PCIOPCcPUci", SN_NOWARN) set_name(0x8007B92C, "GetFileLength__4PCIOPCc", SN_NOWARN) set_name(0x8007B9E4, "LoSave__4PCIOPCcPUci", SN_NOWARN) set_name(0x8007BAB8, "LoStreamFile__4PCIOPCciPFPUciib_bii", SN_NOWARN) set_name(0x8007BCC8, "__6SysObj", SN_NOWARN) set_name(0x8007BCE0, "__nw__6SysObji", SN_NOWARN) set_name(0x8007BD0C, "__nw__6SysObjiUl", SN_NOWARN) set_name(0x8007BD88, "__dl__6SysObjPv", SN_NOWARN) set_name(0x8007BDF4, "__5DatIOUl", SN_NOWARN) set_name(0x8007BE30, "___5DatIO", SN_NOWARN) set_name(0x8007BE88, "FileExists__5DatIOPCc", SN_NOWARN) set_name(0x8007BEC8, "LoReadFileAtAddr__5DatIOPCcPUci", SN_NOWARN) set_name(0x8007BF88, "GetFileLength__5DatIOPCc", SN_NOWARN) set_name(0x8007C03C, "LoSave__5DatIOPCcPUci", SN_NOWARN) set_name(0x8007C0E4, "LoStreamFile__5DatIOPCciPFPUciib_bii", SN_NOWARN) set_name(0x8007C2F0, "__7TextDat", SN_NOWARN) set_name(0x8007C330, "___7TextDat", SN_NOWARN) set_name(0x8007C378, "Use__7TextDat", SN_NOWARN) set_name(0x8007C56C, "TpLoadCallBack__FPUciib", SN_NOWARN) set_name(0x8007C63C, "StreamLoadTP__7TextDat", SN_NOWARN) set_name(0x8007C6F4, "FinishedUsing__7TextDat", SN_NOWARN) set_name(0x8007C750, "MakeBlockOffsetTab__7TextDat", SN_NOWARN) set_name(0x8007C7C0, "MakeOffsetTab__C9CBlockHdr", SN_NOWARN) set_name(0x8007C8EC, "SetUVTp__7TextDatP9FRAME_HDRP8POLY_FT4ii", SN_NOWARN) set_name(0x8007C9E8, "PrintMonster__7TextDatiiibi", SN_NOWARN) set_name(0x8007CDF0, "PrepareFt4__7TextDatP8POLY_FT4iiiii", SN_NOWARN) set_name(0x8007D05C, "GetDecompBufffer__7TextDati", SN_NOWARN) set_name(0x8007D1BC, "SetUVTpGT4__7TextDatP9FRAME_HDRP8POLY_GT4ii", SN_NOWARN) set_name(0x8007D2B8, "PrepareGt4__7TextDatP8POLY_GT4iiiii", SN_NOWARN) set_name(0x8007D514, "SetUVTpGT3__7TextDatP9FRAME_HDRP8POLY_GT3", SN_NOWARN) set_name(0x8007D594, "PrepareGt3__7TextDatP8POLY_GT3iii", SN_NOWARN) set_name(0x8007D758, "PrintFt4__7TextDatiiiiii", SN_NOWARN) set_name(0x8007D8AC, "PrintGt4__7TextDatiiiiii", SN_NOWARN) set_name(0x8007DA00, "PrintGt3__7TextDatiiii", SN_NOWARN) set_name(0x8007DAE4, "DecompFrame__7TextDatP9FRAME_HDR", SN_NOWARN) set_name(0x8007DC38, "MakeCreatureOffsetTab__7TextDat", SN_NOWARN) set_name(0x8007DD78, "MakePalOffsetTab__7TextDat", SN_NOWARN) set_name(0x8007DE74, "InitData__7TextDat", SN_NOWARN) set_name(0x8007DEA0, "DumpData__7TextDat", SN_NOWARN) set_name(0x8007DFE8, "GM_UseTexData__Fi", SN_NOWARN) set_name(0x8007E108, "GM_FinishedUsing__FP7TextDat", SN_NOWARN) set_name(0x8007E15C, "SetPal__7TextDatP9FRAME_HDRP8POLY_FT4", SN_NOWARN) set_name(0x8007E224, "GetFrNum__7TextDatiiii", SN_NOWARN) set_name(0x8007E278, "IsDirAliased__7TextDatiii", SN_NOWARN) set_name(0x8007E2D0, "DoDecompRequests__7TextDat", SN_NOWARN) set_name(0x8007E3F4, "FindDecompArea__7TextDatR4RECT", SN_NOWARN) set_name(0x8007E4C8, "GetFileInfo__7TextDati", SN_NOWARN) set_name(0x8007E518, "GetSize__C15CCreatureAction", SN_NOWARN) set_name(0x8007E540, "GetFrNum__C15CCreatureActionii", SN_NOWARN) set_name(0x8007E5E8, "InitDirRemap__15CCreatureAction", SN_NOWARN) set_name(0x8007E6A8, "GetFrNum__C12CCreatureHdriii", SN_NOWARN) set_name(0x8007E6EC, "GetAction__C12CCreatureHdri", SN_NOWARN) set_name(0x8007E77C, "InitActionDirRemaps__12CCreatureHdr", SN_NOWARN) set_name(0x8007E7EC, "GetSize__C12CCreatureHdr", SN_NOWARN) set_name(0x8007E858, "LoadDat__C13CTextFileInfo", SN_NOWARN) set_name(0x8007E8A8, "LoadHdr__C13CTextFileInfo", SN_NOWARN) set_name(0x8007E8D0, "GetFile__C13CTextFileInfoPc", SN_NOWARN) set_name(0x8007E96C, "HasFile__C13CTextFileInfoPc", SN_NOWARN) set_name(0x8007E9D4, "Un64__FPUcT0l", SN_NOWARN) set_name(0x8007EAA8, "__7CScreen", SN_NOWARN) set_name(0x8007EADC, "Load__7CScreeniii", SN_NOWARN) set_name(0x8007ED58, "Unload__7CScreen", SN_NOWARN) set_name(0x8007ED7C, "Display__7CScreeniiii", SN_NOWARN) set_name(0x8007F05C, "SetRect__5CPartR7TextDatR4RECT", SN_NOWARN) set_name(0x8007F0D4, "GetBoundingBox__6CBlockR7TextDatR4RECT", SN_NOWARN) set_name(0x8007F230, "_GLOBAL__D_DatPool", SN_NOWARN) set_name(0x8007F288, "_GLOBAL__I_DatPool", SN_NOWARN) set_name(0x8007F2DC, "PRIM_GetPrim__FPP8POLY_GT3", SN_NOWARN) set_name(0x8007F358, "PRIM_GetPrim__FPP8POLY_GT4", SN_NOWARN) set_name(0x8007F3D4, "PRIM_GetPrim__FPP8POLY_FT4", SN_NOWARN) set_name(0x8007F450, "CanXferFrame__C7TextDat", SN_NOWARN) set_name(0x8007F478, "CanXferPal__C7TextDat", SN_NOWARN) set_name(0x8007F4A0, "IsLoaded__C7TextDat", SN_NOWARN) set_name(0x8007F4AC, "GetTexNum__C7TextDat", SN_NOWARN) set_name(0x8007F4B8, "GetCreature__7TextDati", SN_NOWARN) set_name(0x8007F530, "GetNumOfCreatures__7TextDat", SN_NOWARN) set_name(0x8007F544, "SetFileInfo__7TextDatPC13CTextFileInfoi", SN_NOWARN) set_name(0x8007F550, "GetNumOfFrames__7TextDat", SN_NOWARN) set_name(0x8007F564, "GetPal__7TextDati", SN_NOWARN) set_name(0x8007F580, "GetFr__7TextDati", SN_NOWARN) set_name(0x8007F59C, "GetName__C13CTextFileInfo", SN_NOWARN) set_name(0x8007F5A8, "HasDat__C13CTextFileInfo", SN_NOWARN) set_name(0x8007F5D0, "HasTp__C13CTextFileInfo", SN_NOWARN) set_name(0x8007F5F8, "GetSize__C6CBlock", SN_NOWARN) set_name(0x8007F60C, "__4CdIOUl", SN_NOWARN) set_name(0x8007F650, "___4CdIO", SN_NOWARN) set_name(0x8007F6A8, "FileExists__4CdIOPCc", SN_NOWARN) set_name(0x8007F6CC, "LoReadFileAtAddr__4CdIOPCcPUci", SN_NOWARN) set_name(0x8007F6F4, "GetFileLength__4CdIOPCc", SN_NOWARN) set_name(0x8007F718, "LoSave__4CdIOPCcPUci", SN_NOWARN) set_name(0x8007F7F8, "LoStreamCallBack__Fi", SN_NOWARN) set_name(0x8007F808, "CD_GetCdlFILE__FPCcP7CdlFILE", SN_NOWARN) set_name(0x8007F954, "LoStreamFile__4CdIOPCciPFPUciib_bii", SN_NOWARN) set_name(0x8007FBB4, "BL_InitEAC__Fv", SN_NOWARN) set_name(0x8007FCA0, "BL_ReadFile__FPcUl", SN_NOWARN) set_name(0x8007FDCC, "BL_LoadDirectory__Fv", SN_NOWARN) set_name(0x8007FF38, "BL_LoadStreamDir__Fv", SN_NOWARN) set_name(0x800801F0, "BL_MakeFilePosTab__FPUcUl", SN_NOWARN) set_name(0x800802F0, "BL_FindStreamFile__FPcc", SN_NOWARN) set_name(0x8008048C, "BL_FileExists__FPcc", SN_NOWARN) set_name(0x800804B0, "BL_FileLength__FPcc", SN_NOWARN) set_name(0x800804E4, "BL_LoadFileAtAddr__FPcPUcc", SN_NOWARN) set_name(0x800805CC, "BL_AsyncLoadDone__Fv", SN_NOWARN) set_name(0x800805D8, "BL_AsyncLoadTASK__FP4TASK", SN_NOWARN) set_name(0x80080644, "BL_LoadFileAsync__FPcPUcc", SN_NOWARN) set_name(0x8008073C, "BL_OpenStreamFile__FPcc", SN_NOWARN) set_name(0x80080768, "BL_CloseStreamFile__FP6STRHDR", SN_NOWARN) set_name(0x800807A0, "BL_LoadFile__FPcUl", SN_NOWARN) set_name(0x800808B8, "LZNP_Decode__FPUcT0", SN_NOWARN) set_name(0x8008098C, "Tmalloc__Fi", SN_NOWARN) set_name(0x80080AB0, "Tfree__FPv", SN_NOWARN) set_name(0x80080B60, "InitTmalloc__Fv", SN_NOWARN) set_name(0x80080B88, "strupr__FPc", SN_NOWARN) set_name(0x80080BDC, "PauseTask__FP4TASK", SN_NOWARN) set_name(0x80080C28, "GetPausePad__Fv", SN_NOWARN) set_name(0x80080CB8, "TryPadForPause__Fi", SN_NOWARN) set_name(0x80080CE4, "DoPause__14CPauseMessagesi", SN_NOWARN) set_name(0x80080EC0, "DoPausedMessage__14CPauseMessages", SN_NOWARN) set_name(0x800811B4, "DoQuitMessage__14CPauseMessages", SN_NOWARN) set_name(0x8008129C, "AreYouSureMessage__14CPauseMessages", SN_NOWARN) set_name(0x80081384, "PA_SetPauseOk__Fb", SN_NOWARN) set_name(0x80081394, "PA_GetPauseOk__Fv", SN_NOWARN) set_name(0x800813A0, "MY_PausePrint__17CTempPauseMessageiPci", SN_NOWARN) set_name(0x800814F0, "InitPrintQuitMessage__17CTempPauseMessage", SN_NOWARN) set_name(0x800814F8, "PrintQuitMessage__17CTempPauseMessagei", SN_NOWARN) set_name(0x800815F8, "LeavePrintQuitMessage__17CTempPauseMessagei", SN_NOWARN) set_name(0x80081600, "InitPrintAreYouSure__17CTempPauseMessage", SN_NOWARN) set_name(0x80081608, "PrintAreYouSure__17CTempPauseMessagei", SN_NOWARN) set_name(0x80081708, "LeavePrintAreYouSure__17CTempPauseMessagei", SN_NOWARN) set_name(0x80081710, "InitPrintPaused__17CTempPauseMessage", SN_NOWARN) set_name(0x80081718, "PrintPaused__17CTempPauseMessage", SN_NOWARN) set_name(0x800817FC, "LeavePrintPaused__17CTempPauseMessage", SN_NOWARN) set_name(0x80081804, "___17CTempPauseMessage", SN_NOWARN) set_name(0x8008182C, "_GLOBAL__D_DoPause__14CPauseMessagesi", SN_NOWARN) set_name(0x80081854, "_GLOBAL__I_DoPause__14CPauseMessagesi", SN_NOWARN) set_name(0x8008187C, "__17CTempPauseMessage", SN_NOWARN) set_name(0x800818C0, "___14CPauseMessages", SN_NOWARN) set_name(0x800818F4, "__14CPauseMessages", SN_NOWARN) set_name(0x80081908, "SetRGB__6DialogUcUcUc", SN_NOWARN) set_name(0x80081928, "SetBack__6Dialogi", SN_NOWARN) set_name(0x80081930, "SetBorder__6Dialogi", SN_NOWARN) set_name(0x80081938, "___6Dialog", SN_NOWARN) set_name(0x80081960, "__6Dialog", SN_NOWARN) set_name(0x800819BC, "GetDown__C4CPad", SN_NOWARN) set_name(0x800819E4, "GetUp__C4CPad", SN_NOWARN) set_name(0x80081A0C, "PAD_Handler__Fv", SN_NOWARN) set_name(0x80081BC0, "PAD_GetPad__FiUc", SN_NOWARN) set_name(0x80081C5C, "NewVal__4CPadUs", SN_NOWARN) set_name(0x80081D94, "BothNewVal__4CPadUsUs", SN_NOWARN) set_name(0x80081EF0, "Trans__4CPadUs", SN_NOWARN) set_name(0x80082014, "_GLOBAL__I_Pad0", SN_NOWARN) set_name(0x8008204C, "SetBothFlag__4CPadUc", SN_NOWARN) set_name(0x80082054, "__4CPadi", SN_NOWARN) set_name(0x80082088, "Flush__4CPad", SN_NOWARN) set_name(0x800820AC, "Set__7FontTab", SN_NOWARN) set_name(0x80082148, "InitPrinty__Fv", SN_NOWARN) set_name(0x800821D0, "SetTextDat__5CFontP7TextDat", SN_NOWARN) set_name(0x800821D8, "PrintChar__5CFontUsUscUcUcUc", SN_NOWARN) set_name(0x80082358, "Print__5CFontiiPc8TXT_JUSTP4RECTUcUcUc", SN_NOWARN) set_name(0x800826F0, "GetStrWidth__5CFontPc", SN_NOWARN) set_name(0x80082758, "SetChar__5CFontiUs", SN_NOWARN) set_name(0x800827BC, "SetOTpos__5CFonti", SN_NOWARN) set_name(0x800827C8, "ClearFont__5CFont", SN_NOWARN) set_name(0x800827EC, "IsDefined__5CFontUc", SN_NOWARN) set_name(0x8008280C, "GetCharFrameNum__5CFontc", SN_NOWARN) set_name(0x80082824, "GetCharWidth__5CFontc", SN_NOWARN) set_name(0x8008287C, "Init__5CFont", SN_NOWARN) set_name(0x800828B0, "GetFr__7TextDati_addr_800828B0", SN_NOWARN) set_name(0x800828CC, "TrimCol__Fs", SN_NOWARN) set_name(0x80082904, "DialogPrint__Fiiiiiiiiii", SN_NOWARN) set_name(0x8008327C, "GetDropShadowG4__FUcUcUcUcUcUcUcUcUcUcUcUc", SN_NOWARN) set_name(0x800833B4, "DropShadows__Fiiii", SN_NOWARN) set_name(0x80083658, "InitDialog__Fv", SN_NOWARN) set_name(0x80083790, "GetSizes__6Dialog", SN_NOWARN) set_name(0x800839E8, "Back__6Dialogiiii", SN_NOWARN) set_name(0x80084BA8, "Line__6Dialogiii", SN_NOWARN) set_name(0x80084DC0, "GetPal__7TextDati_addr_80084DC0", SN_NOWARN) set_name(0x80084DDC, "GetFr__7TextDati_addr_80084DDC", SN_NOWARN) set_name(0x80084DF8, "ATT_DoAttract__Fv", SN_NOWARN) set_name(0x80084EB0, "CreatePlayersFromFeData__FR9FE_CREATE", SN_NOWARN) set_name(0x80084F4C, "UpdateSel__FPUsUsPUc", SN_NOWARN) set_name(0x80084F8C, "CycleSelCols__Fv", SN_NOWARN) set_name(0x8008511C, "FindTownCreature__7CBlocksi", SN_NOWARN) set_name(0x80085190, "FindCreature__7CBlocksi", SN_NOWARN) set_name(0x800851E4, "__7CBlocksiiiii", SN_NOWARN) set_name(0x80085338, "SetTownersGraphics__7CBlocks", SN_NOWARN) set_name(0x80085370, "SetMonsterGraphics__7CBlocksii", SN_NOWARN) set_name(0x80085438, "___7CBlocks", SN_NOWARN) set_name(0x800854C0, "DumpGt4s__7CBlocks", SN_NOWARN) set_name(0x80085528, "DumpRects__7CBlocks", SN_NOWARN) set_name(0x80085590, "SetGraphics__7CBlocksPP7TextDatPii", SN_NOWARN) set_name(0x800855EC, "DumpGraphics__7CBlocksPP7TextDatPi", SN_NOWARN) set_name(0x8008563C, "PrintBlockOutline__7CBlocksiiiii", SN_NOWARN) set_name(0x80085988, "Load__7CBlocksi", SN_NOWARN) set_name(0x80085A34, "MakeRectTable__7CBlocks", SN_NOWARN) set_name(0x80085B08, "MakeGt4Table__7CBlocks", SN_NOWARN) set_name(0x80085C10, "MakeGt4__7CBlocksP8POLY_GT4P9FRAME_HDR", SN_NOWARN) set_name(0x80085D4C, "GetBlock__7CBlocksi", SN_NOWARN) set_name(0x80085DC4, "Print__7CBlocks", SN_NOWARN) set_name(0x80085DEC, "SetXY__7CBlocksii", SN_NOWARN) set_name(0x80085E14, "GetXY__7CBlocksPiT1", SN_NOWARN) set_name(0x80085E2C, "PrintMap__7CBlocksii", SN_NOWARN) set_name(0x80087594, "PrintGameSprites__7CBlocksiiiii", SN_NOWARN) set_name(0x80087704, "PrintGameSprites__7CBlocksP8map_infoiiiiiii", SN_NOWARN) set_name(0x80088420, "PrintSprites__7CBlocksP8map_infoiiiiiii", SN_NOWARN) set_name(0x80088AE0, "PrintSprites__7CBlocksiiiii", SN_NOWARN) set_name(0x80088C50, "ScrToWorldX__7CBlocksii", SN_NOWARN) set_name(0x80088C64, "ScrToWorldY__7CBlocksii", SN_NOWARN) set_name(0x80088C78, "SetScrollTarget__7CBlocksii", SN_NOWARN) set_name(0x80088D3C, "DoScroll__7CBlocks", SN_NOWARN) set_name(0x80088DA4, "SetPlayerPosBlocks__7CBlocksiii", SN_NOWARN) set_name(0x80088E44, "GetScrXY__7CBlocksR4RECTiiii", SN_NOWARN) set_name(0x80088F18, "ShadScaleSkew__7CBlocksP8POLY_FT4", SN_NOWARN) set_name(0x80088F98, "WorldToScrX__7CBlocksii", SN_NOWARN) set_name(0x80088FA0, "WorldToScrY__7CBlocksii", SN_NOWARN) set_name(0x80088FB4, "BL_GetCurrentBlocks__Fv", SN_NOWARN) set_name(0x80088FC0, "PRIM_GetPrim__FPP8POLY_FT4_addr_80088FC0", SN_NOWARN) set_name(0x8008903C, "GetHighlightCol__FiPiUsUsUs", SN_NOWARN) set_name(0x80089084, "PRIM_GetCopy__FP8POLY_FT4", SN_NOWARN) set_name(0x800890C0, "GetHighlightCol__FiPcUsUsUs", SN_NOWARN) set_name(0x80089108, "PRIM_GetPrim__FPP8POLY_GT4_addr_80089108", SN_NOWARN) set_name(0x80089184, "PRIM_GetPrim__FPP7LINE_F2", SN_NOWARN) set_name(0x80089200, "PRIM_CopyPrim__FP8POLY_FT4T0", SN_NOWARN) set_name(0x80089228, "GetCreature__14TownToCreaturei", SN_NOWARN) set_name(0x80089244, "SetItemGraphics__7CBlocksi", SN_NOWARN) set_name(0x8008926C, "SetObjGraphics__7CBlocksi", SN_NOWARN) set_name(0x80089294, "DumpItems__7CBlocks", SN_NOWARN) set_name(0x800892B8, "DumpObjs__7CBlocks", SN_NOWARN) set_name(0x800892DC, "DumpMonsters__7CBlocks", SN_NOWARN) set_name(0x80089304, "GetNumOfBlocks__7CBlocks", SN_NOWARN) set_name(0x80089310, "CopyToGt4__9LittleGt4P8POLY_GT4", SN_NOWARN) set_name(0x800893A8, "InitFromGt4__9LittleGt4P8POLY_GT4ii", SN_NOWARN) set_name(0x80089438, "GetNumOfFrames__7TextDatii", SN_NOWARN) set_name(0x80089470, "GetCreature__7TextDati_addr_80089470", SN_NOWARN) set_name(0x800894E8, "GetNumOfCreatures__7TextDat_addr_800894E8", SN_NOWARN) set_name(0x800894FC, "SetFileInfo__7TextDatPC13CTextFileInfoi_addr_800894FC", SN_NOWARN) set_name(0x80089508, "GetPal__7TextDati_addr_80089508", SN_NOWARN) set_name(0x80089524, "GetFr__7TextDati_addr_80089524", SN_NOWARN) set_name(0x80089540, "OVR_IsMemcardOverlayBlank__Fv", SN_NOWARN) set_name(0x8008956C, "OVR_LoadPregame__Fv", SN_NOWARN) set_name(0x80089594, "OVR_LoadFrontend__Fv", SN_NOWARN) set_name(0x800895BC, "OVR_LoadGame__Fv", SN_NOWARN) set_name(0x800895E4, "OVR_LoadFmv__Fv", SN_NOWARN) set_name(0x8008960C, "OVR_LoadMemcard__Fv", SN_NOWARN) set_name(0x80089638, "ClearOutOverlays__Fv", SN_NOWARN) set_name(0x80089690, "ClearOut__7Overlay", SN_NOWARN) set_name(0x80089754, "Load__7Overlay", SN_NOWARN) set_name(0x800897C4, "OVR_GetCurrentOverlay__Fv", SN_NOWARN) set_name(0x800897D0, "LoadOver__FR7Overlay", SN_NOWARN) set_name(0x80089824, "_GLOBAL__I_OVR_Open__Fv", SN_NOWARN) set_name(0x80089994, "GetOverType__7Overlay", SN_NOWARN) set_name(0x800899A0, "StevesDummyPoll__Fv", SN_NOWARN) set_name(0x800899A8, "Lambo__Fv", SN_NOWARN) set_name(0x800899B0, "__7CPlayerbi", SN_NOWARN) set_name(0x80089A94, "___7CPlayer", SN_NOWARN) set_name(0x80089AEC, "Load__7CPlayeri", SN_NOWARN) set_name(0x80089B48, "SetBlockXY__7CPlayerR7CBlocksR12PlayerStruct", SN_NOWARN) set_name(0x80089C94, "SetScrollTarget__7CPlayerR12PlayerStructR7CBlocks", SN_NOWARN) set_name(0x8008A0C0, "GetNumOfSpellAnims__FR12PlayerStruct", SN_NOWARN) set_name(0x8008A140, "Print__7CPlayerR12PlayerStructR7CBlocks", SN_NOWARN) set_name(0x8008A590, "SetpNscrnxy__7CPlayeriiii", SN_NOWARN) set_name(0x8008A5F8, "FindAction__7CPlayerR12PlayerStruct", SN_NOWARN) set_name(0x8008A674, "FindActionEnum__7CPlayerR12PlayerStruct", SN_NOWARN) set_name(0x8008A6DC, "Init__7CPlayer", SN_NOWARN) set_name(0x8008A6E4, "Dump__7CPlayer", SN_NOWARN) set_name(0x8008A6EC, "PRIM_GetPrim__FPP8POLY_FT4_addr_8008A6EC", SN_NOWARN) set_name(0x8008A768, "PRIM_GetCopy__FP8POLY_FT4_addr_8008A768", SN_NOWARN) set_name(0x8008A7A4, "PRIM_CopyPrim__FP8POLY_FT4T0_addr_8008A7A4", SN_NOWARN) set_name(0x8008A7CC, "GetPlrOt__7CBlocksi", SN_NOWARN) set_name(0x8008A7E0, "SetDecompArea__7TextDatiiii", SN_NOWARN) set_name(0x8008A7F8, "GetNumOfFrames__7TextDatii_addr_8008A7F8", SN_NOWARN) set_name(0x8008A830, "GetNumOfActions__7TextDati", SN_NOWARN) set_name(0x8008A854, "GetCreature__7TextDati_addr_8008A854", SN_NOWARN) set_name(0x8008A8CC, "GetNumOfCreatures__7TextDat_addr_8008A8CC", SN_NOWARN) set_name(0x8008A8E0, "SetFileInfo__7TextDatPC13CTextFileInfoi_addr_8008A8E0", SN_NOWARN) set_name(0x8008A8EC, "PROF_Open__Fv", SN_NOWARN) set_name(0x8008A92C, "PROF_State__Fv", SN_NOWARN) set_name(0x8008A938, "PROF_On__Fv", SN_NOWARN) set_name(0x8008A948, "PROF_Off__Fv", SN_NOWARN) set_name(0x8008A954, "PROF_CpuEnd__Fv", SN_NOWARN) set_name(0x8008A984, "PROF_CpuStart__Fv", SN_NOWARN) set_name(0x8008A9A8, "PROF_DrawStart__Fv", SN_NOWARN) set_name(0x8008A9CC, "PROF_DrawEnd__Fv", SN_NOWARN) set_name(0x8008A9FC, "PROF_Draw__FPUl", SN_NOWARN) set_name(0x8008ABF0, "PROF_Restart__Fv", SN_NOWARN) set_name(0x8008AC10, "PSX_WndProc__FUilUl", SN_NOWARN) set_name(0x8008ACC0, "PSX_PostWndProc__FUilUl", SN_NOWARN) set_name(0x8008AD60, "GoBackLevel__Fv", SN_NOWARN) set_name(0x8008ADD8, "GoWarpLevel__Fv", SN_NOWARN) set_name(0x8008AE10, "PostLoadGame__Fv", SN_NOWARN) set_name(0x8008AEAC, "GoLoadGame__Fv", SN_NOWARN) set_name(0x8008AF34, "PostGoBackLevel__Fv", SN_NOWARN) set_name(0x8008AFCC, "GoForwardLevel__Fv", SN_NOWARN) set_name(0x8008B024, "PostGoForwardLevel__Fv", SN_NOWARN) set_name(0x8008B0BC, "GoNewGame__Fv", SN_NOWARN) set_name(0x8008B10C, "PostNewGame__Fv", SN_NOWARN) set_name(0x8008B144, "LevelToLevelInit__Fv", SN_NOWARN) set_name(0x8008B19C, "GetPal__6GPaneli", SN_NOWARN) set_name(0x8008B1E0, "__6GPaneli", SN_NOWARN) set_name(0x8008B238, "DrawFlask__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008B6AC, "DrawSpeedBar__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008BB30, "DrawSpell__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008BC90, "DrawMsgWindow__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008BCDC, "DrawDurThingy__6GPaneliiP10ItemStructi", SN_NOWARN) set_name(0x8008C098, "DrawDurIcon__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008C18C, "Print__6GPanelP7PanelXYP12PlayerStruct", SN_NOWARN) set_name(0x8008C290, "GetPal__7TextDati_addr_8008C290", SN_NOWARN) set_name(0x8008C2AC, "GetFr__7TextDati_addr_8008C2AC", SN_NOWARN) set_name(0x8008C2C8, "STR_Debug__FP6SFXHDRPce", SN_NOWARN) set_name(0x8008C2DC, "STR_SystemTask__FP4TASK", SN_NOWARN) set_name(0x8008C31C, "STR_AllocBuffer__Fv", SN_NOWARN) set_name(0x8008C3A8, "STR_Init__Fv", SN_NOWARN) set_name(0x8008C470, "STR_InitStream__Fv", SN_NOWARN) set_name(0x8008C5A8, "STR_PlaySound__FUscic", SN_NOWARN) set_name(0x8008C6E4, "STR_setvolume__FP6SFXHDR", SN_NOWARN) set_name(0x8008C73C, "STR_PlaySFX__FP6SFXHDR", SN_NOWARN) set_name(0x8008C848, "STR_pauseall__Fv", SN_NOWARN) set_name(0x8008C898, "STR_resumeall__Fv", SN_NOWARN) set_name(0x8008C8E8, "STR_CloseStream__FP6SFXHDR", SN_NOWARN) set_name(0x8008C954, "STR_SoundCommand__FP6SFXHDRi", SN_NOWARN) set_name(0x8008CA60, "STR_Command__FP6SFXHDR", SN_NOWARN) set_name(0x8008CB80, "STR_DMAControl__FP6SFXHDR", SN_NOWARN) set_name(0x8008CC48, "STR_PlayStream__FP6SFXHDRPUci", SN_NOWARN) set_name(0x8008CE24, "STR_AsyncWeeTASK__FP4TASK", SN_NOWARN) set_name(0x8008D11C, "STR_AsyncTASK__FP4TASK", SN_NOWARN) set_name(0x8008D548, "STR_StreamMainTask__FP6SFXHDRc", SN_NOWARN) set_name(0x8008D658, "SPU_Init__Fv", SN_NOWARN) set_name(0x8008D720, "SND_FindChannel__Fv", SN_NOWARN) set_name(0x8008D78C, "SND_ClearBank__Fv", SN_NOWARN) set_name(0x8008D804, "SndLoadCallBack__FPUciib", SN_NOWARN) set_name(0x8008D87C, "SND_LoadBank__Fi", SN_NOWARN) set_name(0x8008D9B0, "SND_FindSFX__FUs", SN_NOWARN) set_name(0x8008DA04, "SND_StopSnd__Fi", SN_NOWARN) set_name(0x8008DA28, "SND_RemapSnd__Fi", SN_NOWARN) set_name(0x8008DA8C, "SND_PlaySnd__FUsiii", SN_NOWARN) set_name(0x8008DC40, "AS_CallBack0__Fi", SN_NOWARN) set_name(0x8008DC54, "AS_CallBack1__Fi", SN_NOWARN) set_name(0x8008DC68, "AS_WasLastBlock__FiP6STRHDRP6SFXHDR", SN_NOWARN) set_name(0x8008DD44, "AS_OpenStream__FP6STRHDRP6SFXHDR", SN_NOWARN) set_name(0x8008DDE4, "AS_GetBlock__FP6SFXHDR", SN_NOWARN) set_name(0x8008DDF0, "AS_CloseStream__FP6STRHDRP6SFXHDR", SN_NOWARN) set_name(0x8008DE1C, "AS_LoopStream__FiP6STRHDRP6SFXHDR", SN_NOWARN) set_name(0x8008DF3C, "SCR_NeedHighlightPal__FUsUsi", SN_NOWARN) set_name(0x8008DF70, "Init__13PalCollectionPC7InitPos", SN_NOWARN) set_name(0x8008E000, "FindPal__13PalCollectionUsUsi", SN_NOWARN) set_name(0x8008E0DC, "NewPal__13PalCollectionUsUsi", SN_NOWARN) set_name(0x8008E15C, "MakePal__8PalEntryUsUsi", SN_NOWARN) set_name(0x8008E1FC, "GetHighlightPal__13PalCollectionUsUsi", SN_NOWARN) set_name(0x8008E290, "UpdatePals__13PalCollection", SN_NOWARN) set_name(0x8008E304, "SCR_Handler__Fv", SN_NOWARN) set_name(0x8008E32C, "GetNumOfObjs__t10Collection2Z8PalEntryi16", SN_NOWARN) set_name(0x8008E334, "GetObj__t10Collection2Z8PalEntryi16", SN_NOWARN) set_name(0x8008E370, "Init__t10Collection2Z8PalEntryi16", SN_NOWARN) set_name(0x8008E3D4, "MoveFromUsedToUnused__t10Collection2Z8PalEntryi16P8PalEntry", SN_NOWARN) set_name(0x8008E42C, "MoveFromUnusedToUsed__t10Collection2Z8PalEntryi16P8PalEntry", SN_NOWARN) set_name(0x8008E484, "Set__8PalEntryUsUsi", SN_NOWARN) set_name(0x8008E498, "Set__8PalEntryRC7InitPos", SN_NOWARN) set_name(0x8008E4C4, "SetJustUsed__8PalEntryb", SN_NOWARN) set_name(0x8008E4CC, "Init__8PalEntry", SN_NOWARN) set_name(0x8008E4D4, "GetClut__C8PalEntry", SN_NOWARN) set_name(0x8008E4E0, "IsEqual__C8PalEntryUsUsi", SN_NOWARN) set_name(0x8008E518, "GetNext__Ct11TLinkedList1Z8PalEntry", SN_NOWARN) set_name(0x8008E524, "AddToList__t11TLinkedList1Z8PalEntryPP8PalEntry", SN_NOWARN) set_name(0x8008E544, "DetachFromList__t11TLinkedList1Z8PalEntryPP8PalEntry", SN_NOWARN) set_name(0x8008E590, "stub__FPcPv_addr_8008E590", SN_NOWARN) set_name(0x8008E598, "new_eprint__FPcT0i", SN_NOWARN) set_name(0x8008E5CC, "TonysGameTask__FP4TASK", SN_NOWARN) set_name(0x8008E654, "print_demo_task__FP4TASK", SN_NOWARN) set_name(0x8008E784, "TonysDummyPoll__Fv", SN_NOWARN) set_name(0x8008E78C, "load_demo_pad_data__FUl", SN_NOWARN) set_name(0x8008E7DC, "save_demo_pad_data__FUl", SN_NOWARN) set_name(0x8008E82C, "set_pad_record_play__Fi", SN_NOWARN) set_name(0x8008E8A4, "demo_game_task__FP4TASK", SN_NOWARN) set_name(0x8008E8DC, "start_demo__Fv", SN_NOWARN) set_name(0x8008E930, "tony__Fv", SN_NOWARN) set_name(0x8008E984, "GLUE_SetMonsterList__Fi", SN_NOWARN) set_name(0x8008E990, "GLUE_GetMonsterList__Fv", SN_NOWARN) set_name(0x8008E99C, "GLUE_SuspendGame__Fv", SN_NOWARN) set_name(0x8008E9F0, "GLUE_ResumeGame__Fv", SN_NOWARN) set_name(0x8008EA44, "GLUE_PreTown__Fv", SN_NOWARN) set_name(0x8008EAA8, "GLUE_Finished__Fv", SN_NOWARN) set_name(0x8008EAB4, "GLUE_SetFinished__Fb", SN_NOWARN) set_name(0x8008EAC0, "GLUE_StartBg__Fibi", SN_NOWARN) set_name(0x8008EB44, "GLUE_SetShowGameScreenFlag__Fb", SN_NOWARN) set_name(0x8008EB54, "GLUE_SetHomingScrollFlag__Fb", SN_NOWARN) set_name(0x8008EB64, "GLUE_SetShowPanelFlag__Fb", SN_NOWARN) set_name(0x8008EB74, "DoShowPanelGFX__FP6GPanelT0", SN_NOWARN) set_name(0x8008EC4C, "BgTask__FP4TASK", SN_NOWARN) set_name(0x8008F114, "FindPlayerChar__FPc", SN_NOWARN) set_name(0x8008F19C, "FindPlayerChar__Fiii", SN_NOWARN) set_name(0x8008F1F8, "FindPlayerChar__FP12PlayerStruct", SN_NOWARN) set_name(0x8008F228, "FindPlayerChar__FP12PlayerStructb", SN_NOWARN) set_name(0x8008F268, "MakeSurePlayerDressedProperly__FR7CPlayerR12PlayerStructb", SN_NOWARN) set_name(0x8008F2BC, "GLUE_GetCurrentList__Fi", SN_NOWARN) set_name(0x8008F368, "GetTexId__7CPlayer", SN_NOWARN) set_name(0x8008F374, "SetTown__7CBlocksb", SN_NOWARN) set_name(0x8008F37C, "MoveToScrollTarget__7CBlocks", SN_NOWARN) set_name(0x8008F390, "get_action_str__Fii", SN_NOWARN) set_name(0x8008F410, "get_key_pad__Fi", SN_NOWARN) set_name(0x8008F44C, "RemoveCtrlScreen__Fv", SN_NOWARN) set_name(0x8008F494, "Init_ctrl_pos__Fv", SN_NOWARN) set_name(0x8008FA98, "remove_padval__Fi", SN_NOWARN) set_name(0x8008FAD8, "remove_comboval__Fi", SN_NOWARN) set_name(0x8008FB18, "set_buttons__Fii", SN_NOWARN) set_name(0x8008FCB8, "restore_controller_settings__Fv", SN_NOWARN) set_name(0x8008FD08, "main_ctrl_setup__Fv", SN_NOWARN) set_name(0x8008FF98, "PrintCtrlString__FiiUcic", SN_NOWARN) set_name(0x800905EC, "DrawCtrlSetup__Fv", SN_NOWARN) set_name(0x800909EC, "_GLOBAL__D_CtrlBorder", SN_NOWARN) set_name(0x80090A24, "_GLOBAL__I_CtrlBorder", SN_NOWARN) set_name(0x80090A5C, "GetDown__C4CPad_addr_80090A5C", SN_NOWARN) set_name(0x80090A84, "GetCur__C4CPad_addr_80090A84", SN_NOWARN) set_name(0x80090AAC, "SetRGB__6DialogUcUcUc_addr_80090AAC", SN_NOWARN) set_name(0x80090ACC, "SetBorder__6Dialogi_addr_80090ACC", SN_NOWARN) set_name(0x80090AD4, "___6Dialog_addr_80090AD4", SN_NOWARN) set_name(0x80090AFC, "__6Dialog_addr_80090AFC", SN_NOWARN) set_name(0x80090B58, "___7CScreen", SN_NOWARN) set_name(0x80090B78, "switchnight__FP4TASK", SN_NOWARN) set_name(0x80090BC4, "city_lights__FP4TASK", SN_NOWARN) set_name(0x80090D50, "color_cycle__FP4TASK", SN_NOWARN) set_name(0x80090E80, "DrawFlameLogo__Fv", SN_NOWARN) set_name(0x800910BC, "TitleScreen__FP7CScreen", SN_NOWARN) set_name(0x80091110, "TryCreaturePrint__Fiiiiiii", SN_NOWARN) set_name(0x80091374, "TryWater__FiiP8POLY_GT4i", SN_NOWARN) set_name(0x80091544, "nightgfx__FibiP8POLY_GT4i", SN_NOWARN) set_name(0x8009170C, "PRIM_GetCopy__FP8POLY_FT4_addr_8009170C", SN_NOWARN) set_name(0x80091748, "PRIM_CopyPrim__FP8POLY_FT4T0_addr_80091748", SN_NOWARN) set_name(0x80091770, "PRIM_GetPrim__FPP8POLY_FT4_addr_80091770", SN_NOWARN) set_name(0x800917EC, "GetNumOfActions__7TextDati_addr_800917EC", SN_NOWARN) set_name(0x80091810, "GetCreature__7TextDati_addr_80091810", SN_NOWARN) set_name(0x80091888, "GetNumOfCreatures__7TextDat_addr_80091888", SN_NOWARN) set_name(0x8009189C, "DaveLDummyPoll__Fv", SN_NOWARN) set_name(0x800918A4, "DaveL__Fv", SN_NOWARN) set_name(0x800918CC, "DoReflection__FP8POLY_FT4iii", SN_NOWARN) set_name(0x80091BAC, "mteleportfx__Fv", SN_NOWARN) set_name(0x80091E84, "invistimer__Fv", SN_NOWARN) set_name(0x80091F54, "setUVparams__FP8POLY_FT4P9FRAME_HDR", SN_NOWARN) set_name(0x80091FDC, "drawparticle__Fiiiiii", SN_NOWARN) set_name(0x800921CC, "drawpolyF4__Fiiiiii", SN_NOWARN) set_name(0x80092300, "drawpolyG4__Fiiiiiiii", SN_NOWARN) set_name(0x800924D0, "particlejump__Fv", SN_NOWARN) set_name(0x80092670, "particleglow__Fv", SN_NOWARN) set_name(0x80092754, "doparticlejump__Fv", SN_NOWARN) set_name(0x80092794, "StartPartJump__Fiiiiii", SN_NOWARN) set_name(0x800928FC, "doparticlechain__Fiiiiiiiiiiii", SN_NOWARN) set_name(0x80092CF4, "Teleportfx__Fiiiiiii", SN_NOWARN) set_name(0x80092F9C, "ResurrectFX__Fiiii", SN_NOWARN) set_name(0x800931C0, "healFX__Fv", SN_NOWARN) set_name(0x80093254, "ParticleMissile__FP13MissileStructiiii", SN_NOWARN) set_name(0x80093314, "HealStart__Fi", SN_NOWARN) set_name(0x80093330, "HealotherStart__Fi", SN_NOWARN) set_name(0x80093350, "TeleStart__Fi", SN_NOWARN) set_name(0x80093398, "PhaseStart__Fi", SN_NOWARN) set_name(0x800933C8, "InvisStart__Fi", SN_NOWARN) set_name(0x800933F8, "PhaseEnd__Fi", SN_NOWARN) set_name(0x80093420, "ApocaStart__Fi", SN_NOWARN) set_name(0x80093548, "doapocaFX__Fv", SN_NOWARN) set_name(0x8009377C, "DaveLTask__FP4TASK", SN_NOWARN) set_name(0x800937E0, "PRIM_GetPrim__FPP7POLY_G4", SN_NOWARN) set_name(0x8009385C, "PRIM_GetPrim__FPP7POLY_F4", SN_NOWARN) set_name(0x800938D8, "PRIM_GetPrim__FPP8POLY_FT4_addr_800938D8", SN_NOWARN) set_name(0x80093954, "GetFr__7TextDati_addr_80093954", SN_NOWARN) set_name(0x80093970, "DrawArrow__Fii", SN_NOWARN) set_name(0x80093BB0, "show_spell_dir__Fi", SN_NOWARN) set_name(0x80093F08, "release_spell__Fi", SN_NOWARN) set_name(0x80093F7C, "select_belt_item__Fi", SN_NOWARN) set_name(0x80093F84, "any_belt_items__Fv", SN_NOWARN) set_name(0x80093FEC, "get_last_inv__Fv", SN_NOWARN) set_name(0x80094120, "get_next_inv__Fv", SN_NOWARN) set_name(0x8009425C, "pad_func_up__Fi", SN_NOWARN) set_name(0x80094288, "pad_func_down__Fi", SN_NOWARN) set_name(0x800942B4, "pad_func_left__Fi", SN_NOWARN) set_name(0x800942BC, "pad_func_right__Fi", SN_NOWARN) set_name(0x800942C4, "pad_func_select__Fi", SN_NOWARN) set_name(0x800943B4, "pad_func_Attack__Fi", SN_NOWARN) set_name(0x80094724, "pad_func_Action__Fi", SN_NOWARN) set_name(0x80094A34, "InitTargetCursor__Fi", SN_NOWARN) set_name(0x80094B8C, "RemoveTargetCursor__Fi", SN_NOWARN) set_name(0x80094C10, "pad_func_Cast_Spell__Fi", SN_NOWARN) set_name(0x80095324, "pad_func_Use_Item__Fi", SN_NOWARN) set_name(0x80095418, "pad_func_Chr__Fi", SN_NOWARN) set_name(0x80095554, "pad_func_Inv__Fi", SN_NOWARN) set_name(0x80095674, "pad_func_SplBook__Fi", SN_NOWARN) set_name(0x8009578C, "pad_func_QLog__Fi", SN_NOWARN) set_name(0x80095838, "pad_func_SpellBook__Fi", SN_NOWARN) set_name(0x80095904, "pad_func_AutoMap__Fi", SN_NOWARN) set_name(0x80095A1C, "pad_func_Quick_Spell__Fi", SN_NOWARN) set_name(0x80095A98, "check_inv__FiPci", SN_NOWARN) set_name(0x80095C70, "pad_func_Quick_Use_Health__Fi", SN_NOWARN) set_name(0x80095C98, "pad_func_Quick_Use_Mana__Fi", SN_NOWARN) set_name(0x80095CC0, "get_max_find_size__FPici", SN_NOWARN) set_name(0x80095E00, "sort_gold__Fi", SN_NOWARN) set_name(0x80095F08, "DrawObjSelector__Fi", SN_NOWARN) set_name(0x8009673C, "DrawObjTask__FP4TASK", SN_NOWARN) set_name(0x80096818, "add_area_find_object__Fciii", SN_NOWARN) set_name(0x80096924, "CheckRangeObject__Fiici", SN_NOWARN) set_name(0x80096CFC, "CheckArea__FiiicUci", SN_NOWARN) set_name(0x80096F50, "PlacePlayer__FiiiUc", SN_NOWARN) set_name(0x8009718C, "_GLOBAL__D_gplayer", SN_NOWARN) set_name(0x800971B4, "_GLOBAL__I_gplayer", SN_NOWARN) set_name(0x800971DC, "SetRGB__6DialogUcUcUc_addr_800971DC", SN_NOWARN) set_name(0x800971FC, "SetBack__6Dialogi_addr_800971FC", SN_NOWARN) set_name(0x80097204, "SetBorder__6Dialogi_addr_80097204", SN_NOWARN) set_name(0x8009720C, "___6Dialog_addr_8009720C", SN_NOWARN) set_name(0x80097234, "__6Dialog_addr_80097234", SN_NOWARN) set_name(0x80097290, "MoveToScrollTarget__7CBlocks_addr_80097290", SN_NOWARN) set_name(0x800972A4, "GetDown__C4CPad_addr_800972A4", SN_NOWARN) set_name(0x800972CC, "GetCur__C4CPad_addr_800972CC", SN_NOWARN) set_name(0x800972F4, "DEC_AddAsDecRequestor__FP7TextDat", SN_NOWARN) set_name(0x80097370, "DEC_RemoveAsDecRequestor__FP7TextDat", SN_NOWARN) set_name(0x800973C8, "DEC_DoDecompRequests__Fv", SN_NOWARN) set_name(0x80097424, "FindThisTd__FP7TextDat", SN_NOWARN) set_name(0x8009745C, "FindEmptyIndex__Fv", SN_NOWARN) set_name(0x80097494, "UPDATEPROGRESS__Fi", SN_NOWARN) set_name(0x800974F4, "IsGameLoading__Fv", SN_NOWARN) set_name(0x80097500, "PutUpCutScreenTSK__FP4TASK", SN_NOWARN) set_name(0x80097958, "PutUpCutScreen__Fi", SN_NOWARN) set_name(0x80097A08, "TakeDownCutScreen__Fv", SN_NOWARN) set_name(0x80097A50, "FinishProgress__Fv", SN_NOWARN) set_name(0x80097A98, "PRIM_GetPrim__FPP7POLY_G4_addr_80097A98", SN_NOWARN) set_name(0x80097B14, "_GLOBAL__D_UPDATEPROGRESS__Fi", SN_NOWARN) set_name(0x80097B4C, "_GLOBAL__I_UPDATEPROGRESS__Fi", SN_NOWARN) set_name(0x80097B84, "SetRGB__6DialogUcUcUc_addr_80097B84", SN_NOWARN) set_name(0x80097BA4, "SetBack__6Dialogi_addr_80097BA4", SN_NOWARN) set_name(0x80097BAC, "SetBorder__6Dialogi_addr_80097BAC", SN_NOWARN) set_name(0x80097BB4, "___6Dialog_addr_80097BB4", SN_NOWARN) set_name(0x80097BDC, "__6Dialog_addr_80097BDC", SN_NOWARN) set_name(0x80097C38, "___7CScreen_addr_80097C38", SN_NOWARN) set_name(0x80097C58, "init_mem_card__FPFii_v", SN_NOWARN) set_name(0x80097E74, "memcard_event__Fii", SN_NOWARN) set_name(0x80097E80, "init_card__Fi", SN_NOWARN) set_name(0x80097EB4, "ping_card__Fi", SN_NOWARN) set_name(0x80097F48, "CardUpdateTask__FP4TASK", SN_NOWARN) set_name(0x80097F80, "MemcardON__Fv", SN_NOWARN) set_name(0x80097FDC, "MemcardOFF__Fv", SN_NOWARN) set_name(0x8009802C, "DrawDialogBox__FiiP4RECTiiii", SN_NOWARN) set_name(0x80098110, "DrawSpinner__FiiUcUcUciiibiT8", SN_NOWARN) set_name(0x80098610, "DrawMenu__Fi", SN_NOWARN) set_name(0x8009906C, "ShowCharacterFiles__Fv", SN_NOWARN) set_name(0x80099584, "MemcardPad__Fv", SN_NOWARN) set_name(0x80099BFC, "SoundPad__Fv", SN_NOWARN) set_name(0x8009A22C, "CentrePad__Fv", SN_NOWARN) set_name(0x8009A7A8, "CalcVolumes__Fv", SN_NOWARN) set_name(0x8009A8E8, "GetVolumes__Fv", SN_NOWARN) set_name(0x8009A9F0, "PrintInfoMenu__Fv", SN_NOWARN) set_name(0x8009AB98, "DrawOptions__FP4TASK", SN_NOWARN) set_name(0x8009B1C8, "ToggleOptions__Fv", SN_NOWARN) set_name(0x8009B268, "FormatPad__Fv", SN_NOWARN) set_name(0x8009B574, "_GLOBAL__I_cmenu", SN_NOWARN) set_name(0x8009B998, "PRIM_GetPrim__FPP7POLY_G4_addr_8009B998", SN_NOWARN) set_name(0x8009BA14, "GetTick__C4CPad", SN_NOWARN) set_name(0x8009BA3C, "GetDown__C4CPad_addr_8009BA3C", SN_NOWARN) set_name(0x8009BA64, "GetUp__C4CPad_addr_8009BA64", SN_NOWARN) set_name(0x8009BA8C, "GetCur__C4CPad_addr_8009BA8C", SN_NOWARN) set_name(0x8009BAB4, "SetPadTickMask__4CPadUs", SN_NOWARN) set_name(0x8009BABC, "SetPadTick__4CPadUs", SN_NOWARN) set_name(0x8009BAC4, "SetRGB__6DialogUcUcUc_addr_8009BAC4", SN_NOWARN) set_name(0x8009BAE4, "SetBack__6Dialogi_addr_8009BAE4", SN_NOWARN) set_name(0x8009BAEC, "SetBorder__6Dialogi_addr_8009BAEC", SN_NOWARN) set_name(0x8009BAF4, "___6Dialog_addr_8009BAF4", SN_NOWARN) set_name(0x8009BB1C, "__6Dialog_addr_8009BB1C", SN_NOWARN) set_name(0x8009BB78, "GetFr__7TextDati_addr_8009BB78", SN_NOWARN) set_name(0x8009BB94, "BirdDistanceOK__Fiiii", SN_NOWARN) set_name(0x8009BBEC, "AlterBirdPos__FP10BIRDSTRUCTUc", SN_NOWARN) set_name(0x8009BD30, "BirdWorld__FP10BIRDSTRUCTii", SN_NOWARN) set_name(0x8009BDAC, "BirdScared__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009BE8C, "GetPerch__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009BEE0, "BIRD_StartHop__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C048, "BIRD_DoHop__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C14C, "BIRD_StartPerch__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C188, "BIRD_DoPerch__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C20C, "BIRD_DoScatter__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C2B8, "BIRD_StartScatter__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C35C, "BIRD_StartFly__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C400, "BIRD_DoFly__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C6AC, "BIRD_StartLanding__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C6B8, "BIRD_DoLanding__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C708, "PlaceFlock__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C7F4, "ProcessFlock__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009C924, "InitBird__Fv", SN_NOWARN) set_name(0x8009C9FC, "ProcessBird__Fv", SN_NOWARN) set_name(0x8009CB54, "GetBirdFrame__FP10BIRDSTRUCT", SN_NOWARN) set_name(0x8009CBF0, "doshadow__FP10BIRDSTRUCTii", SN_NOWARN) set_name(0x8009CCE4, "DrawLBird__Fv", SN_NOWARN) set_name(0x8009CEDC, "PRIM_GetPrim__FPP8POLY_FT4_addr_8009CEDC", SN_NOWARN) set_name(0x8009CF58, "PlayFMV", SN_NOWARN) set_name(0x8009CFF0, "play_movie", SN_NOWARN) set_name(0x8002F660, "TrimCol__Fs_addr_8002F660", SN_NOWARN) set_name(0x8002F698, "DrawSpellCel__FllUclUc", SN_NOWARN) set_name(0x800301B4, "SetSpellTrans__Fc", SN_NOWARN) set_name(0x800301C0, "DrawSpellBookTSK__FP4TASK", SN_NOWARN) set_name(0x80030258, "DrawSpeedSpellTSK__FP4TASK", SN_NOWARN) set_name(0x800302D0, "ToggleSpell__Fi", SN_NOWARN) set_name(0x80030384, "DrawSpellList__Fv", SN_NOWARN) set_name(0x8003110C, "SetSpell__Fi", SN_NOWARN) set_name(0x800311E0, "AddPanelString__FPCci", SN_NOWARN) set_name(0x80031290, "ClearPanel__Fv", SN_NOWARN) set_name(0x800312C0, "InitPanelStr__Fv", SN_NOWARN) set_name(0x800312E0, "InitControlPan__Fv", SN_NOWARN) set_name(0x80031528, "DrawCtrlPan__Fv", SN_NOWARN) set_name(0x80031554, "DoAutoMap__Fv", SN_NOWARN) set_name(0x800315C8, "CheckPanelInfo__Fv", SN_NOWARN) set_name(0x80031E8C, "FreeControlPan__Fv", SN_NOWARN) set_name(0x80031F9C, "CPrintString__FiPci", SN_NOWARN) set_name(0x800320B8, "PrintInfo__Fv", SN_NOWARN) set_name(0x800322F4, "DrawInfoBox__FP4RECT", SN_NOWARN) set_name(0x80032A64, "MY_PlrStringXY__Fv", SN_NOWARN) set_name(0x80032FB0, "ADD_PlrStringXY__FPCcc", SN_NOWARN) set_name(0x80033058, "DrawPlus__Fii", SN_NOWARN) set_name(0x800331C0, "ChrCheckValidButton__Fi", SN_NOWARN) set_name(0x8003328C, "DrawArrows__Fv", SN_NOWARN) set_name(0x80033384, "BuildChr__Fv", SN_NOWARN) set_name(0x8003465C, "DrawChr__Fv", SN_NOWARN) set_name(0x80034B00, "DrawChrTSK__FP4TASK", SN_NOWARN) set_name(0x80034BA0, "DrawLevelUpIcon__Fi", SN_NOWARN) set_name(0x80034C34, "CheckChrBtns__Fv", SN_NOWARN) set_name(0x80034E78, "DrawDurIcon4Item__FPC10ItemStructii", SN_NOWARN) set_name(0x80034EFC, "RedBack__Fv", SN_NOWARN) set_name(0x80034FE4, "PrintSBookStr__FiiUcPCcUc", SN_NOWARN) set_name(0x8003507C, "GetSBookTrans__FiUc", SN_NOWARN) set_name(0x80035294, "DrawSpellBook__Fv", SN_NOWARN) set_name(0x80035BF4, "CheckSBook__Fv", SN_NOWARN) set_name(0x80035E58, "get_pieces_str__Fi", SN_NOWARN) set_name(0x80035E8C, "_GLOBAL__D_fontkern", SN_NOWARN) set_name(0x80035EB4, "_GLOBAL__I_fontkern", SN_NOWARN) set_name(0x80035EF0, "GetDown__C4CPad_addr_80035EF0", SN_NOWARN) set_name(0x80035F18, "SetRGB__6DialogUcUcUc_addr_80035F18", SN_NOWARN) set_name(0x80035F38, "SetBack__6Dialogi_addr_80035F38", SN_NOWARN) set_name(0x80035F40, "SetBorder__6Dialogi_addr_80035F40", SN_NOWARN) set_name(0x80035F48, "___6Dialog_addr_80035F48", SN_NOWARN) set_name(0x80035F70, "__6Dialog_addr_80035F70", SN_NOWARN) set_name(0x80035FCC, "GetPal__7TextDati_addr_80035FCC", SN_NOWARN) set_name(0x80035FE8, "GetFr__7TextDati_addr_80035FE8", SN_NOWARN) set_name(0x80036004, "InitCursor__Fv", SN_NOWARN) set_name(0x8003600C, "FreeCursor__Fv", SN_NOWARN) set_name(0x80036014, "SetICursor__Fi", SN_NOWARN) set_name(0x80036070, "SetCursor__Fi", SN_NOWARN) set_name(0x800360D4, "NewCursor__Fi", SN_NOWARN) set_name(0x800360F4, "InitLevelCursor__Fv", SN_NOWARN) set_name(0x80036154, "CheckTown__Fv", SN_NOWARN) set_name(0x800363AC, "CheckRportal__Fv", SN_NOWARN) set_name(0x800365D4, "CheckCursMove__Fv", SN_NOWARN) set_name(0x800365DC, "InitDead__Fv", SN_NOWARN) set_name(0x800367D8, "AddDead__Fiici", SN_NOWARN) set_name(0x80036820, "FreeGameMem__Fv", SN_NOWARN) set_name(0x80036870, "start_game__FUi", SN_NOWARN) set_name(0x800368CC, "free_game__Fv", SN_NOWARN) set_name(0x80036940, "LittleStart__FUcUc", SN_NOWARN) set_name(0x80036A04, "StartGame__FUcUc", SN_NOWARN) set_name(0x80036B90, "run_game_loop__FUi", SN_NOWARN) set_name(0x80036CC4, "TryIconCurs__Fv", SN_NOWARN) set_name(0x800370A0, "DisableInputWndProc__FUlUilUl", SN_NOWARN) set_name(0x800370A8, "GM_Game__FUlUilUl", SN_NOWARN) set_name(0x80037158, "LoadLvlGFX__Fv", SN_NOWARN) set_name(0x800371F4, "LoadAllGFX__Fv", SN_NOWARN) set_name(0x80037214, "CreateLevel__Fi", SN_NOWARN) set_name(0x8003730C, "LoCreateLevel__FPv", SN_NOWARN) set_name(0x80037494, "ClearOutDungeonMap__Fv", SN_NOWARN) set_name(0x80037570, "LoadGameLevel__FUci", SN_NOWARN) set_name(0x80037EA4, "game_logic__Fv", SN_NOWARN) set_name(0x80037FB0, "timeout_cursor__FUc", SN_NOWARN) set_name(0x80038058, "game_loop__FUc", SN_NOWARN) set_name(0x80038090, "alloc_plr__Fv", SN_NOWARN) set_name(0x80038098, "plr_encrypt__FUc", SN_NOWARN) set_name(0x800380A0, "assert_fail__FiPCcT1", SN_NOWARN) set_name(0x800380C0, "assert_fail__FiPCc", SN_NOWARN) set_name(0x800380E0, "app_fatal", SN_NOWARN) set_name(0x80038110, "DoMemCardFromFrontEnd__Fv", SN_NOWARN) set_name(0x80038138, "DoMemCardFromInGame__Fv", SN_NOWARN) set_name(0x80038160, "GetActiveTowner__Fi", SN_NOWARN) set_name(0x800381B4, "SetTownerGPtrs__FPUcPPUc", SN_NOWARN) set_name(0x800381D4, "NewTownerAnim__FiPUcii", SN_NOWARN) set_name(0x8003821C, "InitTownerInfo__FilUciiici", SN_NOWARN) set_name(0x8003837C, "InitQstSnds__Fi", SN_NOWARN) set_name(0x80038434, "InitSmith__Fv", SN_NOWARN) set_name(0x80038560, "InitBarOwner__Fv", SN_NOWARN) set_name(0x80038694, "InitTownDead__Fv", SN_NOWARN) set_name(0x800387C4, "InitWitch__Fv", SN_NOWARN) set_name(0x800388F4, "InitBarmaid__Fv", SN_NOWARN) set_name(0x80038A24, "InitBoy__Fv", SN_NOWARN) set_name(0x80038B5C, "InitHealer__Fv", SN_NOWARN) set_name(0x80038C8C, "InitTeller__Fv", SN_NOWARN) set_name(0x80038DBC, "InitDrunk__Fv", SN_NOWARN) set_name(0x80038EEC, "InitCows__Fv", SN_NOWARN) set_name(0x800391B0, "InitTowners__Fv", SN_NOWARN) set_name(0x8003923C, "FreeTownerGFX__Fv", SN_NOWARN) set_name(0x800392E0, "TownCtrlMsg__Fi", SN_NOWARN) set_name(0x80039400, "TownBlackSmith__Fv", SN_NOWARN) set_name(0x80039434, "TownBarOwner__Fv", SN_NOWARN) set_name(0x80039468, "TownDead__Fv", SN_NOWARN) set_name(0x80039550, "TownHealer__Fv", SN_NOWARN) set_name(0x80039578, "TownStory__Fv", SN_NOWARN) set_name(0x800395A0, "TownDrunk__Fv", SN_NOWARN) set_name(0x800395C8, "TownBoy__Fv", SN_NOWARN) set_name(0x800395F0, "TownWitch__Fv", SN_NOWARN) set_name(0x80039618, "TownBarMaid__Fv", SN_NOWARN) set_name(0x80039640, "TownCow__Fv", SN_NOWARN) set_name(0x80039668, "ProcessTowners__Fv", SN_NOWARN) set_name(0x800398B8, "PlrHasItem__FiiRi", SN_NOWARN) set_name(0x8003998C, "CowSFX__Fi", SN_NOWARN) set_name(0x80039AA8, "TownerTalk__Fii", SN_NOWARN) set_name(0x80039AE8, "TalkToTowner__Fii", SN_NOWARN) set_name(0x8003AF10, "effect_is_playing__Fi", SN_NOWARN) set_name(0x8003AF18, "stream_stop__Fv", SN_NOWARN) set_name(0x8003AF60, "stream_play__FP4TSFXll", SN_NOWARN) set_name(0x8003B024, "stream_update__Fv", SN_NOWARN) set_name(0x8003B02C, "sfx_stop__Fv", SN_NOWARN) set_name(0x8003B048, "InitMonsterSND__Fi", SN_NOWARN) set_name(0x8003B0A0, "FreeMonsterSnd__Fv", SN_NOWARN) set_name(0x8003B0A8, "calc_snd_position__FiiPlT2", SN_NOWARN) set_name(0x8003B1AC, "PlaySFX_priv__FP4TSFXUcii", SN_NOWARN) set_name(0x8003B2BC, "PlayEffect__Fii", SN_NOWARN) set_name(0x8003B3E8, "RndSFX__Fi", SN_NOWARN) set_name(0x8003B480, "PlaySFX__Fi", SN_NOWARN) set_name(0x8003B4C0, "PlaySfxLoc__Fiii", SN_NOWARN) set_name(0x8003B514, "sound_stop__Fv", SN_NOWARN) set_name(0x8003B5AC, "sound_update__Fv", SN_NOWARN) set_name(0x8003B5E0, "priv_sound_init__FUc", SN_NOWARN) set_name(0x8003B624, "sound_init__Fv", SN_NOWARN) set_name(0x8003B6CC, "GetDirection__Fiiii", SN_NOWARN) set_name(0x8003B770, "SetRndSeed__Fl", SN_NOWARN) set_name(0x8003B780, "GetRndSeed__Fv", SN_NOWARN) set_name(0x8003B7C8, "random__Fil", SN_NOWARN) set_name(0x8003B834, "DiabloAllocPtr__FUl", SN_NOWARN) set_name(0x8003B880, "mem_free_dbg__FPv", SN_NOWARN) set_name(0x8003B8D0, "LoadFileInMem__FPCcPUl", SN_NOWARN) set_name(0x8003B8D8, "PlayInGameMovie__FPCc", SN_NOWARN) set_name(0x8003B968, "Enter__9CCritSect", SN_NOWARN) set_name(0x8003B970, "InitDiabloMsg__Fc", SN_NOWARN) set_name(0x8003BA04, "ClrDiabloMsg__Fv", SN_NOWARN) set_name(0x8003BA30, "DrawDiabloMsg__Fv", SN_NOWARN) set_name(0x8003BB3C, "interface_msg_pump__Fv", SN_NOWARN) set_name(0x8003BB44, "ShowProgress__FUi", SN_NOWARN) set_name(0x8003C030, "InitAllItemsUseable__Fv", SN_NOWARN) set_name(0x8003C068, "InitItemGFX__Fv", SN_NOWARN) set_name(0x8003C094, "ItemPlace__Fii", SN_NOWARN) set_name(0x8003C15C, "AddInitItems__Fv", SN_NOWARN) set_name(0x8003C374, "InitItems__Fv", SN_NOWARN) set_name(0x8003C534, "CalcPlrItemVals__FiUc", SN_NOWARN) set_name(0x8003CFE4, "CalcPlrScrolls__Fi", SN_NOWARN) set_name(0x8003D364, "CalcPlrStaff__FP12PlayerStruct", SN_NOWARN) set_name(0x8003D400, "CalcSelfItems__Fi", SN_NOWARN) set_name(0x8003D560, "ItemMinStats__FPC12PlayerStructPC10ItemStruct", SN_NOWARN) set_name(0x8003D5AC, "CalcPlrItemMin__Fi", SN_NOWARN) set_name(0x8003D68C, "CalcPlrBookVals__Fi", SN_NOWARN) set_name(0x8003D920, "CalcPlrInv__FiUc", SN_NOWARN) set_name(0x8003D9E4, "SetPlrHandItem__FP10ItemStructi", SN_NOWARN) set_name(0x8003DAFC, "GetPlrHandSeed__FP10ItemStruct", SN_NOWARN) set_name(0x8003DB28, "GetGoldSeed__FiP10ItemStruct", SN_NOWARN) set_name(0x8003DCA4, "SetPlrHandSeed__FP10ItemStructi", SN_NOWARN) set_name(0x8003DCAC, "SetPlrHandGoldCurs__FP10ItemStruct", SN_NOWARN) set_name(0x8003DCDC, "CreatePlrItems__Fi", SN_NOWARN) set_name(0x8003E114, "ItemSpaceOk__Fii", SN_NOWARN) set_name(0x8003E3EC, "GetItemSpace__Fiic", SN_NOWARN) set_name(0x8003E618, "GetSuperItemSpace__Fiic", SN_NOWARN) set_name(0x8003E780, "GetSuperItemLoc__FiiRiT2", SN_NOWARN) set_name(0x8003E848, "CalcItemValue__Fi", SN_NOWARN) set_name(0x8003E900, "GetBookSpell__Fii", SN_NOWARN) set_name(0x8003EB68, "GetStaffPower__FiiiUc", SN_NOWARN) set_name(0x8003ED58, "GetStaffSpell__FiiUc", SN_NOWARN) set_name(0x8003F00C, "GetItemAttrs__Fiii", SN_NOWARN) set_name(0x8003F558, "RndPL__Fii", SN_NOWARN) set_name(0x8003F590, "PLVal__Fiiiii", SN_NOWARN) set_name(0x8003F604, "SaveItemPower__Fiiiiiii", SN_NOWARN) set_name(0x80040C10, "GetItemPower__FiiilUc", SN_NOWARN) set_name(0x80041078, "GetItemBonus__FiiiiUc", SN_NOWARN) set_name(0x80041174, "SetupItem__Fi", SN_NOWARN) set_name(0x80041288, "RndItem__Fi", SN_NOWARN) set_name(0x800414CC, "RndUItem__Fi", SN_NOWARN) set_name(0x8004170C, "RndAllItems__Fv", SN_NOWARN) set_name(0x80041880, "RndTypeItems__Fii", SN_NOWARN) set_name(0x80041980, "CheckUnique__FiiiUc", SN_NOWARN) set_name(0x80041B30, "GetUniqueItem__Fii", SN_NOWARN) set_name(0x80041DD8, "SpawnUnique__Fiii", SN_NOWARN) set_name(0x80041EE4, "ItemRndDur__Fi", SN_NOWARN) set_name(0x80041F74, "SetupAllItems__FiiiiiUcUcUc", SN_NOWARN) set_name(0x80042280, "SpawnItem__FiiiUc", SN_NOWARN) set_name(0x800424C8, "CreateItem__Fiii", SN_NOWARN) set_name(0x800425F8, "CreateRndItem__FiiUcUcUc", SN_NOWARN) set_name(0x80042740, "SetupAllUseful__Fiii", SN_NOWARN) set_name(0x80042818, "CreateRndUseful__FiiiUc", SN_NOWARN) set_name(0x800428D8, "CreateTypeItem__FiiUciiUcUc", SN_NOWARN) set_name(0x80042A1C, "RecreateEar__FiUsiUciiiiii", SN_NOWARN) set_name(0x80042C08, "SpawnQuestItem__Fiiiii", SN_NOWARN) set_name(0x80042E34, "SpawnRock__Fv", SN_NOWARN) set_name(0x80042FF4, "RespawnItem__FiUc", SN_NOWARN) set_name(0x800431B8, "DeleteItem__Fii", SN_NOWARN) set_name(0x8004320C, "ItemDoppel__Fv", SN_NOWARN) set_name(0x800432D4, "ProcessItems__Fv", SN_NOWARN) set_name(0x80043418, "FreeItemGFX__Fv", SN_NOWARN) set_name(0x80043420, "GetItemStr__Fi", SN_NOWARN) set_name(0x800435A8, "CheckIdentify__Fii", SN_NOWARN) set_name(0x80043698, "RepairItem__FP10ItemStructi", SN_NOWARN) set_name(0x80043768, "DoRepair__Fii", SN_NOWARN) set_name(0x8004382C, "RechargeItem__FP10ItemStructi", SN_NOWARN) set_name(0x8004389C, "DoRecharge__Fii", SN_NOWARN) set_name(0x8004399C, "PrintItemOil__Fc", SN_NOWARN) set_name(0x80043A90, "PrintItemPower__FcPC10ItemStruct", SN_NOWARN) set_name(0x8004413C, "PrintItemMisc__FPC10ItemStruct", SN_NOWARN) set_name(0x800443C8, "PrintItemDetails__FPC10ItemStruct", SN_NOWARN) set_name(0x80044734, "PrintItemDur__FPC10ItemStruct", SN_NOWARN) set_name(0x80044A44, "CastScroll__Fi", SN_NOWARN) set_name(0x80044A4C, "UseItem__Fiii", SN_NOWARN) set_name(0x80045060, "StoreStatOk__FP10ItemStruct", SN_NOWARN) set_name(0x800450F4, "PremiumItemOk__Fi", SN_NOWARN) set_name(0x80045170, "RndPremiumItem__Fii", SN_NOWARN) set_name(0x80045278, "SpawnOnePremium__Fii", SN_NOWARN) set_name(0x8004548C, "SpawnPremium__Fi", SN_NOWARN) set_name(0x800456C0, "WitchBookLevel__Fi", SN_NOWARN) set_name(0x80045810, "SpawnStoreGold__Fv", SN_NOWARN) set_name(0x80045890, "RecalcStoreStats__Fv", SN_NOWARN) set_name(0x80045A30, "ItemNoFlippy__Fv", SN_NOWARN) set_name(0x80045A94, "CreateSpellBook__FiiiUcUc", SN_NOWARN) set_name(0x80045C24, "CreateMagicArmor__FiiiiUcUc", SN_NOWARN) set_name(0x80045DA0, "CreateMagicWeapon__FiiiiUcUc", SN_NOWARN) set_name(0x80045F1C, "MakeItemStr__FP10ItemStructUs", SN_NOWARN) set_name(0x8004611C, "veclen2__Fii", SN_NOWARN) set_name(0x80046184, "set_light_bands__Fv", SN_NOWARN) set_name(0x800461F8, "SetLightFX__FiisssUcUcUc", SN_NOWARN) set_name(0x80046264, "DoLighting__Fiiii", SN_NOWARN) set_name(0x80046F14, "DoUnLight__Fv", SN_NOWARN) set_name(0x80047158, "DoUnVision__Fiii", SN_NOWARN) set_name(0x8004721C, "DoVision__FiiiUcUc", SN_NOWARN) set_name(0x8004772C, "FreeLightTable__Fv", SN_NOWARN) set_name(0x80047734, "InitLightTable__Fv", SN_NOWARN) set_name(0x8004773C, "MakeLightTable__Fv", SN_NOWARN) set_name(0x80047744, "InitLightMax__Fv", SN_NOWARN) set_name(0x80047768, "InitLighting__Fv", SN_NOWARN) set_name(0x800477AC, "AddLight__Fiii", SN_NOWARN) set_name(0x80047840, "AddUnLight__Fi", SN_NOWARN) set_name(0x80047870, "ChangeLightRadius__Fii", SN_NOWARN) set_name(0x8004789C, "ChangeLightXY__Fiii", SN_NOWARN) set_name(0x800478D4, "light_fix__Fi", SN_NOWARN) set_name(0x800478DC, "ChangeLightOff__Fiii", SN_NOWARN) set_name(0x80047914, "ChangeLight__Fiiii", SN_NOWARN) set_name(0x80047958, "ChangeLightColour__Fii", SN_NOWARN) set_name(0x80047988, "ProcessLightList__Fv", SN_NOWARN) set_name(0x80047AB4, "SavePreLighting__Fv", SN_NOWARN) set_name(0x80047ABC, "InitVision__Fv", SN_NOWARN) set_name(0x80047B0C, "AddVision__FiiiUc", SN_NOWARN) set_name(0x80047C10, "ChangeVisionRadius__Fii", SN_NOWARN) set_name(0x80047CC4, "ChangeVisionXY__Fiii", SN_NOWARN) set_name(0x80047D7C, "ProcessVisionList__Fv", SN_NOWARN) set_name(0x80047FDC, "FreeQuestText__Fv", SN_NOWARN) set_name(0x80047FE4, "InitQuestText__Fv", SN_NOWARN) set_name(0x80047FF0, "CalcTextSpeed__FPCc", SN_NOWARN) set_name(0x80048130, "InitQTextMsg__Fi", SN_NOWARN) set_name(0x80048258, "DrawQTextBack__Fv", SN_NOWARN) set_name(0x800482C8, "PrintCDWait__Fv", SN_NOWARN) set_name(0x80048354, "DrawQTextTSK__FP4TASK", SN_NOWARN) set_name(0x80048420, "DrawQText__Fv", SN_NOWARN) set_name(0x80048750, "_GLOBAL__D_QBack", SN_NOWARN) set_name(0x80048778, "_GLOBAL__I_QBack", SN_NOWARN) set_name(0x800487A0, "SetRGB__6DialogUcUcUc_addr_800487A0", SN_NOWARN) set_name(0x800487C0, "SetBorder__6Dialogi_addr_800487C0", SN_NOWARN) set_name(0x800487C8, "___6Dialog_addr_800487C8", SN_NOWARN) set_name(0x800487F0, "__6Dialog_addr_800487F0", SN_NOWARN) set_name(0x8004884C, "GetCharWidth__5CFontc_addr_8004884C", SN_NOWARN) set_name(0x800488A4, "GetFr__7TextDati_addr_800488A4", SN_NOWARN) set_name(0x800488C0, "nullmissile__Fiiiiiicii", SN_NOWARN) set_name(0x800488C8, "FuncNULL__FP13MissileStructiii", SN_NOWARN) set_name(0x800488D0, "delta_init__Fv", SN_NOWARN) set_name(0x80048930, "delta_kill_monster__FiUcUcUc", SN_NOWARN) set_name(0x800489A0, "delta_monster_hp__FilUc", SN_NOWARN) set_name(0x80048A00, "delta_sync_golem__FPC9TCmdGolemiUc", SN_NOWARN) set_name(0x80048A78, "delta_leave_sync__FUc", SN_NOWARN) set_name(0x80048CD0, "delta_sync_object__FiUcUc", SN_NOWARN) set_name(0x80048D10, "delta_get_item__FPC9TCmdGItemUc", SN_NOWARN) set_name(0x80048ED4, "delta_put_item__FPC9TCmdPItemiiUc", SN_NOWARN) set_name(0x8004903C, "delta_portal_inited__Fi", SN_NOWARN) set_name(0x80049060, "delta_quest_inited__Fi", SN_NOWARN) set_name(0x80049084, "DeltaAddItem__Fi", SN_NOWARN) set_name(0x800492C4, "DeltaExportData__FPc", SN_NOWARN) set_name(0x800492F4, "DeltaImportData__FPc", SN_NOWARN) set_name(0x80049328, "DeltaSaveLevel__Fv", SN_NOWARN) set_name(0x800493D0, "NetSendCmd__FUcUc", SN_NOWARN) set_name(0x800493F8, "NetSendCmdGolem__FUcUcUcUclUc", SN_NOWARN) set_name(0x80049444, "NetSendCmdLoc__FUcUcUcUc", SN_NOWARN) set_name(0x80049474, "NetSendCmdLocParam1__FUcUcUcUcUs", SN_NOWARN) set_name(0x800494AC, "NetSendCmdLocParam2__FUcUcUcUcUsUs", SN_NOWARN) set_name(0x800494EC, "NetSendCmdLocParam3__FUcUcUcUcUsUsUs", SN_NOWARN) set_name(0x80049534, "NetSendCmdParam1__FUcUcUs", SN_NOWARN) set_name(0x80049560, "NetSendCmdParam2__FUcUcUsUs", SN_NOWARN) set_name(0x80049590, "NetSendCmdParam3__FUcUcUsUsUs", SN_NOWARN) set_name(0x800495C8, "NetSendCmdQuest__FUcUc", SN_NOWARN) set_name(0x8004963C, "NetSendCmdGItem__FUcUcUcUcUc", SN_NOWARN) set_name(0x80049770, "NetSendCmdGItem2__FUcUcUcUcPC9TCmdGItem", SN_NOWARN) set_name(0x800497F4, "NetSendCmdReq2__FUcUcUcPC9TCmdGItem", SN_NOWARN) set_name(0x80049854, "NetSendCmdExtra__FPC9TCmdGItem", SN_NOWARN) set_name(0x800498C4, "NetSendCmdPItem__FUcUcUcUc", SN_NOWARN) set_name(0x800499CC, "NetSendCmdChItem__FUcUc", SN_NOWARN) set_name(0x80049A70, "NetSendCmdDelItem__FUcUc", SN_NOWARN) set_name(0x80049AA0, "NetSendCmdDItem__FUci", SN_NOWARN) set_name(0x80049BB4, "i_own_level__Fi", SN_NOWARN) set_name(0x80049BBC, "NetSendCmdDamage__FUcUcUl", SN_NOWARN) set_name(0x80049BF0, "delta_open_portal__FiUcUcUcUcUc", SN_NOWARN) set_name(0x80049C4C, "delta_close_portal__Fi", SN_NOWARN) set_name(0x80049C8C, "check_update_plr__Fi", SN_NOWARN) set_name(0x80049C94, "On_WALKXY__FPC4TCmdi", SN_NOWARN) set_name(0x80049D4C, "On_ADDSTR__FPC4TCmdi", SN_NOWARN) set_name(0x80049D7C, "On_ADDMAG__FPC4TCmdi", SN_NOWARN) set_name(0x80049DAC, "On_ADDDEX__FPC4TCmdi", SN_NOWARN) set_name(0x80049DDC, "On_ADDVIT__FPC4TCmdi", SN_NOWARN) set_name(0x80049E0C, "On_SBSPELL__FPC4TCmdi", SN_NOWARN) set_name(0x80049E80, "On_GOTOGETITEM__FPC4TCmdi", SN_NOWARN) set_name(0x80049F28, "On_REQUESTGITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A06C, "On_GETITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A244, "On_GOTOAGETITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A2EC, "On_REQUESTAGITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A424, "On_AGETITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A5F4, "On_ITEMEXTRA__FPC4TCmdi", SN_NOWARN) set_name(0x8004A694, "On_PUTITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A820, "On_SYNCPUTITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004A964, "On_RESPAWNITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004AA84, "On_SATTACKXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004AB34, "On_SPELLXYD__FPC4TCmdi", SN_NOWARN) set_name(0x8004AC40, "On_SPELLXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004AD3C, "On_TSPELLXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004AE3C, "On_OPOBJXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004AF6C, "On_DISARMXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004B09C, "On_OPOBJT__FPC4TCmdi", SN_NOWARN) set_name(0x8004B108, "On_ATTACKID__FPC4TCmdi", SN_NOWARN) set_name(0x8004B264, "On_SPELLID__FPC4TCmdi", SN_NOWARN) set_name(0x8004B350, "On_SPELLPID__FPC4TCmdi", SN_NOWARN) set_name(0x8004B434, "On_TSPELLID__FPC4TCmdi", SN_NOWARN) set_name(0x8004B51C, "On_TSPELLPID__FPC4TCmdi", SN_NOWARN) set_name(0x8004B604, "On_KNOCKBACK__FPC4TCmdi", SN_NOWARN) set_name(0x8004B694, "On_RESURRECT__FPC4TCmdi", SN_NOWARN) set_name(0x8004B6D0, "On_HEALOTHER__FPC4TCmdi", SN_NOWARN) set_name(0x8004B740, "On_TALKXY__FPC4TCmdi", SN_NOWARN) set_name(0x8004B7E8, "On_NEWLVL__FPC4TCmdi", SN_NOWARN) set_name(0x8004B820, "On_WARP__FPC4TCmdi", SN_NOWARN) set_name(0x8004B90C, "On_MONSTDEATH__FPC4TCmdi", SN_NOWARN) set_name(0x8004B978, "On_KILLGOLEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004B9E4, "On_AWAKEGOLEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004BB58, "On_MONSTDAMAGE__FPC4TCmdi", SN_NOWARN) set_name(0x8004BC60, "On_PLRDEAD__FPC4TCmdi", SN_NOWARN) set_name(0x8004BCA8, "On_PLRDAMAGE__FPC4TCmdi", SN_NOWARN) set_name(0x8004BE70, "On_OPENDOOR__FPC4TCmdi", SN_NOWARN) set_name(0x8004BF0C, "On_CLOSEDOOR__FPC4TCmdi", SN_NOWARN) set_name(0x8004BFA8, "On_OPERATEOBJ__FPC4TCmdi", SN_NOWARN) set_name(0x8004C044, "On_PLROPOBJ__FPC4TCmdi", SN_NOWARN) set_name(0x8004C0DC, "On_BREAKOBJ__FPC4TCmdi", SN_NOWARN) set_name(0x8004C174, "On_CHANGEPLRITEMS__FPC4TCmdi", SN_NOWARN) set_name(0x8004C17C, "On_DELPLRITEMS__FPC4TCmdi", SN_NOWARN) set_name(0x8004C184, "On_PLRLEVEL__FPC4TCmdi", SN_NOWARN) set_name(0x8004C18C, "On_DROPITEM__FPC4TCmdi", SN_NOWARN) set_name(0x8004C1E4, "On_PLAYER_JOINLEVEL__FPC4TCmdi", SN_NOWARN) set_name(0x8004C47C, "On_ACTIVATEPORTAL__FPC4TCmdi", SN_NOWARN) set_name(0x8004C610, "On_DEACTIVATEPORTAL__FPC4TCmdi", SN_NOWARN) set_name(0x8004C664, "On_RETOWN__FPC4TCmdi", SN_NOWARN) set_name(0x8004C6B0, "On_SETSTR__FPC4TCmdi", SN_NOWARN) set_name(0x8004C6F0, "On_SETDEX__FPC4TCmdi", SN_NOWARN) set_name(0x8004C730, "On_SETMAG__FPC4TCmdi", SN_NOWARN) set_name(0x8004C770, "On_SETVIT__FPC4TCmdi", SN_NOWARN) set_name(0x8004C7B0, "On_SYNCQUEST__FPC4TCmdi", SN_NOWARN) set_name(0x8004C7F8, "On_ENDSHIELD__FPC4TCmdi", SN_NOWARN) set_name(0x8004C91C, "On_CHEAT_EXPERIENCE__FPC4TCmdi", SN_NOWARN) set_name(0x8004C924, "On_CHEAT_SPELL_LEVEL__FPC4TCmdi", SN_NOWARN) set_name(0x8004C92C, "On_DEBUG__FPC4TCmdi", SN_NOWARN) set_name(0x8004C934, "ParseCmd__FiPC4TCmd", SN_NOWARN) set_name(0x8004CD88, "NetSendLoPri__FPCUcUc", SN_NOWARN) set_name(0x8004CDB4, "InitLevelType__Fi", SN_NOWARN) set_name(0x8004CE00, "SetupLocalCoords__Fv", SN_NOWARN) set_name(0x8004CF90, "InitNewSeed__Fl", SN_NOWARN) set_name(0x8004D004, "NetInit__FUcPUc", SN_NOWARN) set_name(0x8004D22C, "InitObjectGFX__Fv", SN_NOWARN) set_name(0x8004D448, "FreeObjectGFX__Fv", SN_NOWARN) set_name(0x8004D454, "DeleteObject__Fii", SN_NOWARN) set_name(0x8004D50C, "SetupObject__Fiiii", SN_NOWARN) set_name(0x8004D790, "SetObjMapRange__Fiiiiii", SN_NOWARN) set_name(0x8004D7F0, "SetBookMsg__Fii", SN_NOWARN) set_name(0x8004D818, "AddObject__Fiii", SN_NOWARN) set_name(0x8004D924, "Obj_Light__Fii", SN_NOWARN) set_name(0x8004DB34, "Obj_Circle__Fi", SN_NOWARN) set_name(0x8004DE58, "Obj_StopAnim__Fi", SN_NOWARN) set_name(0x8004DEBC, "DrawExpl__Fiiiiiccc", SN_NOWARN) set_name(0x8004E198, "DrawObjExpl__FP12ObjectStructiii", SN_NOWARN) set_name(0x8004E208, "Obj_Door__Fi", SN_NOWARN) set_name(0x8004E39C, "Obj_Sarc__Fi", SN_NOWARN) set_name(0x8004E3E8, "ActivateTrapLine__Fii", SN_NOWARN) set_name(0x8004E4F8, "Obj_FlameTrap__Fi", SN_NOWARN) set_name(0x8004E7C8, "Obj_Trap__Fi", SN_NOWARN) set_name(0x8004EB18, "Obj_BCrossDamage__Fi", SN_NOWARN) set_name(0x8004EDA8, "ProcessObjects__Fv", SN_NOWARN) set_name(0x8004F048, "ObjSetMicro__Fiii", SN_NOWARN) set_name(0x8004F080, "ObjSetMini__Fiii", SN_NOWARN) set_name(0x8004F154, "ObjL1Special__Fiiii", SN_NOWARN) set_name(0x8004F15C, "ObjL2Special__Fiiii", SN_NOWARN) set_name(0x8004F164, "DoorSet__Fiii", SN_NOWARN) set_name(0x8004F3E4, "RedoPlayerVision__Fv", SN_NOWARN) set_name(0x8004F488, "OperateL1RDoor__FiiUc", SN_NOWARN) set_name(0x8004F82C, "OperateL1LDoor__FiiUc", SN_NOWARN) set_name(0x8004FC04, "OperateL2RDoor__FiiUc", SN_NOWARN) set_name(0x8004FF9C, "OperateL2LDoor__FiiUc", SN_NOWARN) set_name(0x80050334, "OperateL3RDoor__FiiUc", SN_NOWARN) set_name(0x8005063C, "OperateL3LDoor__FiiUc", SN_NOWARN) set_name(0x80050944, "MonstCheckDoors__Fi", SN_NOWARN) set_name(0x80050E40, "ObjChangeMap__Fiiii", SN_NOWARN) set_name(0x80050FF8, "ObjChangeMapResync__Fiiii", SN_NOWARN) set_name(0x80051168, "OperateL1Door__FiiUc", SN_NOWARN) set_name(0x800512C4, "OperateLever__Fii", SN_NOWARN) set_name(0x800514B0, "OperateBook__Fii", SN_NOWARN) set_name(0x800519A4, "OperateBookLever__Fii", SN_NOWARN) set_name(0x80051D4C, "OperateSChambBk__Fii", SN_NOWARN) set_name(0x80051F24, "OperateChest__FiiUc", SN_NOWARN) set_name(0x800522F4, "OperateMushPatch__Fii", SN_NOWARN) set_name(0x800524B8, "OperateInnSignChest__Fii", SN_NOWARN) set_name(0x80052650, "OperateSlainHero__FiiUc", SN_NOWARN) set_name(0x800528A4, "OperateTrapLvr__Fi", SN_NOWARN) set_name(0x80052A74, "OperateSarc__FiiUc", SN_NOWARN) set_name(0x80052C2C, "OperateL2Door__FiiUc", SN_NOWARN) set_name(0x80052D88, "OperateL3Door__FiiUc", SN_NOWARN) set_name(0x80052EE4, "LoadMapObjs__FPUcii", SN_NOWARN) set_name(0x80052FEC, "OperatePedistal__Fii", SN_NOWARN) set_name(0x800532A4, "TryDisarm__Fii", SN_NOWARN) set_name(0x80053468, "ItemMiscIdIdx__Fi", SN_NOWARN) set_name(0x800534D8, "OperateShrine__Fiii", SN_NOWARN) set_name(0x80055A9C, "OperateSkelBook__FiiUc", SN_NOWARN) set_name(0x80055C18, "OperateBookCase__FiiUc", SN_NOWARN) set_name(0x80055DE8, "OperateDecap__FiiUc", SN_NOWARN) set_name(0x80055ED0, "OperateArmorStand__FiiUc", SN_NOWARN) set_name(0x80056040, "FindValidShrine__Fi", SN_NOWARN) set_name(0x80056130, "OperateGoatShrine__Fiii", SN_NOWARN) set_name(0x800561D8, "OperateCauldron__Fiii", SN_NOWARN) set_name(0x8005628C, "OperateFountains__Fii", SN_NOWARN) set_name(0x80056838, "OperateWeaponRack__FiiUc", SN_NOWARN) set_name(0x800569E4, "OperateStoryBook__Fii", SN_NOWARN) set_name(0x80056AD4, "OperateLazStand__Fii", SN_NOWARN) set_name(0x80056BB4, "OperateObject__FiiUc", SN_NOWARN) set_name(0x80056FEC, "SyncOpL1Door__Fiii", SN_NOWARN) set_name(0x80057100, "SyncOpL2Door__Fiii", SN_NOWARN) set_name(0x80057214, "SyncOpL3Door__Fiii", SN_NOWARN) set_name(0x80057328, "SyncOpObject__Fiii", SN_NOWARN) set_name(0x80057508, "BreakCrux__Fi", SN_NOWARN) set_name(0x800576F8, "BreakBarrel__FiiiUcUc", SN_NOWARN) set_name(0x80057C4C, "BreakObject__Fii", SN_NOWARN) set_name(0x80057DAC, "SyncBreakObj__Fii", SN_NOWARN) set_name(0x80057E08, "SyncL1Doors__Fi", SN_NOWARN) set_name(0x80057F20, "SyncCrux__Fi", SN_NOWARN) set_name(0x80058058, "SyncLever__Fi", SN_NOWARN) set_name(0x800580D4, "SyncQSTLever__Fi", SN_NOWARN) set_name(0x800581CC, "SyncPedistal__Fi", SN_NOWARN) set_name(0x80058328, "SyncL2Doors__Fi", SN_NOWARN) set_name(0x80058490, "SyncL3Doors__Fi", SN_NOWARN) set_name(0x800585BC, "SyncObjectAnim__Fi", SN_NOWARN) set_name(0x800586FC, "GetObjectStr__Fi", SN_NOWARN) set_name(0x80058B18, "RestoreObjectLight__Fv", SN_NOWARN) set_name(0x80058D6C, "GetNumOfFrames__7TextDatii_addr_80058D6C", SN_NOWARN) set_name(0x80058DA4, "GetCreature__7TextDati_addr_80058DA4", SN_NOWARN) set_name(0x80058E1C, "GetNumOfCreatures__7TextDat_addr_80058E1C", SN_NOWARN) set_name(0x80058E30, "FindPath__FPFiii_UciiiiiPc", SN_NOWARN) set_name(0x80058E38, "game_2_ui_class__FPC12PlayerStruct", SN_NOWARN) set_name(0x80058E64, "game_2_ui_player__FPC12PlayerStructP11_uiheroinfoUc", SN_NOWARN) set_name(0x80058F18, "SetupLocalPlayer__Fv", SN_NOWARN) set_name(0x80058F38, "ismyplr__FP12PlayerStruct", SN_NOWARN) set_name(0x80058F7C, "plrind__FP12PlayerStruct", SN_NOWARN) set_name(0x80058F90, "InitPlayerGFX__FP12PlayerStruct", SN_NOWARN) set_name(0x80058FB0, "FreePlayerGFX__FP12PlayerStruct", SN_NOWARN) set_name(0x80058FB8, "NewPlrAnim__FP12PlayerStructiii", SN_NOWARN) set_name(0x80058FD4, "ClearPlrPVars__FP12PlayerStruct", SN_NOWARN) set_name(0x80058FF8, "SetPlrAnims__FP12PlayerStruct", SN_NOWARN) set_name(0x80059234, "CreatePlayer__FP12PlayerStructc", SN_NOWARN) set_name(0x80059650, "CalcStatDiff__FP12PlayerStruct", SN_NOWARN) set_name(0x800596B8, "NextPlrLevel__FP12PlayerStruct", SN_NOWARN) set_name(0x80059828, "AddPlrExperience__FP12PlayerStructil", SN_NOWARN) set_name(0x80059A34, "AddPlrMonstExper__Filc", SN_NOWARN) set_name(0x80059AB8, "InitPlayer__FP12PlayerStructUc", SN_NOWARN) set_name(0x80059E84, "InitMultiView__Fv", SN_NOWARN) set_name(0x80059EE0, "SolidLoc__Fii", SN_NOWARN) set_name(0x80059F24, "PlrClrTrans__Fii", SN_NOWARN) set_name(0x80059FB8, "PlrDoTrans__Fii", SN_NOWARN) set_name(0x8005A0AC, "SetPlayerOld__FP12PlayerStruct", SN_NOWARN) set_name(0x8005A0C0, "StartStand__FP12PlayerStructi", SN_NOWARN) set_name(0x8005A14C, "StartWalkStand__FP12PlayerStruct", SN_NOWARN) set_name(0x8005A1B0, "PM_ChangeLightOff__FP12PlayerStruct", SN_NOWARN) set_name(0x8005A1EC, "PM_ChangeOffset__FP12PlayerStruct", SN_NOWARN) set_name(0x8005A218, "StartAttack__FP12PlayerStructi", SN_NOWARN) set_name(0x8005A2A0, "StartPlrBlock__FP12PlayerStructi", SN_NOWARN) set_name(0x8005A338, "StartSpell__FP12PlayerStructiii", SN_NOWARN) set_name(0x8005A4D4, "RemovePlrFromMap__FP12PlayerStruct", SN_NOWARN) set_name(0x8005A5F4, "StartPlrHit__FP12PlayerStructiUc", SN_NOWARN) set_name(0x8005A714, "RespawnDeadItem__FP10ItemStructii", SN_NOWARN) set_name(0x8005A8AC, "PlrDeadItem__FP12PlayerStructP10ItemStructii", SN_NOWARN) set_name(0x8005AA70, "StartPlayerKill__FP12PlayerStructi", SN_NOWARN) set_name(0x8005AE18, "DropHalfPlayersGold__FP12PlayerStruct", SN_NOWARN) set_name(0x8005B260, "StartPlrKill__FP12PlayerStructi", SN_NOWARN) set_name(0x8005B3A4, "SyncPlrKill__FP12PlayerStructi", SN_NOWARN) set_name(0x8005B3C4, "RemovePlrMissiles__FP12PlayerStruct", SN_NOWARN) set_name(0x8005B6AC, "InitLevelChange__FP12PlayerStruct", SN_NOWARN) set_name(0x8005B768, "StartNewLvl__FP12PlayerStructii", SN_NOWARN) set_name(0x8005B8AC, "RestartTownLvl__FP12PlayerStruct", SN_NOWARN) set_name(0x8005B93C, "StartWarpLvl__FP12PlayerStructi", SN_NOWARN) set_name(0x8005B9F8, "PM_DoStand__FP12PlayerStruct", SN_NOWARN) set_name(0x8005BA00, "ChkPlrOffsets__Fiiii", SN_NOWARN) set_name(0x8005BA88, "PM_DoWalk__FP12PlayerStruct", SN_NOWARN) set_name(0x8005BDF4, "WeaponDur__FP12PlayerStructi", SN_NOWARN) set_name(0x8005BF94, "PlrHitMonst__FP12PlayerStructi", SN_NOWARN) set_name(0x8005C5C4, "PlrHitPlr__FP12PlayerStructc", SN_NOWARN) set_name(0x8005C974, "PlrHitObj__FP12PlayerStructii", SN_NOWARN) set_name(0x8005CA04, "PM_DoAttack__FP12PlayerStruct", SN_NOWARN) set_name(0x8005CD90, "PM_DoRangeAttack__FP12PlayerStruct", SN_NOWARN) set_name(0x8005CE90, "ShieldDur__FP12PlayerStruct", SN_NOWARN) set_name(0x8005CF50, "PM_DoBlock__FP12PlayerStruct", SN_NOWARN) set_name(0x8005CFF0, "do_spell_anim__FiiiP12PlayerStruct", SN_NOWARN) set_name(0x8005DF60, "PM_DoSpell__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E2D0, "ArmorDur__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E3CC, "PM_DoGotHit__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E448, "PM_DoDeath__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E55C, "PM_DoNewLvl__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E564, "CheckNewPath__FP12PlayerStruct", SN_NOWARN) set_name(0x8005E97C, "PlrDeathModeOK__Fi", SN_NOWARN) set_name(0x8005E9E4, "ValidatePlayer__Fv", SN_NOWARN) set_name(0x8005EEC0, "CheckCheatStats__FP12PlayerStruct", SN_NOWARN) set_name(0x8005EF5C, "ProcessPlayers__Fv", SN_NOWARN) set_name(0x8005F290, "ClrPlrPath__FP12PlayerStruct", SN_NOWARN) set_name(0x8005F2B8, "PosOkPlayer__FP12PlayerStructii", SN_NOWARN) set_name(0x8005F460, "MakePlrPath__FP12PlayerStructiiUc", SN_NOWARN) set_name(0x8005F468, "CheckPlrSpell__Fv", SN_NOWARN) set_name(0x8005F874, "SyncInitPlrPos__FP12PlayerStruct", SN_NOWARN) set_name(0x8005F9B0, "SyncInitPlr__FP12PlayerStruct", SN_NOWARN) set_name(0x8005F9E0, "CheckStats__Fi", SN_NOWARN) set_name(0x8005FB7C, "ModifyPlrStr__Fii", SN_NOWARN) set_name(0x8005FC98, "ModifyPlrMag__Fii", SN_NOWARN) set_name(0x8005FD84, "ModifyPlrDex__Fii", SN_NOWARN) set_name(0x8005FE68, "ModifyPlrVit__Fii", SN_NOWARN) set_name(0x8005FF44, "SetPlayerHitPoints__FP12PlayerStructi", SN_NOWARN) set_name(0x8005FF88, "SetPlrStr__Fii", SN_NOWARN) set_name(0x80060064, "SetPlrMag__Fii", SN_NOWARN) set_name(0x800600D4, "SetPlrDex__Fii", SN_NOWARN) set_name(0x800601B0, "SetPlrVit__Fii", SN_NOWARN) set_name(0x8006021C, "InitDungMsgs__FP12PlayerStruct", SN_NOWARN) set_name(0x80060224, "PlayDungMsgs__Fv", SN_NOWARN) set_name(0x80060554, "CreatePlrItems__FP12PlayerStruct", SN_NOWARN) set_name(0x8006057C, "WorldToOffset__FP12PlayerStructii", SN_NOWARN) set_name(0x800605C0, "SetSpdbarGoldCurs__FP12PlayerStructi", SN_NOWARN) set_name(0x800605F4, "GetSpellLevel__FP12PlayerStructi", SN_NOWARN) set_name(0x80060628, "BreakObject__FP12PlayerStructi", SN_NOWARN) set_name(0x8006065C, "CalcPlrInv__FP12PlayerStructUc", SN_NOWARN) set_name(0x80060690, "RemoveSpdBarItem__FP12PlayerStructi", SN_NOWARN) set_name(0x800606C4, "M_StartKill__FiP12PlayerStruct", SN_NOWARN) set_name(0x800606FC, "SetGoldCurs__FP12PlayerStructi", SN_NOWARN) set_name(0x80060730, "HealStart__FP12PlayerStruct", SN_NOWARN) set_name(0x80060758, "HealotherStart__FP12PlayerStruct", SN_NOWARN) set_name(0x80060780, "CalculateGold__FP12PlayerStruct", SN_NOWARN) set_name(0x800607A8, "M_StartHit__FiP12PlayerStructi", SN_NOWARN) set_name(0x800607F0, "TeleStart__FP12PlayerStruct", SN_NOWARN) set_name(0x80060818, "PhaseStart__FP12PlayerStruct", SN_NOWARN) set_name(0x80060840, "RemoveInvItem__FP12PlayerStructi", SN_NOWARN) set_name(0x80060874, "InvisStart__FP12PlayerStruct", SN_NOWARN) set_name(0x8006089C, "PhaseEnd__FP12PlayerStruct", SN_NOWARN) set_name(0x800608C4, "OperateObject__FP12PlayerStructiUc", SN_NOWARN) set_name(0x80060908, "TryDisarm__FP12PlayerStructi", SN_NOWARN) set_name(0x8006093C, "TalkToTowner__FP12PlayerStructi", SN_NOWARN) set_name(0x80060970, "PosOkPlayer__Fiii", SN_NOWARN) set_name(0x800609BC, "CalcStatDiff__Fi", SN_NOWARN) set_name(0x80060A08, "StartNewLvl__Fiii", SN_NOWARN) set_name(0x80060A54, "CreatePlayer__Fic", SN_NOWARN) set_name(0x80060AA8, "StartStand__Fii", SN_NOWARN) set_name(0x80060AF4, "SetPlayerHitPoints__Fii", SN_NOWARN) set_name(0x80060B40, "MakePlrPath__FiiiUc", SN_NOWARN) set_name(0x80060B90, "StartWarpLvl__Fii", SN_NOWARN) set_name(0x80060BDC, "SyncPlrKill__Fii", SN_NOWARN) set_name(0x80060C28, "StartPlrKill__Fii", SN_NOWARN) set_name(0x80060C74, "NewPlrAnim__Fiiii", SN_NOWARN) set_name(0x80060CC0, "AddPlrExperience__Fiil", SN_NOWARN) set_name(0x80060D0C, "StartPlrBlock__Fii", SN_NOWARN) set_name(0x80060D58, "StartPlrHit__FiiUc", SN_NOWARN) set_name(0x80060DA8, "StartSpell__Fiiii", SN_NOWARN) set_name(0x80060DF4, "InitPlayer__FiUc", SN_NOWARN) set_name(0x80060E44, "PM_ChangeLightOff__Fi", SN_NOWARN) set_name(0x80060E90, "CheckNewPath__Fi", SN_NOWARN) set_name(0x80060EDC, "FreePlayerGFX__Fi", SN_NOWARN) set_name(0x80060F28, "InitDungMsgs__Fi", SN_NOWARN) set_name(0x80060F74, "InitPlayerGFX__Fi", SN_NOWARN) set_name(0x80060FC0, "SyncInitPlrPos__Fi", SN_NOWARN) set_name(0x8006100C, "SetPlrAnims__Fi", SN_NOWARN) set_name(0x80061058, "ClrPlrPath__Fi", SN_NOWARN) set_name(0x800610A4, "SyncInitPlr__Fi", SN_NOWARN) set_name(0x800610F0, "RestartTownLvl__Fi", SN_NOWARN) set_name(0x8006113C, "SetPlayerOld__Fi", SN_NOWARN) set_name(0x80061188, "GetGoldSeed__FP12PlayerStructP10ItemStruct", SN_NOWARN) set_name(0x800611BC, "PRIM_GetPrim__FPP8POLY_FT4_addr_800611BC", SN_NOWARN) set_name(0x80061238, "GetPlayer__7CPlayeri", SN_NOWARN) set_name(0x80061288, "GetLastOtPos__C7CPlayer", SN_NOWARN) set_name(0x80061294, "GetLastScrY__C7CPlayer", SN_NOWARN) set_name(0x800612A0, "GetLastScrX__C7CPlayer", SN_NOWARN) set_name(0x800612AC, "TSK_Lava2Water__FP4TASK", SN_NOWARN) set_name(0x800614FC, "CheckQuests__Fv", SN_NOWARN) set_name(0x800619B4, "ForceQuests__Fv", SN_NOWARN) set_name(0x80061B58, "QuestStatus__Fi", SN_NOWARN) set_name(0x80061BEC, "CheckQuestKill__FiUc", SN_NOWARN) set_name(0x800621CC, "SetReturnLvlPos__Fv", SN_NOWARN) set_name(0x800622DC, "GetReturnLvlPos__Fv", SN_NOWARN) set_name(0x80062330, "ResyncMPQuests__Fv", SN_NOWARN) set_name(0x8006246C, "ResyncQuests__Fv", SN_NOWARN) set_name(0x800629CC, "PrintQLString__FiiUcPcc", SN_NOWARN) set_name(0x80062BF8, "DrawQuestLog__Fv", SN_NOWARN) set_name(0x80062E30, "DrawQuestLogTSK__FP4TASK", SN_NOWARN) set_name(0x80062EB0, "StartQuestlog__Fv", SN_NOWARN) set_name(0x80062FC0, "QuestlogUp__Fv", SN_NOWARN) set_name(0x80063018, "QuestlogDown__Fv", SN_NOWARN) set_name(0x80063080, "QuestlogEnter__Fv", SN_NOWARN) set_name(0x8006313C, "QuestlogESC__Fv", SN_NOWARN) set_name(0x8006317C, "SetMultiQuest__FiiUci", SN_NOWARN) set_name(0x800631FC, "_GLOBAL__D_questlog", SN_NOWARN) set_name(0x80063224, "_GLOBAL__I_questlog", SN_NOWARN) set_name(0x8006324C, "GetBlockTexDat__7CBlocks", SN_NOWARN) set_name(0x80063258, "SetRGB__6DialogUcUcUc_addr_80063258", SN_NOWARN) set_name(0x80063278, "SetBack__6Dialogi_addr_80063278", SN_NOWARN) set_name(0x80063280, "SetBorder__6Dialogi_addr_80063280", SN_NOWARN) set_name(0x80063288, "___6Dialog_addr_80063288", SN_NOWARN) set_name(0x800632B0, "__6Dialog_addr_800632B0", SN_NOWARN) set_name(0x8006330C, "GetPal__7TextDati_addr_8006330C", SN_NOWARN) set_name(0x80063328, "GetFr__7TextDati_addr_80063328", SN_NOWARN) set_name(0x80063344, "DrawView__Fii", SN_NOWARN) set_name(0x800635B0, "DrawAndBlit__Fv", SN_NOWARN) set_name(0x800636A8, "FreeStoreMem__Fv", SN_NOWARN) set_name(0x800636B0, "DrawSTextBack__Fv", SN_NOWARN) set_name(0x80063720, "PrintSString__FiiUcPcci", SN_NOWARN) set_name(0x80063AB0, "DrawSLine__Fi", SN_NOWARN) set_name(0x80063B44, "ClearSText__Fii", SN_NOWARN) set_name(0x80063BDC, "AddSLine__Fi", SN_NOWARN) set_name(0x80063C2C, "AddSTextVal__Fii", SN_NOWARN) set_name(0x80063C54, "AddSText__FiiUcPccUc", SN_NOWARN) set_name(0x80063D08, "PrintStoreItem__FPC10ItemStructic", SN_NOWARN) set_name(0x8006414C, "StoreAutoPlace__Fv", SN_NOWARN) set_name(0x80064768, "S_StartSmith__Fv", SN_NOWARN) set_name(0x800648F0, "S_ScrollSBuy__Fi", SN_NOWARN) set_name(0x80064A9C, "S_StartSBuy__Fv", SN_NOWARN) set_name(0x80064BCC, "S_ScrollSPBuy__Fi", SN_NOWARN) set_name(0x80064D94, "S_StartSPBuy__Fv", SN_NOWARN) set_name(0x80064EE4, "SmithSellOk__Fi", SN_NOWARN) set_name(0x80064FCC, "S_ScrollSSell__Fi", SN_NOWARN) set_name(0x800651B8, "S_StartSSell__Fv", SN_NOWARN) set_name(0x800655E0, "SmithRepairOk__Fi", SN_NOWARN) set_name(0x80065688, "AddStoreHoldRepair__FP10ItemStructi", SN_NOWARN) set_name(0x80065864, "S_StartSRepair__Fv", SN_NOWARN) set_name(0x80065D30, "S_StartWitch__Fv", SN_NOWARN) set_name(0x80065E70, "S_ScrollWBuy__Fi", SN_NOWARN) set_name(0x8006601C, "S_StartWBuy__Fv", SN_NOWARN) set_name(0x80066144, "WitchSellOk__Fi", SN_NOWARN) set_name(0x80066268, "S_StartWSell__Fv", SN_NOWARN) set_name(0x800668B4, "WitchRechargeOk__Fi", SN_NOWARN) set_name(0x80066940, "AddStoreHoldRecharge__FG10ItemStructi", SN_NOWARN) set_name(0x80066ABC, "S_StartWRecharge__Fv", SN_NOWARN) set_name(0x80066ED0, "S_StartNoMoney__Fv", SN_NOWARN) set_name(0x80066F38, "S_StartNoRoom__Fv", SN_NOWARN) set_name(0x80066F98, "S_StartConfirm__Fv", SN_NOWARN) set_name(0x800672CC, "S_StartBoy__Fv", SN_NOWARN) set_name(0x8006745C, "S_StartBBoy__Fv", SN_NOWARN) set_name(0x800675A8, "S_StartHealer__Fv", SN_NOWARN) set_name(0x8006777C, "S_ScrollHBuy__Fi", SN_NOWARN) set_name(0x800678DC, "S_StartHBuy__Fv", SN_NOWARN) set_name(0x800679FC, "S_StartStory__Fv", SN_NOWARN) set_name(0x80067AEC, "IdItemOk__FP10ItemStruct", SN_NOWARN) set_name(0x80067B20, "AddStoreHoldId__FG10ItemStructi", SN_NOWARN) set_name(0x80067BF0, "S_StartSIdentify__Fv", SN_NOWARN) set_name(0x8006862C, "S_StartIdShow__Fv", SN_NOWARN) set_name(0x800687BC, "S_StartTalk__Fv", SN_NOWARN) set_name(0x800689EC, "S_StartTavern__Fv", SN_NOWARN) set_name(0x80068AE4, "S_StartBarMaid__Fv", SN_NOWARN) set_name(0x80068BB8, "S_StartDrunk__Fv", SN_NOWARN) set_name(0x80068C8C, "StartStore__Fc", SN_NOWARN) set_name(0x80068F74, "DrawSText__Fv", SN_NOWARN) set_name(0x80068FB4, "DrawSTextTSK__FP4TASK", SN_NOWARN) set_name(0x8006907C, "DoThatDrawSText__Fv", SN_NOWARN) set_name(0x80069228, "STextESC__Fv", SN_NOWARN) set_name(0x800693D8, "STextUp__Fv", SN_NOWARN) set_name(0x80069560, "STextDown__Fv", SN_NOWARN) set_name(0x800696F8, "S_SmithEnter__Fv", SN_NOWARN) set_name(0x800697CC, "SetGoldCurs__Fii", SN_NOWARN) set_name(0x8006984C, "SetSpdbarGoldCurs__Fii", SN_NOWARN) set_name(0x800698CC, "TakePlrsMoney__Fl", SN_NOWARN) set_name(0x80069D18, "SmithBuyItem__Fv", SN_NOWARN) set_name(0x80069EFC, "S_SBuyEnter__Fv", SN_NOWARN) set_name(0x8006A0F8, "SmithBuyPItem__Fv", SN_NOWARN) set_name(0x8006A278, "S_SPBuyEnter__Fv", SN_NOWARN) set_name(0x8006A4BC, "StoreGoldFit__Fi", SN_NOWARN) set_name(0x8006A78C, "PlaceStoreGold__Fl", SN_NOWARN) set_name(0x8006A9F0, "StoreSellItem__Fv", SN_NOWARN) set_name(0x8006ACD8, "S_SSellEnter__Fv", SN_NOWARN) set_name(0x8006ADCC, "SmithRepairItem__Fv", SN_NOWARN) set_name(0x8006B034, "S_SRepairEnter__Fv", SN_NOWARN) set_name(0x8006B180, "S_WitchEnter__Fv", SN_NOWARN) set_name(0x8006B230, "WitchBuyItem__Fv", SN_NOWARN) set_name(0x8006B424, "S_WBuyEnter__Fv", SN_NOWARN) set_name(0x8006B620, "S_WSellEnter__Fv", SN_NOWARN) set_name(0x8006B714, "WitchRechargeItem__Fv", SN_NOWARN) set_name(0x8006B884, "S_WRechargeEnter__Fv", SN_NOWARN) set_name(0x8006B9D0, "S_BoyEnter__Fv", SN_NOWARN) set_name(0x8006BB08, "BoyBuyItem__Fv", SN_NOWARN) set_name(0x8006BB8C, "HealerBuyItem__Fv", SN_NOWARN) set_name(0x8006BE18, "S_BBuyEnter__Fv", SN_NOWARN) set_name(0x8006C014, "StoryIdItem__Fv", SN_NOWARN) set_name(0x8006C35C, "S_ConfirmEnter__Fv", SN_NOWARN) set_name(0x8006C478, "S_HealerEnter__Fv", SN_NOWARN) set_name(0x8006C510, "S_HBuyEnter__Fv", SN_NOWARN) set_name(0x8006C72C, "S_StoryEnter__Fv", SN_NOWARN) set_name(0x8006C7C4, "S_SIDEnter__Fv", SN_NOWARN) set_name(0x8006C930, "S_TalkEnter__Fv", SN_NOWARN) set_name(0x8006CB28, "S_TavernEnter__Fv", SN_NOWARN) set_name(0x8006CB98, "S_BarmaidEnter__Fv", SN_NOWARN) set_name(0x8006CC08, "S_DrunkEnter__Fv", SN_NOWARN) set_name(0x8006CC78, "STextEnter__Fv", SN_NOWARN) set_name(0x8006CE88, "CheckStoreBtn__Fv", SN_NOWARN) set_name(0x8006CFA0, "ReleaseStoreBtn__Fv", SN_NOWARN) set_name(0x8006CFB4, "_GLOBAL__D_pSTextBoxCels", SN_NOWARN) set_name(0x8006CFDC, "_GLOBAL__I_pSTextBoxCels", SN_NOWARN) set_name(0x8006D004, "GetDown__C4CPad_addr_8006D004", SN_NOWARN) set_name(0x8006D02C, "SetRGB__6DialogUcUcUc_addr_8006D02C", SN_NOWARN) set_name(0x8006D04C, "SetBorder__6Dialogi_addr_8006D04C", SN_NOWARN) set_name(0x8006D054, "___6Dialog_addr_8006D054", SN_NOWARN) set_name(0x8006D07C, "__6Dialog_addr_8006D07C", SN_NOWARN) set_name(0x8006D0D8, "T_DrawView__Fii", SN_NOWARN) set_name(0x8006D24C, "T_FillSector__FPUcT0iiiib", SN_NOWARN) set_name(0x8006D444, "T_FillTile__FPUciii", SN_NOWARN) set_name(0x8006D534, "T_Pass3__Fv", SN_NOWARN) set_name(0x8006D930, "CreateTown__Fi", SN_NOWARN) set_name(0x8006DA98, "GRL_LoadFileInMemSig__FPCcPUl", SN_NOWARN) set_name(0x8006DB7C, "GRL_StripDir__FPcPCc", SN_NOWARN) set_name(0x8006DC14, "ForceTownTrig__Fv", SN_NOWARN) set_name(0x8006DF2C, "ForceL1Trig__Fv", SN_NOWARN) set_name(0x8006E1DC, "ForceL2Trig__Fv", SN_NOWARN) set_name(0x8006E63C, "ForceL3Trig__Fv", SN_NOWARN) set_name(0x8006EAB8, "ForceL4Trig__Fv", SN_NOWARN) set_name(0x8006EFC4, "Freeupstairs__Fv", SN_NOWARN) set_name(0x8006F084, "ForceSKingTrig__Fv", SN_NOWARN) set_name(0x8006F178, "ForceSChambTrig__Fv", SN_NOWARN) set_name(0x8006F26C, "ForcePWaterTrig__Fv", SN_NOWARN) set_name(0x8006F360, "CheckTrigForce__Fv", SN_NOWARN) set_name(0x8006F67C, "FadeGameOut__Fv", SN_NOWARN) set_name(0x8006F718, "CheckTriggers__Fi", SN_NOWARN) set_name(0x8006FC44, "GetManaAmount__Fii", SN_NOWARN) set_name(0x8006FF0C, "UseMana__Fii", SN_NOWARN) set_name(0x80070050, "CheckSpell__FiicUc", SN_NOWARN) set_name(0x800700F0, "CastSpell__Fiiiiiiii", SN_NOWARN) set_name(0x80070354, "DoResurrect__Fii", SN_NOWARN) set_name(0x80070608, "DoHealOther__Fii", SN_NOWARN) set_name(0x8007086C, "snd_update__FUc", SN_NOWARN) set_name(0x80070874, "snd_get_volume__FPCcPl", SN_NOWARN) set_name(0x800708DC, "snd_stop_snd__FP4TSnd", SN_NOWARN) set_name(0x800708FC, "snd_play_snd__FP4TSFXll", SN_NOWARN) set_name(0x8007096C, "snd_play_msnd__FUsll", SN_NOWARN) set_name(0x80070A08, "snd_init__FUl", SN_NOWARN) set_name(0x80070A70, "music_stop__Fv", SN_NOWARN) set_name(0x80070ABC, "music_fade__Fv", SN_NOWARN) set_name(0x80070AFC, "music_start__Fi", SN_NOWARN) set_name(0x80070B80, "flyabout__7GamePad", SN_NOWARN) set_name(0x8007103C, "CloseInvChr__Fv", SN_NOWARN) set_name(0x800710A4, "WorldToOffset__Fiii", SN_NOWARN) set_name(0x80071150, "pad_UpIsUp__Fi", SN_NOWARN) set_name(0x800711C0, "pad_UpIsUpRight__Fi", SN_NOWARN) set_name(0x80071230, "__7GamePadi", SN_NOWARN) set_name(0x80071370, "SetMoveStyle__7GamePadc", SN_NOWARN) set_name(0x80071390, "SetDownButton__7GamePadiPFi_v", SN_NOWARN) set_name(0x800713D4, "SetComboDownButton__7GamePadiPFi_v", SN_NOWARN) set_name(0x80071418, "SetAllButtons__7GamePadP11KEY_ASSIGNS", SN_NOWARN) set_name(0x80071584, "GetAllButtons__7GamePadP11KEY_ASSIGNS", SN_NOWARN) set_name(0x8007164C, "GetActionButton__7GamePadPFi_v", SN_NOWARN) set_name(0x800716A8, "SetUpAction__7GamePadPFi_vT1", SN_NOWARN) set_name(0x800716E4, "RunFunc__7GamePadi", SN_NOWARN) set_name(0x80071768, "ButtonDown__7GamePadi", SN_NOWARN) set_name(0x80071B34, "TestButtons__7GamePad", SN_NOWARN) set_name(0x80071BE0, "CheckDirs__7GamePadi", SN_NOWARN) set_name(0x80071CF8, "CheckSide__7GamePadi", SN_NOWARN) set_name(0x80071D3C, "CheckBodge__7GamePadi", SN_NOWARN) set_name(0x80072040, "walk__7GamePadc", SN_NOWARN) set_name(0x80072300, "check_around_player__7GamePad", SN_NOWARN) set_name(0x800724FC, "show_combos__7GamePad", SN_NOWARN) set_name(0x80072674, "Handle__7GamePad", SN_NOWARN) set_name(0x80072C24, "GamePadTask__FP4TASK", SN_NOWARN) set_name(0x80072E1C, "PostGamePad__Fiiii", SN_NOWARN) set_name(0x80072ECC, "Init_GamePad__Fv", SN_NOWARN) set_name(0x80072EFC, "InitGamePadVars__Fv", SN_NOWARN) set_name(0x80072F74, "MoveToScrollTarget__7CBlocks_addr_80072F74", SN_NOWARN) set_name(0x80072F88, "GetDown__C4CPad_addr_80072F88", SN_NOWARN) set_name(0x80072FB0, "GetUp__C4CPad_addr_80072FB0", SN_NOWARN) set_name(0x80072FD8, "GetCur__C4CPad_addr_80072FD8", SN_NOWARN) set_name(0x80073000, "DoGameTestStuff__Fv", SN_NOWARN) set_name(0x8007302C, "DoInitGameStuff__Fv", SN_NOWARN) set_name(0x80073060, "SMemAlloc", SN_NOWARN) set_name(0x80073080, "SMemFree", SN_NOWARN) set_name(0x800730A0, "GRL_InitGwin__Fv", SN_NOWARN) set_name(0x800730AC, "GRL_SetWindowProc__FPFUlUilUl_Ul", SN_NOWARN) set_name(0x800730BC, "GRL_CallWindowProc__FUlUilUl", SN_NOWARN) set_name(0x800730E4, "GRL_PostMessage__FUlUilUl", SN_NOWARN) set_name(0x80073188, "Msg2Txt__Fi", SN_NOWARN) set_name(0x800731D0, "LANG_GetLang__Fv", SN_NOWARN) set_name(0x800731DC, "LANG_SetDb__F10LANG_DB_NO", SN_NOWARN) set_name(0x800732E0, "GetStr__Fi", SN_NOWARN) set_name(0x80073348, "LANG_SetLang__F9LANG_TYPE", SN_NOWARN) set_name(0x8007344C, "DumpCurrentText__Fv", SN_NOWARN) set_name(0x800734A4, "CalcNumOfStrings__FPPc", SN_NOWARN) set_name(0x800734B0, "GetLangFileName__F9LANG_TYPEPc", SN_NOWARN) set_name(0x800735B8, "GetLangFileNameExt__F9LANG_TYPE", SN_NOWARN) set_name(0x80073638, "TempPrintMissile__FiiiiiiiiccUcUcUcc", SN_NOWARN) set_name(0x80073B70, "FuncTOWN__FP13MissileStructiii", SN_NOWARN) set_name(0x80073CF0, "FuncRPORTAL__FP13MissileStructiii", SN_NOWARN) set_name(0x80073E50, "FuncFIREBOLT__FP13MissileStructiii", SN_NOWARN) set_name(0x80073EE8, "FuncHBOLT__FP13MissileStructiii", SN_NOWARN) set_name(0x80073F98, "FuncLIGHTNING__FP13MissileStructiii", SN_NOWARN) set_name(0x80073FFC, "FuncGUARDIAN__FP13MissileStructiii", SN_NOWARN) set_name(0x80074114, "FuncFIREWALL__FP13MissileStructiii", SN_NOWARN) set_name(0x800741AC, "FuncFIREMOVE__FP13MissileStructiii", SN_NOWARN) set_name(0x80074244, "FuncFLAME__FP13MissileStructiii", SN_NOWARN) set_name(0x800742AC, "FuncARROW__FP13MissileStructiii", SN_NOWARN) set_name(0x80074340, "FuncFARROW__FP13MissileStructiii", SN_NOWARN) set_name(0x80074420, "FuncLARROW__FP13MissileStructiii", SN_NOWARN) set_name(0x800744F8, "FuncMAGMABALL__FP13MissileStructiii", SN_NOWARN) set_name(0x80074588, "FuncBONESPIRIT__FP13MissileStructiii", SN_NOWARN) set_name(0x800746A4, "FuncACID__FP13MissileStructiii", SN_NOWARN) set_name(0x80074740, "FuncACIDSPLAT__FP13MissileStructiii", SN_NOWARN) set_name(0x800747A8, "FuncACIDPUD__FP13MissileStructiii", SN_NOWARN) set_name(0x80074810, "FuncFLARE__FP13MissileStructiii", SN_NOWARN) set_name(0x80074944, "FuncFLAREXP__FP13MissileStructiii", SN_NOWARN) set_name(0x80074A88, "FuncCBOLT__FP13MissileStructiii", SN_NOWARN) set_name(0x80074AF0, "FuncBOOM__FP13MissileStructiii", SN_NOWARN) set_name(0x80074B48, "FuncELEMENT__FP13MissileStructiii", SN_NOWARN) set_name(0x80074C14, "FuncMISEXP__FP13MissileStructiii", SN_NOWARN) set_name(0x80074C78, "FuncRHINO__FP13MissileStructiii", SN_NOWARN) set_name(0x80074C80, "FuncFLASH__FP13MissileStructiii", SN_NOWARN) set_name(0x800751A8, "FuncMANASHIELD__FP13MissileStructiii", SN_NOWARN) set_name(0x80075250, "FuncFLASH2__FP13MissileStructiii", SN_NOWARN) set_name(0x80075258, "FuncRESURRECTBEAM__FP13MissileStructiii", SN_NOWARN) set_name(0x8007528C, "PRIM_GetPrim__FPP8POLY_FT4_addr_8007528C", SN_NOWARN) set_name(0x80075308, "GetPlayer__7CPlayeri_addr_80075308", SN_NOWARN) set_name(0x80075358, "GetLastOtPos__C7CPlayer_addr_80075358", SN_NOWARN) set_name(0x80075364, "GetLastScrY__C7CPlayer_addr_80075364", SN_NOWARN) set_name(0x80075370, "GetLastScrX__C7CPlayer_addr_80075370", SN_NOWARN) set_name(0x8007537C, "GetNumOfFrames__7TextDat_addr_8007537C", SN_NOWARN) set_name(0x80075390, "GetFr__7TextDati_addr_80075390", SN_NOWARN) set_name(0x800753AC, "ML_Init__Fv", SN_NOWARN) set_name(0x800753E4, "ML_GetList__Fi", SN_NOWARN) set_name(0x80075464, "ML_SetRandomList__Fi", SN_NOWARN) set_name(0x800754FC, "ML_SetList__Fii", SN_NOWARN) set_name(0x800755AC, "ML_GetPresetMonsters__FiPiUl", SN_NOWARN) set_name(0x80075768, "DefaultObjPrint__FP12ObjectStructiiP7TextDatiii", SN_NOWARN) set_name(0x800758FC, "LightObjPrint__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800759B4, "DoorObjPrint__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075C48, "DrawLightSpark__Fiii", SN_NOWARN) set_name(0x80075D20, "PrintOBJ_L1LIGHT__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075DA8, "PrintOBJ_SKFIRE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075DD4, "PrintOBJ_LEVER__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075E00, "PrintOBJ_CHEST1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075E2C, "PrintOBJ_CHEST2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075E58, "PrintOBJ_CHEST3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075E84, "PrintOBJ_CANDLE1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075EA8, "PrintOBJ_CANDLE2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075ECC, "PrintOBJ_CANDLEO__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075EF8, "PrintOBJ_BANNERL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075F24, "PrintOBJ_BANNERM__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075F50, "PrintOBJ_BANNERR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075F7C, "PrintOBJ_SKPILE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075FA8, "PrintOBJ_SKSTICK1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80075FD4, "PrintOBJ_SKSTICK2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076000, "PrintOBJ_SKSTICK3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007602C, "PrintOBJ_SKSTICK4__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076058, "PrintOBJ_SKSTICK5__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076084, "PrintOBJ_CRUX1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800760B0, "PrintOBJ_CRUX2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800760DC, "PrintOBJ_CRUX3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076108, "PrintOBJ_STAND__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076134, "PrintOBJ_ANGEL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076160, "PrintOBJ_BOOK2L__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007618C, "PrintOBJ_BCROSS__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800761B8, "PrintOBJ_NUDEW2R__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800761E4, "PrintOBJ_SWITCHSKL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076210, "PrintOBJ_TNUDEM1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007623C, "PrintOBJ_TNUDEM2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076268, "PrintOBJ_TNUDEM3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076294, "PrintOBJ_TNUDEM4__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800762C0, "PrintOBJ_TNUDEW1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800762EC, "PrintOBJ_TNUDEW2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076318, "PrintOBJ_TNUDEW3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076344, "PrintOBJ_TORTURE1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076370, "PrintOBJ_TORTURE2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007639C, "PrintOBJ_TORTURE3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800763C8, "PrintOBJ_TORTURE4__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800763F4, "PrintOBJ_TORTURE5__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076420, "PrintOBJ_BOOK2R__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007644C, "PrintTorchStick__Fiiii", SN_NOWARN) set_name(0x800764E0, "PrintOBJ_TORCHL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076570, "PrintOBJ_TORCHR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076600, "PrintOBJ_TORCHL2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076690, "PrintOBJ_TORCHR2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076720, "PrintOBJ_SARC__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007674C, "PrintOBJ_FLAMEHOLE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076778, "PrintOBJ_FLAMELVR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800767A4, "PrintOBJ_WATER__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800767D0, "PrintOBJ_BOOKLVR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800767FC, "PrintOBJ_TRAPL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076828, "PrintOBJ_TRAPR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076854, "PrintOBJ_BOOKSHELF__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076880, "PrintOBJ_WEAPRACK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800768AC, "PrintOBJ_BARREL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800768D8, "PrintOBJ_BARRELEX__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076A30, "PrintOBJ_SHRINEL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076AFC, "PrintOBJ_SHRINER__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076BC8, "PrintOBJ_SKELBOOK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076BF4, "PrintOBJ_BOOKCASEL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076C20, "PrintOBJ_BOOKCASER__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076C4C, "PrintOBJ_BOOKSTAND__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076C78, "PrintOBJ_BOOKCANDLE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076C9C, "PrintOBJ_BLOODFTN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076CC8, "PrintOBJ_DECAP__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076CF4, "PrintOBJ_TCHEST1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076D20, "PrintOBJ_TCHEST2__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076D4C, "PrintOBJ_TCHEST3__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076D78, "PrintOBJ_BLINDBOOK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076DA4, "PrintOBJ_BLOODBOOK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076DD0, "PrintOBJ_PEDISTAL__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076DFC, "PrintOBJ_PURIFYINGFTN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076E28, "PrintOBJ_ARMORSTAND__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076E54, "PrintOBJ_ARMORSTANDN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076E80, "PrintOBJ_GOATSHRINE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076EAC, "PrintOBJ_CAULDRON__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076ED8, "PrintOBJ_MURKYFTN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076F04, "PrintOBJ_TEARFTN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076F30, "PrintOBJ_ALTBOY__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80076F5C, "PrintOBJ_MCIRCLE1__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800770F0, "PrintOBJ_STORYBOOK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007711C, "PrintOBJ_STORYCANDLE__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80077140, "PrintOBJ_STEELTOME__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007716C, "PrintOBJ_WARARMOR__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80077198, "PrintOBJ_WARWEAP__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800771C4, "PrintOBJ_TBCROSS__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800771F0, "PrintOBJ_WEAPONRACK__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x8007721C, "PrintOBJ_WEAPONRACKN__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80077248, "PrintOBJ_MUSHPATCH__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x80077274, "PrintOBJ_LAZSTAND__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800772A0, "PrintOBJ_SLAINHERO__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800772CC, "PrintOBJ_SIGNCHEST__FP12ObjectStructiiP7TextDati", SN_NOWARN) set_name(0x800772F8, "PRIM_GetCopy__FP8POLY_FT4_addr_800772F8", SN_NOWARN) set_name(0x80077334, "PRIM_CopyPrim__FP8POLY_FT4T0_addr_80077334", SN_NOWARN) set_name(0x8007735C, "PRIM_GetPrim__FPP8POLY_FT4_addr_8007735C", SN_NOWARN) set_name(0x800773D8, "GetBlockTexDat__7CBlocks_addr_800773D8", SN_NOWARN) set_name(0x800773E4, "GetNumOfFrames__7TextDatii_addr_800773E4", SN_NOWARN) set_name(0x8007741C, "GetCreature__7TextDati_addr_8007741C", SN_NOWARN) set_name(0x80077494, "GetNumOfCreatures__7TextDat_addr_80077494", SN_NOWARN) set_name(0x800774A8, "GetFr__7TextDati_addr_800774A8", SN_NOWARN) set_name(0x800774C4, "gamemenu_on__Fv", SN_NOWARN) set_name(0x800774CC, "gamemenu_off__Fv", SN_NOWARN) set_name(0x800774D4, "LoadPalette__FPCc", SN_NOWARN) set_name(0x800774DC, "LoadRndLvlPal__Fi", SN_NOWARN) set_name(0x800774E4, "ResetPal__Fv", SN_NOWARN) set_name(0x800774EC, "SetFadeLevel__Fi", SN_NOWARN) set_name(0x8007751C, "GetFadeState__Fv", SN_NOWARN) set_name(0x80077528, "SetPolyXY__FP8POLY_GT4PUc", SN_NOWARN) set_name(0x8007762C, "DrawFadedScreen__Fv", SN_NOWARN) set_name(0x8007776C, "BlackPalette__Fv", SN_NOWARN) set_name(0x80077828, "PaletteFadeInTask__FP4TASK", SN_NOWARN) set_name(0x800778AC, "PaletteFadeIn__Fi", SN_NOWARN) set_name(0x80077904, "PaletteFadeOutTask__FP4TASK", SN_NOWARN) set_name(0x8007799C, "PaletteFadeOut__Fi", SN_NOWARN) set_name(0x800779F0, "PRIM_GetPrim__FPP8POLY_FT4_addr_800779F0", SN_NOWARN) set_name(0x80077A6C, "M_CheckEFlag__Fi", SN_NOWARN) set_name(0x80077A8C, "M_ClearSquares__Fi", SN_NOWARN) set_name(0x80077BF8, "IsSkel__Fi", SN_NOWARN) set_name(0x80077C34, "NewMonsterAnim__FiR10AnimStructii", SN_NOWARN) set_name(0x80077C80, "M_Ranged__Fi", SN_NOWARN) set_name(0x80077CC8, "M_Talker__Fi", SN_NOWARN) set_name(0x80077D28, "M_Enemy__Fi", SN_NOWARN) set_name(0x800782E8, "ClearMVars__Fi", SN_NOWARN) set_name(0x8007835C, "InitMonster__Fiiiii", SN_NOWARN) set_name(0x800787A8, "AddMonster__FiiiiUc", SN_NOWARN) set_name(0x80078858, "M_StartStand__Fii", SN_NOWARN) set_name(0x8007899C, "M_UpdateLeader__Fi", SN_NOWARN) set_name(0x80078A94, "ActivateSpawn__Fiiii", SN_NOWARN) set_name(0x80078B3C, "SpawnSkeleton__Fiii", SN_NOWARN) set_name(0x80078D2C, "M_StartSpStand__Fii", SN_NOWARN) set_name(0x80078E0C, "PosOkMonst__Fiii", SN_NOWARN) set_name(0x80079088, "CanPut__Fii", SN_NOWARN) set_name(0x80079390, "GetAutomapType__FiiUc", SN_NOWARN) set_name(0x8007969C, "SetAutomapView__Fii", SN_NOWARN) set_name(0x8001F458, "TICK_InitModule", SN_NOWARN) set_name(0x8001F478, "TICK_Set", SN_NOWARN) set_name(0x8001F488, "TICK_Get", SN_NOWARN) set_name(0x8001F498, "TICK_Update", SN_NOWARN) set_name(0x8001F4B8, "TICK_GetAge", SN_NOWARN) set_name(0x8001F4E4, "TICK_GetDateString", SN_NOWARN) set_name(0x8001F4F4, "TICK_GetTimeString", SN_NOWARN) set_name(0x8001F504, "GU_InitModule", SN_NOWARN) set_name(0x8001F530, "GU_SetRndSeed", SN_NOWARN) set_name(0x8001F560, "GU_GetRnd", SN_NOWARN) set_name(0x8001F5F0, "GU_GetSRnd", SN_NOWARN) set_name(0x8001F610, "GU_GetRndRange", SN_NOWARN) set_name(0x8001F64C, "GU_AlignVal", SN_NOWARN) set_name(0x8001F670, "main", SN_NOWARN) set_name(0x8001F6C0, "DBG_OpenModule", SN_NOWARN) set_name(0x8001F6C8, "DBG_PollHost", SN_NOWARN) set_name(0x8001F6D0, "DBG_Halt", SN_NOWARN) set_name(0x8001F6D8, "DBG_SendMessage", SN_NOWARN) set_name(0x8001F6F0, "DBG_SetMessageHandler", SN_NOWARN) set_name(0x8001F700, "DBG_Error", SN_NOWARN) set_name(0x8001F72C, "DBG_SetErrorFunc", SN_NOWARN) set_name(0x8001F73C, "SendPsyqString", SN_NOWARN) set_name(0x8001F744, "DBG_SetPollRoutine", SN_NOWARN) set_name(0x8001F754, "GTIMSYS_GetTimer", SN_NOWARN) set_name(0x8001F778, "GTIMSYS_ResetTimer", SN_NOWARN) set_name(0x8001F79C, "GTIMSYS_InitTimer", SN_NOWARN) set_name(0x8001F9D0, "GAL_SetErrorChecking", SN_NOWARN) set_name(0x8001F9E0, "GAL_SplitBlock", SN_NOWARN) set_name(0x8001FB14, "GAL_InitModule", SN_NOWARN) set_name(0x8001FBCC, "GAL_AddMemType", SN_NOWARN) set_name(0x8001FCEC, "GAL_Alloc", SN_NOWARN) set_name(0x8001FE84, "GAL_Lock", SN_NOWARN) set_name(0x8001FEE4, "GAL_Unlock", SN_NOWARN) set_name(0x8001FF60, "GAL_Free", SN_NOWARN) set_name(0x80020000, "GAL_GetFreeMem", SN_NOWARN) set_name(0x80020074, "GAL_GetUsedMem", SN_NOWARN) set_name(0x800200E8, "GAL_LargestFreeBlock", SN_NOWARN) set_name(0x80020164, "AttachHdrToList", SN_NOWARN) set_name(0x80020184, "DetachHdrFromList", SN_NOWARN) set_name(0x800201D0, "IsActiveValidHandle", SN_NOWARN) set_name(0x80020200, "AlignPtr", SN_NOWARN) set_name(0x80020230, "AlignSize", SN_NOWARN) set_name(0x80020260, "FindClosestSizedBlock", SN_NOWARN) set_name(0x800202B8, "FindHighestMemBlock", SN_NOWARN) set_name(0x80020320, "FindLowestMemBlock", SN_NOWARN) set_name(0x80020388, "GetMemInitInfoBlockFromType", SN_NOWARN) set_name(0x800203C4, "MergeToEmptyList", SN_NOWARN) set_name(0x80020498, "GAL_AllocAt", SN_NOWARN) set_name(0x80020574, "LoAlloc", SN_NOWARN) set_name(0x8002070C, "FindBlockInTheseBounds", SN_NOWARN) set_name(0x80020778, "GetFreeMemHdrBlock", SN_NOWARN) set_name(0x80020800, "ReleaseMemHdrBlock", SN_NOWARN) set_name(0x80020840, "GAL_IterateEmptyMem", SN_NOWARN) set_name(0x800208C4, "GAL_IterateUsedMem", SN_NOWARN) set_name(0x80020960, "GAL_SetMemName", SN_NOWARN) set_name(0x800209C8, "GAL_TotalMem", SN_NOWARN) set_name(0x80020A1C, "GAL_MemBase", SN_NOWARN) set_name(0x80020A70, "GAL_DefragMem", SN_NOWARN) set_name(0x80020AF4, "GSetError", SN_NOWARN) set_name(0x80020B50, "GAL_CheckMem", SN_NOWARN) set_name(0x80020C4C, "CheckCollisions", SN_NOWARN) set_name(0x80020CF8, "AreBlocksColliding", SN_NOWARN) set_name(0x80020D50, "GAL_GetErrorText", SN_NOWARN) set_name(0x80020D80, "GAL_GetLastErrorCode", SN_NOWARN) set_name(0x80020D90, "GAL_GetLastErrorText", SN_NOWARN) set_name(0x80020DB8, "GAL_HowManyEmptyRegions", SN_NOWARN) set_name(0x80020E20, "GAL_HowManyUsedRegions", SN_NOWARN) set_name(0x80020E88, "GAL_SetTimeStamp", SN_NOWARN) set_name(0x80020E98, "GAL_IncTimeStamp", SN_NOWARN) set_name(0x80020EB8, "GAL_GetTimeStamp", SN_NOWARN) set_name(0x80020EC8, "GAL_AlignSizeToType", SN_NOWARN) set_name(0x80020F18, "GAL_AllocMultiStruct", SN_NOWARN) set_name(0x80020F68, "GAL_ProcessMultiStruct", SN_NOWARN) set_name(0x80021014, "GAL_GetSize", SN_NOWARN) set_name(0x80021068, "GazDefragMem", SN_NOWARN) set_name(0x800211D0, "PutBlocksInRegionIntoList", SN_NOWARN) set_name(0x80021274, "CollideRegions", SN_NOWARN) set_name(0x800212A8, "DeleteEmptyBlocks", SN_NOWARN) set_name(0x80021314, "GetRegion", SN_NOWARN) set_name(0x8002140C, "FindNextBlock", SN_NOWARN) set_name(0x80021448, "ShuffleBlocks", SN_NOWARN) set_name(0x800214D8, "PutAllLockedBlocksOntoList", SN_NOWARN) set_name(0x80021554, "SortMemHdrListByAddr", SN_NOWARN) set_name(0x80021608, "GraftMemHdrList", SN_NOWARN) set_name(0x80021664, "GAL_MemDump", SN_NOWARN) set_name(0x800216D8, "GAL_SetVerbosity", SN_NOWARN) set_name(0x800216E8, "CountFreeBlocks", SN_NOWARN) set_name(0x80021714, "SetBlockName", SN_NOWARN) set_name(0x8002175C, "GAL_GetNumFreeHeaders", SN_NOWARN) set_name(0x8002176C, "GAL_GetLastTypeAlloced", SN_NOWARN) set_name(0x8002177C, "GAL_SetAllocFilter", SN_NOWARN) set_name(0x80021794, "GAL_SortUsedRegionsBySize", SN_NOWARN) set_name(0x800217E8, "SortSize", SN_NOWARN) set_name(0x800217F8, "SortMemHdrList", SN_NOWARN) set_name(0x800218E8, "DoEpi", SN_NOWARN) set_name(0x80021938, "DoPro", SN_NOWARN) set_name(0x80021988, "TSK_OpenModule", SN_NOWARN) set_name(0x800219FC, "TSK_AddTask", SN_NOWARN) set_name(0x80021BE4, "TSK_DoTasks", SN_NOWARN) set_name(0x80021DA4, "TSK_Sleep", SN_NOWARN) set_name(0x80021E80, "ReturnToSchedulerIfCurrentTask", SN_NOWARN) set_name(0x80021F08, "TSK_Die", SN_NOWARN) set_name(0x80021F34, "TSK_Kill", SN_NOWARN) set_name(0x80021F84, "TSK_GetFirstActive", SN_NOWARN) set_name(0x80021F94, "TSK_IsStackCorrupted", SN_NOWARN) set_name(0x80022010, "TSK_JumpAndResetStack", SN_NOWARN) set_name(0x80022058, "TSK_RepointProc", SN_NOWARN) set_name(0x8002209C, "TSK_GetCurrentTask", SN_NOWARN) set_name(0x800220AC, "TSK_IsCurrentTask", SN_NOWARN) set_name(0x800220C4, "TSK_Exist", SN_NOWARN) set_name(0x8002211C, "TSK_SetExecFilter", SN_NOWARN) set_name(0x80022134, "TSK_ClearExecFilter", SN_NOWARN) set_name(0x80022158, "TSK_KillTasks", SN_NOWARN) set_name(0x80022258, "TSK_IterateTasks", SN_NOWARN) set_name(0x800222D0, "TSK_MakeTaskInactive", SN_NOWARN) set_name(0x800222E4, "TSK_MakeTaskActive", SN_NOWARN) set_name(0x800222F8, "TSK_MakeTaskImmortal", SN_NOWARN) set_name(0x8002230C, "TSK_MakeTaskMortal", SN_NOWARN) set_name(0x80022320, "TSK_IsTaskActive", SN_NOWARN) set_name(0x80022334, "TSK_IsTaskMortal", SN_NOWARN) set_name(0x80022348, "DetachFromList", SN_NOWARN) set_name(0x80022394, "AddToList", SN_NOWARN) set_name(0x800223B4, "LoTskKill", SN_NOWARN) set_name(0x80022424, "ExecuteTask", SN_NOWARN) set_name(0x80022474, "TSK_SetDoTasksPrologue", SN_NOWARN) set_name(0x8002248C, "TSK_SetDoTasksEpilogue", SN_NOWARN) set_name(0x800224A4, "TSK_SetTaskPrologue", SN_NOWARN) set_name(0x800224BC, "TSK_SetTaskEpilogue", SN_NOWARN) set_name(0x800224D4, "TSK_SetEpiProFilter", SN_NOWARN) set_name(0x800224EC, "TSK_ClearEpiProFilter", SN_NOWARN) set_name(0x80022520, "TSK_SetExtraStackProtection", SN_NOWARN) set_name(0x80022530, "TSK_SetStackFloodCallback", SN_NOWARN) set_name(0x80022548, "TSK_SetExtraStackSize", SN_NOWARN) set_name(0x80022570, "ExtraMarkStack", SN_NOWARN) set_name(0x8002259C, "CheckExtraStack", SN_NOWARN) set_name(0x800225D8, "GSYS_GetWorkMemInfo", SN_NOWARN) set_name(0x800225E8, "GSYS_SetStackAndJump", SN_NOWARN) set_name(0x80022624, "GSYS_MarkStack", SN_NOWARN) set_name(0x80022634, "GSYS_IsStackCorrupted", SN_NOWARN) set_name(0x8002264C, "GSYS_InitMachine", SN_NOWARN) set_name(0x800226A0, "GSYS_CheckPtr", SN_NOWARN) set_name(0x800226D4, "GSYS_IsStackOutOfBounds", SN_NOWARN) set_name(0x80024A1C, "vsprintf", SN_NOWARN) set_name(0x80024A68, "_doprnt", SN_NOWARN) set_name(0x801165B0, "NumOfMonsterListLevels", SN_NOWARN) set_name(0x800A3808, "AllLevels", SN_NOWARN) set_name(0x801162C0, "NumsLEV1M1A", SN_NOWARN) set_name(0x801162C4, "NumsLEV1M1B", SN_NOWARN) set_name(0x801162C8, "NumsLEV1M1C", SN_NOWARN) set_name(0x801162D0, "NumsLEV2M2A", SN_NOWARN) set_name(0x801162D4, "NumsLEV2M2B", SN_NOWARN) set_name(0x801162D8, "NumsLEV2M2C", SN_NOWARN) set_name(0x801162DC, "NumsLEV2M2D", SN_NOWARN) set_name(0x801162E0, "NumsLEV2M2QA", SN_NOWARN) set_name(0x801162E4, "NumsLEV2M2QB", SN_NOWARN) set_name(0x801162E8, "NumsLEV3M3A", SN_NOWARN) set_name(0x801162EC, "NumsLEV3M3QA", SN_NOWARN) set_name(0x801162F0, "NumsLEV3M3B", SN_NOWARN) set_name(0x801162F4, "NumsLEV3M3C", SN_NOWARN) set_name(0x801162F8, "NumsLEV4M4A", SN_NOWARN) set_name(0x801162FC, "NumsLEV4M4QA", SN_NOWARN) set_name(0x80116300, "NumsLEV4M4B", SN_NOWARN) set_name(0x80116304, "NumsLEV4M4QB", SN_NOWARN) set_name(0x80116308, "NumsLEV4M4C", SN_NOWARN) set_name(0x8011630C, "NumsLEV4M4QC", SN_NOWARN) set_name(0x80116310, "NumsLEV4M4D", SN_NOWARN) set_name(0x80116314, "NumsLEV5M5A", SN_NOWARN) set_name(0x80116318, "NumsLEV5M5B", SN_NOWARN) set_name(0x8011631C, "NumsLEV5M5C", SN_NOWARN) set_name(0x80116320, "NumsLEV5M5D", SN_NOWARN) set_name(0x80116324, "NumsLEV5M5E", SN_NOWARN) set_name(0x80116328, "NumsLEV5M5F", SN_NOWARN) set_name(0x8011632C, "NumsLEV5M5QA", SN_NOWARN) set_name(0x80116330, "NumsLEV6M6A", SN_NOWARN) set_name(0x80116338, "NumsLEV6M6B", SN_NOWARN) set_name(0x8011633C, "NumsLEV6M6C", SN_NOWARN) set_name(0x80116340, "NumsLEV6M6D", SN_NOWARN) set_name(0x80116344, "NumsLEV6M6E", SN_NOWARN) set_name(0x80116348, "NumsLEV7M7A", SN_NOWARN) set_name(0x8011634C, "NumsLEV7M7B", SN_NOWARN) set_name(0x80116350, "NumsLEV7M7C", SN_NOWARN) set_name(0x80116354, "NumsLEV7M7D", SN_NOWARN) set_name(0x80116358, "NumsLEV7M7E", SN_NOWARN) set_name(0x8011635C, "NumsLEV8M8QA", SN_NOWARN) set_name(0x80116360, "NumsLEV8M8A", SN_NOWARN) set_name(0x80116364, "NumsLEV8M8B", SN_NOWARN) set_name(0x80116368, "NumsLEV8M8C", SN_NOWARN) set_name(0x8011636C, "NumsLEV8M8D", SN_NOWARN) set_name(0x80116370, "NumsLEV8M8E", SN_NOWARN) set_name(0x80116374, "NumsLEV9M9A", SN_NOWARN) set_name(0x80116378, "NumsLEV9M9B", SN_NOWARN) set_name(0x8011637C, "NumsLEV9M9C", SN_NOWARN) set_name(0x80116380, "NumsLEV9M9D", SN_NOWARN) set_name(0x80116384, "NumsLEV10M10A", SN_NOWARN) set_name(0x80116388, "NumsLEV10M10B", SN_NOWARN) set_name(0x8011638C, "NumsLEV10M10C", SN_NOWARN) set_name(0x80116390, "NumsLEV10M10D", SN_NOWARN) set_name(0x80116394, "NumsLEV11M11A", SN_NOWARN) set_name(0x80116398, "NumsLEV11M11B", SN_NOWARN) set_name(0x8011639C, "NumsLEV11M11C", SN_NOWARN) set_name(0x801163A0, "NumsLEV11M11D", SN_NOWARN) set_name(0x801163A4, "NumsLEV11M11E", SN_NOWARN) set_name(0x801163A8, "NumsLEV12M12A", SN_NOWARN) set_name(0x801163AC, "NumsLEV12M12B", SN_NOWARN) set_name(0x801163B0, "NumsLEV12M12C", SN_NOWARN) set_name(0x801163B4, "NumsLEV12M12D", SN_NOWARN) set_name(0x801163B8, "NumsLEV13M13A", SN_NOWARN) set_name(0x801163BC, "NumsLEV13M13B", SN_NOWARN) set_name(0x801163C0, "NumsLEV13M13QB", SN_NOWARN) set_name(0x801163C4, "NumsLEV13M13C", SN_NOWARN) set_name(0x801163C8, "NumsLEV13M13D", SN_NOWARN) set_name(0x801163CC, "NumsLEV14M14A", SN_NOWARN) set_name(0x801163D0, "NumsLEV14M14B", SN_NOWARN) set_name(0x801163D4, "NumsLEV14M14QB", SN_NOWARN) set_name(0x801163D8, "NumsLEV14M14C", SN_NOWARN) set_name(0x801163DC, "NumsLEV14M14D", SN_NOWARN) set_name(0x801163E0, "NumsLEV14M14E", SN_NOWARN) set_name(0x801163E4, "NumsLEV15M15A", SN_NOWARN) set_name(0x801163E8, "NumsLEV15M15B", SN_NOWARN) set_name(0x801163EC, "NumsLEV15M15C", SN_NOWARN) set_name(0x801163F0, "NumsLEV16M16D", SN_NOWARN) set_name(0x800A3358, "ChoiceListLEV1", SN_NOWARN) set_name(0x800A3388, "ChoiceListLEV2", SN_NOWARN) set_name(0x800A33E8, "ChoiceListLEV3", SN_NOWARN) set_name(0x800A3428, "ChoiceListLEV4", SN_NOWARN) set_name(0x800A3498, "ChoiceListLEV5", SN_NOWARN) set_name(0x800A3508, "ChoiceListLEV6", SN_NOWARN) set_name(0x800A3558, "ChoiceListLEV7", SN_NOWARN) set_name(0x800A35A8, "ChoiceListLEV8", SN_NOWARN) set_name(0x800A3608, "ChoiceListLEV9", SN_NOWARN) set_name(0x800A3648, "ChoiceListLEV10", SN_NOWARN) set_name(0x800A3688, "ChoiceListLEV11", SN_NOWARN) set_name(0x800A36D8, "ChoiceListLEV12", SN_NOWARN) set_name(0x800A3718, "ChoiceListLEV13", SN_NOWARN) set_name(0x800A3768, "ChoiceListLEV14", SN_NOWARN) set_name(0x800A37C8, "ChoiceListLEV15", SN_NOWARN) set_name(0x800A37F8, "ChoiceListLEV16", SN_NOWARN) set_name(0x80117B48, "GameTaskPtr", SN_NOWARN) set_name(0x801165C0, "time_in_frames", SN_NOWARN) set_name(0x800A3888, "AllArgs", SN_NOWARN) set_name(0x801165C4, "ArgsSoFar", SN_NOWARN) set_name(0x801165C8, "ThisOt", SN_NOWARN) set_name(0x801165CC, "ThisPrimAddr", SN_NOWARN) set_name(0x80117B4C, "hndPrimBuffers", SN_NOWARN) set_name(0x80117B50, "PrimBuffers", SN_NOWARN) set_name(0x80117B54, "BufferDepth", SN_NOWARN) set_name(0x80117B55, "WorkRamId", SN_NOWARN) set_name(0x80117B56, "ScrNum", SN_NOWARN) set_name(0x80117B58, "Screens", SN_NOWARN) set_name(0x80117B5C, "PbToClear", SN_NOWARN) set_name(0x80117B60, "BufferNum", SN_NOWARN) set_name(0x801165D0, "AddrToAvoid", SN_NOWARN) set_name(0x80117B61, "LastBuffer", SN_NOWARN) set_name(0x80117B64, "DispEnvToPut", SN_NOWARN) set_name(0x80117B68, "ThisOtSize", SN_NOWARN) set_name(0x801165D4, "ScrRect", SN_NOWARN) set_name(0x80117B6C, "VidWait", SN_NOWARN) set_name(0x80117FF8, "screen", SN_NOWARN) set_name(0x80117B70, "VbFunc", SN_NOWARN) set_name(0x80117B74, "VidTick", SN_NOWARN) set_name(0x80117B78, "VXOff", SN_NOWARN) set_name(0x80117B7C, "VYOff", SN_NOWARN) set_name(0x801165E8, "Gaz", SN_NOWARN) set_name(0x801165EC, "LastFmem", SN_NOWARN) set_name(0x801165DC, "GSYS_MemStart", SN_NOWARN) set_name(0x801165E0, "GSYS_MemEnd", SN_NOWARN) set_name(0x800A3BD0, "PsxMem", SN_NOWARN) set_name(0x800A3BF8, "PsxFastMem", SN_NOWARN) set_name(0x801165E4, "LowestFmem", SN_NOWARN) set_name(0x801165FC, "FileSYS", SN_NOWARN) set_name(0x80117B80, "FileSystem", SN_NOWARN) set_name(0x80117B84, "OverlayFileSystem", SN_NOWARN) set_name(0x80116616, "DavesPad", SN_NOWARN) set_name(0x80116618, "DavesPadDeb", SN_NOWARN) set_name(0x800A3C20, "_6FileIO_FileToLoad", SN_NOWARN) set_name(0x801180D8, "MyFT4", SN_NOWARN) set_name(0x800A44C4, "AllDats", SN_NOWARN) set_name(0x80116668, "TpW", SN_NOWARN) set_name(0x8011666C, "TpH", SN_NOWARN) set_name(0x80116670, "TpXDest", SN_NOWARN) set_name(0x80116674, "TpYDest", SN_NOWARN) set_name(0x80116678, "R", SN_NOWARN) set_name(0x800A4934, "MyGT4", SN_NOWARN) set_name(0x800A4968, "MyGT3", SN_NOWARN) set_name(0x800A3C54, "DatPool", SN_NOWARN) set_name(0x8011668C, "ChunkGot", SN_NOWARN) set_name(0x800A4990, "STREAM_DIR", SN_NOWARN) set_name(0x800A49A0, "STREAM_BIN", SN_NOWARN) set_name(0x800A49B0, "EAC_DirectoryCache", SN_NOWARN) set_name(0x801166A0, "BL_NoLumpFiles", SN_NOWARN) set_name(0x801166A4, "BL_NoStreamFiles", SN_NOWARN) set_name(0x801166A8, "LFileTab", SN_NOWARN) set_name(0x801166AC, "SFileTab", SN_NOWARN) set_name(0x801166B0, "FileLoaded", SN_NOWARN) set_name(0x801166E0, "NoTAllocs", SN_NOWARN) set_name(0x800A4ADC, "MemBlock", SN_NOWARN) set_name(0x80117B90, "CanPause", SN_NOWARN) set_name(0x80117B94, "Paused", SN_NOWARN) set_name(0x80117B98, "PRect", SN_NOWARN) set_name(0x80118100, "PBack", SN_NOWARN) set_name(0x800A4D44, "RawPadData0", SN_NOWARN) set_name(0x800A4D68, "RawPadData1", SN_NOWARN) set_name(0x800A4D8C, "demo_buffer", SN_NOWARN) set_name(0x8011670C, "demo_pad_time", SN_NOWARN) set_name(0x80116710, "demo_pad_count", SN_NOWARN) set_name(0x800A4C6C, "Pad0", SN_NOWARN) set_name(0x800A4CD8, "Pad1", SN_NOWARN) set_name(0x80116714, "demo_finish", SN_NOWARN) set_name(0x80116718, "cac_pad", SN_NOWARN) set_name(0x80116734, "CharFt4", SN_NOWARN) set_name(0x80116738, "CharFrm", SN_NOWARN) set_name(0x80116725, "WHITER", SN_NOWARN) set_name(0x80116726, "WHITEG", SN_NOWARN) set_name(0x80116727, "WHITEB", SN_NOWARN) set_name(0x80116728, "BLUER", SN_NOWARN) set_name(0x80116729, "BLUEG", SN_NOWARN) set_name(0x8011672A, "BLUEB", SN_NOWARN) set_name(0x8011672B, "REDR", SN_NOWARN) set_name(0x8011672C, "REDG", SN_NOWARN) set_name(0x8011672D, "REDB", SN_NOWARN) set_name(0x8011672E, "GOLDR", SN_NOWARN) set_name(0x8011672F, "GOLDG", SN_NOWARN) set_name(0x80116730, "GOLDB", SN_NOWARN) set_name(0x800A5494, "MediumFont", SN_NOWARN) set_name(0x800A56AC, "LargeFont", SN_NOWARN) set_name(0x800A58C4, "LFontTab", SN_NOWARN) set_name(0x800A5978, "LFont", SN_NOWARN) set_name(0x800A5988, "MFontTab", SN_NOWARN) set_name(0x800A5AB8, "MFont", SN_NOWARN) set_name(0x8011674D, "DialogRed", SN_NOWARN) set_name(0x8011674E, "DialogGreen", SN_NOWARN) set_name(0x8011674F, "DialogBlue", SN_NOWARN) set_name(0x80116750, "DialogTRed", SN_NOWARN) set_name(0x80116751, "DialogTGreen", SN_NOWARN) set_name(0x80116752, "DialogTBlue", SN_NOWARN) set_name(0x80116754, "DialogTData", SN_NOWARN) set_name(0x80116758, "DialogBackGfx", SN_NOWARN) set_name(0x8011675C, "DialogBackW", SN_NOWARN) set_name(0x80116760, "DialogBackH", SN_NOWARN) set_name(0x80116764, "DialogBorderGfx", SN_NOWARN) set_name(0x80116768, "DialogBorderTLW", SN_NOWARN) set_name(0x8011676C, "DialogBorderTLH", SN_NOWARN) set_name(0x80116770, "DialogBorderTRW", SN_NOWARN) set_name(0x80116774, "DialogBorderTRH", SN_NOWARN) set_name(0x80116778, "DialogBorderBLW", SN_NOWARN) set_name(0x8011677C, "DialogBorderBLH", SN_NOWARN) set_name(0x80116780, "DialogBorderBRW", SN_NOWARN) set_name(0x80116784, "DialogBorderBRH", SN_NOWARN) set_name(0x80116788, "DialogBorderTW", SN_NOWARN) set_name(0x8011678C, "DialogBorderTH", SN_NOWARN) set_name(0x80116790, "DialogBorderBW", SN_NOWARN) set_name(0x80116794, "DialogBorderBH", SN_NOWARN) set_name(0x80116798, "DialogBorderLW", SN_NOWARN) set_name(0x8011679C, "DialogBorderLH", SN_NOWARN) set_name(0x801167A0, "DialogBorderRW", SN_NOWARN) set_name(0x801167A4, "DialogBorderRH", SN_NOWARN) set_name(0x801167A8, "DialogBevelGfx", SN_NOWARN) set_name(0x801167AC, "DialogBevelCW", SN_NOWARN) set_name(0x801167B0, "DialogBevelCH", SN_NOWARN) set_name(0x801167B4, "DialogBevelLRW", SN_NOWARN) set_name(0x801167B8, "DialogBevelLRH", SN_NOWARN) set_name(0x801167BC, "DialogBevelUDW", SN_NOWARN) set_name(0x801167C0, "DialogBevelUDH", SN_NOWARN) set_name(0x801167C4, "MY_DialogOTpos", SN_NOWARN) set_name(0x80117BA0, "DialogGBack", SN_NOWARN) set_name(0x80117BA1, "GShadeX", SN_NOWARN) set_name(0x80117BA2, "GShadeY", SN_NOWARN) set_name(0x80117BA8, "RandBTab", SN_NOWARN) set_name(0x800A5B08, "Cxy", SN_NOWARN) set_name(0x80116747, "BORDERR", SN_NOWARN) set_name(0x80116748, "BORDERG", SN_NOWARN) set_name(0x80116749, "BORDERB", SN_NOWARN) set_name(0x8011674A, "BACKR", SN_NOWARN) set_name(0x8011674B, "BACKG", SN_NOWARN) set_name(0x8011674C, "BACKB", SN_NOWARN) set_name(0x800A5AC8, "GShadeTab", SN_NOWARN) set_name(0x80116745, "GShadePX", SN_NOWARN) set_name(0x80116746, "GShadePY", SN_NOWARN) set_name(0x801167D1, "PlayDemoFlag", SN_NOWARN) set_name(0x80118110, "rgbb", SN_NOWARN) set_name(0x80118140, "rgbt", SN_NOWARN) set_name(0x80117BB0, "blockr", SN_NOWARN) set_name(0x80117BB4, "blockg", SN_NOWARN) set_name(0x80117BB8, "blockb", SN_NOWARN) set_name(0x80117BBC, "InfraFlag", SN_NOWARN) set_name(0x801167DD, "P1ObjSelCount", SN_NOWARN) set_name(0x801167DE, "P2ObjSelCount", SN_NOWARN) set_name(0x801167DF, "P12ObjSelCount", SN_NOWARN) set_name(0x801167E0, "P1ItemSelCount", SN_NOWARN) set_name(0x801167E1, "P2ItemSelCount", SN_NOWARN) set_name(0x801167E2, "P12ItemSelCount", SN_NOWARN) set_name(0x801167E3, "P1MonstSelCount", SN_NOWARN) set_name(0x801167E4, "P2MonstSelCount", SN_NOWARN) set_name(0x801167E5, "P12MonstSelCount", SN_NOWARN) set_name(0x801167E6, "P1ObjSelCol", SN_NOWARN) set_name(0x801167E8, "P2ObjSelCol", SN_NOWARN) set_name(0x801167EA, "P12ObjSelCol", SN_NOWARN) set_name(0x801167EC, "P1ItemSelCol", SN_NOWARN) set_name(0x801167EE, "P2ItemSelCol", SN_NOWARN) set_name(0x801167F0, "P12ItemSelCol", SN_NOWARN) set_name(0x801167F2, "P1MonstSelCol", SN_NOWARN) set_name(0x801167F4, "P2MonstSelCol", SN_NOWARN) set_name(0x801167F6, "P12MonstSelCol", SN_NOWARN) set_name(0x801167F8, "CurrentBlocks", SN_NOWARN) set_name(0x8010C704, "SinTab", SN_NOWARN) set_name(0x800A5B78, "TownConv", SN_NOWARN) set_name(0x80116814, "CurrentOverlay", SN_NOWARN) set_name(0x8010C790, "HaltTab", SN_NOWARN) set_name(0x80118170, "FrontEndOver", SN_NOWARN) set_name(0x80118180, "PregameOver", SN_NOWARN) set_name(0x80118190, "GameOver", SN_NOWARN) set_name(0x801181A0, "FmvOver", SN_NOWARN) set_name(0x80117BC0, "OWorldX", SN_NOWARN) set_name(0x80117BC4, "OWorldY", SN_NOWARN) set_name(0x80117BC8, "WWorldX", SN_NOWARN) set_name(0x80117BCC, "WWorldY", SN_NOWARN) set_name(0x8010C80C, "TxyAdd", SN_NOWARN) set_name(0x80116838, "GXAdj2", SN_NOWARN) set_name(0x80117BD0, "TimePerFrame", SN_NOWARN) set_name(0x80117BD4, "CpuStart", SN_NOWARN) set_name(0x80117BD8, "CpuTime", SN_NOWARN) set_name(0x80117BDC, "DrawTime", SN_NOWARN) set_name(0x80117BE0, "DrawStart", SN_NOWARN) set_name(0x80117BE4, "LastCpuTime", SN_NOWARN) set_name(0x80117BE8, "LastDrawTime", SN_NOWARN) set_name(0x80117BEC, "DrawArea", SN_NOWARN) set_name(0x80116840, "ProfOn", SN_NOWARN) set_name(0x800A5B8C, "LevPals", SN_NOWARN) set_name(0x8010C950, "Level2Bgdata", SN_NOWARN) set_name(0x800A5BA0, "DefP1PanelXY", SN_NOWARN) set_name(0x800A5BF4, "DefP1PanelXY2", SN_NOWARN) set_name(0x800A5C48, "DefP2PanelXY", SN_NOWARN) set_name(0x800A5C9C, "DefP2PanelXY2", SN_NOWARN) set_name(0x800A5CF0, "SpeedBarGfxTable", SN_NOWARN) set_name(0x80116868, "hof", SN_NOWARN) set_name(0x8011686C, "mof", SN_NOWARN) set_name(0x800A5DB8, "SFXTab", SN_NOWARN) set_name(0x801168A0, "Time", SN_NOWARN) set_name(0x800A5EB8, "voice_attr", SN_NOWARN) set_name(0x8011687C, "STR_Buffer", SN_NOWARN) set_name(0x80116880, "NoActiveStreams", SN_NOWARN) set_name(0x80116884, "STRInit", SN_NOWARN) set_name(0x801168C4, "SFXNotPlayed", SN_NOWARN) set_name(0x801168C5, "SFXNotInBank", SN_NOWARN) set_name(0x801181B0, "spu_management", SN_NOWARN) set_name(0x801182C0, "rev_attr", SN_NOWARN) set_name(0x80117BF4, "NoSfx", SN_NOWARN) set_name(0x801168B0, "BankOffsets", SN_NOWARN) set_name(0x801168B4, "OffsetHandle", SN_NOWARN) set_name(0x801168B8, "BankBase", SN_NOWARN) set_name(0x801168BC, "SPU_Done", SN_NOWARN) set_name(0x8010CD14, "SFXRemapTab", SN_NOWARN) set_name(0x801168C0, "NoSNDRemaps", SN_NOWARN) set_name(0x800A5EF8, "ThePals", SN_NOWARN) set_name(0x8010CDF8, "InitialPositions", SN_NOWARN) set_name(0x8011690C, "demo_level", SN_NOWARN) set_name(0x80116910, "DemoTask", SN_NOWARN) set_name(0x80116914, "DemoGameTask", SN_NOWARN) set_name(0x80116918, "tonys", SN_NOWARN) set_name(0x801168F0, "demo_load", SN_NOWARN) set_name(0x801168F4, "demo_record_load", SN_NOWARN) set_name(0x801168F8, "level_record", SN_NOWARN) set_name(0x801168EC, "moo_moo", SN_NOWARN) set_name(0x801168FC, "demo_flash", SN_NOWARN) set_name(0x80116900, "tonys_Task", SN_NOWARN) set_name(0x80116A74, "DoShowPanel", SN_NOWARN) set_name(0x80116A78, "DoDrawBg", SN_NOWARN) set_name(0x80117BF8, "GlueFinished", SN_NOWARN) set_name(0x80117BFC, "DoHomingScroll", SN_NOWARN) set_name(0x80117C00, "TownerGfx", SN_NOWARN) set_name(0x80117C04, "CurrentMonsterList", SN_NOWARN) set_name(0x80116925, "started_grtask", SN_NOWARN) set_name(0x800A6084, "PlayerInfo", SN_NOWARN) set_name(0x80116A7C, "ArmourChar", SN_NOWARN) set_name(0x8010CEDC, "WepChar", SN_NOWARN) set_name(0x80116A80, "CharChar", SN_NOWARN) set_name(0x80117C08, "ctrl_select_line", SN_NOWARN) set_name(0x80117C09, "ctrl_select_side", SN_NOWARN) set_name(0x80117C0A, "ckeyheld", SN_NOWARN) set_name(0x80117C0C, "old_options_pad", SN_NOWARN) set_name(0x80117C10, "CtrlRect", SN_NOWARN) set_name(0x80116A94, "ctrlflag", SN_NOWARN) set_name(0x800A63B4, "txt_actions", SN_NOWARN) set_name(0x800A630C, "pad_txt", SN_NOWARN) set_name(0x80116A90, "CtrlBorder", SN_NOWARN) set_name(0x801182D8, "CtrlScreen", SN_NOWARN) set_name(0x80118358, "CtrlBack", SN_NOWARN) set_name(0x800A64F4, "controller_defaults", SN_NOWARN) set_name(0x80116AF8, "gr_scrxoff", SN_NOWARN) set_name(0x80116AFC, "gr_scryoff", SN_NOWARN) set_name(0x80116B04, "water_clut", SN_NOWARN) set_name(0x80116B08, "visible_level", SN_NOWARN) set_name(0x80116AF5, "last_type", SN_NOWARN) set_name(0x80116B0A, "daylight", SN_NOWARN) set_name(0x80116B06, "cow_in_sight", SN_NOWARN) set_name(0x80116B07, "inn_in_sight", SN_NOWARN) set_name(0x80116B00, "water_count", SN_NOWARN) set_name(0x80116B09, "lastrnd", SN_NOWARN) set_name(0x80116B0C, "call_clock", SN_NOWARN) set_name(0x80116B1C, "TitleAnimCount", SN_NOWARN) set_name(0x8010CFA4, "light_tile", SN_NOWARN) set_name(0x80116B80, "p1scrnx", SN_NOWARN) set_name(0x80116B84, "p1scrny", SN_NOWARN) set_name(0x80116B88, "p1wrldx", SN_NOWARN) set_name(0x80116B8C, "p1wrldy", SN_NOWARN) set_name(0x80116B90, "p2scrnx", SN_NOWARN) set_name(0x80116B94, "p2scrny", SN_NOWARN) set_name(0x80116B98, "p2wrldx", SN_NOWARN) set_name(0x80116B9C, "p2wrldy", SN_NOWARN) set_name(0x80117C18, "p1spiny1", SN_NOWARN) set_name(0x80117C1C, "p1spiny2", SN_NOWARN) set_name(0x80117C20, "p1scale", SN_NOWARN) set_name(0x80117C24, "p1apocaflag", SN_NOWARN) set_name(0x80117C28, "p1apocaxpos", SN_NOWARN) set_name(0x80117C2C, "p1apocaypos", SN_NOWARN) set_name(0x80117C30, "p2spiny1", SN_NOWARN) set_name(0x80117C34, "p2spiny2", SN_NOWARN) set_name(0x80117C38, "p2scale", SN_NOWARN) set_name(0x80117C3C, "p2apocaflag", SN_NOWARN) set_name(0x80117C40, "p2apocaxpos", SN_NOWARN) set_name(0x80117C44, "p2apocaypos", SN_NOWARN) set_name(0x80118368, "PartArray", SN_NOWARN) set_name(0x80117C48, "partOtPos", SN_NOWARN) set_name(0x80116B38, "p1teleflag", SN_NOWARN) set_name(0x80116B3C, "p1phaseflag", SN_NOWARN) set_name(0x80116B40, "p1inviscount", SN_NOWARN) set_name(0x80116B44, "p2teleflag", SN_NOWARN) set_name(0x80116B48, "p2phaseflag", SN_NOWARN) set_name(0x80116B4C, "p2inviscount", SN_NOWARN) set_name(0x80116B50, "SetParticle", SN_NOWARN) set_name(0x80116B54, "p1partexecnum", SN_NOWARN) set_name(0x80116B58, "p2partexecnum", SN_NOWARN) set_name(0x800A6594, "JumpArray", SN_NOWARN) set_name(0x80116B5C, "partjumpflag", SN_NOWARN) set_name(0x80116B60, "partglowflag", SN_NOWARN) set_name(0x80116B64, "partcolour", SN_NOWARN) set_name(0x80116B68, "healflag", SN_NOWARN) set_name(0x80116B6C, "healtime", SN_NOWARN) set_name(0x80116B70, "healplyr", SN_NOWARN) set_name(0x800A65B4, "SplTarget", SN_NOWARN) set_name(0x80116BB9, "select_flag", SN_NOWARN) set_name(0x80117C4C, "SelectRect", SN_NOWARN) set_name(0x80117C54, "item_select", SN_NOWARN) set_name(0x80116BBC, "QSpell", SN_NOWARN) set_name(0x80116BC0, "_spltotype", SN_NOWARN) set_name(0x80116BAC, "gplayer", SN_NOWARN) set_name(0x801185A8, "SelectBack", SN_NOWARN) set_name(0x80116BB0, "mana_order", SN_NOWARN) set_name(0x80116BB4, "health_order", SN_NOWARN) set_name(0x80116BB8, "birdcheck", SN_NOWARN) set_name(0x801185B8, "DecRequestors", SN_NOWARN) set_name(0x80117C58, "progress", SN_NOWARN) set_name(0x8010D0A0, "Level2CutScreen", SN_NOWARN) set_name(0x80116BDC, "CutString", SN_NOWARN) set_name(0x801185E0, "Scr", SN_NOWARN) set_name(0x80116BE0, "CutScreenTSK", SN_NOWARN) set_name(0x80116BE4, "GameLoading", SN_NOWARN) set_name(0x80118660, "LBack", SN_NOWARN) set_name(0x80116BF4, "card_ev0", SN_NOWARN) set_name(0x80116BF8, "card_ev1", SN_NOWARN) set_name(0x80116BFC, "card_ev2", SN_NOWARN) set_name(0x80116C00, "card_ev3", SN_NOWARN) set_name(0x80116C04, "card_ev10", SN_NOWARN) set_name(0x80116C08, "card_ev11", SN_NOWARN) set_name(0x80116C0C, "card_ev12", SN_NOWARN) set_name(0x80116C10, "card_ev13", SN_NOWARN) set_name(0x80116C14, "card_dirty", SN_NOWARN) set_name(0x80116C1C, "MemcardTask", SN_NOWARN) set_name(0x80116C20, "card_event", SN_NOWARN) set_name(0x80116BF0, "mem_card_event_handler", SN_NOWARN) set_name(0x80116BE8, "MemCardActive", SN_NOWARN) set_name(0x80116BEC, "never_hooked_events", SN_NOWARN) set_name(0x80117C5C, "MasterVol", SN_NOWARN) set_name(0x80117C60, "MusicVol", SN_NOWARN) set_name(0x80117C64, "SoundVol", SN_NOWARN) set_name(0x80117C68, "VideoVol", SN_NOWARN) set_name(0x80117C6C, "SpeechVol", SN_NOWARN) set_name(0x80117C70, "Slider", SN_NOWARN) set_name(0x80117C74, "sw", SN_NOWARN) set_name(0x80117C78, "sx", SN_NOWARN) set_name(0x80117C7C, "sy", SN_NOWARN) set_name(0x80117C80, "Adjust", SN_NOWARN) set_name(0x80117C81, "qspin", SN_NOWARN) set_name(0x80117C82, "lqspin", SN_NOWARN) set_name(0x80117C84, "OrigLang", SN_NOWARN) set_name(0x80117C88, "OldLang", SN_NOWARN) set_name(0x80117C8C, "NewLang", SN_NOWARN) set_name(0x80116CCC, "ReturnMenu", SN_NOWARN) set_name(0x80117C94, "ORect", SN_NOWARN) set_name(0x80116C48, "optionsflag", SN_NOWARN) set_name(0x80116C3C, "cmenu", SN_NOWARN) set_name(0x80116C50, "options_pad", SN_NOWARN) set_name(0x80116C54, "PrevTxt", SN_NOWARN) set_name(0x80116C44, "allspellsflag", SN_NOWARN) set_name(0x800A6DD8, "Circle", SN_NOWARN) set_name(0x80116C30, "Spacing", SN_NOWARN) set_name(0x80116C34, "cs", SN_NOWARN) set_name(0x80116C38, "lastcs", SN_NOWARN) set_name(0x80116C40, "MemcardOverlay", SN_NOWARN) set_name(0x80116C4C, "saveflag", SN_NOWARN) set_name(0x80117C9C, "McState", SN_NOWARN) set_name(0x80116C58, "BlankEntry", SN_NOWARN) set_name(0x800A65EC, "MainMenu", SN_NOWARN) set_name(0x800A6694, "GameMenu", SN_NOWARN) set_name(0x800A676C, "SoundMenu", SN_NOWARN) set_name(0x800A67FC, "CentreMenu", SN_NOWARN) set_name(0x800A68A4, "LangMenu", SN_NOWARN) set_name(0x800A694C, "MemcardMenu", SN_NOWARN) set_name(0x800A69AC, "MemcardGameMenu", SN_NOWARN) set_name(0x800A6A3C, "MemcardCharacterMenu", SN_NOWARN) set_name(0x800A6A9C, "MemcardSelectCard1", SN_NOWARN) set_name(0x800A6B44, "MemcardSelectCard2", SN_NOWARN) set_name(0x800A6BEC, "MemcardFormatMenu", SN_NOWARN) set_name(0x800A6C4C, "CheatMenu", SN_NOWARN) set_name(0x800A6D0C, "InfoMenu", SN_NOWARN) set_name(0x800A6D3C, "MenuList", SN_NOWARN) set_name(0x80116CB0, "debounce", SN_NOWARN) set_name(0x80116CB4, "pu", SN_NOWARN) set_name(0x80116CB8, "pd", SN_NOWARN) set_name(0x80116CBC, "pl", SN_NOWARN) set_name(0x80116CC0, "pr", SN_NOWARN) set_name(0x80116CC4, "uc", SN_NOWARN) set_name(0x80116CC5, "dc", SN_NOWARN) set_name(0x80116CC6, "lc", SN_NOWARN) set_name(0x80116CC7, "rc", SN_NOWARN) set_name(0x80116CC8, "centrestep", SN_NOWARN) set_name(0x800A6E58, "BirdList", SN_NOWARN) set_name(0x80116CD9, "hop_height", SN_NOWARN) set_name(0x80116CDC, "perches", SN_NOWARN) set_name(0x800A6FD8, "FmvTab", SN_NOWARN) set_name(0x80116D18, "FeBackX", SN_NOWARN) set_name(0x80116D1C, "FeBackY", SN_NOWARN) set_name(0x80116D20, "FeBackW", SN_NOWARN) set_name(0x80116D24, "FeBackH", SN_NOWARN) set_name(0x80116D28, "FeFlag", SN_NOWARN) set_name(0x800A7858, "FeBuffer", SN_NOWARN) set_name(0x80117CA4, "CStruct", SN_NOWARN) set_name(0x80116D2C, "FeBufferCount", SN_NOWARN) set_name(0x80116D30, "FeNoOfPlayers", SN_NOWARN) set_name(0x80116D34, "FePlayerNo", SN_NOWARN) set_name(0x80116D38, "FeChrClass", SN_NOWARN) set_name(0x800A7C18, "FePlayerName", SN_NOWARN) set_name(0x80116D40, "FeCurMenu", SN_NOWARN) set_name(0x80116D44, "FePlayerNameFlag", SN_NOWARN) set_name(0x80116D48, "FeCount", SN_NOWARN) set_name(0x80116D4C, "fileselect", SN_NOWARN) set_name(0x80116D50, "BookMenu", SN_NOWARN) set_name(0x80116D54, "FeAttractMode", SN_NOWARN) set_name(0x80116D58, "FMVPress", SN_NOWARN) set_name(0x80116CF0, "FeTData", SN_NOWARN) set_name(0x80116CF4, "FlameTData", SN_NOWARN) set_name(0x80116CF8, "FeIsAVirgin", SN_NOWARN) set_name(0x80116CFC, "FeMenuDelay", SN_NOWARN) set_name(0x800A70B8, "DummyMenu", SN_NOWARN) set_name(0x800A70D4, "FeMainMenu", SN_NOWARN) set_name(0x800A70F0, "FeNewGameMenu", SN_NOWARN) set_name(0x800A710C, "FeNewP1ClassMenu", SN_NOWARN) set_name(0x800A7128, "FeNewP1NameMenu", SN_NOWARN) set_name(0x800A7144, "FeNewP2ClassMenu", SN_NOWARN) set_name(0x800A7160, "FeNewP2NameMenu", SN_NOWARN) set_name(0x800A717C, "FeDifficultyMenu", SN_NOWARN) set_name(0x800A7198, "FeBackgroundMenu", SN_NOWARN) set_name(0x800A71B4, "FeBook1Menu", SN_NOWARN) set_name(0x800A71D0, "FeBook2Menu", SN_NOWARN) set_name(0x800A71EC, "FeLoadCharMenu", SN_NOWARN) set_name(0x800A7208, "FeLoadChar1Menu", SN_NOWARN) set_name(0x800A7224, "FeLoadChar2Menu", SN_NOWARN) set_name(0x80116D00, "LoadErrorText", SN_NOWARN) set_name(0x800A7240, "FeMainMenuTable", SN_NOWARN) set_name(0x800A72B8, "FeNewGameMenuTable", SN_NOWARN) set_name(0x800A7300, "FePlayerClassMenuTable", SN_NOWARN) set_name(0x800A7378, "FeNameEngMenuTable", SN_NOWARN) set_name(0x800A7660, "FeMemcardMenuTable", SN_NOWARN) set_name(0x800A76A8, "FeDifficultyMenuTable", SN_NOWARN) set_name(0x800A7708, "FeBackgroundMenuTable", SN_NOWARN) set_name(0x800A7768, "FeBook1MenuTable", SN_NOWARN) set_name(0x800A77E0, "FeBook2MenuTable", SN_NOWARN) set_name(0x80116D0C, "AttractTitleDelay", SN_NOWARN) set_name(0x80116D10, "AttractMainDelay", SN_NOWARN) set_name(0x80116D14, "FMVEndPad", SN_NOWARN) set_name(0x80116D8C, "InCredits", SN_NOWARN) set_name(0x80116D90, "CreditTitleNo", SN_NOWARN) set_name(0x80116D94, "CreditSubTitleNo", SN_NOWARN) set_name(0x80116DA8, "card_status", SN_NOWARN) set_name(0x80116DB0, "card_usable", SN_NOWARN) set_name(0x80116DB8, "card_files", SN_NOWARN) set_name(0x80116DC0, "card_changed", SN_NOWARN) set_name(0x80116E38, "AlertTxt", SN_NOWARN) set_name(0x80116E3C, "current_card", SN_NOWARN) set_name(0x80116E40, "LoadType", SN_NOWARN) set_name(0x80116E44, "McMenuPos", SN_NOWARN) set_name(0x80116E48, "McCurMenu", SN_NOWARN) set_name(0x80116DF4, "OText3", SN_NOWARN) set_name(0x80116E34, "fileinfoflag", SN_NOWARN) set_name(0x80116E10, "DiabloGameFile", SN_NOWARN) set_name(0x80116DD8, "Text3", SN_NOWARN) set_name(0x80116DF0, "OText2", SN_NOWARN) set_name(0x80116DF8, "OText4", SN_NOWARN) set_name(0x80116DFC, "OText5", SN_NOWARN) set_name(0x80116E00, "OText7", SN_NOWARN) set_name(0x80116E04, "OText8", SN_NOWARN) set_name(0x80116E08, "SaveError", SN_NOWARN) set_name(0x80116DD4, "Text1", SN_NOWARN) set_name(0x80116DDC, "Text5", SN_NOWARN) set_name(0x80116DE0, "Text6", SN_NOWARN) set_name(0x80116DE4, "Text7", SN_NOWARN) set_name(0x80116DE8, "Text8", SN_NOWARN) set_name(0x80116DEC, "Text9", SN_NOWARN) set_name(0x80116E0C, "ContText", SN_NOWARN) set_name(0x80116E2C, "McState_addr_80116E2C", SN_NOWARN) set_name(0x80117CA8, "t1", SN_NOWARN) set_name(0x80117CAC, "t2", SN_NOWARN) set_name(0x80118670, "draw", SN_NOWARN) set_name(0x80118730, "dec", SN_NOWARN) set_name(0x80117CB0, "oldHeapbase", SN_NOWARN) set_name(0x80117CB4, "oldVolume", SN_NOWARN) set_name(0x80117CB8, "ringName", SN_NOWARN) set_name(0x80116E78, "ringSH", SN_NOWARN) set_name(0x80116E7C, "FMVStream", SN_NOWARN) set_name(0x80117CBC, "DCTTab", SN_NOWARN) set_name(0x80116E56, "firstFrame", SN_NOWARN) set_name(0x80116E58, "numSkipped", SN_NOWARN) set_name(0x80116E5A, "prevFrameNum", SN_NOWARN) set_name(0x80116E5C, "maxRunLevel", SN_NOWARN) set_name(0x80116E60, "ringBuf", SN_NOWARN) set_name(0x80116E64, "ringcount", SN_NOWARN) set_name(0x80116E68, "ringpos", SN_NOWARN) set_name(0x80116E6C, "ringsec", SN_NOWARN) set_name(0x80116E70, "ringHnd", SN_NOWARN) set_name(0x80116E74, "SecGot", SN_NOWARN) set_name(0x80116F1C, "pStatusPanel", SN_NOWARN) set_name(0x80116F20, "pGBoxBuff", SN_NOWARN) set_name(0x80116F24, "dropGoldFlag", SN_NOWARN) set_name(0x80116F28, "_pinfoflag", SN_NOWARN) set_name(0x800A8210, "_infostr", SN_NOWARN) set_name(0x80116F2C, "_infoclr", SN_NOWARN) set_name(0x800A8410, "tempstr", SN_NOWARN) set_name(0x80116F2E, "drawhpflag", SN_NOWARN) set_name(0x80116F2F, "drawmanaflag", SN_NOWARN) set_name(0x80116F30, "chrflag", SN_NOWARN) set_name(0x80116F31, "drawbtnflag", SN_NOWARN) set_name(0x80116F32, "panbtndown", SN_NOWARN) set_name(0x80116F33, "panelflag", SN_NOWARN) set_name(0x80116F34, "chrbtndown", SN_NOWARN) set_name(0x80116F35, "lvlbtndown", SN_NOWARN) set_name(0x80116F36, "sbookflag", SN_NOWARN) set_name(0x80116F37, "talkflag", SN_NOWARN) set_name(0x80116F38, "dropGoldValue", SN_NOWARN) set_name(0x80116F3C, "initialDropGoldValue", SN_NOWARN) set_name(0x80116F40, "initialDropGoldIndex", SN_NOWARN) set_name(0x80116F44, "pPanelButtons", SN_NOWARN) set_name(0x80116F48, "pPanelText", SN_NOWARN) set_name(0x80116F4C, "pManaBuff", SN_NOWARN) set_name(0x80116F50, "pLifeBuff", SN_NOWARN) set_name(0x80116F54, "pChrPanel", SN_NOWARN) set_name(0x80116F58, "pChrButtons", SN_NOWARN) set_name(0x80116F5C, "pSpellCels", SN_NOWARN) set_name(0x801187A8, "_panelstr", SN_NOWARN) set_name(0x80118BA8, "_pstrjust", SN_NOWARN) set_name(0x80117CC0, "_pnumlines", SN_NOWARN) set_name(0x80116F60, "InfoBoxRect", SN_NOWARN) set_name(0x80116F64, "CSRect", SN_NOWARN) set_name(0x80117CD0, "_pSpell", SN_NOWARN) set_name(0x80117CD8, "_pSplType", SN_NOWARN) set_name(0x80117CE0, "panbtn", SN_NOWARN) set_name(0x80116F6C, "numpanbtns", SN_NOWARN) set_name(0x80116F70, "pDurIcons", SN_NOWARN) set_name(0x80116F74, "drawdurflag", SN_NOWARN) set_name(0x80117CE8, "chrbtn", SN_NOWARN) set_name(0x80116F75, "chrbtnactive", SN_NOWARN) set_name(0x80116F78, "pSpellBkCel", SN_NOWARN) set_name(0x80116F7C, "pSBkBtnCel", SN_NOWARN) set_name(0x80116F80, "pSBkIconCels", SN_NOWARN) set_name(0x80116F84, "sbooktab", SN_NOWARN) set_name(0x80116F88, "cur_spel", SN_NOWARN) set_name(0x80117CEC, "talkofs", SN_NOWARN) set_name(0x80118BF8, "sgszTalkMsg", SN_NOWARN) set_name(0x80117CF0, "sgbTalkSavePos", SN_NOWARN) set_name(0x80117CF1, "sgbNextTalkSave", SN_NOWARN) set_name(0x80117CF2, "sgbPlrTalkTbl", SN_NOWARN) set_name(0x80117CF4, "pTalkPanel", SN_NOWARN) set_name(0x80117CF8, "pMultiBtns", SN_NOWARN) set_name(0x80117CFC, "pTalkBtns", SN_NOWARN) set_name(0x80117D00, "talkbtndown", SN_NOWARN) set_name(0x8010D6F4, "gbFontTransTbl", SN_NOWARN) set_name(0x8010D634, "fontkern", SN_NOWARN) set_name(0x800A7C44, "SpellITbl", SN_NOWARN) set_name(0x80116E89, "DrawLevelUpFlag", SN_NOWARN) set_name(0x80116EB0, "_spselflag", SN_NOWARN) set_name(0x80116EAC, "spspelstate", SN_NOWARN) set_name(0x80116EEC, "initchr", SN_NOWARN) set_name(0x80116E8C, "SPLICONNO", SN_NOWARN) set_name(0x80116E90, "SPLICONY", SN_NOWARN) set_name(0x80117CC8, "SPLICONRIGHT", SN_NOWARN) set_name(0x80116E94, "scx", SN_NOWARN) set_name(0x80116E98, "scy", SN_NOWARN) set_name(0x80116E9C, "scx1", SN_NOWARN) set_name(0x80116EA0, "scy1", SN_NOWARN) set_name(0x80116EA4, "scx2", SN_NOWARN) set_name(0x80116EA8, "scy2", SN_NOWARN) set_name(0x80116EB8, "SpellCol", SN_NOWARN) set_name(0x800A7C30, "SpellColors", SN_NOWARN) set_name(0x800A7C6C, "PanBtnPos", SN_NOWARN) set_name(0x800A7D0C, "PanBtnHotKey", SN_NOWARN) set_name(0x800A7D2C, "PanBtnStr", SN_NOWARN) set_name(0x800A7D4C, "SpellPages", SN_NOWARN) set_name(0x80116EDC, "lus", SN_NOWARN) set_name(0x80116EE0, "CsNo", SN_NOWARN) set_name(0x80116EE4, "plusanim", SN_NOWARN) set_name(0x80118BE8, "CSBack", SN_NOWARN) set_name(0x80116EE8, "CS_XOFF", SN_NOWARN) set_name(0x800A7DB0, "CS_Tab", SN_NOWARN) set_name(0x80116EF0, "NoCSEntries", SN_NOWARN) set_name(0x80116EF4, "SPALOFF", SN_NOWARN) set_name(0x80116EF8, "paloffset1", SN_NOWARN) set_name(0x80116EFC, "paloffset2", SN_NOWARN) set_name(0x80116F00, "paloffset3", SN_NOWARN) set_name(0x80116F04, "paloffset4", SN_NOWARN) set_name(0x80116F08, "pinc1", SN_NOWARN) set_name(0x80116F0C, "pinc2", SN_NOWARN) set_name(0x80116F10, "pinc3", SN_NOWARN) set_name(0x80116F14, "pinc4", SN_NOWARN) set_name(0x80116F9C, "_pcurs", SN_NOWARN) set_name(0x80116FA4, "cursW", SN_NOWARN) set_name(0x80116FA8, "cursH", SN_NOWARN) set_name(0x80116FAC, "icursW", SN_NOWARN) set_name(0x80116FB0, "icursH", SN_NOWARN) set_name(0x80116FB4, "icursW28", SN_NOWARN) set_name(0x80116FB8, "icursH28", SN_NOWARN) set_name(0x80116FBC, "cursmx", SN_NOWARN) set_name(0x80116FC0, "cursmy", SN_NOWARN) set_name(0x80116FC4, "_pcursmonst", SN_NOWARN) set_name(0x80116FCC, "_pcursobj", SN_NOWARN) set_name(0x80116FD0, "_pcursitem", SN_NOWARN) set_name(0x80116FD4, "_pcursinvitem", SN_NOWARN) set_name(0x80116FD8, "_pcursplr", SN_NOWARN) set_name(0x80116F98, "sel_data", SN_NOWARN) set_name(0x800A8510, "dead", SN_NOWARN) set_name(0x80116FDC, "spurtndx", SN_NOWARN) set_name(0x80116FE0, "stonendx", SN_NOWARN) set_name(0x80116FE4, "pSquareCel", SN_NOWARN) set_name(0x80117024, "ghInst", SN_NOWARN) set_name(0x80117028, "svgamode", SN_NOWARN) set_name(0x8011702C, "MouseX", SN_NOWARN) set_name(0x80117030, "MouseY", SN_NOWARN) set_name(0x80117034, "gv1", SN_NOWARN) set_name(0x80117038, "gv2", SN_NOWARN) set_name(0x8011703C, "gv3", SN_NOWARN) set_name(0x80117040, "gv4", SN_NOWARN) set_name(0x80117044, "gv5", SN_NOWARN) set_name(0x80117048, "gbProcessPlayers", SN_NOWARN) set_name(0x800A8684, "DebugMonsters", SN_NOWARN) set_name(0x800A86AC, "glSeedTbl", SN_NOWARN) set_name(0x800A86F0, "gnLevelTypeTbl", SN_NOWARN) set_name(0x80117049, "gbDoEnding", SN_NOWARN) set_name(0x8011704A, "gbRunGame", SN_NOWARN) set_name(0x8011704B, "gbRunGameResult", SN_NOWARN) set_name(0x8011704C, "gbGameLoopStartup", SN_NOWARN) set_name(0x80118C48, "glEndSeed", SN_NOWARN) set_name(0x80118C98, "glMid1Seed", SN_NOWARN) set_name(0x80118CE8, "glMid2Seed", SN_NOWARN) set_name(0x80118D38, "glMid3Seed", SN_NOWARN) set_name(0x80117D04, "sg_previousFilter", SN_NOWARN) set_name(0x800A8734, "CreateEnv", SN_NOWARN) set_name(0x80117050, "Passedlvldir", SN_NOWARN) set_name(0x80117054, "TempStack", SN_NOWARN) set_name(0x80116FF4, "ghMainWnd", SN_NOWARN) set_name(0x80116FF8, "fullscreen", SN_NOWARN) set_name(0x80116FFC, "force_redraw", SN_NOWARN) set_name(0x80117010, "PauseMode", SN_NOWARN) set_name(0x80117011, "FriendlyMode", SN_NOWARN) set_name(0x80117001, "visiondebug", SN_NOWARN) set_name(0x80117003, "light4flag", SN_NOWARN) set_name(0x80117004, "leveldebug", SN_NOWARN) set_name(0x80117005, "monstdebug", SN_NOWARN) set_name(0x8011700C, "debugmonsttypes", SN_NOWARN) set_name(0x80117000, "cineflag", SN_NOWARN) set_name(0x80117002, "scrollflag", SN_NOWARN) set_name(0x80117006, "trigdebug", SN_NOWARN) set_name(0x80117008, "setseed", SN_NOWARN) set_name(0x80117014, "sgnTimeoutCurs", SN_NOWARN) set_name(0x80117018, "sgbMouseDown", SN_NOWARN) set_name(0x800A8E00, "towner", SN_NOWARN) set_name(0x8011706C, "numtowners", SN_NOWARN) set_name(0x80117070, "storeflag", SN_NOWARN) set_name(0x80117071, "boyloadflag", SN_NOWARN) set_name(0x80117072, "bannerflag", SN_NOWARN) set_name(0x80117074, "pCowCels", SN_NOWARN) set_name(0x80117D08, "sgdwCowClicks", SN_NOWARN) set_name(0x80117D0C, "sgnCowMsg", SN_NOWARN) set_name(0x800A8B40, "Qtalklist", SN_NOWARN) set_name(0x80117064, "CowPlaying", SN_NOWARN) set_name(0x800A8764, "AnimOrder", SN_NOWARN) set_name(0x800A8ADC, "TownCowX", SN_NOWARN) set_name(0x800A8AE8, "TownCowY", SN_NOWARN) set_name(0x800A8AF4, "TownCowDir", SN_NOWARN) set_name(0x800A8B00, "cowoffx", SN_NOWARN) set_name(0x800A8B20, "cowoffy", SN_NOWARN) set_name(0x8011708C, "sfxdelay", SN_NOWARN) set_name(0x80117090, "sfxdnum", SN_NOWARN) set_name(0x80117084, "sghStream", SN_NOWARN) set_name(0x800A9C00, "sgSFX", SN_NOWARN) set_name(0x80117088, "sgpStreamSFX", SN_NOWARN) set_name(0x80117094, "orgseed", SN_NOWARN) set_name(0x80117D10, "sglGameSeed", SN_NOWARN) set_name(0x80117098, "SeedCount", SN_NOWARN) set_name(0x80117D14, "sgMemCrit", SN_NOWARN) set_name(0x80117D18, "sgnWidth", SN_NOWARN) set_name(0x801170A6, "msgflag", SN_NOWARN) set_name(0x801170A7, "msgdelay", SN_NOWARN) set_name(0x800AABFC, "msgtable", SN_NOWARN) set_name(0x800AAB4C, "MsgStrings", SN_NOWARN) set_name(0x801170A5, "msgcnt", SN_NOWARN) set_name(0x80117D1C, "sgdwProgress", SN_NOWARN) set_name(0x80117D20, "sgdwXY", SN_NOWARN) set_name(0x800AAC4C, "AllItemsUseable", SN_NOWARN) set_name(0x8010DB14, "AllItemsList", SN_NOWARN) set_name(0x8010EEB4, "PL_Prefix", SN_NOWARN) set_name(0x8010FBD4, "PL_Suffix", SN_NOWARN) set_name(0x80110AD4, "UniqueItemList", SN_NOWARN) set_name(0x800AAE60, "item", SN_NOWARN) set_name(0x800AF860, "itemactive", SN_NOWARN) set_name(0x800AF8E0, "itemavail", SN_NOWARN) set_name(0x800AF960, "UniqueItemFlag", SN_NOWARN) set_name(0x801170E8, "uitemflag", SN_NOWARN) set_name(0x80117D24, "tem", SN_NOWARN) set_name(0x80118D80, "curruitem", SN_NOWARN) set_name(0x80118E20, "itemhold", SN_NOWARN) set_name(0x801170EC, "ScrollType", SN_NOWARN) set_name(0x800AF9E0, "ItemStr", SN_NOWARN) set_name(0x801170C0, "numitems", SN_NOWARN) set_name(0x801170C4, "gnNumGetRecords", SN_NOWARN) set_name(0x800AADBC, "ItemInvSnds", SN_NOWARN) set_name(0x800AACEC, "ItemCAnimTbl", SN_NOWARN) set_name(0x80112918, "Item2Frm", SN_NOWARN) set_name(0x800AAD98, "ItemAnimLs", SN_NOWARN) set_name(0x801170C8, "ItemAnimSnds", SN_NOWARN) set_name(0x801170CC, "idoppely", SN_NOWARN) set_name(0x801170D0, "ScrollFlag", SN_NOWARN) set_name(0x800AAE48, "premiumlvladd", SN_NOWARN) set_name(0x800B080C, "LightList", SN_NOWARN) set_name(0x800B094C, "lightactive", SN_NOWARN) set_name(0x80117100, "numlights", SN_NOWARN) set_name(0x80117104, "lightmax", SN_NOWARN) set_name(0x800B0974, "VisionList", SN_NOWARN) set_name(0x80117108, "numvision", SN_NOWARN) set_name(0x8011710C, "dovision", SN_NOWARN) set_name(0x80117110, "visionid", SN_NOWARN) set_name(0x80117D28, "disp_mask", SN_NOWARN) set_name(0x80117D2C, "weird", SN_NOWARN) set_name(0x80117D30, "disp_tab_r", SN_NOWARN) set_name(0x80117D34, "dispy_r", SN_NOWARN) set_name(0x80117D38, "disp_tab_g", SN_NOWARN) set_name(0x80117D3C, "dispy_g", SN_NOWARN) set_name(0x80117D40, "disp_tab_b", SN_NOWARN) set_name(0x80117D44, "dispy_b", SN_NOWARN) set_name(0x80117D48, "radius", SN_NOWARN) set_name(0x80117D4C, "bright", SN_NOWARN) set_name(0x80118E30, "mult_tab", SN_NOWARN) set_name(0x801170F0, "lightflag", SN_NOWARN) set_name(0x800B0520, "vCrawlTable", SN_NOWARN) set_name(0x800B07D4, "RadiusAdj", SN_NOWARN) set_name(0x800AFA60, "CrawlTable", SN_NOWARN) set_name(0x801170F4, "restore_r", SN_NOWARN) set_name(0x801170F8, "restore_g", SN_NOWARN) set_name(0x801170FC, "restore_b", SN_NOWARN) set_name(0x800B07EC, "radius_tab", SN_NOWARN) set_name(0x800B07FC, "bright_tab", SN_NOWARN) set_name(0x80117132, "qtextflag", SN_NOWARN) set_name(0x80117134, "qtextSpd", SN_NOWARN) set_name(0x80117D50, "pMedTextCels", SN_NOWARN) set_name(0x80117D54, "pTextBoxCels", SN_NOWARN) set_name(0x80117D58, "qtextptr", SN_NOWARN) set_name(0x80117D5C, "qtexty", SN_NOWARN) set_name(0x80117D60, "qtextDelay", SN_NOWARN) set_name(0x80117D64, "sgLastScroll", SN_NOWARN) set_name(0x80117D68, "scrolltexty", SN_NOWARN) set_name(0x80117D6C, "sglMusicVolumeSave", SN_NOWARN) set_name(0x80117120, "qtbodge", SN_NOWARN) set_name(0x800B0B34, "QBack", SN_NOWARN) set_name(0x80117131, "CDFlip", SN_NOWARN) set_name(0x800B0B44, "missiledata", SN_NOWARN) set_name(0x800B12B4, "misfiledata", SN_NOWARN) set_name(0x800B11A4, "MissPrintRoutines", SN_NOWARN) set_name(0x800B13A0, "sgLevels", SN_NOWARN) set_name(0x800C85E8, "sgLocals", SN_NOWARN) set_name(0x80118EB0, "sgJunk", SN_NOWARN) set_name(0x80117D71, "sgbRecvCmd", SN_NOWARN) set_name(0x80117D74, "sgdwRecvOffset", SN_NOWARN) set_name(0x80117D78, "sgbDeltaChunks", SN_NOWARN) set_name(0x80117D79, "sgbDeltaChanged", SN_NOWARN) set_name(0x80117D7C, "sgdwOwnerWait", SN_NOWARN) set_name(0x80117D80, "sgpMegaPkt", SN_NOWARN) set_name(0x80117D84, "sgpCurrPkt", SN_NOWARN) set_name(0x80117D88, "sgnCurrMegaPlayer", SN_NOWARN) set_name(0x8011714D, "deltaload", SN_NOWARN) set_name(0x8011714E, "gbBufferMsgs", SN_NOWARN) set_name(0x80117150, "dwRecCount", SN_NOWARN) set_name(0x80117166, "gbMaxPlayers", SN_NOWARN) set_name(0x80117167, "gbActivePlayers", SN_NOWARN) set_name(0x80117168, "gbGameDestroyed", SN_NOWARN) set_name(0x80117169, "gbDeltaSender", SN_NOWARN) set_name(0x8011716A, "gbSelectProvider", SN_NOWARN) set_name(0x8011716B, "gbSomebodyWonGameKludge", SN_NOWARN) set_name(0x80117D8C, "sgbSentThisCycle", SN_NOWARN) set_name(0x80117D90, "sgdwGameLoops", SN_NOWARN) set_name(0x80117D94, "sgwPackPlrOffsetTbl", SN_NOWARN) set_name(0x80117D98, "sgbPlayerLeftGameTbl", SN_NOWARN) set_name(0x80117D9C, "sgdwPlayerLeftReasonTbl", SN_NOWARN) set_name(0x80117DA4, "sgbSendDeltaTbl", SN_NOWARN) set_name(0x80117DAC, "sgGameInitInfo", SN_NOWARN) set_name(0x80117DB4, "sgbTimeout", SN_NOWARN) set_name(0x80117DB8, "sglTimeoutStart", SN_NOWARN) set_name(0x80117160, "gszVersionNumber", SN_NOWARN) set_name(0x80117165, "sgbNetInited", SN_NOWARN) set_name(0x800C9330, "ObjTypeConv", SN_NOWARN) set_name(0x800C94F4, "AllObjects", SN_NOWARN) set_name(0x80112FE0, "ObjMasterLoadList", SN_NOWARN) set_name(0x800C9CD4, "object", SN_NOWARN) set_name(0x8011718C, "numobjects", SN_NOWARN) set_name(0x800CB2A8, "objectactive", SN_NOWARN) set_name(0x800CB328, "objectavail", SN_NOWARN) set_name(0x80117190, "InitObjFlag", SN_NOWARN) set_name(0x80117194, "trapid", SN_NOWARN) set_name(0x800CB3A8, "ObjFileList", SN_NOWARN) set_name(0x80117198, "trapdir", SN_NOWARN) set_name(0x8011719C, "leverid", SN_NOWARN) set_name(0x80117184, "numobjfiles", SN_NOWARN) set_name(0x800C9BEC, "bxadd", SN_NOWARN) set_name(0x800C9C0C, "byadd", SN_NOWARN) set_name(0x800C9C94, "shrineavail", SN_NOWARN) set_name(0x800C9C2C, "shrinestrs", SN_NOWARN) set_name(0x800C9CB0, "StoryBookName", SN_NOWARN) set_name(0x80117188, "myscale", SN_NOWARN) set_name(0x801171B0, "gbValidSaveFile", SN_NOWARN) set_name(0x801171AC, "DoLoadedChar", SN_NOWARN) set_name(0x800CB5C8, "plr", SN_NOWARN) set_name(0x801171D0, "myplr", SN_NOWARN) set_name(0x801171D4, "deathdelay", SN_NOWARN) set_name(0x801171D8, "deathflag", SN_NOWARN) set_name(0x801171D9, "light_rad", SN_NOWARN) set_name(0x801171C8, "light_level", SN_NOWARN) set_name(0x800CB4C0, "MaxStats", SN_NOWARN) set_name(0x801171C0, "PlrStructSize", SN_NOWARN) set_name(0x801171C4, "ItemStructSize", SN_NOWARN) set_name(0x800CB3D0, "plrxoff", SN_NOWARN) set_name(0x800CB3F4, "plryoff", SN_NOWARN) set_name(0x800CB418, "plrxoff2", SN_NOWARN) set_name(0x800CB43C, "plryoff2", SN_NOWARN) set_name(0x800CB460, "PlrGFXAnimLens", SN_NOWARN) set_name(0x800CB484, "StrengthTbl", SN_NOWARN) set_name(0x800CB490, "MagicTbl", SN_NOWARN) set_name(0x800CB49C, "DexterityTbl", SN_NOWARN) set_name(0x800CB4A8, "VitalityTbl", SN_NOWARN) set_name(0x800CB4B4, "ToBlkTbl", SN_NOWARN) set_name(0x800CB4F0, "ExpLvlsTbl", SN_NOWARN) set_name(0x800CFCA0, "quests", SN_NOWARN) set_name(0x80117214, "pQLogCel", SN_NOWARN) set_name(0x80117218, "ReturnLvlX", SN_NOWARN) set_name(0x8011721C, "ReturnLvlY", SN_NOWARN) set_name(0x80117220, "ReturnLvl", SN_NOWARN) set_name(0x80117224, "ReturnLvlT", SN_NOWARN) set_name(0x80117228, "qfade", SN_NOWARN) set_name(0x8011722C, "rporttest", SN_NOWARN) set_name(0x80117230, "qline", SN_NOWARN) set_name(0x80117234, "numqlines", SN_NOWARN) set_name(0x80117238, "qtopline", SN_NOWARN) set_name(0x80118ED0, "qlist", SN_NOWARN) set_name(0x80117DBC, "QSRect", SN_NOWARN) set_name(0x801171E5, "questlog", SN_NOWARN) set_name(0x800CFB68, "questlist", SN_NOWARN) set_name(0x801171E8, "ALLQUESTS", SN_NOWARN) set_name(0x800CFC7C, "QuestGroup1", SN_NOWARN) set_name(0x800CFC88, "QuestGroup2", SN_NOWARN) set_name(0x800CFC94, "QuestGroup3", SN_NOWARN) set_name(0x801171FC, "QuestGroup4", SN_NOWARN) set_name(0x801171EC, "questxoff", SN_NOWARN) set_name(0x801171F4, "questyoff", SN_NOWARN) set_name(0x800CFC68, "questtrigstr", SN_NOWARN) set_name(0x80117204, "QS_PX", SN_NOWARN) set_name(0x80117208, "QS_PY", SN_NOWARN) set_name(0x8011720C, "QS_PW", SN_NOWARN) set_name(0x80117210, "QS_PH", SN_NOWARN) set_name(0x80118F10, "QSBack", SN_NOWARN) set_name(0x800CFDE0, "spelldata", SN_NOWARN) set_name(0x80117277, "stextflag", SN_NOWARN) set_name(0x800D0638, "smithitem", SN_NOWARN) set_name(0x800D11C8, "premiumitem", SN_NOWARN) set_name(0x80117278, "numpremium", SN_NOWARN) set_name(0x8011727C, "premiumlevel", SN_NOWARN) set_name(0x800D1540, "witchitem", SN_NOWARN) set_name(0x800D20D0, "boyitem", SN_NOWARN) set_name(0x80117280, "boylevel", SN_NOWARN) set_name(0x800D2164, "golditem", SN_NOWARN) set_name(0x800D21F8, "healitem", SN_NOWARN) set_name(0x80117284, "stextsize", SN_NOWARN) set_name(0x80117285, "stextscrl", SN_NOWARN) set_name(0x80117DC4, "stextsel", SN_NOWARN) set_name(0x80117DC8, "stextlhold", SN_NOWARN) set_name(0x80117DCC, "stextshold", SN_NOWARN) set_name(0x80117DD0, "stextvhold", SN_NOWARN) set_name(0x80117DD4, "stextsval", SN_NOWARN) set_name(0x80117DD8, "stextsmax", SN_NOWARN) set_name(0x80117DDC, "stextup", SN_NOWARN) set_name(0x80117DE0, "stextdown", SN_NOWARN) set_name(0x80117DE4, "stextscrlubtn", SN_NOWARN) set_name(0x80117DE5, "stextscrldbtn", SN_NOWARN) set_name(0x80117DE6, "SItemListFlag", SN_NOWARN) set_name(0x80118F20, "stext", SN_NOWARN) set_name(0x800D2D88, "storehold", SN_NOWARN) set_name(0x800D4948, "storehidx", SN_NOWARN) set_name(0x80117DE8, "storenumh", SN_NOWARN) set_name(0x80117DEC, "gossipstart", SN_NOWARN) set_name(0x80117DF0, "gossipend", SN_NOWARN) set_name(0x80117DF4, "StoreBackRect", SN_NOWARN) set_name(0x80117DFC, "talker", SN_NOWARN) set_name(0x80117260, "pSTextBoxCels", SN_NOWARN) set_name(0x80117264, "pSTextSlidCels", SN_NOWARN) set_name(0x80117268, "SStringY", SN_NOWARN) set_name(0x800D0564, "SBack", SN_NOWARN) set_name(0x800D0574, "SStringYNorm", SN_NOWARN) set_name(0x800D05C4, "SStringYBuy", SN_NOWARN) set_name(0x800D0614, "talkname", SN_NOWARN) set_name(0x80117276, "InStoreFlag", SN_NOWARN) set_name(0x80114068, "alltext", SN_NOWARN) set_name(0x80117294, "gdwAllTextEntries", SN_NOWARN) set_name(0x80117E00, "P3Tiles", SN_NOWARN) set_name(0x801172A4, "tile", SN_NOWARN) set_name(0x801172B4, "_trigflag", SN_NOWARN) set_name(0x800D4BB0, "trigs", SN_NOWARN) set_name(0x801172B8, "numtrigs", SN_NOWARN) set_name(0x801172BC, "townwarps", SN_NOWARN) set_name(0x801172C0, "TWarpFrom", SN_NOWARN) set_name(0x800D4978, "TownDownList", SN_NOWARN) set_name(0x800D49A4, "TownWarp1List", SN_NOWARN) set_name(0x800D49D8, "L1UpList", SN_NOWARN) set_name(0x800D4A08, "L1DownList", SN_NOWARN) set_name(0x800D4A30, "L2UpList", SN_NOWARN) set_name(0x800D4A3C, "L2DownList", SN_NOWARN) set_name(0x800D4A50, "L2TWarpUpList", SN_NOWARN) set_name(0x800D4A5C, "L3UpList", SN_NOWARN) set_name(0x800D4A98, "L3DownList", SN_NOWARN) set_name(0x800D4ABC, "L3TWarpUpList", SN_NOWARN) set_name(0x800D4AF4, "L4UpList", SN_NOWARN) set_name(0x800D4B04, "L4DownList", SN_NOWARN) set_name(0x800D4B1C, "L4TWarpUpList", SN_NOWARN) set_name(0x800D4B2C, "L4PentaList", SN_NOWARN) set_name(0x80114DF8, "cursoff", SN_NOWARN) set_name(0x801172DA, "gbMusicOn", SN_NOWARN) set_name(0x801172DB, "gbSoundOn", SN_NOWARN) set_name(0x801172D9, "gbSndInited", SN_NOWARN) set_name(0x801172E0, "sglMasterVolume", SN_NOWARN) set_name(0x801172E4, "sglMusicVolume", SN_NOWARN) set_name(0x801172E8, "sglSoundVolume", SN_NOWARN) set_name(0x801172EC, "sglSpeechVolume", SN_NOWARN) set_name(0x801172DC, "gbDupSounds", SN_NOWARN) set_name(0x801172F0, "sgnMusicTrack", SN_NOWARN) set_name(0x801172F4, "sghMusic", SN_NOWARN) set_name(0x80114EA4, "sgszMusicTracks", SN_NOWARN) set_name(0x80117318, "_pcurr_inv", SN_NOWARN) set_name(0x800D4C00, "_pfind_list", SN_NOWARN) set_name(0x80117320, "_pfind_index", SN_NOWARN) set_name(0x80117324, "_pfindx", SN_NOWARN) set_name(0x80117328, "_pfindy", SN_NOWARN) set_name(0x8011732A, "automapmoved", SN_NOWARN) set_name(0x8011730C, "flyflag", SN_NOWARN) set_name(0x80117304, "pad_styles", SN_NOWARN) set_name(0x8011730D, "speed_type", SN_NOWARN) set_name(0x8011730E, "sel_speed", SN_NOWARN) set_name(0x80117E04, "CurrentProc", SN_NOWARN) set_name(0x80115030, "AllMsgs", SN_NOWARN) set_name(0x80117358, "NumOfStrings", SN_NOWARN) set_name(0x8011732C, "LanguageType", SN_NOWARN) set_name(0x80117330, "hndText", SN_NOWARN) set_name(0x80117334, "TextPtr", SN_NOWARN) set_name(0x80117338, "LangDbNo", SN_NOWARN) set_name(0x80117368, "MissDat", SN_NOWARN) set_name(0x8011736C, "CharFade", SN_NOWARN) set_name(0x80117370, "rotateness", SN_NOWARN) set_name(0x80117374, "spiralling_shape", SN_NOWARN) set_name(0x80117378, "down", SN_NOWARN) set_name(0x800D4C50, "MlTab", SN_NOWARN) set_name(0x800D4C60, "QlTab", SN_NOWARN) set_name(0x800D4C70, "ObjPrintFuncs", SN_NOWARN) set_name(0x80117394, "MyXoff1", SN_NOWARN) set_name(0x80117398, "MyYoff1", SN_NOWARN) set_name(0x8011739C, "MyXoff2", SN_NOWARN) set_name(0x801173A0, "MyYoff2", SN_NOWARN) set_name(0x801173B0, "iscflag", SN_NOWARN) set_name(0x801173BD, "sgbFadedIn", SN_NOWARN) set_name(0x801173BE, "screenbright", SN_NOWARN) set_name(0x801173C0, "faderate", SN_NOWARN) set_name(0x801173C4, "fading", SN_NOWARN) set_name(0x801173E0, "AmShiftTab", SN_NOWARN) set_name(0x80117E08, "tbuff", SN_NOWARN) set_name(0x80117E0C, "HR1", SN_NOWARN) set_name(0x80117E0D, "HR2", SN_NOWARN) set_name(0x80117E0E, "HR3", SN_NOWARN) set_name(0x80117E0F, "VR1", SN_NOWARN) set_name(0x80117E10, "VR2", SN_NOWARN) set_name(0x80117E11, "VR3", SN_NOWARN) set_name(0x80117454, "pHallList", SN_NOWARN) set_name(0x80117458, "nRoomCnt", SN_NOWARN) set_name(0x8011745C, "nSx1", SN_NOWARN) set_name(0x80117460, "nSy1", SN_NOWARN) set_name(0x80117464, "nSx2", SN_NOWARN) set_name(0x80117468, "nSy2", SN_NOWARN) set_name(0x8011740C, "Area_Min", SN_NOWARN) set_name(0x80117410, "Room_Max", SN_NOWARN) set_name(0x80117414, "Room_Min", SN_NOWARN) set_name(0x80117418, "BIG3", SN_NOWARN) set_name(0x80117420, "BIG4", SN_NOWARN) set_name(0x80117428, "BIG6", SN_NOWARN) set_name(0x80117430, "BIG7", SN_NOWARN) set_name(0x80117438, "RUINS1", SN_NOWARN) set_name(0x8011743C, "RUINS2", SN_NOWARN) set_name(0x80117440, "RUINS3", SN_NOWARN) set_name(0x80117444, "RUINS4", SN_NOWARN) set_name(0x80117448, "RUINS5", SN_NOWARN) set_name(0x8011744C, "RUINS6", SN_NOWARN) set_name(0x80117450, "RUINS7", SN_NOWARN) set_name(0x80117E14, "abyssx", SN_NOWARN) set_name(0x80117E18, "lavapool", SN_NOWARN) set_name(0x801174F4, "lockoutcnt", SN_NOWARN) set_name(0x80117478, "L3TITE12", SN_NOWARN) set_name(0x80117480, "L3TITE13", SN_NOWARN) set_name(0x80117488, "L3CREV1", SN_NOWARN) set_name(0x80117490, "L3CREV2", SN_NOWARN) set_name(0x80117498, "L3CREV3", SN_NOWARN) set_name(0x801174A0, "L3CREV4", SN_NOWARN) set_name(0x801174A8, "L3CREV5", SN_NOWARN) set_name(0x801174B0, "L3CREV6", SN_NOWARN) set_name(0x801174B8, "L3CREV7", SN_NOWARN) set_name(0x801174C0, "L3CREV8", SN_NOWARN) set_name(0x801174C8, "L3CREV9", SN_NOWARN) set_name(0x801174D0, "L3CREV10", SN_NOWARN) set_name(0x801174D8, "L3CREV11", SN_NOWARN) set_name(0x801174E0, "L3XTRA1", SN_NOWARN) set_name(0x801174E4, "L3XTRA2", SN_NOWARN) set_name(0x801174E8, "L3XTRA3", SN_NOWARN) set_name(0x801174EC, "L3XTRA4", SN_NOWARN) set_name(0x801174F0, "L3XTRA5", SN_NOWARN) set_name(0x801174F8, "diabquad1x", SN_NOWARN) set_name(0x801174FC, "diabquad2x", SN_NOWARN) set_name(0x80117500, "diabquad3x", SN_NOWARN) set_name(0x80117504, "diabquad4x", SN_NOWARN) set_name(0x80117508, "diabquad1y", SN_NOWARN) set_name(0x8011750C, "diabquad2y", SN_NOWARN) set_name(0x80117510, "diabquad3y", SN_NOWARN) set_name(0x80117514, "diabquad4y", SN_NOWARN) set_name(0x80117518, "SP4x1", SN_NOWARN) set_name(0x8011751C, "SP4y1", SN_NOWARN) set_name(0x80117520, "SP4x2", SN_NOWARN) set_name(0x80117524, "SP4y2", SN_NOWARN) set_name(0x80117528, "l4holdx", SN_NOWARN) set_name(0x8011752C, "l4holdy", SN_NOWARN) set_name(0x8011753C, "SkelKingTrans1", SN_NOWARN) set_name(0x80117544, "SkelKingTrans2", SN_NOWARN) set_name(0x800D4DF8, "SkelKingTrans3", SN_NOWARN) set_name(0x800D4E0C, "SkelKingTrans4", SN_NOWARN) set_name(0x800D4E28, "SkelChamTrans1", SN_NOWARN) set_name(0x8011754C, "SkelChamTrans2", SN_NOWARN) set_name(0x800D4E3C, "SkelChamTrans3", SN_NOWARN) set_name(0x80117638, "DoUiForChooseMonster", SN_NOWARN) set_name(0x800D4E60, "MgToText", SN_NOWARN) set_name(0x800D4EE8, "StoryText", SN_NOWARN) set_name(0x800D4F0C, "dungeon", SN_NOWARN) set_name(0x800D610C, "pdungeon", SN_NOWARN) set_name(0x800D674C, "dflags", SN_NOWARN) set_name(0x8011765C, "setpc_x", SN_NOWARN) set_name(0x80117660, "setpc_y", SN_NOWARN) set_name(0x80117664, "setpc_w", SN_NOWARN) set_name(0x80117668, "setpc_h", SN_NOWARN) set_name(0x8011766C, "setloadflag", SN_NOWARN) set_name(0x80117670, "pMegaTiles", SN_NOWARN) set_name(0x800D6D8C, "nBlockTable", SN_NOWARN) set_name(0x800D7590, "nSolidTable", SN_NOWARN) set_name(0x800D7D94, "nTransTable", SN_NOWARN) set_name(0x800D8598, "nMissileTable", SN_NOWARN) set_name(0x800D8D9C, "nTrapTable", SN_NOWARN) set_name(0x80117674, "dminx", SN_NOWARN) set_name(0x80117678, "dminy", SN_NOWARN) set_name(0x8011767C, "dmaxx", SN_NOWARN) set_name(0x80117680, "dmaxy", SN_NOWARN) set_name(0x80117684, "gnDifficulty", SN_NOWARN) set_name(0x80117688, "currlevel", SN_NOWARN) set_name(0x80117689, "leveltype", SN_NOWARN) set_name(0x8011768A, "setlevel", SN_NOWARN) set_name(0x8011768B, "setlvlnum", SN_NOWARN) set_name(0x8011768C, "setlvltype", SN_NOWARN) set_name(0x80117690, "ViewX", SN_NOWARN) set_name(0x80117694, "ViewY", SN_NOWARN) set_name(0x80117698, "ViewDX", SN_NOWARN) set_name(0x8011769C, "ViewDY", SN_NOWARN) set_name(0x801176A0, "ViewBX", SN_NOWARN) set_name(0x801176A4, "ViewBY", SN_NOWARN) set_name(0x800D95A0, "ScrollInfo", SN_NOWARN) set_name(0x801176A8, "LvlViewX", SN_NOWARN) set_name(0x801176AC, "LvlViewY", SN_NOWARN) set_name(0x801176B0, "btmbx", SN_NOWARN) set_name(0x801176B4, "btmby", SN_NOWARN) set_name(0x801176B8, "btmdx", SN_NOWARN) set_name(0x801176BC, "btmdy", SN_NOWARN) set_name(0x801176C0, "MicroTileLen", SN_NOWARN) set_name(0x801176C4, "TransVal", SN_NOWARN) set_name(0x800D95B4, "TransList", SN_NOWARN) set_name(0x801176C8, "themeCount", SN_NOWARN) set_name(0x800D95D4, "dung_map", SN_NOWARN) set_name(0x800FB894, "dung_map_r", SN_NOWARN) set_name(0x800FC3F8, "dung_map_g", SN_NOWARN) set_name(0x800FCF5C, "dung_map_b", SN_NOWARN) set_name(0x800FDAC0, "MinisetXY", SN_NOWARN) set_name(0x80117654, "pSetPiece", SN_NOWARN) set_name(0x80117658, "DungSize", SN_NOWARN) set_name(0x800FDC8C, "theme", SN_NOWARN) set_name(0x80117708, "numthemes", SN_NOWARN) set_name(0x8011770C, "zharlib", SN_NOWARN) set_name(0x80117710, "armorFlag", SN_NOWARN) set_name(0x80117711, "bCrossFlag", SN_NOWARN) set_name(0x80117712, "weaponFlag", SN_NOWARN) set_name(0x80117714, "themex", SN_NOWARN) set_name(0x80117718, "themey", SN_NOWARN) set_name(0x8011771C, "themeVar1", SN_NOWARN) set_name(0x80117720, "bFountainFlag", SN_NOWARN) set_name(0x80117721, "cauldronFlag", SN_NOWARN) set_name(0x80117722, "mFountainFlag", SN_NOWARN) set_name(0x80117723, "pFountainFlag", SN_NOWARN) set_name(0x80117724, "tFountainFlag", SN_NOWARN) set_name(0x80117725, "treasureFlag", SN_NOWARN) set_name(0x80117728, "ThemeGoodIn", SN_NOWARN) set_name(0x800FDB6C, "ThemeGood", SN_NOWARN) set_name(0x800FDB7C, "trm5x", SN_NOWARN) set_name(0x800FDBE0, "trm5y", SN_NOWARN) set_name(0x800FDC44, "trm3x", SN_NOWARN) set_name(0x800FDC68, "trm3y", SN_NOWARN) set_name(0x801177E0, "nummissiles", SN_NOWARN) set_name(0x800FDEA4, "missileactive", SN_NOWARN) set_name(0x800FE098, "missileavail", SN_NOWARN) set_name(0x801177E4, "MissilePreFlag", SN_NOWARN) set_name(0x800FE28C, "missile", SN_NOWARN) set_name(0x801177E5, "ManashieldFlag", SN_NOWARN) set_name(0x801177E6, "ManashieldFlag2", SN_NOWARN) set_name(0x800FDE1C, "XDirAdd", SN_NOWARN) set_name(0x800FDE3C, "YDirAdd", SN_NOWARN) set_name(0x801177CD, "fadetor", SN_NOWARN) set_name(0x801177CE, "fadetog", SN_NOWARN) set_name(0x801177CF, "fadetob", SN_NOWARN) set_name(0x800FDE5C, "ValueTable", SN_NOWARN) set_name(0x800FDE6C, "StringTable", SN_NOWARN) set_name(0x80100B3C, "monster", SN_NOWARN) set_name(0x80117844, "nummonsters", SN_NOWARN) set_name(0x801062BC, "monstactive", SN_NOWARN) set_name(0x8010644C, "monstkills", SN_NOWARN) set_name(0x801065DC, "Monsters", SN_NOWARN) set_name(0x80117848, "monstimgtot", SN_NOWARN) set_name(0x8011784C, "totalmonsters", SN_NOWARN) set_name(0x80117850, "uniquetrans", SN_NOWARN) set_name(0x80117E1C, "sgbSaveSoundOn", SN_NOWARN) set_name(0x80117818, "offset_x", SN_NOWARN) set_name(0x80117820, "offset_y", SN_NOWARN) set_name(0x80117800, "left", SN_NOWARN) set_name(0x80117808, "right", SN_NOWARN) set_name(0x80117810, "opposite", SN_NOWARN) set_name(0x801177F4, "nummtypes", SN_NOWARN) set_name(0x801177F8, "animletter", SN_NOWARN) set_name(0x8010099C, "MWVel", SN_NOWARN) set_name(0x80117828, "rnd5", SN_NOWARN) set_name(0x8011782C, "rnd10", SN_NOWARN) set_name(0x80117830, "rnd20", SN_NOWARN) set_name(0x80117834, "rnd60", SN_NOWARN) set_name(0x80100ABC, "AiProc", SN_NOWARN) set_name(0x80106AB4, "monsterdata", SN_NOWARN) set_name(0x801084F4, "MonstConvTbl", SN_NOWARN) set_name(0x80108574, "MonstAvailTbl", SN_NOWARN) set_name(0x801085E4, "UniqMonst", SN_NOWARN) set_name(0x8010689C, "TransPals", SN_NOWARN) set_name(0x8010679C, "StonePals", SN_NOWARN) set_name(0x80108F34, "portal", SN_NOWARN) set_name(0x8011786C, "portalindex", SN_NOWARN) set_name(0x80108F14, "WarpDropX", SN_NOWARN) set_name(0x80108F24, "WarpDropY", SN_NOWARN) set_name(0x8011788C, "invflag", SN_NOWARN) set_name(0x8011788D, "drawsbarflag", SN_NOWARN) set_name(0x80117890, "InvBackY", SN_NOWARN) set_name(0x80117894, "InvCursPos", SN_NOWARN) set_name(0x80109614, "InvSpareSlot", SN_NOWARN) set_name(0x801096A8, "InvSlotTable", SN_NOWARN) set_name(0x80117898, "InvBackAY", SN_NOWARN) set_name(0x8011789C, "InvSel", SN_NOWARN) set_name(0x801178A0, "ItemW", SN_NOWARN) set_name(0x801178A4, "ItemH", SN_NOWARN) set_name(0x801178A8, "ItemNo", SN_NOWARN) set_name(0x801178AC, "InvSpareFlag", SN_NOWARN) set_name(0x801178B0, "BRect", SN_NOWARN) set_name(0x8011787C, "InvPanelTData", SN_NOWARN) set_name(0x80117880, "InvGfxTData", SN_NOWARN) set_name(0x80108F94, "AP2x2Tbl", SN_NOWARN) set_name(0x80108FBC, "InvRect", SN_NOWARN) set_name(0x8010920C, "InvGfxTable", SN_NOWARN) set_name(0x801094AC, "InvItemWidth", SN_NOWARN) set_name(0x80109560, "InvItemHeight", SN_NOWARN) set_name(0x80117884, "sgdwLastTime", SN_NOWARN) set_name(0x80117888, "InvSpareSel", SN_NOWARN) set_name(0x801178C1, "automapflag", SN_NOWARN) set_name(0x801096F4, "automapview", SN_NOWARN) set_name(0x801097BC, "automaptype", SN_NOWARN) set_name(0x801178C2, "AMLWallFlag", SN_NOWARN) set_name(0x801178C3, "AMRWallFlag", SN_NOWARN) set_name(0x801178C4, "AMLLWallFlag", SN_NOWARN) set_name(0x801178C5, "AMLRWallFlag", SN_NOWARN) set_name(0x801178C6, "AMDirtFlag", SN_NOWARN) set_name(0x801178C7, "AMColumnFlag", SN_NOWARN) set_name(0x801178C8, "AMStairFlag", SN_NOWARN) set_name(0x801178C9, "AMLDoorFlag", SN_NOWARN) set_name(0x801178CA, "AMLGrateFlag", SN_NOWARN) set_name(0x801178CB, "AMLArchFlag", SN_NOWARN) set_name(0x801178CC, "AMRDoorFlag", SN_NOWARN) set_name(0x801178CD, "AMRGrateFlag", SN_NOWARN) set_name(0x801178CE, "AMRArchFlag", SN_NOWARN) set_name(0x801178D0, "AutoMapX", SN_NOWARN) set_name(0x801178D4, "AutoMapY", SN_NOWARN) set_name(0x801178D8, "AutoMapXOfs", SN_NOWARN) set_name(0x801178DC, "AutoMapYOfs", SN_NOWARN) set_name(0x801178E0, "AMPlayerX", SN_NOWARN) set_name(0x801178E4, "AMPlayerY", SN_NOWARN) set_name(0x80117F78, "GazTick", SN_NOWARN) set_name(0x8011E2C8, "RndTabs", SN_NOWARN) set_name(0x800A262C, "DefaultRnd", SN_NOWARN) set_name(0x80117FA0, "PollFunc", SN_NOWARN) set_name(0x80117F84, "MsgFunc", SN_NOWARN) set_name(0x80117FD0, "ErrorFunc", SN_NOWARN) set_name(0x80117EA4, "MemInitBlocks", SN_NOWARN) set_name(0x8011C260, "MemHdrBlocks", SN_NOWARN) set_name(0x80117EA8, "FreeBlocks", SN_NOWARN) set_name(0x80117EAC, "LastError", SN_NOWARN) set_name(0x80117EB0, "TimeStamp", SN_NOWARN) set_name(0x80117EB4, "FullErrorChecking", SN_NOWARN) set_name(0x80117EB8, "LastAttemptedAlloc", SN_NOWARN) set_name(0x80117EBC, "LastDeallocedBlock", SN_NOWARN) set_name(0x80117EC0, "VerbLev", SN_NOWARN) set_name(0x80117EC4, "NumOfFreeHdrs", SN_NOWARN) set_name(0x80117EC8, "LastTypeAlloced", SN_NOWARN) set_name(0x80117ECC, "AllocFilter", SN_NOWARN) set_name(0x800A2664, "GalErrors", SN_NOWARN) set_name(0x800A268C, "PhantomMem", SN_NOWARN) set_name(0x80117ED0, "ActiveTasks", SN_NOWARN) set_name(0x80117ED4, "CurrentTask", SN_NOWARN) set_name(0x80117ED8, "T", SN_NOWARN) set_name(0x80117EDC, "MemTypeForTasker", SN_NOWARN) set_name(0x8011CC60, "SchEnv", SN_NOWARN) set_name(0x80117EE0, "ExecId", SN_NOWARN) set_name(0x80117EE4, "ExecMask", SN_NOWARN) set_name(0x80117EE8, "TasksActive", SN_NOWARN) set_name(0x80117EEC, "EpiFunc", SN_NOWARN) set_name(0x80117EF0, "ProFunc", SN_NOWARN) set_name(0x80117EF4, "EpiProId", SN_NOWARN) set_name(0x80117EF8, "EpiProMask", SN_NOWARN) set_name(0x80117EFC, "DoTasksPrologue", SN_NOWARN) set_name(0x80117F00, "DoTasksEpilogue", SN_NOWARN) set_name(0x80117F04, "StackFloodCallback", SN_NOWARN) set_name(0x80117F08, "ExtraStackProtection", SN_NOWARN) set_name(0x80117F0C, "ExtraStackSizeLongs", SN_NOWARN) set_name(0x80117F8C, "LastPtr", SN_NOWARN) set_name(0x800A26B4, "WorkMemInfo", SN_NOWARN) set_name(0x8011CC90, "buf", SN_NOWARN) set_name(0x800A26BC, "NULL_REP", SN_NOWARN)
174343
from extract_place import extract_place from compress_dataset import compress benchmark_dir = './benchmark/' path_to_json = './benchmark/JsonFile/' compressed_data = "./data/data.hdf5" OTA1 = 'Telescopic_Three_stage' OTA2 = 'Telescopic_Three_stage_1' OTA3 = 'Core_test_flow' OTA4 = 'Core_FF' # Extract raw feature images print("Extracting Features for OTA1:", OTA1) extract_place.main(benchmark_dir, path_to_json, OTA1) print("Extracting Features for OTA2:", OTA2) extract_place.main(benchmark_dir, path_to_json, OTA2) print("Extracting Features for OTA3:", OTA3) extract_place.main(benchmark_dir, path_to_json, OTA3) print("Extracting Features for OTA4:", OTA4) extract_place.main(benchmark_dir, path_to_json, OTA4) # Compress and data labeling args = { "name" : "OTA1", "file" : benchmark_dir + OTA1, "label" : "Offset_Voltage", "perc" : 75, "balance": True } print("Settings", args) compressor = compress.compress() compressor.saveDesign(args, compressed_data) args['balance'] = False print("Settings", args) compressor = compress.compress() compressor.saveDesign(args, compressed_data) args['name'] = 'OTA2' args['file'] = benchmark_dir + OTA2 print("Settings", args) compressor = compress.compress() compressor.saveDesign(args, compressed_data) args['name'] = 'OTA3' args['file'] = benchmark_dir + OTA3 print("Settings", args) compressor = compress.compress() compressor.saveDesign(args, compressed_data) args['name'] = 'OTA4' args['file'] = benchmark_dir + OTA4 args['label'] = "CMRR" args['perc'] = 25 print("Settings", args) compressor = compress.compress() compressor.saveDesign(args, compressed_data)
174351
import pytest from mongoengine import connect @pytest.fixture def setup_mongo(): connect(host='mongomock://localhost', db='graphene-mongo-extras')
174404
from tqdm import * from sklearn.neighbors import BallTree from .batch_generator import * from .ReadWriteLock import ReadWriteLock class CenterBatchGenerator(BatchGenerator): """ creates batches where the blobs are centered around a specific point in the grid cell """ def __init__(self, dataset, batch_size, num_points, grid_spacing, augmentation=False, metric='euclidean'): self._rw_lock = ReadWriteLock() super().__init__(dataset, batch_size, num_points, augmentation) self._grid_spacing = grid_spacing self._shuffle_train = True self._shuffle_test = True # TODO make min_num_points_per_block variable self.min_num_points_per_block = 5 self._ball_trees = self._calc_ball_trees(metric=metric) self._pc_center_pos = self._generate_center_positions() @property def ball_trees(self): return self._ball_trees @property def pc_center_pos(self): return self._pc_center_pos @property def test_sample_idx(self): # after shuffling we need to recalculate the indices if self._shuffle_test: self._test_sample_idx_cache = self.pc_center_pos[np.isin(self.pc_center_pos[:, 0], self.dataset.test_pc_idx)] self._shuffle_test = False return self._test_sample_idx_cache @property def train_sample_idx(self): # after shuffling we need to recalculate the indices if self._shuffle_train: self._train_sample_idx_cache = self.pc_center_pos[np.isin(self.pc_center_pos[:, 0], self.dataset.train_pc_idx)] self._shuffle_train = False return self._train_sample_idx_cache @staticmethod def _sample_data(data, num_sample): """ data is in N x ... we want to keep num_samplexC of them. if N > num_sample, we will randomly keep num_sample of them. if N < num_sample, we will randomly duplicate samples. """ N = data.shape[0] if N == num_sample: return data, range(N) elif N > num_sample: sample = np.random.choice(N, num_sample) return data[sample, ...], sample else: sample = np.random.choice(N, num_sample - N) dup_data = data[sample, ...] return np.concatenate([data, dup_data], 0), list(range(N)) + (list(sample)) def _calc_ball_trees(self, metric='euclidean'): ball_trees = [] for pointcloud_data in tqdm(self.dataset.data, desc='Ball trees have to be calculated from scratch'): ball_trees.append(BallTree(pointcloud_data[:, :2], metric=metric)) return ball_trees @abstractmethod def _generate_blob(self, index, train=True, aug_trans=True): raise NotImplementedError('Should be defined in subclass') def shuffle(self): self._rw_lock.acquire_write() try: self._shuffle_train = True self._shuffle_test = True # Randomly shuffle training data from epoch np.random.shuffle(self.pc_center_pos) finally: self._rw_lock.release_write() def _generate_center_positions(self): """ Generate blob positions while making sure the grid stays inside the pointcloud bounding box :return: (point_cloud_id, pos_x, pos_y) """ room_pos_list = [] for room_id, room_data in enumerate(tqdm(self.dataset.data, desc='Calculate center positions')): room_maxs = np.amax(room_data[:, 0:2], axis=0) room_mins = np.amin(room_data[:, 0:2], axis=0) room_size = room_maxs - room_mins num_blobs = np.ceil(room_size / self._grid_spacing) num_blobs = num_blobs - np.array([1, 1]) + 1 if num_blobs[0] <= 0: num_blobs[0] = 1 if num_blobs[1] <= 0: num_blobs[1] = 1 ctrs = [[room_mins[0] + x * self._grid_spacing + self._grid_spacing / 2.0, room_mins[1] + y * self._grid_spacing + self._grid_spacing / 2.0] for x in range(int(num_blobs[0])) for y in range(int(num_blobs[1]))] blob_point_ids_all = self.ball_trees[room_id].query_radius(np.reshape(ctrs, [-1, 2]), r=self._grid_spacing / 2.0) blob_point_ids_all = np.reshape(blob_point_ids_all, [-1, 1]) ctrs = np.reshape(ctrs, [-1, 1, 2]) for i in range(np.shape(ctrs)[0]): npoints = 0 for j in range(np.shape(ctrs)[1]): npoints = npoints + np.shape(blob_point_ids_all[i, j])[0] if npoints >= self.min_num_points_per_block: # TODO CHECK IF MINPOINTS 5 IS GOOD room_pos_list.append(np.reshape(np.array([room_id, ctrs[i, 0, 0], ctrs[i, 0, 1]]), (1, 3))) return np.concatenate(room_pos_list) if __name__ == '__main__': pass
174414
from typing import List from jivago.config.router.router_builder import RouterBuilder from jivago.inject.service_locator import ServiceLocator class AbstractContext(object): INSTANCE: "AbstractContext" = None def __init__(self): self.serviceLocator = ServiceLocator() AbstractContext.INSTANCE = self self.serviceLocator.bind(ServiceLocator, self.serviceLocator) def configure_service_locator(self): raise NotImplementedError def service_locator(self) -> ServiceLocator: return self.serviceLocator def get_views_folder_path(self) -> str: raise NotImplementedError def get_config_file_locations(self) -> List[str]: raise NotImplementedError def create_router_config(self) -> RouterBuilder: raise NotImplementedError def get_banner(self) -> List[str]: return """ _ _ | (_) | |___ ____ _ __ _ ___ _ | | \ \ / / _` |/ _` |/ _ \ | |__| | |\ V / (_| | (_| | (_) | \____/|_| \_/ \__,_|\__, |\___/ __/ | |___/ """.split("\n")
174427
from __future__ import annotations import logging from functools import partial from typing import Any, List, Optional, Tuple, Type, Union, cast from nuplan.common.actor_state.vehicle_parameters import VehicleParameters, get_pacifica_parameters from nuplan.common.maps.nuplan_map.map_factory import NuPlanMapFactory from nuplan.database.nuplan_db.nuplandb_wrapper import NuPlanDBWrapper from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario from nuplan.planning.scenario_builder.abstract_scenario_builder import AbstractScenarioBuilder from nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario import NuPlanScenario from nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_filter_utils import ( FilterWrapper, ScenarioDict, create_all_scenarios, create_scenarios_by_tokens, create_scenarios_by_types, filter_by_map_names, filter_invalid_goals, filter_num_scenarios_per_type, filter_total_num_scenarios, scenario_dict_to_list, ) from nuplan.planning.scenario_builder.nuplan_db.nuplan_scenario_utils import ScenarioMapping from nuplan.planning.scenario_builder.scenario_filter import ScenarioFilter from nuplan.planning.simulation.trajectory.trajectory_sampling import TrajectorySampling from nuplan.planning.utils.multithreading.worker_pool import WorkerPool logger = logging.getLogger(__name__) class NuPlanScenarioBuilder(AbstractScenarioBuilder): """Builder class for constructing nuPlan scenarios for training and simulation.""" def __init__( self, data_root: str, map_root: str, db_files: Optional[Union[List[str], str]], map_version: str, max_workers: Optional[int] = None, verbose: bool = True, scenario_mapping: Optional[ScenarioMapping] = None, vehicle_parameters: Optional[VehicleParameters] = None, ground_truth_predictions: Optional[TrajectorySampling] = None, ): """ Initialize scenario builder that filters and retrieves scenarios from the nuPlan dataset. :param data_root: Local data root for loading (or storing downloaded) the log databases. If `db_files` is not None, all downloaded databases will be stored to this data root. :param map_root: Local map root for loading (or storing downloaded) the map database. :param db_files: Path to load the log database(s) from. It can be a local/remote path to a single database, list of databases or dir of databases. If None, all database filenames found under `data_root` will be used. :param map_version: Version of map database to load. The map database is passed to each loaded log database. :param max_workers: Maximum number of workers to use when loading the databases concurrently. Only used when the number of databases to load is larger than this parameter. :param verbose: Whether to print progress and details during the database loading and scenario building. :param scenario_mapping: Mapping of scenario types to extraction information. :param vehicle_parameters: Vehicle parameters for this db. """ self._data_root = data_root self._map_root = map_root self._db_files = db_files self._map_version = map_version self._max_workers = max_workers self._verbose = verbose self._ground_truth_predictions = ground_truth_predictions self._scenario_mapping = scenario_mapping if scenario_mapping is not None else ScenarioMapping({}) self._vehicle_parameters = vehicle_parameters if vehicle_parameters is not None else get_pacifica_parameters() self._db = NuPlanDBWrapper( data_root=data_root, map_root=map_root, db_files=db_files, map_version=map_version, max_workers=max_workers, verbose=verbose, ) def __reduce__(self) -> Tuple[Type[NuPlanScenarioBuilder], Tuple[Any, ...]]: """ :return: tuple of class and its constructor parameters, this is used to pickle the class """ return self.__class__, ( self._data_root, self._map_root, self._db_files, self._map_version, self._max_workers, self._verbose, self._scenario_mapping, self._vehicle_parameters, self._ground_truth_predictions, ) @classmethod def get_scenario_type(cls) -> Type[AbstractScenario]: """Inherited. See superclass.""" return cast(Type[AbstractScenario], NuPlanScenario) def get_map_factory(self) -> NuPlanMapFactory: """Inherited. See superclass.""" return NuPlanMapFactory(self._db.maps_db) def _create_scenarios(self, scenario_filter: ScenarioFilter, worker: WorkerPool) -> ScenarioDict: """ Creates a scenario dictionary with scenario type as key and list of scenarios for each type. :param scenario_filter: Structure that contains scenario filtering instructions. :param worker: Worker pool for concurrent scenario processing. :return: Constructed scenario dictionary. """ if scenario_filter.scenario_tokens is not None: # Filter scenarios by desired scenario tokens scenario_dict = create_scenarios_by_tokens( scenario_filter.scenario_tokens, self._db, scenario_filter.log_names, scenario_filter.expand_scenarios, self._vehicle_parameters, self._ground_truth_predictions, ) elif scenario_filter.scenario_types is not None: # Filter scenarios by desired scenario types scenario_dict = create_scenarios_by_types( scenario_filter.scenario_types, self._db, scenario_filter.log_names, scenario_filter.expand_scenarios, self._scenario_mapping, self._vehicle_parameters, self._ground_truth_predictions, ) else: # Use all scenarios from each scene scenario_dict = create_all_scenarios( self._db, scenario_filter.log_names, scenario_filter.expand_scenarios, self._vehicle_parameters, worker, self._ground_truth_predictions, ) return scenario_dict def _create_filter_wrappers(self, scenario_filter: ScenarioFilter, worker: WorkerPool) -> List[FilterWrapper]: """ Creates a series of filter wrappers that will be applied sequentially to construct the list of scenarios. :param scenario_filter: Structure that contains scenario filtering instructions. :param worker: Worker pool for concurrent scenario processing. :return: Series of filter wrappers. """ filters = [ FilterWrapper( fn=partial(filter_by_map_names, map_names=scenario_filter.map_names, db=self._db), enable=(scenario_filter.map_names is not None), name='map_names', ), FilterWrapper( fn=partial( filter_num_scenarios_per_type, num_scenarios_per_type=scenario_filter.num_scenarios_per_type, randomize=scenario_filter.shuffle, ), enable=(scenario_filter.num_scenarios_per_type is not None), name='num_scenarios_per_type', ), FilterWrapper( fn=partial( filter_total_num_scenarios, limit_total_scenarios=scenario_filter.limit_total_scenarios, randomize=scenario_filter.shuffle, ), enable=(scenario_filter.limit_total_scenarios is not None), name='limit_total_scenarios', ), FilterWrapper( fn=partial(filter_invalid_goals, worker=worker), enable=scenario_filter.remove_invalid_goals, name='remove_invalid_goals', ), ] return filters def get_scenarios(self, scenario_filter: ScenarioFilter, worker: WorkerPool) -> List[AbstractScenario]: """Implemented. See interface.""" # Create scenario dictionary and series of filters to apply scenario_dict = self._create_scenarios(scenario_filter, worker) filter_wrappers = self._create_filter_wrappers(scenario_filter, worker) # Apply filtering strategy sequentially to the scenario dictionary for filter_wrapper in filter_wrappers: scenario_dict = filter_wrapper.run(scenario_dict) return scenario_dict_to_list(scenario_dict, shuffle=scenario_filter.shuffle) # type: ignore
174435
import re from typing import List from dtags.files import COMP_FILE, DEST_FILE, get_file_path ANSI_ESCAPE = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") def clean_str(value: str) -> str: return ANSI_ESCAPE.sub("", value) def load_completion() -> List[str]: with open(get_file_path(COMP_FILE)) as fp: return sorted(tag for tag in fp.read().split(" ") if tag) def load_destination() -> str: with open(get_file_path(DEST_FILE)) as fp: return fp.read().strip()
174491
import os import curses import numpy as np from pathlib import Path ROOT = Path("terminal_dungeon") WALL_DIR = ROOT / "wall_textures" SPRITE_DIR = ROOT / "sprite_textures" def clamp(mi, val, ma): return max(min(ma, val), mi) class Renderer: """ Graphic engine. Casts rays. Casts sprites. Kicks ass. Notes ----- If one wanted to add ceiling/floor textures, weapons, or anything new, just add a method """ max_hops = 20 # How far rays are cast. # Shading constants -- Modifying ascii_map should be safe. ascii_map = np.array(list(' .,:;<+*LtCa4U80dQM@')) shades = len(ascii_map) - 1 side_shade = (shades + 1) // 5 shade_dif = shades - side_shade _textures_on = True minimap_width = .2 # Fraction of screen minimap_height = .3 minimap_pos = 5, 5 # minimap's lower-right corner's offset from screen's lower-right corner pad = 50 # How much extra space is added around the edge of the mini-map -- for large terminals this will need to be increased. def __init__(self, screen, player, wall_textures=None, sprite_textures=None): self.screen = screen self.resize() self.player = player self.game_map = player.game_map self.mini_map = np.pad(np.where(self.game_map._map.T, '#', ' '), self.pad, constant_values=' ') self._load_textures(wall_textures or [ ], sprite_textures or [ ]) @property def textures_on(self): return self.wall_textures and self._textures_on def toggle_textures(self): self._textures_on = not self._textures_on def resize(self): try: # linux w, h = os.get_terminal_size() curses.resizeterm(h, w) except: # windows h, w = self.screen.getmaxyx() w -= 1 self.height = h self.width = w self.angle_increment = 1 / w self.floor_y = h // 2 self.distances = np.zeros(w) self.buffer = np.full((h, w), " ") def _load_textures(self, wall_textures, sprite_textures): # Wall textures will be integer arrays, while sprite textures are character arrays. # This because the values in wall textures will add or subtract brightness to the current wall shading. # If we used character arrays for walls, we wouldn't have different shades for N/S and E/W walls and # walls further away wouldn't be dimmer, diminishing the 3d effect. # This could be changed though, and would simplify some of the texture drawing logic in `cast_ray`. self.wall_textures = [ ] for name in wall_textures: wall_lines = (WALL_DIR / (name + ".txt")).read_text().splitlines() wall_as_integer_array = [list(map(int, line)) for line in wall_lines] self.wall_textures.append(np.array(wall_as_integer_array).T) self.sprite_textures = { } for name in sprite_textures: sprite_lines = (SPRITE_DIR / (name + ".txt")).read_text().splitlines() sprite_as_character_array = list(map(list, sprite_lines)) self.sprite_textures[name] = np.array(sprite_as_character_array).T def cast_ray(self, column): """ Cast rays and draw columns whose heights correspond to the distance a ray traveled until it hit a wall. """ player = self.player ray_angle = np.array((1, 2 * column * self.angle_increment - 1)) @ player.cam map_pos = player.pos.astype(int) delta = abs(1 / ray_angle) step = np.sign(ray_angle) side_dis = step * (np.heaviside(step, 1) - player.pos % 1) * delta # Cast a ray until we hit a wall or hit max_hops for _ in range(self.max_hops): side = 0 if side_dis[0] < side_dis[1] else 1 side_dis[side] += delta[side] map_pos[side] += step[side] if self.game_map[map_pos]: break else: # No walls in range self.distances[column] = float("inf") return # Not euclidean distance to avoid fish-eye effect. wall_dis = (map_pos[side] - player.pos[side] + (0 if step[side] == 1 else 1)) / ray_angle[side] # Save distance for sprite calculations. self.distances[column] = wall_dis h = self.height line_height = int(h / wall_dis) # if wall_dis else h -- possible divide-by-0 error if line_height == 0: return # Draw nothing jump_height = player.z * line_height line_start = max(0, int((h - line_height) / 2 + jump_height)) line_end = min(h, int((h + line_height) / 2 + jump_height)) drawn_height = line_end - line_start shade = min(drawn_height, self.shade_dif) shade += 0 if side else self.side_shade # One side is brighter shade_buffer = np.full(drawn_height, shade) if self.textures_on: tex = self.wall_textures[self.game_map[map_pos] - 1] texture_width, texture_height = tex.shape wall_x = (player.pos[1 - side] + wall_dis * ray_angle[1 - side]) % 1 tex_x = int(wall_x * texture_width) if (-1 if side == 1 else 1) * ray_angle[side] < 0: tex_x = texture_width - tex_x - 1 offset = (line_height - drawn_height) / 2 ys = np.arange(drawn_height) + offset tex_ys = (ys * texture_height / line_height).astype(int) # Add or subtract texture values to shade values # Note 2 * n - 12 is 0 for n = 6, i.e., values above 6 are additive and # below 6 are subtractive. For larger ascii maps, one may want to use linear # equation with a larger slope. shade_buffer += 2 * tex[tex_x, tex_ys] - 12 np.clip(shade_buffer, 1, self.shades, out=shade_buffer) self.buffer[line_start:line_end, column] = self.ascii_map[shade_buffer] def cast_sprites(self): buffer = self.buffer player = self.player h = self.height w = self.width sprites = self.game_map.sprites for sprite in sprites: # Relative position of sprite to player sprite.relative = player.pos - sprite.pos sprites.sort() # Camera Inverse used to calculate transformed position of sprites. cam_inv = np.linalg.inv(-player.cam[::-1]) for sprite in sprites: # Draw each sprite from furthest to closest. # Transformed position of sprites due to camera position x, y = sprite.relative @ cam_inv if y <= 0: # Sprite is behind player, don't draw it. continue # Sprite x-position on screen sprite_x = int(w / 2 * (1 + x / y)) sprite_height = int(h / y) sprite_width = int(w / y / 2) if sprite_height == 0 or sprite_width == 0: # Sprite too small. continue jump_height = player.z * sprite_height start_y = clamp(0, int((h - sprite_height) / 2 + jump_height), h) end_y = clamp(0, int((h + sprite_height) / 2 + jump_height), h) start_x = clamp(0, -sprite_width // 2 + sprite_x, w) end_x = clamp(0, sprite_width // 2 + sprite_x, w) columns = np.arange(start_x, end_x) columns = columns[(0 <= columns) & (columns <= w) & (y <= self.distances[columns])] tex = self.sprite_textures[sprite.tex] tex_width, tex_height = tex.shape clip_y = (sprite_height - h) / 2 - jump_height tex_ys = np.clip((np.arange(start_y, end_y) + clip_y) * tex_height / sprite_height, 0, None).astype(int) clip_x = sprite_x - sprite_width / 2 tex_xs = ((columns - clip_x) * tex_width / sprite_width).astype(int) tex_rect = tex[tex_xs][:, tex_ys].T buffer[start_y:end_y, columns] = np.where(tex_rect != "0", tex_rect, buffer[start_y:end_y, columns]) def draw_minimap(self): x_offset, y_offset = self.minimap_pos width = int(self.minimap_width * self.width) width += width % 2 hw = width // 2 height = int(self.minimap_height * self.height) height += height % 2 hh = height // 2 # half-height x, y = self.player.pos.astype(int) + self.pad r = -height - y_offset c = -width - x_offset self.buffer[r: -y_offset, c: -x_offset] = self.mini_map[y - hh: y + hh, x - hw: x + hw] self.buffer[r + hh, c + hw] = '@' def update(self): self.buffer[:, :] = " " # Clear buffer self.buffer[self.floor_y:, ::2] = self.ascii_map[1] # Draw floor for column in range(self.width): # Draw walls self.cast_ray(column) self.cast_sprites() self.draw_minimap() # Push buffer to screen for row_num, row in enumerate(self.buffer): self.screen.addstr(row_num, 0, ''.join(row)) self.screen.refresh()
174503
import cherrypy from paste.translogger import TransLogger from flask import Flask, request, abort, jsonify, make_response import json import os from utils import decode_string from DeepRecommender.reco_encoder.data import input_layer_api, input_layer from DeepRecommender.reco_encoder.model import model import torch from torch.autograd import Variable from parameters import * # app app = Flask(__name__) BAD_REQUEST = 400 STATUS_OK = 200 NOT_FOUND = 404 SERVER_ERROR = 500 @app.errorhandler(BAD_REQUEST) def bad_request(error): return make_response(jsonify({'error': 'Bad request'}), BAD_REQUEST) @app.errorhandler(NOT_FOUND) def not_found(error): return make_response(jsonify({'error': 'Not found'}), NOT_FOUND) @app.errorhandler(SERVER_ERROR) def server_error(error): return make_response(jsonify({'error': 'Server Internal Error'}), SERVER_ERROR) def run_server(): # Enable WSGI access logging via Paste app_logged = TransLogger(app) # Mount the WSGI callable object (app) on the root directory cherrypy.tree.graft(app_logged, '/') # Set the configuration of the web server cherrypy.config.update({ 'engine.autoreload_on': True, 'log.screen': True, 'log.access_file': 'access.log', 'log.error_file': "cherrypy.log", 'server.socket_port': 5000, 'server.socket_host': '0.0.0.0', 'server.thread_pool': 50, # 10 is default }) # Start the CherryPy WSGI web server cherrypy.engine.start() cherrypy.engine.block() def load_model_weights(model_architecture, weights_path): if os.path.isfile(weights_path): cherrypy.log("CHERRYPYLOG Loading model from: {}".format(weights_path)) model_architecture.load_state_dict(torch.load(weights_path)) else: raise ValueError("Path not found {}".format(weights_path)) def load_recommender(vector_dim, hidden, activation, dropout, weights_path): rencoder_api = model.AutoEncoder(layer_sizes=[vector_dim] + [int(l) for l in hidden.split(',')], nl_type=activation, is_constrained=False, dp_drop_prob=dropout, last_layer_activations=False) load_model_weights(rencoder_api, weights_path) rencoder_api.eval() rencoder_api = rencoder_api.cuda() return rencoder_api def load_train_data(data_dir): params = dict() params['batch_size'] = 1 params['data_dir'] = data_dir params['major'] = 'users' params['itemIdInd'] = 1 params['userIdInd'] = 0 cherrypy.log("CHERRYPYLOG Loading training data") data_layer = input_layer.UserItemRecDataProvider(params=params) return data_layer def manage_query(dict_query, data_layer): params = dict() params['batch_size'] = 1 params['data_dict'] = dict_query params['major'] = 'users' params['itemIdInd'] = 1 params['userIdInd'] = 0 data_api = input_layer_api.UserItemRecDataProviderAPI(params=params, user_id_map=data_layer.userIdMap, item_id_map=data_layer.itemIdMap) cherrypy.log("CHERRYPYLOG Input data: {}".format(data_api.data)) data_api.src_data = data_layer.data return data_api def evaluate_model(rencoder_api, data_api): result = dict() for i, ((out, src), major_ind) in enumerate(data_api.iterate_one_epoch_eval(for_inf=True)): inputs = Variable(src.cuda().to_dense()) targets_np = out.to_dense().numpy()[0, :] non_zeros = targets_np.nonzero()[0].tolist() outputs = rencoder_api(inputs).cpu().data.numpy()[0, :] for ind in non_zeros: result[ind] = outputs[ind] return result @app.route("/") def index(): return "Yeah, yeah, I highly recommend it" @app.route("/recommend", methods=['POST']) def recommend(): if not request.is_json: abort(BAD_REQUEST) dict_query = request.get_json() dict_query = dict((decode_string(k), decode_string(v)) for k, v in dict_query.items()) data_api = manage_query(dict_query, data_layer) result = evaluate_model(rencoder_api, data_api) cherrypy.log("CHERRYPYLOG Result: {}".format(result)) result = dict((str(k), str(v)) for k,v in result.items()) return make_response(jsonify(result), STATUS_OK) #Load data and model as global variables data_layer = load_train_data(TRAIN) rencoder_api = load_recommender(data_layer.vector_dim, HIDDEN, ACTIVATION, DROPOUT, MODEL_PATH) if __name__ == "__main__": run_server()
174511
import logging from typing import Optional, Union, cast import discord from ddtrace import tracer from discord.errors import DiscordException from discord_slash.context import ComponentContext, InteractionContext from .metrics import add_span_error from .utils import ( CANT_SEND_CODE, DiscordChannel, bot_can_delete_channel, bot_can_read, bot_can_reply_to, bot_can_role, log_warning, suppress, ) logger = logging.getLogger(__name__) bad_users: set[int] = set() @tracer.wrap() async def safe_fetch_user( client: discord.Client, user_xid: int, ) -> Optional[discord.User]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"user_xid": user_xid}) user: Optional[discord.User] if user := client.get_user(user_xid): return user with suppress( DiscordException, log="could not fetch user %(user_xid)s", user_xid=user_xid, ): user = await client.fetch_user(user_xid) return user @tracer.wrap() async def safe_fetch_guild( client: discord.Client, guild_xid: int, ) -> Optional[discord.Guild]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid}) guild: Optional[discord.Guild] if guild := client.get_guild(guild_xid): return guild with suppress( DiscordException, log="could not fetch guild %(guild_xid)s", guild_xid=guild_xid, ): guild = await client.fetch_guild(guild_xid) return guild @tracer.wrap() async def safe_fetch_text_channel( client: discord.Client, guild_xid: int, channel_xid: int, ) -> Optional[discord.TextChannel]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "channel_xid": channel_xid}) # first check our channel cache channel: Optional[DiscordChannel] if channel := client.get_channel(channel_xid): if not isinstance(channel, discord.TextChannel): return None return channel # fallback to hitting the Discord API with suppress( DiscordException, log="in guild %(guild_xid)s, could not fetch channel %(channel_xid)s", guild_xid=guild_xid, channel_xid=channel_xid, ): fetched = await client.fetch_channel(channel_xid) if isinstance(fetched, discord.TextChannel): return fetched # failed to find in cache or via the API return None @tracer.wrap() def safe_get_partial_message( channel: DiscordChannel, guild_xid: int, message_xid: int, ) -> Optional[discord.PartialMessage]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "message_xid": message_xid}) if ( not hasattr(channel, "type") or getattr(channel, "type") != discord.ChannelType.text ): return None if not bot_can_read(channel): return None message: Optional[discord.PartialMessage] = None text_channel = cast(discord.TextChannel, channel) with suppress( DiscordException, log="in guild %(guild_xid)s, could not get partial message %(message_xid)s", guild_xid=guild_xid, message_xid=message_xid, ): message = text_channel.get_partial_message(message_xid) return message @tracer.wrap() async def safe_update_embed( message: Union[discord.Message, discord.PartialMessage], *args, **kwargs, ) -> None: if span := tracer.current_span(): # pragma: no cover span.set_tags({"messsage_xid": message.id}) with suppress( DiscordException, log="could not update embed in message %(message_xid)s", message_xid=message.id, ): await message.edit(*args, **kwargs) @tracer.wrap() async def safe_update_embed_origin(ctx: ComponentContext, *args, **kwargs) -> bool: assert hasattr(ctx, "origin_message_id") if span := tracer.current_span(): # pragma: no cover span.set_tags({"origin_messsage_xid": ctx.origin_message_id}) success: bool = False with suppress( DiscordException, log="could not update origin embed in message %(message_xid)s", message_xid=ctx.origin_message_id, ): await ctx.edit_origin(*args, **kwargs) success = True return success @tracer.wrap() async def safe_create_category_channel( client: discord.Client, guild_xid: int, name: str, ) -> Optional[discord.CategoryChannel]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "name": name}) guild: Optional[discord.Guild] if not (guild := await safe_fetch_guild(client, guild_xid)): return None channel: Optional[discord.CategoryChannel] = None with suppress( DiscordException, log="in guild %(guild_xid)s, could not create category channel", guild_xid=guild_xid, ): channel = await guild.create_category_channel(name) return channel @tracer.wrap() async def safe_create_voice_channel( client: discord.Client, guild_xid: int, name: str, category: Optional[discord.CategoryChannel] = None, ) -> Optional[discord.VoiceChannel]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "name": name}) guild: Optional[discord.Guild] if not (guild := await safe_fetch_guild(client, guild_xid)): return None channel: Optional[discord.VoiceChannel] = None with suppress( DiscordException, log="in guild %(guild_xid)s, could not create voice channel", guild_xid=guild_xid, ): channel = await guild.create_voice_channel(name, category=category) return channel @tracer.wrap() async def safe_ensure_voice_category( client: discord.Client, guild_xid: int, prefix: str, ) -> Optional[discord.CategoryChannel]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "prefix": prefix}) guild: Optional[discord.Guild] if not (guild := await safe_fetch_guild(client, guild_xid)): return None def category_num(cat: discord.CategoryChannel) -> int: try: offset = len(prefix) + 1 return 0 if cat.name == prefix else int(cat.name[offset:]) - 1 except ValueError: return -1 def category_name(i: int) -> str: return prefix if i == 0 else f"{prefix} {i + 1}" available: Optional[discord.CategoryChannel] = None full: list[discord.CategoryChannel] = [] for i, cat in enumerate( sorted( (c for c in guild.categories if c.name.startswith(prefix)), key=category_num, ), ): cat_num = category_num(cat) if cat_num < 0: continue # invalid category name, skip it if i != cat_num: break # there's a missing category, we need to re-create it if len(cat.channels) < 50: available = cat break # we found an available channel, use it full.append(cat) # keep track of how many full channels there are if available: return available return await safe_create_category_channel( client, guild_xid, category_name(len(full)), ) @tracer.wrap() async def safe_create_invite( channel: discord.VoiceChannel, guild_xid: int, max_age: int = 0, ) -> Optional[str]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": guild_xid, "channel_xid": channel.id}) invite: Optional[str] = None with suppress( DiscordException, log="int guild %(guild_xid)s, could create invite for channel %(channel_xid)s", guild_xid=guild_xid, channel_xid=channel.id, ): discord_invite = await channel.create_invite(max_age=max_age) invite = str(discord_invite.url) return invite @tracer.wrap() async def safe_delete_channel( channel: discord.abc.GuildChannel, guild_xid: int, ) -> bool: if span := tracer.current_span(): # pragma: no cover span.set_tag("guild_xid", guild_xid) if not bot_can_delete_channel(channel): return False if not hasattr(channel, "id"): return False channel_xid: int = getattr(channel, "id") if span: # pragma: no cover span.set_tag("channel_xid", channel_xid) success = False with suppress( DiscordException, log="in guild %(guild_xid)s, could not delete channel %(channel_xid)s", guild_xid=guild_xid, channel_xid=channel_xid, ): await channel.delete() success = True return success @tracer.wrap() async def safe_send_channel( ctx: InteractionContext, *args, **kwargs, ) -> Optional[discord.Message]: if span := tracer.current_span(): # pragma: no cover span.set_tags({"guild_xid": ctx.guild_id, "channel_xid": ctx.channel_id}) message: Optional[discord.Message] = None with suppress( DiscordException, log="in guild %(guild_xid)s, could not send message to channel %(channel_xid)s", guild_xid=ctx.guild_id, channel_xid=ctx.channel_id, ): message = await ctx.send(*args, **kwargs) return message @tracer.wrap() async def safe_message_reply(message: discord.Message, *args, **kwargs) -> None: if span := tracer.current_span(): # pragma: no cover span.set_tags({"messsage_xid": message.id}) if not bot_can_reply_to(message): return try: await message.reply(*args, **kwargs) except Exception as ex: add_span_error(ex) logger.debug("debug: %s", ex, exc_info=True) @tracer.wrap() async def safe_send_user( user: Union[discord.User, discord.Member], *args, **kwargs, ) -> None: user_xid = getattr(user, "id", None) if span := tracer.current_span(): # pragma: no cover span.set_tags({"user_xid": user_xid}) if user_xid in bad_users: return log_warning("not sending to bad user %(user)s", user=user) if not hasattr(user, "send"): return log_warning("no send method on user %(user)s", user=user) try: await user.send(*args, **kwargs) except discord.errors.DiscordServerError as ex: add_span_error(ex) log_warning( "discord server error sending to user %(user)s", user=user, exec_info=True, ) except discord.errors.InvalidArgument as ex: add_span_error(ex) log_warning( "could not send message to user %(user)s", user=user, exec_info=True, ) except (discord.errors.Forbidden, discord.errors.HTTPException) as ex: add_span_error(ex) if isinstance(ex, discord.errors.Forbidden) or ex.code == CANT_SEND_CODE: # User may have the bot blocked or they may have DMs only allowed for friends. # Generally speaking, we can safely ignore this sort of error. However, too # many failed API requests can cause our bot to be flagged and rate limited. # It's not clear what can be done to avoid this, but we can maybe mitigate # by flagging the user until the next time we restart. if user_xid is not None: bad_users.add(user_xid) return log_warning( "not allowed to send message to %(user)s", user=user, exec_info=True, ) log_warning( "failed to send message to user %(user)s", user=user, exec_info=True, ) @tracer.wrap() async def safe_add_role( user_or_member: Union[discord.User, discord.Member], guild: discord.Guild, role: str, ) -> None: if span := tracer.current_span(): # pragma: no cover span.set_tags( { "user_xid": getattr(user_or_member, "id", None), "guild_xid": guild.id, "role": role, }, ) try: member = cast( Optional[discord.Member], ( user_or_member if hasattr(user_or_member, "roles") else guild.get_member(cast(discord.User, user_or_member).id) ), ) if not member or not hasattr(member, "roles"): logger.warning( "warning: in guild %s, could not add role: could not find member: %s", guild.id, str(user_or_member), ) return discord_role = discord.utils.find(lambda m: m.name == role, guild.roles) if not discord_role: logger.warning( "warning: in guild %s, could not add role: could not find role: %s", guild.id, str(role), ) return if not bot_can_role(guild): logger.warning( ( "warning: in guild %s, could not add role: " "no permissions to add role: %s" ), guild.id, str(role), ) return await member.add_roles(discord_role) except ( discord.errors.Forbidden, discord.errors.HTTPException, ) as ex: add_span_error(ex) logger.exception( "warning: in guild %s, could not add role to member %s: %s", guild.id, str(user_or_member), ex, exc_info=True, )
174552
from rest_framework import serializers from blog.models import Blog, Category # create serializers class BlogsListSerializer(serializers.ModelSerializer): author = serializers.SerializerMethodField(method_name='get_author') category = serializers.SerializerMethodField(method_name='get_category') def get_author(self,obj): return { "first_name":obj.author.first_name, "last_name":obj.author.last_name, } def get_category(self,obj): category = [cat.title for cat in obj.category.get_queryset().only("title")] return category class Meta: model = Blog exclude = [ 'id', 'likes', 'create', 'body', 'status', 'updated', 'publish', 'visits', 'special', ] class BlogCreateSerializer(serializers.ModelSerializer): category = serializers.SlugRelatedField( many=True, queryset=Category.objects.all(), slug_field='id', ) class Meta: model = Blog fields = [ 'title', 'body', 'image', 'summary', 'category', 'publish', 'special', 'status', ] class BlogDetailUpdateDeleteSerializer(serializers.ModelSerializer): author = serializers.SerializerMethodField(method_name='get_author') slug = serializers.ReadOnlyField() def get_author(self,obj): return { "first_name":obj.author.first_name, "last_name":obj.author.last_name, } likes = serializers.SerializerMethodField(method_name='get_likes') def get_likes(self, obj): return obj.likes.count() class Meta: model = Blog exclude =[ "create", "updated", ] read_only_fields = [ "likes", ] class CategoryListSerializer(serializers.ModelSerializer): parent = serializers.SerializerMethodField(method_name='get_parent') def get_parent(self,obj): return { "title":str(obj.parent), } class Meta: model = Category fields = [ "parent", "title", ]
174557
from django.http import HttpResponse from test_pipeline import test from django.shortcuts import render import base64 import torch.cuda from PIL import Image cat2id = {0:'Bar', 1:'Line', 2:'Pie'} Lock = False def get_group(request): global Lock print("The method is: %s" %request.method) if not Lock: if request.method == 'POST': #print(request.FILES) #print(request.POST) print("Clean Cuda Cache") torch.cuda.empty_cache() Lock = True try: if 'file' in request.FILES.keys(): with open('static/target.png', 'wb') as fout: for chunk in request.FILES['file'].chunks(): fout.write(chunk) if len(request.POST['min']) > 0: min_value = float(request.POST['min']) max_value = float(request.POST['max']) else: min_value = None max_value = None plot_area, image_painted, data, chart_data = test('static/target.png', min_value_official=min_value, max_value_official=max_value) print_data = '' if chart_data[0]==0: if len(request.POST['min']) > 0: min_value = float(request.POST['min']) max_value = float(request.POST['max']) else: min_value = chart_data[3] max_value = chart_data[4] for k in range(len(data)): for j in range(len(data[k])): data[k][j] = round((max_value - min_value) * data[k][j] + min_value, 2) print_data += ('%8.2f' % (data[k][j])) print_data += ' ' print_data += '\n' if chart_data[0] == 1: if len(request.POST['min']) > 0: min_value = float(request.POST['min']) max_value = float(request.POST['max']) else: min_value = chart_data[3] max_value = chart_data[4] for k in range(len(data)): for j in range(len(data[k])): data[k][j] = round((max_value - min_value) * data[k][j] + min_value, 2) print_data += ('%8.2f' % (data[k][j])) print_data += ' ' print_data += '\n' if chart_data[0]==2: for k in range(len(data)): data[k] /= 360 data = [round(x, 2) for x in data] for k in range(len(data)): print_data += ('%8.2f' % (data[k])) print_data += ' ' min_value = 0 max_value = 1 image_painted.save('static/target_draw.png') with open("static/target.png", "rb") as f: base64_data = base64.b64encode(f.read()) str_format_ori = 'data:image/png;base64,' + base64_data.decode() with open("static/target_draw.png", "rb") as f: base64_data = base64.b64encode(f.read()) str_format_tar = 'data:image/png;base64,' + base64_data.decode() context = {'data': print_data, 'image': str_format_ori, 'image_painted': str_format_tar, 'plot_area': plot_area, 'min2max': '%2f:%2f' %(min_value, max_value)} title2string = chart_data[2] if 1 in title2string.keys(): context['ValueAxisTitle'] = title2string[1] else: context['ValueAxisTitle'] = "None" if 2 in title2string.keys(): context['ChartTitle'] = title2string[2] else: context['ChartTitle'] = "None" if 3 in title2string.keys(): context['CategoryAxisTitle'] = title2string[3] else: context['CategoryAxisTitle'] = "None" context['Type'] = cat2id[chart_data[0]] except: print('We met some errors!') Lock = False raise Lock = False return render(request, 'results.html', context) else: return render(request, 'upload.html') else: return render(request, 'onuse.html') type2idFormal = { "Legend" : 0, "ValueAxisTitle" : 1, "ChartTitle" : 2, "CategoryAxisTitle" : 3, "PlotArea" : 4, "InnerPlotArea" : 5}
174595
import os import textfsm def parse_with_textfsm(template, command_output): """ :param template: TextFSM template to parse command :param command_output: Command output from a node :return: List of dicts. Dict per FSM row. """ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), template), "r") as template_file: fsm = textfsm.TextFSM(template_file) fsm_results = fsm.ParseText(command_output) output_list = [] # print fsm.header for index, line in enumerate(fsm_results, 1): # print line textfsm_dict = {} for number, value in enumerate(line): textfsm_dict[fsm.header[number]] = value output_list.append(textfsm_dict) return output_list def parse_with_textfsm_by_first_value(template, command_output): """ :param template: TextFSM template to parse command :param command_output: Command output from a node :return: Dict per first(top) textFSM template value """ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), template), "r") as template_file: fsm = textfsm.TextFSM(template_file) fsm_results = fsm.ParseText(command_output) textfsm_dict = {} # print fsm.header for line in fsm_results: # print line textfsm_dict[line[0]] = {} for number, value in enumerate(line): if value != line[0]: textfsm_dict[line[0]].update({fsm.header[number]: value}) return textfsm_dict if __name__ == '__main__': pass
174601
import torch import torch.nn as nn from torch.autograd import Variable from include import IMG_h from include import CNN_h from include import UI_h import torch.utils.data as Data train_path = 'D:/PycharmProjects/Num_distinguish/train_data/labels.txt' test_path = 'D:/PycharmProjects/Num_distinguish/test_data' train_data = CNN_h.MyDataset(train_path) train_loader = Data.DataLoader(dataset=train_data, batch_size=1, shuffle=True, num_workers=0) cnn = CNN_h.CNN() optimizer = torch.optim.Adam(cnn.parameters(), lr=0.001) loss_func = nn.CrossEntropyLoss() for i in range(10): for step, (x, y) in enumerate(train_loader): real_x = Variable(x) real_y = Variable(y) pre_y = cnn(real_x) loss = loss_func(pre_y, real_y) optimizer.zero_grad() loss.backward() optimizer.step() #print('loss:', float(loss.data)) img_dist = IMG_h.Carlicense_distinguish() img_dist.carlicense_distinguish() test_data = CNN_h.predicted_data(test_path) decode_input = [] for i in range(len(test_data)): pre_test = cnn(test_data[i]) decode_input.append(int(torch.max(pre_test,1)[1].data.numpy().squeeze())) print(CNN_h.decode_output(decode_input)) UI_h.window(CNN_h.decode_output(decode_input))
174613
NODE_LEFT = "LEFT" NODE_RIGHT = "RIGHT" NODE_ROOT = "ROOT" class BinarySearchTree: def __init__(self, value): self.value = value self.left = None self.right = None self.parent = None self.type = None def insert(self, tree): current = self while 1: if tree.value < current.value: if current.left is None: current.left = tree tree.parent = current tree.type = NODE_LEFT return else: current = current.left else: if current.right is None: tree.parent = current current.right = tree tree.type = NODE_RIGHT return else: current = current.right def dig(self): current = self while 1: if current.left is not None: current = current.left elif current.right is not None: current = current.right else: break return current def post_order_traverse(self, on_visit): to_visit = [self] while len(to_visit) > 0: current = to_visit.pop(0) on_visit(current.value) if current.type == NODE_LEFT: if current.parent.right is not None: to_visit.append(current.parent.right.dig()) else: to_visit.append(current.parent) elif current.type == NODE_RIGHT: to_visit.append(current.parent) root = BinarySearchTree(int(input())) root.type = NODE_ROOT try: while 1: child = BinarySearchTree(int(input())) root.insert(child) except EOFError: pass root.dig().post_order_traverse(print)
174614
from django.conf.urls import * from .views import (EventsListView, CreateEventView, EventDetailView, ) urlpatterns = patterns('reactions.views', # just make the reactions list the 'dashboard' for the moment, later # we can snaz this up url(r'reactions/list/$', EventsListView.as_view(), name='dashboard'), url(r'events/list/$', EventsListView.as_view(), name='reactions_list'), url(r'event/new/$', CreateEventView.as_view(), name="create_event"), url(r'event/view/(?P<slug>[a-zA-Z0-9\-]+)/$', EventDetailView.as_view(), name="view_event"), url(r'event/feedback/', 'respond_to_msg', name='respond_to_msg'), )
174640
import random import os from func.question import question from func.file import readJsonFile from func.error import saveError def getExam(path, clear): # 模拟考试(40道单选,10道多选) questionList = readJsonFile(path[0]) examList = [] while len(examList) < 40: flag = random.randint(0, len(questionList) - 1) if len(questionList[flag]['Answer']) == 1: examList.append(questionList[flag]) while len(examList) < 50: flag = random.randint(0, len(questionList) - 1) if len(questionList[flag]['Answer']) > 1: examList.append(questionList[flag]) count = 0 for item in examList: isWrong = question(item, count, len(examList), clear) if isWrong: saveError(path[2], item) count = count+1 os.system(clear) print('考试结束,退出程序...')
174688
from . downscaling_workflow import DownscalingWorkflow, PainteraToBdvWorkflow from . upscaling import UpscalingLocal, UpscalingSlurm, UpscalingLSF from . downscaling import DownscalingLocal, DownscalingSlurm, DownscalingLSF
174704
from tempfile import NamedTemporaryFile import PyPDF4 import urllib import urllib.request import shutil import json import os import sys URL = 'http://ww11.doh.state.fl.us/comm/_partners/covid19_report_archive/cases-monitoring-and-pui-information/state-report/state_reports_latest.pdf' SER_URL = 'http://ww11.doh.state.fl.us/comm/_partners/covid19_report_archive/total-antibody-results/serology-reports/serology_latest.pdf' def atoi(val): '''Raises exception on failure to parse''' if isinstance(val, int): return val return int(val.replace(",", '')) def parse_totals(totals): '''Getting an array of tokens, satrig with the string "Total" returning a tagged dictionary, expecting the order to be. This method handles a couple of formats, depending on the length of the input. If there is a difference in order of values (e.g., swap betwene negatives and positives) this will not be cought here and will be parsed incorrectly. ''' res = None if len(totals) == 6: # expected: # ["Title", Inconclusive, Negative, Positive, Percent Positive, Total] # Or # ["title", "Positive", "Negative", "Inconclusive", "Total", "Percent positivity"] if totals[-1].strip().endswith("%"): res = { 'Inconclusive': atoi(totals[3]), 'Negative': atoi(totals[2]), 'Positive': atoi(totals[1]), 'Total': atoi(totals[4]) } else: res = { 'Inconclusive': atoi(totals[1]), 'Negative': atoi(totals[2]), 'Positive': atoi(totals[3]), 'Total': atoi(totals[5]) } elif len(totals) == 5: # expected: # ["Total", Negative, Positive, Percent Positive, Total] res = { 'Negative': atoi(totals[1]), 'Positive': atoi(totals[2]), 'Total': atoi(totals[4]) } else: print("\tTotals have some other format?") print(totals) return res def get_antibody_tests(pages): people_page = pages[0] lines = people_page.splitlines() index = lines.index("Total tested") interesting = lines[index:index+10] # quick map: mapping = { 'Total tested': 'Total_people', 'Positive': 'Positive_people', 'Negative': 'Negative_people', 'Inconclusive': 'Inconclusive_people' } res = {} for i in range(0, 10, 2): if interesting[i].strip() in mapping: res[mapping[interesting[i].strip()]] = atoi(interesting[i+1].strip()) # Tests tests = pages[1].splitlines() # small heuristic here about the location index = tests.index('Total', len(tests) - 10) part = parse_totals(tests[index:]) res.update(part) return res def get_pcr_tests(page_text): totals = page_text.splitlines() # We need the last index for "Total" index = None date_str = None res = {} for i, row in enumerate(totals): if row.startswith("Data through"): date_str = row if row == "Total": index = i res = parse_totals(totals[index:]) if date_str: if not res: res = {} res['Date'] = date_str return res def get_data(filepath, prefix): pdf = PyPDF4.PdfFileReader(filepath) res = {} # people vs tests if prefix == 'SER': part = get_antibody_tests([ pdf.getPage(0).extractText(), pdf.getPage(pdf.getNumPages() - 3).extractText()]) res.update(part) else: testing_candidate = pdf.getPage(pdf.getNumPages() - 1) part = get_pcr_tests(testing_candidate.extractText()) res.update(part) # apply prefix to all keys: res = {"{}_{}".format(prefix, k): v for k, v in res.items()} return res def main(base_dir): # download report # open it # parse it # store numbers, as json, somewhere data = {} urls = {"PCR": URL, "SER": SER_URL} for prefix, url in urls.items(): req = urllib.request.Request(url) with urllib.request.urlopen(req) as response, NamedTemporaryFile(delete=True) as tmpfile: shutil.copyfileobj(response, tmpfile) tmpfile.flush() part = get_data(tmpfile.name, prefix) data.update(part) print(data) json.dump(data, open(os.path.join(base_dir, "fl_pcr_specimens.json"), 'w')) if __name__ == "__main__": # where to store? base_dir = '.' if len(sys.argv) > 1: base_dir = sys.argv[1] main(base_dir)
174705
import collections import openmlpimp from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter from scipy.stats import gaussian_kde from sklearn.model_selection._search import BaseSearchCV from sklearn.model_selection._search import ParameterSampler from collections import Sized, defaultdict from functools import partial import math import numpy as np from sklearn.utils import resample from sklearn.base import is_classifier, clone from sklearn.model_selection._split import check_cv from sklearn.model_selection._validation import _fit_and_score from sklearn.externals.joblib import Parallel, delayed from sklearn.utils.fixes import rankdata from sklearn.utils.fixes import MaskedArray from sklearn.utils.validation import indexable from sklearn.metrics.scorer import check_scoring class BaseSearchBandits(BaseSearchCV): def _do_iteration(self, X, y, groups, sample_size, parameter_iterable, cv, eta): base_estimator = clone(self.estimator) n_splits = cv.get_n_splits(X, y, groups) cv_iter = list(cv.split(X, y, groups)) out = Parallel( n_jobs=self.n_jobs, verbose=self.verbose, pre_dispatch=self.pre_dispatch )(delayed(_fit_and_score)(clone(base_estimator), X, y, self.scorer_, train, test, self.verbose, parameters, fit_params=self.fit_params, return_train_score=self.return_train_score, return_n_test_samples=True, return_times=True, return_parameters=True, error_score=self.error_score) for parameters in parameter_iterable for train, test in cv_iter) # if one choose to see train score, "out" will contain train score info if self.return_train_score: (train_scores, test_scores, test_sample_counts, fit_time, score_time, parameters) = zip(*out) else: (test_scores, test_sample_counts, fit_time, score_time, parameters) = zip(*out) candidate_params = parameters[::n_splits] n_candidates = len(candidate_params) # TODO: obtain from cv_iter object sample_sizes = [sample_size] * n_candidates * n_splits results = dict() def _store(key_name, array, weights=None, splits=False, rank=False): """A small helper to store the scores/times to the cv_results_""" array = np.array(array, dtype=np.float64).reshape(n_candidates, n_splits) if splits: for split_i in range(n_splits): results["split%d_%s" % (split_i, key_name)] = array[:, split_i] array_means = np.average(array, axis=1, weights=weights) results['mean_%s' % key_name] = array_means # Weighted std is not directly available in numpy array_stds = np.sqrt(np.average((array - array_means[:, np.newaxis]) ** 2, axis=1, weights=weights)) results['std_%s' % key_name] = array_stds if rank: results["rank_%s" % key_name] = np.asarray( rankdata(-array_means, method='min'), dtype=np.int32) # Computed the (weighted) mean and std for test scores alone # NOTE test_sample counts (weights) remain the same for all candidates test_sample_counts = np.array(test_sample_counts[:n_splits], dtype=np.int) _store('test_score', test_scores, splits=True, rank=True, weights=test_sample_counts if self.iid else None) if self.return_train_score: _store('train_score', train_scores, splits=True) _store('fit_time', fit_time) _store('score_time', score_time) _store('sample_sizes', sample_sizes) best_index = np.flatnonzero(results["rank_test_score"] == 1)[0] best_parameters = candidate_params[best_index] new_parameter_iterable = [] order = np.argsort(results['mean_test_score'][-n_candidates:] * -1) for i in range(int(len(parameter_iterable) / eta)): new_parameter_iterable.append(candidate_params[order[i]]) # Use one MaskedArray and mask all the places where the param is not # applicable for that candidate. Use defaultdict as each candidate may # not contain all the params param_results = defaultdict(partial(MaskedArray, np.empty(n_candidates, ), mask=True, dtype=object)) for cand_i, params in enumerate(candidate_params): for name, value in params.items(): # An all masked empty array gets created for the key # `"param_%s" % name` at the first occurence of `name`. # Setting the value at an index also unmasks that index param_results["param_%s" % name][cand_i] = value results.update(param_results) # Store a list of param dicts at the key 'params' results['params'] = candidate_params return results, new_parameter_iterable, best_index, best_parameters def _successive_halving(self, X, y, groups, cv, eta, hyperband_s, hyperband_smax=None): results = dict() best_index = None hyperband_B = hyperband_smax + 1 if hyperband_smax is not None else hyperband_s print(hyperband_B, eta, hyperband_s, (hyperband_s + 1)) hyperband_n = math.ceil(hyperband_B * eta ** hyperband_s / (hyperband_s + 1)) print('- bracket %d; B = %d, n = %d' %(hyperband_s, hyperband_B, hyperband_n)) parameter_iterable = ParameterSampler(self.param_distributions, hyperband_n, random_state=self.random_state + hyperband_s) for hyperband_i in range(0, hyperband_s + 1): sample_size = int(len(X) * (eta ** -(hyperband_s - hyperband_i))) arms_pulled = 0 if 'mean_test_score' in results: arms_pulled = len(results['mean_test_score']) if groups is not None: X_resampled, y_resampled, groups_resampled = resample(X, y, groups, n_samples=sample_size, replace=False, random_state=self.random_state) else: X_resampled, y_resampled = resample(X, y, n_samples=sample_size, replace=False) groups_resampled = None print('-- iteration %d sample size %d arms %d' %(hyperband_i, sample_size, len(parameter_iterable))) res = self._do_iteration(X_resampled, y_resampled, groups_resampled, sample_size, parameter_iterable, cv, eta) results_iteration, parameter_iterable, best_index_iteration, best_parameters_iteration = res # TODO: This assumes we always take the index from the highest bracket. best_index = arms_pulled + best_index_iteration best_parameters = best_parameters_iteration for key, values in results_iteration.items(): if key not in results: results[key] = values else: results[key] = np.append(results[key], values) return results, best_index, best_parameters class SuccessiveHalving(BaseSearchBandits): def __init__(self, estimator, param_distributions, num_steps, eta, scoring=None, fit_params=None, n_jobs=1, iid=True, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', random_state=None, error_score='raise', return_train_score=True): self.param_distributions = param_distributions self.random_state = random_state self.num_steps = num_steps self.eta = eta super(SuccessiveHalving, self).__init__( estimator=estimator, scoring=scoring, fit_params=fit_params, n_jobs=n_jobs, iid=iid, refit=refit, cv=cv, verbose=verbose, pre_dispatch=pre_dispatch, error_score=error_score, return_train_score=return_train_score) def fit(self, X, y, groups=None): """Actual fitting, performing the search over parameters.""" num_arms = self.eta ** (self.num_steps - 1) parameter_iterable = ParameterSampler(self.param_distributions, num_arms, random_state=self.random_state) estimator = self.estimator cv = check_cv(self.cv, y, classifier=is_classifier(estimator)) self.scorer_ = check_scoring(self.estimator, scoring=self.scoring) X, y, groups = indexable(X, y, groups) n_splits = cv.get_n_splits(X, y, groups) if self.verbose > 0 and isinstance(parameter_iterable, Sized): n_candidates = len(parameter_iterable) print("Fitting {0} folds for each of {1} candidates, totalling" " {2} fits".format(n_splits, n_candidates, n_candidates * n_splits)) base_estimator = clone(self.estimator) results, best_index, best_parameters = self._successive_halving(X, y, groups, cv, self.eta, self.num_steps - 1, self.num_steps - 1) self.cv_results_ = results self.best_index_ = best_index self.n_splits_ = n_splits if self.refit: # fit the best estimator using the entire dataset # clone first to work around broken estimators best_estimator = clone(base_estimator).set_params( **best_parameters) if y is not None: best_estimator.fit(X, y, **self.fit_params) else: best_estimator.fit(X, **self.fit_params) self.best_estimator_ = best_estimator return self class HyperBand(BaseSearchBandits): def __init__(self, estimator, param_distributions, num_brackets, eta, scoring=None, fit_params=None, n_jobs=1, iid=True, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', random_state=None, error_score='raise', return_train_score=True): self.param_distributions = param_distributions self.random_state = random_state self.num_brackets = num_brackets self.eta = eta super(HyperBand, self).__init__( estimator=estimator, scoring=scoring, fit_params=fit_params, n_jobs=n_jobs, iid=iid, refit=refit, cv=cv, verbose=verbose, pre_dispatch=pre_dispatch, error_score=error_score, return_train_score=return_train_score) def fit(self, X, y, groups=None): """Actual fitting, performing the search over parameters.""" results = dict() best_index = None best_parameters = None for bracket_idx in range(self.num_brackets - 1, -1, -1): successive_halving_steps = bracket_idx + 1 # TODO: num_arms should be different estimator = self.estimator cv = check_cv(self.cv, y, classifier=is_classifier(estimator)) self.scorer_ = check_scoring(self.estimator, scoring=self.scoring) X, y, groups = indexable(X, y, groups) n_splits = cv.get_n_splits(X, y, groups) base_estimator = clone(self.estimator) arms_pulled = 0 if 'mean_test_score' in results: arms_pulled = len(results['mean_test_score']) res = self._successive_halving(X, y, groups, cv, self.eta, successive_halving_steps - 1, self.num_brackets - 1) bracket_results, bracket_best_index, bracket_best_parameters = res for key, values in bracket_results.items(): if key not in results: results[key] = values else: results[key] = np.append(results[key], values) if best_index is None: best_index = bracket_best_index + arms_pulled best_parameters = bracket_best_parameters elif bracket_results['mean_test_score'][bracket_best_index] > results['mean_test_score'][best_index]: best_index = bracket_best_index + arms_pulled best_parameters = bracket_best_parameters self.cv_results_ = results self.best_index_ = best_index self.n_splits_ = n_splits if self.refit: # fit the best estimator using the entire dataset # clone first to work around broken estimators best_estimator = clone(base_estimator).set_params( **best_parameters) if y is not None: best_estimator.fit(X, y, **self.fit_params) else: best_estimator.fit(X, **self.fit_params) self.best_estimator_ = best_estimator return self
174732
from core.function_context import * from config.utils import * from collections import defaultdict import config.libc_config as libc class ExternalFunction(CodeContext): """A context that describes a source-code point of view of an external function, using references from/to it. Attributes ---------- hints (set): set of possible match (bin) candidates represented as eas xrefs (set): set of xrefs to this external function, as seen in the source project """ def __init__(self, name): """Create a class instance using only the name (ea is unknown until we will have a match). Args: name (str): name of the external function """ super(ExternalFunction, self).__init__(name) self.hints = None self.xrefs = set() # Overridden base function def declareMatch(self, match): """Declare a match between our source external and a binary function. Args: match (ea): the match ea """ self.match = match # Overridden base function def valid(self): """Check if the function is still valid (still active). Return Value: True iff the function still exists in the file matching process """ return True def addXref(self, xref): """Add an xref to the function. Args: xref (CodeContext): code context that calls (xrefs) our function """ self.xrefs.add(xref) def removeXref(self, xref): """Remove an xref from the function (the caller was probably found irrelevant for our search). Args: xref (CodeContext): code context that calls (xrefs) our function """ if xref in self.xrefs: self.xrefs.remove(xref) def used(self): """Check if our external function is still used by active functions. Return Value: True iff the function is used (has at least 1 active xref) """ return len(self.xrefs) > 0 def addHints(self, hints): """Add a collection of (bin) hints for our match. Args: hints (collection): a collection of (bin) match hints, represented as eas """ # filter out hints from known ignored libc functions if self.hints is None: self.hints = set(hints) else: self.hints &= set(hints) # check for a match if len(self.hints) == 1: self.declareMatch(list(self.hints)[0]) class ComparableContext(object): """Base class representing the canonical representation of a function / code snippet, with the ability of being compared one to another. Attributes ---------- consts (set): set of numeric constants strings (set): set of string calls (set): set of (library) function calls (containing ComparableContext instances) externals (set): set of external function calls _const_ranks (dict): mapping from numeric const to it's score (calculated only once on start) """ def __init__(self): """Create the basic instance.""" # artifacts self.consts = set() self.strings = set() # call references self.calls = set() self.externals = set() # preprocess results self._const_ranks = {} def recordConst(self, const): """Record a numeric constant artifact in the code's artifacts list. Args: const (int): numeric constant artifact """ self.consts.add(const) def recordString(self, string): """Record a string artifact in the code's artifacts list. Args: string (str): string artifact """ self.strings.add(string) def recordCall(self, call): """Record a function call artifact in the code's artifacts list. Args: call (varies): name of ea that identifies the (basic) function call """ self.calls.add(call) def rankConsts(self): """Rank all of the consts of our context - should be done only once on init.""" for num_const in self.consts: self._const_ranks[num_const] = rankConst(num_const, self) @staticmethod def compareConsts(src_ctx, bin_ctx): """Compare the numerical constants of both contexts and returns the matching score. Args: src_ctx (ComparableContext): context representing the source function bin_ctx (ComparableContext): context representing the binary function Return value floating point score for the constants comparison """ score = 0 # earn points by ranking the consts in the intersection for const in src_ctx.consts & set(bin_ctx.consts): score += src_ctx._const_ranks[const] # deduce points by ranking the consts in the symmetric difference for const in src_ctx.consts - set(bin_ctx.consts): score -= src_ctx._const_ranks[const] for const in bin_ctx.consts - set(src_ctx.consts): score -= bin_ctx._const_ranks[const] # give a boost for a perfect match if len(src_ctx.consts) > 0 and src_ctx.consts == bin_ctx.consts: score += ARTIFACT_MATCH_SCORE return score @staticmethod def compareString(src_ctx, bin_ctx): """Compare the strings of both contexts and returns the matching score. Args: src_ctx (ComparableContext): context representing the source function bin_ctx (ComparableContext): context representing the binary function Return value floating point score for the strings comparison """ score = 0 # start with a bonus score in case the string is contained in the source function's name try: score += STRING_NAME_SCORE * len(list(filter(lambda s: s in src_ctx.name, bin_ctx.strings))) except UnicodeDecodeError: pass # now actually match the strings (intersection and symmetric difference) for string in src_ctx.strings & bin_ctx.strings: score += len(string) * STRING_MATCH_SCORE # duplicate the bonus in this case if string in src_ctx.name: score += STRING_NAME_SCORE # deduce points for strings in the symmetric difference for string in src_ctx.strings.symmetric_difference(bin_ctx.strings): score -= len(string) * STRING_MISMATCH_SCORE # give a boost for a perfect match if len(src_ctx.strings) > 0 and src_ctx.strings == bin_ctx.strings: score += ARTIFACT_MATCH_SCORE return score @staticmethod def compareCalls(src_ctx, bin_ctx): """Compare the function calls of both contexts and returns the matching score. Args: src_ctx (ComparableContext): context representing the source function bin_ctx (ComparableContext): context representing the binary function Return value floating point score for the calls comparison """ score = -1 * abs(len(src_ctx.calls) - len(bin_ctx.calls)) * CALL_COUNT_SCORE # penalty for missing matched calls src_matched = [x for x in src_ctx.calls if x.matched()] bin_matched = [x for x in bin_ctx.calls if x.matched()] mismatching = [] mismatching += [x for x in src_matched if x.match not in bin_ctx.calls] mismatching += [x for x in bin_matched if x.match not in src_ctx.calls] matching = [x for x in src_matched if x.match in bin_ctx.calls] # the penalty is halved because we the list will most probably contain duplicates score -= CALL_COUNT_SCORE * len(mismatching) * 1.0 / 2 score += MATCHED_CALL_SCORE * len(matching) # give a boost for a perfect match if len(mismatching) == 0 and len(src_ctx.calls) > 0 and len(src_ctx.calls) == len(bin_ctx.calls): score += ARTIFACT_MATCH_SCORE return score @staticmethod def compareExternals(src_ctx, bin_ctx): """Compare the (matched) external function calls of both contexts and returns the matching score. Args: src_ctx (ComparableContext): context representing the source function bin_ctx (ComparableContext): context representing the binary function Return value floating point score for the external calls comparison """ # penalty for number of missing external calls score = -1 * abs(len(src_ctx.externals) - len(bin_ctx.externals)) * EXTERNAL_COUNT_SCORE for external in [x for x in src_ctx.externals if x.matched()]: # check for a hit if external.match in bin_ctx.externals: if external.name in libc.libc_function_names: score += LIBC_COMP_FUNC_MATCH_SCORE if external.name in libc.libc_comp_function_names else LIBC_FUNC_MATCH_SCORE else: score += EXT_FUNC_MATCH_SCORE # give a boost for a perfect match if len(src_ctx.externals) > 0 and len(src_ctx.externals) == len(bin_ctx.externals): score += ARTIFACT_MATCH_SCORE return score # Technically, BinaryCodeContext is mapped (has an index), and Island don't have an index. # However this is much easier to implement instead of having a diamond shaped inheritance... class IslandContext(BinaryCodeContext, ComparableContext): """A context that describes the canonical representation of a (bin) "Island" function that lives inside another binary function. Attributes ---------- xrefs (set): set of (library) function xrefs (containing ComparableContext instances) """ def __init__(self, name, ea): """Create the basic code snippet (island) instance.""" BinaryCodeContext.__init__(self, ea, name, None) ComparableContext.__init__(self) self.xrefs = set() # Overridden base function def isPartial(self): """Tell us that the current instance is only a partial one (an island). Return Value: Always True """ return True # Overridden base function def valid(self): """Check if the function is still valid (still active). Return Value: True iff the function still exists in the file matching process """ return True # Overridden base function def preprocess(self): """Preform preprocess calculations once here after initialization, to avoid performance costs later.""" self.rankConsts() # Overridden base function def rankConsts(self): """Rank all of the consts of our context - should be done only once on init.""" for num_const in self.consts: self._const_ranks[num_const] = rankConst(num_const, None) # Overridden base function def declareMatch(self, match): """Declare a match between a source and our (partial) bin context. Args: match (SourceCodeContext): the matching source context """ self.match = match def compare(self, src_ctx, logger): """Compare our island to a potential source match. Args: src_ctx (SourceCodeContext): src context representing a source function (potential match) logger (logger): logger instance Return Value: floating point score for the entire match """ score = 0 logger.addIndent() boost_score = len(src_ctx.blocks) <= MINIMAL_BLOCKS_BOOST # 1. Match constants const_score = ComparableContext.compareConsts(src_ctx, self) logger.debug("Const score: %f", const_score) score += const_score # 2. Match strings string_score = ComparableContext.compareString(src_ctx, self) logger.debug("String score: %f", string_score) score += string_score # 3. Match calls calls_score = ComparableContext.compareCalls(src_ctx, self) logger.debug("Calls score: %f", calls_score) score += calls_score # 4. Match external calls externals_score = ComparableContext.compareExternals(src_ctx, self) logger.debug("Externals score: %f", externals_score) score += externals_score # 5. Boost the score if boost_score: score *= 2 logger.debug("Score boost") # Overall result logger.debug("Overall score is: %f", score) logger.removeIndent() return score class FunctionContext(ComparableContext): """Base class representing the full canonical representation of a function. Attributes ---------- xrefs (set): set of (library) function xrefs (containing ComparableContext instances) frame (int): size (in bytes) of the function's stack frame instrs (int): number of code instruction in our function blocks (list): (sorted) list containing the number of instructions in each code block call_order (dict): a mapping of: call invocation => set of call invocations that can reach it is_static (bool): True iff the function is not exported outside of it's local compiled file """ def __init__(self): """Create a basic function context instance.""" super(FunctionContext, self).__init__() # artifacts self.xrefs = set() self.frame = None self.instrs = None self.blocks = [] self.call_order = None # is static self.is_static = False # False by default def setFrame(self, frame): """Set the size of the stack frame for our function. Args: frame (int): frame size (in bytes) of our function """ self.frame = frame def setInstrCount(self, num_instrs): """Set the number of code instructions in our function. Args: num_instrs (int): number of instructions in the function """ self.instrs = num_instrs def recordBlock(self, block): """Record a code block in our function's code flow. Args: block (int): number of instructions in the given code block """ self.blocks.append(block) def setCallOrder(self, mapping): """Set the call order mapping: call invocation => set of call invocations that can reach it. Args: mapping (dict): mapping of the call order """ self.call_order = mapping def markStatic(self): """Mark our function as a non-exported (static) function.""" self.is_static = True def used(self): """Check if our function is used, i.e. has ingoing/outgoing reference to other functions. Return value: True iff the function has any call/xref to other functions """ return len(self.calls) + len(self.xrefs) > 0 class SourceContext(SrcFileFunction, FunctionContext): """A context that describes the canonical representation of a source file function, with it's full logic. Attributes ---------- unknown_funcs (set): temporary set of (source) function names from outside of our compilation file unknown_fptrs (set): temporary set of (source) function (pointer) names from outside of our compilation file hash (str): hex digest of the function's hash (calculated on the raw binary) call_order (dict): a mapping of: call invocation => set of call invocations that can reach it followers (set): set of binary functions that use us as a potential match hint exists (bool): validity flag marking our existence in the source (according to info from the binary match) file_hint (str): source file name string if exists inside function, None otherwise collision_candidates (list) list of src candidates with a possibility for merging (same name + linker optimizations) """ def __init__(self, name, index): """Create a source function instance. Args: name (str): source function name index (int): index of the function in the global array of all source functions """ SrcFileFunction.__init__(self, name, index) FunctionContext.__init__(self) # temporary field self.unknown_funcs = set() self.unknown_fptrs = set() # artifacts self.hash = None # matching hints self.followers = set() # validity flag self.exists = True # File (source) hint self.file_hint = None # Compilation clues self.is_static = False # Linker optimizations self.collision_candidates = [] # Overridden base function def declareMatch(self, match): """Declare a match between a source and a bin context. Args: match (BinaryCodeContext): the matching binary context """ self.match = match # notify our followers that we are now out of the game for follower in self.followers: follower.removeHint(self, clear=False) self.followers = set() # Overridden base function def isPartial(self): """Tell us that the current instance is a full function. Return Value: Always False """ return False # Overridden base function def valid(self): """Check if the function is still valid (still active). Return Value: True iff the function still exists in the file matching process """ return self.exists # Overridden base function def preprocess(self): """Preform preprocess calculations once here after initialization, to avoid performance costs later.""" self.rankConsts() # Overridden base function def disable(self): """Mark the source function as absent (inlined / ifdeffed out).""" # singleton lock if not self.exists: return # can now safely continue self.exists = False # keep on recursively with our external functions for ext in self.externals: ext.removeXref(self) # mark that I'm no longer a valid collision candidate for collision_candidate in self.collision_candidates: collision_candidate.collision_candidates.remove(self) self.collision_candidates = [] def recordUnknown(self, unknown, is_fptr=False): """Record a function call to an unknown function. Args: unknown (str): name of an unknown source function is_fptr (bool): True if this is an unknown fptr (False by default) """ if not is_fptr: self.unknown_funcs.add(unknown) else: self.unknown_fptrs.add(unknown) def setHash(self, digest): """Set the hash digest of our function. Args: digest (str): hex digest of our function """ self.hash = digest def markCollisionCandidates(self, candidates): """Mark the potential collision (merge) candidates from other files. Args: candidates (list): list of src context candidates """ self.collision_candidates = [] + candidates # no need to count me in self.collision_candidates.remove(self) def addFollower(self, bin_ctx): """Add a binary follower to our source context. He thinks we are a potential (hint) match. Args: bin_ctx (ComparableContext): binary function that follows us using a hint """ self.followers.add(bin_ctx) def removeFollower(self, bin_ctx): """Remove a (binary) follower from our watch list (he was probably matched without us). Args: bin_ctx (ComparableContext): a follower (binary) function """ if bin_ctx in self.followers: self.followers.remove(bin_ctx) def checkFileHint(self): """Check if has a file string hint, now that all strings were recorded. Return Value: source file name string hint iff found one, None otherwise """ for string in self.strings: name_parts = string.split(".") if len(name_parts) != 2: continue file_name = self.file.split(os.path.sep)[-1].split(".")[0] if name_parts[0] == file_name and name_parts[1].lower() in ["c", "cpp", "c++"]: self.file_hint = string return self.file_hint return None def isValidCandidate(self, bin_ctx): """Check if the given binary context is a valid match candidate. Args: bin_ctx (ComparableContext): context representing a binary function (potential match) Return Value: False iff the binary context was found as an invalid match candidate """ # 0. Both must be in the game if not self.active() or not bin_ctx.active(): return False # 1. They must be in the same file if not bin_ctx.isFileSuitable(self): return False # 2. A static function can not have an xref from outside the library (weak because of possible inlining) if self.is_static and not bin_ctx.is_static: return False # 3. A collision candidate must not conflict with the previous matches if not bin_ctx.isPartial() and bin_ctx.matched() and self.hash != bin_ctx.match.hash: return False # If reached this line, the candidate is probably fine return True def compare(self, bin_ctx, logger): """Compare our (source) function to a potential binary match. Args: bin_ctx (ComparableContext): context representing a binary function (potential match) logger (logger): logger instance Return Value: floating point score for the entire match """ score = 0 logger.addIndent() # 0. prepare the instruction ratio (if has one already) instr_ratio = (src_instr_count * 1.0 / bin_instr_count) if num_instr_samples >= INSTR_RATIO_COUNT_THRESHOLD else 1 boost_score = len(self.blocks) <= MINIMAL_BLOCKS_BOOST and len(bin_ctx.blocks) <= MINIMAL_BLOCKS_BOOST boost_score = boost_score and bin_ctx.call_hints is None and len(bin_ctx.xref_hints) == 0 # 1. Match constants const_score = ComparableContext.compareConsts(self, bin_ctx) logger.debug("Const score: %f", const_score) score += const_score # 2. Match strings string_score = ComparableContext.compareString(self, bin_ctx) logger.debug("String score: %f", string_score) score += string_score # 3. Match sizes function_size_score = -1 * abs(self.instrs - bin_ctx.instrs * instr_ratio) * INSTR_COUNT_SCORE # check for a probable match if abs(function_size_score) <= INSTR_COUNT_THRESHOLD * INSTR_COUNT_SCORE: function_size_score += ARTIFACT_MATCH_SCORE logger.debug("Function size score: %f", function_size_score) score += function_size_score # 4. Match stack frames frame_size_score = -1 * abs(self.frame - bin_ctx.frame) * FUNC_FRAME_SCORE # check for a probable match if abs(frame_size_score) <= FRAME_SIZE_THRESHOLD * FUNC_FRAME_SCORE: frame_size_score += ARTIFACT_MATCH_SCORE logger.debug("Frame size score: %f", frame_size_score) score += frame_size_score # 5. Match calls calls_score = ComparableContext.compareCalls(self, bin_ctx) logger.debug("Calls score: %f", calls_score) score += calls_score # 6. Match code blocks code_blocks_score = 0 for index, block in enumerate(self.blocks): code_blocks_score -= abs(self.blocks[index] - ((bin_ctx.blocks[index] * instr_ratio) if index < len(bin_ctx.blocks) else 0)) * BLOCK_MATCH_SCORE for j in range(index + 1, len(bin_ctx.blocks)): code_blocks_score -= bin_ctx.blocks[j] * BLOCK_MISMATCH_SCORE * instr_ratio # check for a probable match if abs(code_blocks_score) <= INSTR_COUNT_THRESHOLD * INSTR_COUNT_SCORE: code_blocks_score += ARTIFACT_MATCH_SCORE logger.debug("Code blocks score: %f", code_blocks_score) score += code_blocks_score # 7. Match function calls (hints) call_hints_score = 0 merged_hints = 0 if bin_ctx.call_hints is not None and len(bin_ctx.call_hints) > 0 and self in bin_ctx.call_hints: merged_hints = len([x for x in bin_ctx.call_hints if x.hash == self.hash]) # prioritize merged hints call_hints_score += FUNC_HINT_SCORE * 1.0 * (merged_hints ** 1.5) / len(bin_ctx.call_hints) logger.debug("Call hints score: %f", call_hints_score) score += call_hints_score # 8. Match xrefs calls (hints) if len(bin_ctx.xref_hints) > 0: xref_hints_score = FUNC_HINT_SCORE * bin_ctx.xref_hints.count(self) * 1.0 / len(bin_ctx.xref_hints) logger.debug("Xref hints score: %f", xref_hints_score) score += xref_hints_score # 9. Existence check (followers) or non static binary function if len(self.followers) > 0 or not bin_ctx.is_static: logger.debug("We have (%d) followers / are static (%s) - grant an existence bonus: %f", len(self.followers), str(bin_ctx.is_static), EXISTENCE_BOOST_SCORE) score += EXISTENCE_BOOST_SCORE # 10. Match external calls externals_score = ComparableContext.compareExternals(self, bin_ctx) logger.debug("Externals score: %f", externals_score) score += externals_score # 11. Possible static deduction (if no probability for a collision) if self.is_static and merged_hints == 0: static_penalty = 0 for xref in bin_ctx.xrefs: if self.file not in xref.files: static_penalty += STATIC_VIOLATION_PENALTY logger.debug("Static penalty score: %f", static_penalty) score -= static_penalty # 12. Score boost if boost_score: score *= 2 logger.debug("Score boost") # Overall result logger.debug("Overall score is: %f", score) logger.removeIndent() return score def serialize(self): """Serialize the context into a dict. Return Value: dict representing the context instance, prepared for a future JSON dump """ result = {} result["Function Name"] = self.name result["Instruction Count"] = self.instrs result["Stack Frame Size"] = self.frame result["Hash"] = self.hash result["Is Static"] = self.is_static result["Numeric Consts"] = list(self.consts) result["Strings"] = list(self.strings) result["Calls"] = list(self.calls) result["Unknown Functions"] = list(self.unknown_funcs) result["Unknown Globals"] = list(self.unknown_fptrs) result["Code Block Sizes"] = self.blocks result["Call Order"] = self.call_order return result @staticmethod def deserialize(serialized_ctx, source_index): """Deserialize the stored context from it's file representation dict. Args: serialized_ctx (dict): a dict containing a serialize()d context instance source_index (int): source index for the current function Return value: The newly created context instance, built according to the serialized form """ context = SourceContext(serialized_ctx["Function Name"], source_index) # Numeric Consts [context.recordConst(int(x)) for x in serialized_ctx["Numeric Consts"]] # Strings [context.recordString(x) for x in serialized_ctx["Strings"]] # Function Calls [context.recordCall(x) for x in serialized_ctx["Calls"]] # Unknowns [context.recordUnknown(x, False) for x in serialized_ctx["Unknown Functions"]] [context.recordUnknown(x, True) for x in serialized_ctx["Unknown Globals"]] # Hash context.setHash(serialized_ctx["Hash"]) # Frame size context.setFrame(serialized_ctx["Stack Frame Size"]) # Function size context.setInstrCount(serialized_ctx["Instruction Count"]) # Function Blocks [context.recordBlock(x) for x in serialized_ctx["Code Block Sizes"]] # Call order context.setCallOrder(serialized_ctx["Call Order"]) # Is static if serialized_ctx["Is Static"]: context.markStatic() # Now rank the consts context.rankConsts() return context class BinaryContext(BinFileFunction, FunctionContext): """A context that describes the full canonical representation of a binary function, with all of it's logic. Attributes ---------- call_hints (set): set of potential matches derived by lists of function calls from matched functions xref_hints (list): list potential matches derived by lists of xrefs from matched functions collision_map (dict): a mapping of seen collision options: hint id ==> list of possible (seen) collisions taken_collision (bool): True iff was merged as part of a collision merged_sources (list): list of merged source functions (in a collision case) """ def __init__(self, ea, name, index): """Create a binary function context. Args: ea (int): effective address of the given code chunk name (str): temporary (?) name given by the disassembler index (int): index of the function in the global array of all binary functions """ BinFileFunction.__init__(self, ea, name, index) FunctionContext.__init__(self) # matching hints self.call_hints = None self.xref_hints = [] # validity flag self.exists = True # Compilation clues self.is_static = False # Linker optimizations self.collision_map = defaultdict(set) self.taken_collision = False self.merged_sources = [] # Overridden base function def declareMatch(self, match): """Declare a match between our a bin context and a source context. Args: match (SourceContext): the matching source context """ self.match = match # notify our hints that we are out of the game if self.call_hints is not None: for hint in list(self.call_hints): self.removeHint(hint, clear=True) for hint in list(self.xref_hints): self.removeHint(hint, clear=True) # If we chose a collision candidate, when we saw the possibility for a collision, it means it is indeed an active collision if match.hash in self.collision_map or (len(self.files) > 0 and match.file not in self.files): self.merged_sources.append(match) self.taken_collision = True # make sure that our match will always be in our map if match.hash not in self.collision_map: self.collision_map[match.hash] = set() # make sure the collision map won't allow conflicting collisions new_collisions = defaultdict(set) if match.hash in self.collision_map: new_collisions[match.hash] = self.collision_map[match.hash] self.collision_map = new_collisions # Overridden base function def isPartial(self): """Tell us that the current instance is a full function. Return Value: Always False """ return False # Overridden base function def valid(self): """Check if the function is still valid (still active). Return Value: True iff the function still exists in the file matching process """ return self.exists # Overridden base function def preprocess(self): """Preform preprocess calculations once here after initialization, to avoid performance costs later.""" self.rankConsts() # Overridden base function def active(self): """Check if the given function is still in the matching game. Return Value: True iff the function is valid and wasn't matched yet """ # special case for collisions return self.valid() and (self.mergePotential() or not self.matched()) # Overridden base function def selfCheck(self): """Double checks our hints, and keeps only those who match our possible file candidates.""" for hint in set(self.xref_hints) | (self.call_hints if self.call_hints is not None else set()): # bye bye, hint if not hint.isValidCandidate(self): self.removeHint(hint) # Overridden base function def isLinkerOptimizationCandidate(self, src_ctx): """Check if the given source context can be a possible match for a linker optimized version of our binary function. Args: src_ctx (context): source context of the candidate source function Return Value: True iff the src ctx is file-suitable as a collision match candidate """ # edge case for possibile collision candidates # 1. Matched to one candidate, and checking to merge more src functions if self.merged() and self.match in src_ctx.collision_candidates: return True # 2. Didn't match yet, however one collision candidate is a valid candidate for collision in src_ctx.collision_candidates: if collision.file in self.files: return True # If we reached this point, it looks like they don't belong to each other return False # Overridden base function def merged(self): """Check if this is a merged (collision) function. Return value: True iff this is a merged function """ return self.taken_collision def mergePotential(self): """Check if this is a collision function with a potential to merge more src functions. Return value: True iff this is a merged function with growth potential """ return self.matched() and (not self.match.isPartial()) and len([x for x in self.match.collision_candidates if not x.matched()]) > 0 def isHinted(self): """Check if our function was hinted at sometimes - meaning we should suspect it is a valid function. Return value: True iff the function has any call/xref hint granted by other functions """ return (self.call_hints is not None and len(self.call_hints) > 0) or len(self.xref_hints) > 0 def addHints(self, hints, is_call): """Add a set of (source) match hints to help us filter our existing hints. Args: hint (collection): a collection of (source) function potential matches (containing FunctionContext instances) is_call (bool): True iff call hints, otherwise xref hints """ new_hints = [x for x in hints if x.isValidCandidate(self)] # Saw a collision candidate, after was already matched to one of his friends if self.matched(): # Only candidate hints can reach this point, and they all should be matched # Later on, the matching round will declare them as matched if len(new_hints) > 0: self.call_hints = new_hints self.collision_map[new_hints[0].hash].update(new_hints) return # normal case if is_call: if self.call_hints is None: self.call_hints = set(new_hints) for hint in new_hints: hint.addFollower(self) else: # linker optimizations edge case new_hashes = [x.hash for x in new_hints] cur_hashes = set(x.hash for x in self.call_hints) for dropped in [x for x in self.call_hints if x.hash not in new_hashes]: dropped.removeFollower(self) # check for a possibile collision option context_intersection = self.call_hints & set(new_hints) context_union = self.call_hints | set(new_hints) hashes_intersection = cur_hashes & set(new_hashes) remaining_hashes = [x.hash for x in context_intersection] if len(hashes_intersection) > len(remaining_hashes): collision_candidates = [] for collision_hash in set(hashes_intersection) - set(remaining_hashes): cur_collision_candidates = [x for x in context_union if x.hash == collision_hash] self.collision_map[collision_hash].update(cur_collision_candidates) collision_candidates += cur_collision_candidates self.call_hints = context_intersection | set(collision_candidates) else: self.call_hints = self.call_hints & set(new_hints) else: self.xref_hints += new_hints for hint in new_hints: hint.addFollower(self) def removeHint(self, src_ctx, clear=True): """Remove a (source) hint from our possible candidates (he was probably matched without us). Args: src_ctx (FunctionContext): a hint (source) function clear (bool, optional): True iff should also remove us from following him (True by default) """ if clear: src_ctx.removeFollower(self) if self.call_hints is not None: while src_ctx in self.call_hints: self.call_hints.remove(src_ctx) while src_ctx in self.xref_hints: self.xref_hints.remove(src_ctx)
174765
import torch import torch.nn as nn import torch.nn.functional as F import math import numpy as np import scipy.ndimage from config import config class FlawDetector(nn.Module): """ The FC Discriminator proposed in paper: 'Guided Collaborative Training for Pixel-wise Semi-Supervised Learning' """ ndf = 64 # basic number of channels def __init__(self, in_channels, norm_layer=None): super(FlawDetector, self).__init__() self.conv1 = nn.Conv2d(in_channels, self.ndf, kernel_size=4, stride=2, padding=1) self.ibn1 = IBNorm(self.ndf, norm_layer=norm_layer) self.conv2 = nn.Conv2d(self.ndf, self.ndf * 2, kernel_size=4, stride=2, padding=1) self.ibn2 = IBNorm(self.ndf * 2, norm_layer=norm_layer) self.conv2_1 = nn.Conv2d(self.ndf * 2, self.ndf * 2, kernel_size=4, stride=1, padding=1) self.ibn2_1 = IBNorm(self.ndf * 2, norm_layer=norm_layer) self.conv3 = nn.Conv2d(self.ndf * 2, self.ndf * 4, kernel_size=4, stride=2, padding=1) self.ibn3 = IBNorm(self.ndf * 4, norm_layer=norm_layer) self.conv3_1 = nn.Conv2d(self.ndf * 4, self.ndf * 4, kernel_size=4, stride=1, padding=1) self.ibn3_1 = IBNorm(self.ndf * 4, norm_layer=norm_layer) self.conv4 = nn.Conv2d(self.ndf * 4, self.ndf * 8, kernel_size=4, stride=2, padding=1) self.ibn4 = IBNorm(self.ndf * 8, norm_layer=norm_layer) self.conv4_1 = nn.Conv2d(self.ndf * 8, self.ndf * 8, kernel_size=4, stride=1, padding=1) self.ibn4_1 = IBNorm(self.ndf * 8, norm_layer=norm_layer) self.classifier = nn.Conv2d(self.ndf * 8, 1, kernel_size=4, stride=2, padding=1) self.leaky_relu = nn.LeakyReLU(negative_slope=0.2, inplace=True) def forward(self, task_inp, task_pred): resulter, debugger = {}, {} # task_inp = torch.cat(task_inp, dim=1) x = torch.cat((task_inp, task_pred), dim=1) x = self.leaky_relu(self.ibn1(self.conv1(x))) x = self.leaky_relu(self.ibn2(self.conv2(x))) x = self.leaky_relu(self.ibn2_1(self.conv2_1(x))) x = self.leaky_relu(self.ibn3(self.conv3(x))) x = self.leaky_relu(self.ibn3_1(self.conv3_1(x))) x = self.leaky_relu(self.ibn4(self.conv4(x))) x = self.leaky_relu(self.ibn4_1(self.conv4_1(x))) x = self.classifier(x) x = F.interpolate(x, size=(task_pred.shape[2], task_pred.shape[3]), mode='bilinear', align_corners=True) # x is not activated here since it will be activated by the criterion function assert x.shape[2:] == task_pred.shape[2:] resulter['flawmap'] = x return x class IBNorm(nn.Module): """ This layer combines BatchNorm and InstanceNorm. """ def __init__(self, num_features, split=0.5, norm_layer=None): super(IBNorm, self).__init__() self.num_features = num_features self.num_BN = int(num_features * split + 0.5) self.bnorm = norm_layer(num_features=self.num_BN, affine=True) self.inorm = nn.InstanceNorm2d(num_features=num_features - self.num_BN, affine=False) def forward(self, x): if self.num_BN == self.num_features: return self.bnorm(x.contiguous()) else: xb = self.bnorm(x[:, 0:self.num_BN, :, :].contiguous()) xi = self.inorm(x[:, self.num_BN:, :, :].contiguous()) return torch.cat((xb, xi), 1) class FlawDetectorCriterion(nn.Module): """ Criterion of the flaw detector. """ def __init__(self): super(FlawDetectorCriterion, self).__init__() def forward(self, pred, gt, is_ssl=False, reduction=True): loss = F.mse_loss(pred, gt, reduction='none') if reduction: loss = torch.mean(loss, dim=(1, 2, 3)) return loss class FlawmapHandler(nn.Module): """ Post-processing of the predicted flawmap. This module processes the predicted flawmap to fix some special cases that may cause errors in the subsequent steps of generating pseudo ground truth. """ def __init__(self): super(FlawmapHandler, self).__init__() self.clip_threshold = 0.1 blur_ksize = config.image_height // 16 blur_ksize = blur_ksize + 1 if blur_ksize % 2 == 0 else blur_ksize self.blur = GaussianBlurLayer(1, blur_ksize) def forward(self, flawmap): flawmap = flawmap.data # force all values to be larger than 0 flawmap.mul_((flawmap >= 0).float()) # smooth the flawmap flawmap = self.blur(flawmap) # if all values in the flawmap are less than 'clip_threshold' # set the entire flawmap to 0, i.e., no flaw pixel fmax = flawmap.max(dim=3, keepdim=True)[0].max(dim=2, keepdim=True)[0].max(dim=1, keepdim=True)[0] fmin = flawmap.min(dim=3, keepdim=True)[0].min(dim=2, keepdim=True)[0].min(dim=1, keepdim=True)[0] max_matrix = fmax.repeat(1, 1, flawmap.shape[2], flawmap.shape[3]) flawmap.mul_((max_matrix > self.clip_threshold).float()) # maximum number is lower than threshold, set the error to 0. # normalize the flawmap flawmap = flawmap.sub_(fmin).div_(fmax - fmin + 1e-9) return flawmap class DCGTGenerator(nn.Module): """ Generate the ground truth of the dynamic consistency constraint. """ def __init__(self): super(DCGTGenerator, self).__init__() def forward(self, l_pred, r_pred, l_handled_flawmap, r_handled_flawmap): l_tmp = l_handled_flawmap.clone() r_tmp = r_handled_flawmap.clone() l_bad = l_tmp > config.dc_threshold r_bad = r_tmp > config.dc_threshold both_bad = (l_bad & r_bad).float() # too high error rate l_handled_flawmap.mul_((l_tmp <= config.dc_threshold).float()) r_handled_flawmap.mul_((r_tmp <= config.dc_threshold).float()) l_handled_flawmap.add_((l_tmp > config.dc_threshold).float()) r_handled_flawmap.add_((r_tmp > config.dc_threshold).float()) l_mask = (r_handled_flawmap >= l_handled_flawmap).float() r_mask = (l_handled_flawmap >= r_handled_flawmap).float() l_dc_gt = l_mask * l_pred + (1 - l_mask) * r_pred r_dc_gt = r_mask * r_pred + (1 - r_mask) * l_pred return l_dc_gt, r_dc_gt, both_bad, both_bad class FDGTGenerator(nn.Module): """ Generate the ground truth of the flaw detector, i.e., pipeline 'C' in the paper. """ def __init__(self): super(FDGTGenerator, self).__init__() blur_ksize = int(config.image_height / 8) blur_ksize = blur_ksize + 1 if blur_ksize % 2 == 0 else blur_ksize self.blur = GaussianBlurLayer(1, blur_ksize) reblur_ksize = int(config.image_height / 4) reblur_ksize = reblur_ksize + 1 if reblur_ksize % 2 == 0 else reblur_ksize self.reblur = GaussianBlurLayer(1, reblur_ksize) self.dilate = nn.Sequential( nn.ReflectionPad2d(1), nn.MaxPool2d(kernel_size=3, stride=1, padding=0) ) def forward(self, pred, gt): diff = torch.abs_(gt - pred.detach()) diff = torch.sum(diff, dim=1, keepdim=True).mul_(config.mu) diff = self.blur(diff) for _ in range(0, config.nu): diff = self.reblur(self.dilate(diff)) # normlize each sample to [0, 1] dmax = diff.max(dim=3, keepdim=True)[0].max(dim=2, keepdim=True)[0].max(dim=1, keepdim=True)[0] dmin = diff.min(dim=3, keepdim=True)[0].min(dim=2, keepdim=True)[0].min(dim=1, keepdim=True)[0] diff.sub_(dmin).div_(dmax - dmin + 1e-9) flawmap_gt = diff return flawmap_gt class GaussianBlurLayer(nn.Module): """ Add Gaussian Blur to a 4D tensor This layer takes a 4D tensor of {N, C, H, W} as input. The Gaussian blur will be performed in given channel number (C) splitly. """ def __init__(self, channels, kernel_size): """ Arguments: channels (int): Channel for input tensor kernel_size (int): Size of the kernel used in blurring """ super(GaussianBlurLayer, self).__init__() self.channels = channels self.kernel_size = kernel_size assert self.kernel_size % 2 != 0 self.op = nn.Sequential( nn.ReflectionPad2d(math.floor(self.kernel_size / 2)), nn.Conv2d(channels, channels, self.kernel_size, stride=1, padding=0, bias=None, groups=channels) ) self._init_kernel() def forward(self, x): """ Arguments: x (torch.Tensor): input 4D tensor Returns: torch.Tensor: Blurred version of the input """ assert len(list(x.shape)) == 4 assert x.shape[1] == self.channels return self.op(x) def _init_kernel(self): sigma = 0.3 * ((self.kernel_size - 1) * 0.5 - 1) + 0.8 n = np.zeros((self.kernel_size, self.kernel_size)) i = math.floor(self.kernel_size / 2) n[i, i] = 1 kernel = scipy.ndimage.gaussian_filter(n, sigma) for name, param in self.named_parameters(): param.data.copy_(torch.from_numpy(kernel)) def sigmoid_rampup(current, rampup_length): """ Exponential rampup from https://arxiv.org/abs/1610.02242 . """ if rampup_length == 0: return 1.0 else: current = np.clip(current, 0.0, rampup_length) phase = 1.0 - current / rampup_length return float(np.exp(-5.0 * phase * phase)) def sslgct_prepare_task_gt_for_fdgt(task_gt): task_gt = task_gt.unsqueeze(1) gt_np = task_gt.data.cpu().numpy() shape = list(gt_np.shape) assert len(shape) == 4 shape[1] = config.num_classes one_hot = torch.zeros(shape).cuda() for i in range(config.num_classes): one_hot[:, i:i+1, ...].add_((task_gt == i).float()) # ignore segment boundary one_hot[:, i:i+1, ...].mul_((task_gt != 255).float()) # return torch.FloatTensor(one_hot) return one_hot
174786
import hypothesis import numpy as np import pytest import torch from hypothesis.extra.numpy import arrays, array_shapes from hypothesis.strategies import floats from torch.testing import assert_allclose from dsntnn import average_loss, euclidean_losses, l1_losses, mse_losses _LOSSES_FNS = { 'euclidean': euclidean_losses, 'l1': l1_losses, 'mse': mse_losses, } class TestLosses: """Common tests for all loss functions.""" @pytest.fixture(params=['euclidean', 'l1', 'mse']) def losses_fn(self, request): return _LOSSES_FNS[request.param] def test_smoke(self, losses_fn): input_tensor = torch.randn(4, 3, 2) target = torch.randn(4, 3, 2) losses = losses_fn(input_tensor, target) assert losses.shape == (4, 3) @hypothesis.given( data=arrays(np.float32, array_shapes(min_dims=3, max_dims=3), elements=floats(allow_nan=False, allow_infinity=False, width=32)), ) def test_same(self, data, losses_fn): input_tensor = torch.as_tensor(data) target = input_tensor.clone() losses = losses_fn(input_tensor, target) assert_allclose(losses, torch.zeros_like(losses)) class TestEuclideanLosses: def test_forward_and_backward(self): input_tensor = torch.tensor([ [[3.0, 4.0], [3.0, 4.0]], [[3.0, 4.0], [3.0, 4.0]], ]) target = torch.tensor([ [[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]], ]) in_var = input_tensor.detach().requires_grad_(True) expected_loss = 5.0 actual_loss = average_loss(euclidean_losses(in_var, target)) expected_grad = torch.tensor([ [[0.15, 0.20], [0.15, 0.20]], [[0.15, 0.20], [0.15, 0.20]], ]) actual_loss.backward() assert float(actual_loss) == expected_loss assert_allclose(expected_grad, in_var.grad) def test_average_loss_mask(): losses = torch.tensor([ [0.0, 1.0, 0.0], [1.0, 0.0, 0.0], ]) mask = torch.tensor([ [1.0, 0.0, 1.0], [0.0, 1.0, 1.0], ]) actual = average_loss(losses, mask) assert float(actual) == 0.0
174791
import pygame pygame.init() clock = pygame.time.Clock() fps = 60 #game window bottom_panel = 150 screen_width = 800 screen_height = 400 + bottom_panel screen = pygame.display.set_mode((screen_width, screen_height)) pygame.display.set_caption('Battle') #load images #background image background_img = pygame.image.load('img/Background/background.png').convert_alpha() #panel image panel_img = pygame.image.load('img/Icons/panel.png').convert_alpha() #function for drawing background def draw_bg(): screen.blit(background_img, (0, 0)) #function for drawing panel def draw_panel(): screen.blit(panel_img, (0, screen_height - bottom_panel)) #fighter class class Fighter(): def __init__(self, x, y, name, max_hp, strength, potions): self.name = name self.max_hp = max_hp self.hp = max_hp self.strength = strength self.start_potions = potions self.potions = potions self.alive = True img = pygame.image.load(f'img/{self.name}/Idle/0.png') self.image = pygame.transform.scale(img, (img.get_width() * 3, img.get_height() * 3)) self.rect = self.image.get_rect() self.rect.center = (x, y) def draw(self): screen.blit(self.image, self.rect) knight = Fighter(200, 260, 'Knight', 30, 10, 3) bandit1 = Fighter(550, 270, 'Bandit', 20, 6, 1) bandit2 = Fighter(700, 270, 'Bandit', 20, 6, 1) bandit_list = [] bandit_list.append(bandit1) bandit_list.append(bandit2) run = True while run: clock.tick(fps) #draw background draw_bg() #draw panel draw_panel() #draw fighters knight.draw() for bandit in bandit_list: bandit.draw() for event in pygame.event.get(): if event.type == pygame.QUIT: run = False pygame.display.update() pygame.quit()
174804
from flask_wtf import FlaskForm from wtforms.validators import Length from wtforms import TextAreaField class NoticeForm(FlaskForm): body = TextAreaField('notice', validators=[Length(0, 25)])
174807
import threading import numpy as np import SimpleITK as sitk class NiftiGenerator2D_ExtraInput(object): def __init__(self, batch_size, image_locations, labels, image_size, extra_inputs, random_shuffle=True): self.n = len(image_locations) self.batch_size = batch_size self.batch_index = 0 self.total_batches_seen = 0 self.lock = threading.Lock() self.index_array = None self.index_generator = self._flow_index() self.image_locations = image_locations self.labels = labels self.image_size = image_size self.random_shuffle = random_shuffle self.extra_inputs = extra_inputs def _set_index_array(self): if self.random_shuffle: self.index_array = np.random.permutation(self.n) else: self.index_array = np.arange(self.n) def __iter__(self): return self def __next__(self, *args, **kwargs): return self.next(*args, **kwargs) def reset(self): self.batch_index = 0 self.total_batches_seen = 0 self._set_index_array() def _flow_index(self): self.reset() while 1: if self.batch_index == 0: self._set_index_array() current_index = (self.batch_index * self.batch_size) % self.n if self.n > current_index + self.batch_size: self.batch_index += 1 else: self.batch_index = 0 self.total_batches_seen += 1 if current_index + self.batch_size > self.n: N_missing_samples = (current_index + self.batch_size) - self.n batch_indices_leftover = self.index_array[current_index:] self.reset() batch_indices_filler = self.index_array[0:N_missing_samples] batch_indices = np.concatenate((batch_indices_leftover, batch_indices_filler)) else: batch_indices = self.index_array[current_index: current_index + self.batch_size] yield batch_indices def on_epoch_end(self): self.reset() def _get_batch_of_samples(self, index_array): image_tensor = np.zeros((self.batch_size, self.image_size[0], self.image_size[1], 1)) out_labels = self.labels[index_array, :] out_extra_inputs = self.extra_inputs[index_array, :] image_locations = self.image_locations[index_array] for i_sample, i_image_location in enumerate(image_locations): i_image = sitk.ReadImage(i_image_location, sitk.sitkFloat32) i_image_array = sitk.GetArrayFromImage(i_image) image_tensor[i_sample, :, :, 0] = i_image_array[:, :] return [image_tensor, out_extra_inputs], out_labels def next(self): with self.lock: index_array = next(self.index_generator) return self._get_batch_of_samples(index_array) def get_single_image(self, image_path): full_sample_tensor = np.zeros((1, self.image_size[0], self.image_size[1], 1)) i_image = sitk.ReadImage(image_path, sitk.sitkFloat32) i_image_array = sitk.GetArrayFromImage(i_image) full_sample_tensor[0, :, :, 0] = i_image_array return full_sample_tensor
174836
from Models.NN.MultiNNRec import MultiDistilBertRec from Utils.Data.Data import get_dataset, get_feature, get_feature_reader from Utils.Submission.Submission import create_submission_file import numpy as np import time from Utils.TelegramBot import telegram_bot_send_update def main(): ''' feature_list = [ "raw_feature_creator_follower_count", # 0 "raw_feature_creator_following_count", # 1 "raw_feature_engager_follower_count", # 2 "raw_feature_engager_following_count", # 3 "tweet_feature_number_of_photo", # 4 "tweet_feature_number_of_video", # 5 "tweet_feature_number_of_gif", # 6 "tweet_feature_number_of_hashtags", # 7 "tweet_feature_creation_timestamp_hour", # 8 "tweet_feature_creation_timestamp_week_day", # 9 "tweet_feature_number_of_mentions", # 10 "number_of_engagements_like", # 11 "number_of_engagements_retweet", # 12 "number_of_engagements_reply", # 13 "number_of_engagements_comment", # 14 "number_of_engagements_positive", # 15 "number_of_engagements_negative", # 16 "engager_feature_number_of_previous_like_engagement_ratio", # 17 "engager_feature_number_of_previous_reply_engagement_ratio", # 18 "engager_feature_number_of_previous_retweet_engagement_ratio", # 19 "engager_feature_number_of_previous_comment_engagement_ratio", # 20 "engager_feature_number_of_previous_positive_engagement_ratio", # 21 "engager_feature_number_of_previous_negative_engagement_ratio" # 22 ] ''' ''' feature_list = [ "raw_feature_creator_follower_count", "raw_feature_creator_following_count", "raw_feature_engager_follower_count", "raw_feature_engager_following_count", "raw_feature_creator_is_verified", "raw_feature_engager_is_verified", "raw_feature_engagement_creator_follows_engager", "tweet_feature_number_of_photo", "tweet_feature_number_of_video", "tweet_feature_number_of_gif", "tweet_feature_number_of_media", "tweet_feature_is_retweet", "tweet_feature_is_quote", "tweet_feature_is_top_level", "tweet_feature_number_of_hashtags", "tweet_feature_creation_timestamp_hour", "tweet_feature_creation_timestamp_week_day", #"tweet_feature_number_of_mentions", "tweet_feature_token_length", "tweet_feature_token_length_unique", "tweet_feature_text_topic_word_count_adult_content", "tweet_feature_text_topic_word_count_kpop", "tweet_feature_text_topic_word_count_covid", "tweet_feature_text_topic_word_count_sport", "number_of_engagements_with_language_like", "number_of_engagements_with_language_retweet", "number_of_engagements_with_language_reply", "number_of_engagements_with_language_comment", "number_of_engagements_with_language_negative", "number_of_engagements_with_language_positive", "number_of_engagements_ratio_like", "number_of_engagements_ratio_retweet", "number_of_engagements_ratio_reply", "number_of_engagements_ratio_comment", "number_of_engagements_ratio_negative", "number_of_engagements_ratio_positive", "number_of_engagements_between_creator_and_engager_like", "number_of_engagements_between_creator_and_engager_retweet", "number_of_engagements_between_creator_and_engager_reply", "number_of_engagements_between_creator_and_engager_comment", "number_of_engagements_between_creator_and_engager_negative", "number_of_engagements_between_creator_and_engager_positive", "number_of_engagements_like", "number_of_engagements_retweet", "number_of_engagements_reply", "number_of_engagements_comment", "number_of_engagements_negative", "number_of_engagements_positive", "tweet_feature_creation_timestamp_hour_shifted", "tweet_feature_creation_timestamp_day_phase", "tweet_feature_creation_timestamp_day_phase_shifted", "engager_feature_number_of_previous_like_engagement_ratio", "engager_feature_number_of_previous_reply_engagement_ratio", "engager_feature_number_of_previous_retweet_engagement_ratio", "engager_feature_number_of_previous_comment_engagement_ratio", "engager_feature_number_of_previous_positive_engagement_ratio", "engager_feature_number_of_previous_negative_engagement_ratio", "adjacency_between_creator_and_engager_retweet", "adjacency_between_creator_and_engager_reply", "adjacency_between_creator_and_engager_comment", "adjacency_between_creator_and_engager_like", "adjacency_between_creator_and_engager_positive", "adjacency_between_creator_and_engager_negative", "graph_two_steps_adjacency_positive", "graph_two_steps_adjacency_negative", "graph_two_steps_adjacency_like", "graph_two_steps_adjacency_reply", "graph_two_steps_adjacency_retweet", "graph_two_steps_adjacency_comment", "graph_two_steps_positive", "graph_two_steps_negative", "graph_two_steps_like", "graph_two_steps_reply", "graph_two_steps_retweet", "graph_two_steps_comment" ] ''' feature_list = [ "raw_feature_creator_follower_count", # 0 "raw_feature_creator_following_count", # 1 ] print("Running on labels : like - retweet - reply - comment") ip = '172.16.17.32' submission_filename = "Dataset/Features/cherry_val/ensembling/nn_predictions" chunksize = 2048 train_dataset = "cherry_train" test_dataset = "new_test" ffnn_params = {'hidden_size_1': 128, 'hidden_size_2': 64, 'hidden_dropout_prob_1': 0.5, 'hidden_dropout_prob_2': 0.5} rec_params = {'epochs': 5, 'weight_decay': 1e-5, 'lr': 2e-5, 'cap_length': 128, 'ffnn_params': ffnn_params} saved_model_path = "./saved_models/saved_model_multi_label" rec = MultiDistilBertRec(**rec_params) train_df = get_dataset(features=feature_list, dataset_id=train_dataset) train_df = train_df.head(3840000) train_df = rec._normalize_features(train_df, is_train=True) ### PREDICTION test_df = get_dataset(features=feature_list, dataset_id=test_dataset) #test_df = test_df.head(2500) prediction_start_time = time.time() text_test_reader_df = get_feature_reader(feature_name="raw_feature_tweet_text_token", dataset_id=test_dataset, chunksize=chunksize) predictions = rec.get_prediction(df_test_features=test_df, df_test_tokens_reader=text_test_reader_df, pretrained_model_dict_path=saved_model_path) print(f"Prediction time: {time.time() - prediction_start_time} seconds") print(predictions) print(predictions.shape) predictions_like = predictions[:,0] predictions_retweet = predictions[:,1] predictions_reply = predictions[:,2] predictions_comment = predictions[:,3] #print(predictions_like) #print(predictions_like.shape) tweets = get_feature("raw_feature_tweet_id", test_dataset)["raw_feature_tweet_id"].array users = get_feature("raw_feature_engager_id", test_dataset)["raw_feature_engager_id"].array #tweets = tweets.head(2500).array #users = users.head(2500).array create_submission_file(tweets, users, predictions_like, submission_filename+"_like.csv") create_submission_file(tweets, users, predictions_like, submission_filename+"_retweet.csv") create_submission_file(tweets, users, predictions_like, submission_filename+"_reply.csv") create_submission_file(tweets, users, predictions_like, submission_filename+"_comment.csv") #bot_string = f"DistilBertDoubleInput NN - like_retweet \n ---------------- \n" #bot_string = bot_string + f"@lucaconterio la submission pronta! \nIP: {ip} \nFile: {submission_filename}" #telegram_bot_send_update(bot_string) if __name__ == '__main__': main()
174838
from beluga.utils import load import matplotlib.pyplot as plt data = load('data.beluga') sol_set = data['solutions'] traj = sol_set[-1][-1] continuation = sol_set[-1] L = len(continuation) plt.figure() for ind, sol in enumerate(continuation): plt.plot(sol.y[:, 0], sol.y[:, 1], linestyle='-', color=(1*(ind/L), 0, 1*(L-ind)/L)) plt.title('Phase Plot') plt.xlabel('$x_1$') plt.ylabel('$x_2$') plt.grid(True) plt.figure() for ind, sol in enumerate(continuation): plt.plot(sol.t, sol.u[:, 0], linestyle='-', color=(1*(ind/L), 0, 1*(L-ind)/L)) plt.plot([traj.t[0], traj.t[-1]], [1, 1], color='k', linestyle='--') plt.plot([traj.t[0], traj.t[-1]], [-1, -1], color='k', linestyle='--') plt.title('Control History Plot') plt.xlabel('Time [s]') plt.ylabel('Control, $u$') plt.grid(True) plt.figure() for ind, sol in enumerate(continuation): plt.plot(sol.t, sol.dual[:, 0], linestyle='-', color=(1*(ind/L), 0, 1*(L-ind)/L)) plt.title('$\\lambda_{x1}$ History Plot') plt.xlabel('Time [s]') plt.ylabel('$\\lambda_{x1}$') plt.grid(True) plt.figure() for ind, sol in enumerate(continuation): plt.plot(sol.t, sol.dual[:, 1], linestyle='-', color=(1*(ind/L), 0, 1*(L-ind)/L)) plt.title('$\\lambda_{x2}$ History Plot') plt.xlabel('Time [s]') plt.ylabel('$\\lambda_{x2}$') plt.grid(True) plt.show()
174841
import base64 import json import pytest import requests import responses import xendit from xendit._api_requestor import _APIRequestor def generate_auth(api_key): auth_pair = api_key + ":" auth_base64 = base64.b64encode(auth_pair.encode()) return f'Basic {auth_base64.decode("utf-8")}' def substitute_callback(request): resp_body = {"method": request.method} return (200, request.headers, json.dumps(resp_body)) @pytest.fixture def default_params(): api_key = "test-123" base_url = "https://mock-url.xendit.co" section = "/balance" http_client = requests url = base_url + section custom_headers = { "X-IDEMPOTENCY-KEY": "key-123", "for-user-id": "id-123", } return api_key, base_url, section, http_client, url, custom_headers @responses.activate def test_get_call_get_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="GET", url=url, callback=substitute_callback) _APIRequestor.get( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_post_call_post_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="POST", url=url, callback=substitute_callback) _APIRequestor.post( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_patch_call_patch_method(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="PATCH", url=url, callback=substitute_callback) _APIRequestor.patch( section, api_key=api_key, base_url=base_url, http_client=http_client, ) @responses.activate def test_request_send_correct_params_on_given_params(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="GET", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request( "GET", section, api_key=api_key, base_url=base_url, http_client=http_client, ) assert xendit_response.headers["Authorization"] == generate_auth(api_key) @responses.activate def test_request_send_default_config_on_empty_params(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params xendit.api_key = api_key xendit.base_url = base_url responses.add_callback(method="GET", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request("GET", section, http_client=http_client,) assert xendit_response.headers["Authorization"] == generate_auth(api_key) @responses.activate def test_request_header_have_custom_header_when_inserted(default_params): api_key, base_url, section, http_client, url, custom_headers = default_params responses.add_callback(method="POST", url=url, callback=substitute_callback) xendit_response = _APIRequestor._request( "POST", section, api_key=api_key, base_url=base_url, http_client=http_client, headers=custom_headers, ) assert ( xendit_response.headers["X-IDEMPOTENCY-KEY"] == custom_headers["X-IDEMPOTENCY-KEY"] ) assert xendit_response.headers["for-user-id"] == custom_headers["for-user-id"]
174901
import json import unittest from automerge import doc from automerge.datatypes import Counter class TestCounters(unittest.TestCase): def test_make_counters_behave_like_primitive_numbers(self): d0 = doc.Doc(initial_data={"birds": Counter(3)}) self.assertEqual(d0["birds"], 3) self.assertTrue(d0["birds"] < 4) self.assertTrue(d0["birds"] >= 0) self.assertFalse(d0["birds"] <= 2) self.assertEqual(d0["birds"] + 10, 13) self.assertEqual(f"I saw {d0['birds']} birds", "I saw 3 birds") def test_allow_counters_to_be_serialized_to_JSON(self): d0 = doc.Doc(initial_data={"birds": Counter(0)}) s = json.dumps(d0.get_active_root_obj()) self.assertEqual(s, '{"birds": 0}')
174918
BASE_ROUTE = 'data' def register_routes(api, app): from .controller import api as data_api api.add_namespace(data_api, path=f"/{BASE_ROUTE}")
174919
from backend.common.sitevars.google_analytics_id import ContentType, GoogleAnalyticsID def test_key(): assert GoogleAnalyticsID.key() == "google_analytics.id" def test_description(): assert ( GoogleAnalyticsID.description() == "Google Analytics ID for logging API requests" ) def test_default_sitevar(): default_sitevar = GoogleAnalyticsID._fetch_sitevar() assert default_sitevar is not None default_json = {"GOOGLE_ANALYTICS_ID": ""} assert default_sitevar.contents == default_json assert default_sitevar.description == "Google Analytics ID for logging API requests" def test_google_analytics_id_empty(): assert GoogleAnalyticsID.google_analytics_id() is None def test_google_analytics_id(): test_id = "abc" GoogleAnalyticsID.put(ContentType(GOOGLE_ANALYTICS_ID=test_id)) assert GoogleAnalyticsID.google_analytics_id() == test_id
174929
def xmaslight(): # This is the code from my #NOTE THE LEDS ARE GRB COLOUR (NOT RGB) # Here are the libraries I am currently using: import time import board import neopixel import re import math # You are welcome to add any of these: import random # import numpy # import scipy # import sys # If you want to have user changable values, they need to be entered from the command line # so import sys sys and use sys.argv[0] etc # some_value = int(sys.argv[0]) # IMPORT THE COORDINATES (please don't break this bit) coordfilename = "coords.txt" fin = open(coordfilename,'r') coords_raw = fin.readlines() coords_bits = [i.split(",") for i in coords_raw] coords = [] for slab in coords_bits: new_coord = [] for i in slab: new_coord.append(int(re.sub(r'[^-\d]','', i))) coords.append(new_coord) #set up the pixels (AKA 'LEDs') PIXEL_COUNT = len(coords) # this should be 500 pixels = neopixel.NeoPixel(board.D18, PIXEL_COUNT, auto_write=False) # YOU CAN EDIT FROM HERE DOWN #maxes = [max(c[i] for c in coords) for i in range(0, 3)] #mins = [min(c[i] for c in coords) for i in range(0, 3)] # Construct a k-d tree to make finding nearby lights easier # Maybe overkill for only 500 lights but should avoid O(n^2) if more are added treeBuildOrder = random.sample(range(0, PIXEL_COUNT), k=PIXEL_COUNT) tree = [] def addToTree(i): newNode = dict(i=i, left=-1, right=-1) newNodeIndex = len(tree) tree.append(newNode) if newNodeIndex > 0: nodeIndex = 0 dim = 0 while True: node = tree[nodeIndex] branch = "right" if coords[i][dim] > coords[node["i"]][dim] else "left" if node[branch] >= 0: nodeIndex = node[branch] else: node[branch] = newNodeIndex return dim = (dim + 1) % 3 def findWithinBox(minCoords, maxCoords): foundIndices = [] def search(nodeIndex, dim): if nodeIndex >= 0: node = tree[nodeIndex] nodeCoords = coords[node["i"]] if all(nodeCoords[d] > minCoords[d] and nodeCoords[d] < maxCoords[d] for d in range(0, 3)): foundIndices.append(node["i"]) if nodeCoords[dim] > minCoords[dim]: search(node["left"], (dim + 1) % 3) if nodeCoords[dim] < maxCoords[dim]: search(node["right"], (dim + 1) % 3) search(0, 0) return foundIndices def norm2(p1, p2): return sum((p1[d] - p2[d]) * (p1[d] - p2[d]) for d in range(0, 3)) def findWithinRadius(centre, radius): withinBox = findWithinBox([c - radius for c in centre], [c + radius for c in centre]) return [i for i in withinBox if norm2(centre, coords[i]) < radius * radius] for i in treeBuildOrder: addToTree(i) def colourFade(c1, c2, fade): return [c1[c] * fade + c2[c] * (1 - fade) for c in range(0, 3)] # VARIOUS SETTINGS slow = 0 maxInfectRadius = 80 # probability of infection at zero distance maxInfectProb = 0.1 # multiply by maxInfectProb to get probability of infection at distance maxInfectRadius infectProbMultiplierAtRadius = 0.5 # how many iterations an infection last for (and can be passed on) infectionDuration = 5 # how many iterations with no infections to wait before resetting inactivityIterationsBeforeReset = 10 # how many iterations the reset transition lasts resetTransitionDuration = 40 # colour for uninfected lights uninfectedColour = [10, 10, 10] # colour for infected lights is different each cycle, this number controls # the brightness (max 256) infectedColourBrightness = 150 # colour for recovered lights is chosen by combining uninfected and infected colours using this weighting recoveredColourFade = 0.2 # INITIALISATION colours = dict(uninfected=uninfectedColour) resetCountdown = inactivityIterationsBeforeReset infectionStatus = [] def reset(): infectionStatus.clear() infectionStatus.extend(("uninfected", 0) for _ in coords) infectionStatus[random.randrange(0, PIXEL_COUNT)] = ("infected", 1) # choose a new colour for infected lights g = random.randrange(0, infectedColourBrightness) r = random.randrange(0, infectedColourBrightness - g) b = infectedColourBrightness - g - r infectedColour = [g, r, b] colours["infected"] = infectedColour colours["recovered"] = colourFade(infectedColour, uninfectedColour, recoveredColourFade) # CONTAGION CALCULATIONS distanceFactor = (1 / infectProbMultiplierAtRadius) - 1 def infectionProbability(p1, p2): return maxInfectProb / (1 + distanceFactor * (norm2(p1, p2) / (maxInfectRadius * maxInfectRadius))) def isSusceptible(i): (currentStatus, _) = infectionStatus[i] return currentStatus == "uninfected" # yes, I just run which run is true reset() run = 1 while run == 1: time.sleep(slow) if resetCountdown <= -resetTransitionDuration: resetCountdown = inactivityIterationsBeforeReset reset() newInfections = [] if resetCountdown <= 0: resetProb = -resetCountdown / resetTransitionDuration resetProb *= resetProb for i in range(0, PIXEL_COUNT): if random.random() < resetProb: infectionStatus[i] = ("uninfected", 0) (currentStatus, _) = infectionStatus[i] pixels[i] = colours[currentStatus] else: for i in range(0, PIXEL_COUNT): (currentStatus, iterationsInfected) = infectionStatus[i] if currentStatus == "infected": if iterationsInfected >= infectionDuration: infectionStatus[i] = ("recovered", 0) else: infectionStatus[i] = ("infected", iterationsInfected + 1) newInfections.extend(j for j in findWithinRadius(coords[i], maxInfectRadius) if isSusceptible(j) and random.random() < infectionProbability(coords[i], coords[j])) for j in newInfections: infectionStatus[j] = ("infected", 0) for i in range(0, PIXEL_COUNT): (currentStatus, _) = infectionStatus[i] pixels[i] = colours[currentStatus] if len(newInfections) > 0: resetCountdown = inactivityIterationsBeforeReset else: resetCountdown -= 1 # use the show() option as rarely as possible as it takes ages # do not use show() each time you change a LED but rather wait until you have changed them all pixels.show() return 'DONE' # yes, I just put this at the bottom so it auto runs xmaslight()
174932
from pytest import fixture from pygiftgrab import ColourSpace def pytest_addoption(parser): parser.addoption('--address', action='store', help='Network source address') parser.addoption('--init-delay', action='store', type=float, help='Network source initialisation delay (sec)') parser.addoption('--colour-space', action='store', help='Colour space specification (BGRA or I420)') parser.addoption('--frame-rate', action='store', type=int, help='Frame-rate specification for test') parser.addoption('--observers', action='store', type=int, help='Number of observers to use when testing frame rate') @fixture(scope='session') def address(request): return request.config.getoption('--address') @fixture(scope='session') def init_delay(request): return request.config.getoption('--init-delay') @fixture(scope='session') def colour_space(request): colour_space = request.config.getoption('--colour-space') case_insensitive = colour_space.lower() if case_insensitive == 'bgra': return ColourSpace.BGRA elif case_insensitive == 'i420': return ColourSpace.I420 else: raise RuntimeError('Could not recognise colour space ' + colour_space) @fixture(scope='session') def frame_rate(request): return request.config.getoption('--frame-rate') @fixture(scope='session') def observers(request): return request.config.getoption('--observers')
174967
import library, figure_library from MDP import * from ValueIteration import ValueIteration from SpriteFigure import SpriteFigure
174990
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals """Auxilary functions for group representations""" import numpy as np def sgn(s): """return (-1)**(s)""" return 1 - ((s & 1) << 1) def zero_vector(length, *data): """Return zero numpy vector of given length and type np.int32""" return np.zeros(length, dtype = np.int32) #234567890123456789012345678901234567890123456789012345678901234567890 def pm_mat_from_function(f, l): """Create an l times l matrix from a function f. The returned matrix m has entries m[i,j] = (-1)**f(i,j), i, j = 0,...,l-1. It is a numpy array of shape (l,l) and type np.int32. """ a = np.zeros((l,l), dtype = np.int32) for i in range(l): for j in range(l): a[i,j] = 1 - 2 * (f(i,j) & 1) return a def pm_diag_from_function(f, l): """Create an l times l diagonal matrix from a function f. The returned matrix m has entries m[i,i] = (-1)**f(i), i = 0,...,l-1, and zero entries for i != j. It is a numpy array of shape (l,l) and type np.int32. """ a = np.zeros((l,l), dtype = np.int32) for i in range(l): a[i,i] = 1 - 2 * (f(i) & 1) return a
175004
from __future__ import print_function,division import torch import torch.nn as nn from torch.utils.data import DataLoader class Evaluator(object): def __init__(self,loss=nn.MSELoss(),batch_size=64,delay=36,valid_feature_indices=list(range(0,3)),begin_compute_loss_index=0): self.loss=loss self.batch_size=batch_size self.delay=delay self.valid_feature_indices=valid_feature_indices self.begin_compute_loss_index=begin_compute_loss_index def evaluate(self,model,data,device=torch.device('cpu')): model.eval() loss=self.loss dataloader= DataLoader(dataset=data,batch_size=self.batch_size,shuffle=True,num_workers=0) _loss_val=0.0 rmse=0 with torch.no_grad(): model=model.to(device) for batch in dataloader: input_vars=batch['X'].to(device) decoder_inputs=batch['decoder_inputs'].to(device) target_vars=batch['y'].to(device) atten_features=batch['atten_features'].to(device) seq2seq_outputs=model(input_vars,decoder_inputs,atten_features) _loss_val+=loss(seq2seq_outputs[:,self.begin_compute_loss_index:,self.valid_feature_indices],target_vars[:,self.begin_compute_loss_index:,self.valid_feature_indices]).item() return _loss_val/(len(dataloader)),rmse
175062
import pytz from rest_framework import serializers from data.models import Summary class RegionListSerializer(serializers.Serializer): region = serializers.CharField(max_length=200) region_slug = serializers.CharField(max_length=200) class Meta: ref_name = "RegionListV1" class RegionSerializer(serializers.Serializer): region = serializers.CharField(max_length=200) region_slug = serializers.CharField(max_length=200) lat = serializers.FloatField() long = serializers.FloatField() confirmed = serializers.IntegerField() deaths = serializers.IntegerField() recovered = serializers.IntegerField() updated = serializers.DateTimeField(default_timezone=pytz.utc) class Meta: ref_name = "RegionV1" class WorldSerializer(serializers.ModelSerializer): regions_data = RegionSerializer(source="get_regions_data", many=True) created = serializers.SerializerMethodField() class Meta: model = Summary ref_name = "WorldV1" fields = ["created", "confirmed", "deaths", "recovered", "regions_data"] def get_created(self, obj): dt = obj.created.replace(microsecond=0).replace(tzinfo=None).isoformat() return dt + "Z"
175086
def error_handler(decorated): def wrapper(self, *args, **kwargs): try: return decorated(self, *args, **kwargs) except Exception as exc: if self.ctx.debug: import traceback traceback.print_exc() if "ServiceException" in str(type(exc)): exc = Exception(exc.message) self.ctx.log(str(exc)) if not hasattr(self.ctx, 'not_reraise_exceptions')\ or not self.ctx.not_reraise_exceptions: raise return wrapper def authenticated(decorated): def wrapper(self, *args, **kwargs): self.credentials.verify() return decorated(self, *args, **kwargs) return wrapper
175130
from easydict import EasyDict as edict import numpy as np import torch.nn as nn __C = edict() cfg = __C ### Define config flags here ### Some flags are dummy, would be removed later ### Name of the config __C.TAG = 'default' ### Training and validation __C.GT_DEPTH_DIR = None __C.TRAIN_SIZE = [256,512] __C.VAL_SIZE = [370,1224] __C.MIN_DEPTH = 1.0 __C.FLIP_AUG = False __C.EIGEN_SFM = False __C.ZOOM_INPUT = False __C.SAVE_POSE = False __C.MILESTONES = [2,5,8] __C.TRAIN_FLOW = False __C.STORED_POSE = False __C.NORM_TARGET = 0.8 __C.PRED_POSE_ONLINE = True ### Deep PSNet, used as our depth estimation module __C.PSNET_CONTEXT = True __C.PSNET_DEP_CONTEXT = False ### RANSAC __C.POSE_EST = 'RANSAC' __C.ransac_iter = 5 __C.ransac_threshold = 1e-4 __C.min_matches = 20 ### Deep Pose regression, for ablation study __C.POSE_NET_TYPE = 'plain' __C.POSE_DOWN_FEAT = 128 __C.POSENET_FLOW = False __C.POSENET_ENTRO= False __C.POSE_WITH_BN = True ### __C.GENERATE_DEMON_POSE_OR_DEPTH = False __C.ALL_VELO_RAW = False __C.NO_MASK = False __C.NO_SIFT = False __C.TRUNC_SOFT = False __C.KITTI_697 = True __C.RANDOM_FW_BW = False __C.RANDOM_OFFSET = False __C.FILTERED_PAIR = True __C.COST_BY_COLOR = False __C.COST_BY_COLOR_WITH_FEAT = False __C.PREDICT_BY_DEPTH = False __C.NOT_CROP_VAL = False __C.FILTER_OUT_RGBD = False __C.KITTI_RAW_DATASET = False __C.FILTER_DEMON_DATASET = False __C.FILTER_DEMON_DATASET_FT = False __C.FLOW_MASK = False __C.GENERATE_DEMON_POSE_TO_SAVE = False __C.DEMON_GENERATED_IDX = 0 __C.GENERATE_KITTI_POSE_TO_SAVE = False __C.DEMON_DATASET = False __C.DEMON_DATASET_SPE = 'None' __C.FLOW_SPLIT_TRAIN = False __C.SEQ_LEN = 5 __C.RESCALE_DEPTH = False __C.RESCALE_DEPTH_REMASK = False __C.REL_ABS_LOSS = False __C.MIN_TRAIN_SCALE = 0.2 __C.MAX_TRAIN_SCALE = 3.0 __C.POSE_SEQ = [9] __C.PRED_POSE_GT_SCALE = False __C.RECORD_POSE = False __C.RECORD_POSE_EVAL = False __C.PRED_POSE_VAL_ONLINE = False __C.CHECK_WRONG_POSE = False __C.CONTEXT_BN = False __C.FIX_DEPTH = False __C.SUP_INIT = True __C.IND_CONTEXT = False __C.POSE_AWARE_MAX = False __C.VALIDATE_FW = False __C.MIXED_PREC = False __C.NO_SMOOTH = True __C.FLOW_EST = 'DICL' __C.DEPTH_EST = 'PSNET' __C.SCALE_MIN = 0.9 __C.SCALE_MAX = 1.1 __C.SCALE_STEP = 0.025 __C.FLOW_AND_JOINT_LOSS = False __C.POSE_AWARE_MEAN = False __C.SKIP = 1 __C.GT_POSE = False __C.GT_POSE_NORMALIZED = False __C.FLOW_POSE = True __C.FLOW_BY_SIFT = False __C.SIFT_POSE = False __C.FLOW_CONF = -1.0 __C.SAMPLE_SP = False #################################################################################### ### Configs for DICL Flow ### To Be Removed Soon __C.MAX_DISP = [[6,6],[6,6],[6,6]] __C.MIN_DISP = [[-6,-6],[-6,-6],[-6,-6]] __C.SOFT2D = True __C.FLOWAGG = True __C.COST_TOGETHER = False __C.RANDOM_TRANS = 10 __C.DOWN_FEAT = False __C.SPARSE_RESIZE = True __C.KITTI_REMOVE130 = False __C.SMOOTH_BY_TEMP = False __C.CORR_BY_COS = False __C.CLAMP_INPUT = True __C.MIN_SCALE = 128 __C.UP_TO_RAW_SCALE = False __C.KITTI_NO_VALID = False __C.RAW_SINTEL_RATIO = 5 __C.USE_PCA_AUG = False __C.SHALLOW_DOWN_SMALL = False __C.BASIC_WITH_LEAKYRELU = False __C.RAFT_RESIZE_CV2 = True __C.MATCH_WITHDIS = False __C.PAD_BY_CONS = False __C.PAD_CONS = -1 __C.RAW_THING = False __C.asymmetric_color_aug = False __C.WEIGHT_DECAY = 0.0 __C.UPCONV = True __C.DETACH_FUSION = False __C.USE_CONTEXT6 = True __C.USE_CONTEXT5 = True __C.USE_SUBLOSS = False __C.SUBLOSS_W = 0.001 __C.SHALLOW_SHARE = False __C.SHALLOW_Down = False __C.WITH_DIFF = False __C.REMOVE_WARP_HOLE = True __C.CONC_KITTI = False __C.DROP_LAST = True __C.TRUNCATED = False __C.TRUNCATED_SIZE = 3 __C.CORRECT_ENTRO = False __C.CORRECT_ENTRO_SOFT = False __C.USE_SEQ_LOSS = False __C.COST6_RATIO = 1.0 __C.COST5_RATIO = 1.0 __C.COST4_RATIO = 1.0 __C.COST3_RATIO = 1.0 __C.COST2_RATIO = 1.0 __C.SMOOTH_COST = False __C.SMOOTH_LOSS = False __C.SMOOTH_LOSS_WEIGHT = 0.1 __C.SMOOTH_SHARE = False __C.SMOOTH_INIT_BY_ID = False __C.FLOW_REG_BY_MAX = True __C.SMOOTH_COST_ONLY_FLOW6 = False __C.SMOOTH_COST_WITH_THREEMLP = False __C.SCALE_BY_MASK = False __C.DISTRIBUTED = False __C.NO_SPATIAL = False __C.NO_ERASE = False __C.HALF_THINGS = False __C.FIX_MATCHING = False __C.MATCHING_USE_BN = False __C.MATCHING_USE_RELU = False __C.USE_CORR = False __C.TIMES_RATIO = False __C.VALID_RANGE = [[8,8], [32,32], [64,64], [128,128]] __C.USE_VALID_RANGE = True __C.USE_FUSION = False __C.FULL_SINTEL = True __C.DETACH_FLOW = True __C.COST_COMP_METHOD = 'compute_cost_vcn_together' __C.LOSS_TYPE = 'L1' __C.MultiScale_W = [1.,0.5,0.25] __C.CROP_SIZE = [256,256] __C.FEATURE_NET = 'SPP' __C.MATCH_INPUTC = [128,64,64] __C.SEATCH_RANGE = [8,12,8] __C.AUG_BY_ROT = False __C.DILATED_LLL = False __C.FAC = 1.0 __C.MD = [4,4,4,4,4] __C.SEP_LEVEL = 1 __C.ADD_FEATURE = False __C.CTF = False __C.CTF_CONTEXT = False __C.CTF_CONTEXT_ONLY_FLOW2 = False __C.REFINE = 1 __C.REFINE_DETACH = False __C.SHARE_MATCHING = False __C.SHARE_MATCHING_MLP = False __C.COS_LR = False __C.COS_TMAX = 20 __C.PSP_FEATURE = False __C.NO_DECONV = False __C.USE_RAW_FLOW2 = False __C.SUP_RAW_FLOW = False __C.SCALE_CONTEXT6 = 1.0 __C.SCALE_CONTEXT5 = 1.0 __C.SCALE_CONTEXT4 = 1.0 __C.SCALE_CONTEXT3 = 1.0 __C.SCALE_CONTEXT2 = 1.0 ########################################################################################## def cfg_from_file(filename): """Load a config file and merge it into the default options.""" import yaml with open(filename, 'r') as f: yaml_cfg = edict(yaml.load(f)) _merge_a_into_b(yaml_cfg, __C) def _merge_a_into_b(a, b): """Merge config dictionary a into config dictionary b, clobbering the options in b whenever they are also specified in a. """ if type(a) is not edict: return for k, v in a.items(): # a must specify keys that are in b if k not in b: raise KeyError('{} is not a valid config key'.format(k)) # the types must match, too old_type = type(b[k]) if old_type is not type(v): if isinstance(b[k], np.ndarray): v = np.array(v, dtype=b[k].dtype) else: raise ValueError(('Type mismatch ({} vs. {}) ' 'for config key: {}').format(type(b[k]), type(v), k)) # recursively merge dicts if type(v) is edict: try: _merge_a_into_b(a[k], b[k]) except: print(('Error under config key: {}'.format(k))) raise else: b[k] = v def cfg_from_list(cfg_list): """Set config keys via list (e.g., from command line).""" from ast import literal_eval assert len(cfg_list) % 2 == 0 for k, v in zip(cfg_list[0::2], cfg_list[1::2]): key_list = k.split('.') d = __C for subkey in key_list[:-1]: assert subkey in d d = d[subkey] subkey = key_list[-1] assert subkey in d try: value = literal_eval(v) except: # handle the case when v is a string literal value = v assert type(value) == type(d[subkey]), \ 'type {} does not match original type {}'.format(type(value), type(d[subkey])) d[subkey] = value def save_config_to_file(cfg, pre='cfg', logger=None): for key, val in cfg.items(): if isinstance(cfg[key], edict): if logger is not None: logger.info('\n%s.%s = edict()' % (pre, key)) else: print('\n%s.%s = edict()' % (pre, key)) save_config_to_file(cfg[key], pre=pre + '.' + key, logger=logger) continue if logger is not None: logger.info('%s.%s: %s' % (pre, key, val)) else: print('%s.%s: %s' % (pre, key, val))
175155
import uos from pybricks.experimental import run_parallel from pybricks.tools import wait if uos.getenv("PYBRICKS_BUILD_ENV") == "docker-armel": # qemu-user-static has issues with threads print("SKIP") raise SystemExit def task1(): wait(1000) return "OK1" def task2(): wait(500) return "OK2" def task3(): # Unhandled Exception should interrupt all other tasks raise Exception("oops") def task4(): # Unhandled BaseException does not interrupt other tasks raise SystemExit result = run_parallel(task1, task2) print(repr(result[task1])) print(repr(result[task2])) try: run_parallel(task1, task2, task3) except RuntimeError as ex: print(ex.args[0]) # message print(repr(ex.args[1][task1])) # sometimes task2 finishes before being interrupted # print(repr(ex.args[1][task2])) print(repr(ex.args[1][task3])) result = run_parallel(task1, task2, task4) print(repr(result[task1])) print(repr(result[task2])) print(repr(result[task4]))
175187
import random import numpy as np import torch def set_seed(seed): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) def cuda_if(torch_object, cuda): return torch_object.cuda() if cuda else torch_object def gae(rewards, masks, values, gamma, lambd): """ Generalized Advantage Estimation Args: rewards (FloatTensor): rewards shaped [T x N x 1] masks (FloatTensor): continuation masks shaped [T x N x 1] zero at done timesteps, one otherwise values (Variable): value predictions shaped [(T + 1) x N x 1] gamma (float): discount factor lambd (float): GAE lambda parameter Returns: advantages (FloatTensor): advantages shaped [T x N x 1] returns (FloatTensor): returns shaped [T x N x 1] """ T, N, _ = rewards.size() cuda = rewards.is_cuda advantages = torch.zeros(T, N, 1) advantages = cuda_if(advantages, cuda) advantage_t = torch.zeros(N, 1) advantage_t = cuda_if(advantage_t, cuda) for t in reversed(range(T)): delta = rewards[t] + values[t + 1].data * gamma * masks[t] - values[t].data advantage_t = delta + advantage_t * gamma * lambd * masks[t] advantages[t] = advantage_t returns = values[:T].data + advantages return advantages, returns def mean_std_groups(x, y, group_size): num_groups = int(len(x) / group_size) x, x_tail = x[:group_size * num_groups], x[group_size * num_groups:] x = x.reshape((num_groups, group_size)) y, y_tail = y[:group_size * num_groups], y[group_size * num_groups:] y = y.reshape((num_groups, group_size)) x_means = x.mean(axis=1) x_stds = x.std(axis=1) if len(x_tail) > 0: x_means = np.concatenate([x_means, x_tail.mean(axis=0, keepdims=True)]) x_stds = np.concatenate([x_stds, x_tail.std(axis=0, keepdims=True)]) y_means = y.mean(axis=1) y_stds = y.std(axis=1) if len(y_tail) > 0: y_means = np.concatenate([y_means, y_tail.mean(axis=0, keepdims=True)]) y_stds = np.concatenate([y_stds, y_tail.std(axis=0, keepdims=True)]) return x_means, x_stds, y_means, y_stds def set_lr(optimizer, lr): for param_group in optimizer.param_groups: param_group['lr'] = lr
175199
import unittest from torch_complex import torch class TestComplexTensor(unittest.TestCase): def test_empty(self): torch.empty(2, 2, dtype=torch.complex64) torch.empty(2, 2, dtype=torch.complex128) def test_indexing(self): t = torch.empty(2, 2, dtype=torch.complex128) t[1] t[1, 1] def test_fill(self): t = torch.empty(2, 2, dtype=torch.complex128) t.fill_(1.0) t.fill_(1.0 + 2.0j) def test_scalar_binary_op(self): a = torch.ones(2, 2, dtype=torch.complex128) 2 * a 2 / a 2 - a 2 + a def test_blas(self): pass def test_rand(self): pass if __name__ == '__main__': unittest.main()
175219
import unittest from jivago.wsgi.invocation.resource_invoker import ResourceInvoker from jivago.wsgi.invocation.rewrite.path_rewriting_route_handler_decorator import PathRewritingRouteHandlerDecorator from jivago.wsgi.methods import GET from jivago.wsgi.routing.routing_rule import RoutingRule from jivago.wsgi.routing.table.tree_routing_table import TreeRoutingTable from test_utils.request_builder import RequestBuilder class RoutingRuleTest(unittest.TestCase): def setUp(self): self.routing_table = TreeRoutingTable() self.routing_table.register_route(GET, "/path", object(), object()) def test_matchingPrefixRootPrefix(self): rule = RoutingRule("/", None) self.assertTrue(rule.matches("/foo")) self.assertTrue(rule.matches("/")) def test_matchingPrefix(self): rule = RoutingRule("/users", None) self.assertTrue(rule.matches("/users")) self.assertTrue(rule.matches("/users/foo/bar/delete")) self.assertFalse(rule.matches("/admin")) def test_givenPathWhichDoesNotMatchRule_whenGettingRouteRegistrations_thenReturnEmptyList(self): rule = RoutingRule("/users", None) routes = rule.get_route_registrations("/foobar") self.assertEqual(0, len(routes)) def test_whenCreatingRouteHandlers_thenRewritePaths(self): request = RequestBuilder().path("/users/path").build() rule = RoutingRule("/users", self.routing_table, rewrite_path=True) handlers = [x for x in rule.create_route_handlers(request, None, None)] self.assertIsInstance(handlers[0], PathRewritingRouteHandlerDecorator) def test_givenShouldNotRewritePath_whenCreatingRouteHandlers_thenReturnStandardResourceInvokers(self): request = RequestBuilder().path("/users/path").build() rule = RoutingRule("/users", self.routing_table, rewrite_path=False) handlers = [x for x in rule.create_route_handlers(request, None, None)] self.assertIsInstance(handlers[0], ResourceInvoker)
175225
import os import abc import cv2 import numpy as np import tensorflow as tf class TFRecordGenerator(abc.ABC): def __init__(self, tfrecord_path, labels, dir_paths=None, file_paths=None): # tfrecord_path : record tfrecord_path # dir_paths : dir paths of different image sources # labels : label for each dir path # file_paths : files that each contains list of images self.tfrecord_path = None self.file_paths = None self.labels = None self.file_count = None self.update_record_paths(tfrecord_path, labels, dir_paths, file_paths) def update_record_paths(self, tfrecord_path, labels, dir_paths=None, file_paths=None): if file_paths is None and dir_paths is None: raise ValueError("Both dir_paths and file_paths are none") elif file_paths is None: if len(dir_paths) != len(labels): raise ValueError("Length of file_paths and labels are not equal") file_paths = self._convert_dir_to_file_path(dir_paths) files_count = np.array([len(files) for files in file_paths]) if not np.all(files_count == files_count[0]): raise ValueError("File paths have different number of files") self.tfrecord_path = tfrecord_path self.file_paths = zip(*file_paths) self.labels = labels self.file_count = files_count[0] def generate_record(self): with tf.io.TFRecordWriter(self.tfrecord_path) as writer: for count, img_paths in enumerate(self.file_paths): example = self._convert_one_example(img_paths) writer.write(example.SerializeToString()) print("complete {:0>4d}/{:0>4d} example".format(count+1, self.file_count)) def _convert_dir_to_file_path(self, dir_paths): file_paths = [] for dir_path in dir_paths: file_path = [os.path.join(dir_path, f) for f in os.listdir(dir_path) if os.path.isfile(os.path.join(dir_path, f))] # sort file path, make sure files in different folders are matched file_path.sort() file_paths.append(file_path) return file_paths @abc.abstractmethod def _convert_one_example(self, img_paths): """ define how each example should be processed """ class TFRecordGeneratorforTH(TFRecordGenerator): def __init__(self, tfrecord_path, labels, dir_paths=None, file_paths=None): super(TFRecordGeneratorforTH, self).__init__(tfrecord_path, labels, dir_paths, file_paths) def _convert_one_example(self, img_paths): features = dict() # all images have same shape for count, img_path in enumerate(img_paths): # save exr image as float32 1d-array in **NCHW** format # for best GPU inference performance tmp = np.transpose(cv2.imread(img_path, -1), [2,0,1]) if self.labels[count].startswith("depth"): # keep depth image as single channel to reduce memory cost tmp = tmp[0,:,:] tmp = tmp.flatten() features[self.labels[count]] = tf.train.Feature(float_list = tf.train.FloatList(value=tmp)) example = tf.train.Example(features = tf.train.Features(feature = features)) return example class TFRecordExtractor(abc.ABC): def __init__(self, tfrecord_path, dataset_params, labels): # tfrecord_path : record tfrecord_path # dataset_params : parameters for constructing dataset pipeline # labels : label for each image self.tfrecord_path = None self.dataset_params = None self.labels = None self.iterator = None self.update_record_path(tfrecord_path, dataset_params, labels) def update_record_path(self, tfrecord_path, dataset_params, labels): self.tfrecord_path = os.path.abspath(tfrecord_path) self.dataset_params = dataset_params self.labels = labels def _extract_fn(self, tfrecord): """ define how each example should be parsed """ def build_dataset(self): # Pipeline of dataset and iterator dataset = tf.data.TFRecordDataset([self.tfrecord_path]) dataset = dataset.shuffle(buffer_size=self.dataset_params["shuffle_buffer_size"]) if self.dataset_params["repeat"]: dataset = dataset.repeat() dataset = dataset.map(self._extract_fn, num_parallel_calls=self.dataset_params["num_parallel_calls"]) dataset = dataset.batch(self.dataset_params["batch"]) dataset = dataset.prefetch(buffer_size=self.dataset_params["prefetch_buffer_size"]) iterator = tf.compat.v1.data.make_one_shot_iterator(dataset) self.iterator = iterator return iterator class TFRecordExtractorforTH(TFRecordExtractor): def __init__(self, tfrecord_path, dataset_params, labels): super(TFRecordExtractorforTH, self).__init__(tfrecord_path, dataset_params, labels) def _extract_fn(self, tfrecord): # Extract features using the keys set during creation features = dict() for element in self.labels: # restore image in to 3d with provided shape if element.startswith("depth"): # load as single channel image features[element] = tf.io.FixedLenFeature((1, self.dataset_params["res_h"], self.dataset_params["res_w"]), tf.float32) else: features[element] = tf.io.FixedLenFeature((3, self.dataset_params["res_h"], self.dataset_params["res_w"]), tf.float32) # Extract the data record imgs = tf.io.parse_single_example(tfrecord, features) return imgs
175232
from CPT import * model = CPT() data,target = model.load_files("./data/train.csv","./data/test.csv") model.train(data) predictions = model.predict(data,target,5,3)
175250
import os, sys, inspect import multiprocessing import platform def setup_paths(caffe_path, malis_path): cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) if cmd_folder not in sys.path: sys.path.append(cmd_folder) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0], caffe_path + "/python"))) if cmd_subfolder not in sys.path: sys.path.append(cmd_subfolder) cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0], malis_path))) if cmd_subfolder not in sys.path: sys.path.append(cmd_subfolder) sys.path.append(caffe_path + "/python") sys.path.append(malis_path + "/python") def linux_distribution(): try: return platform.linux_distribution() except: return "N/A" def sys_info(): print("""Python version: %s dist: %s linux_distribution: %s system: %s machine: %s platform: %s uname: %s version: %s mac_ver: %s """ % ( sys.version.split('\n'), str(platform.dist()), linux_distribution(), platform.system(), platform.machine(), platform.platform(), platform.uname(), platform.version(), platform.mac_ver(), )) def install_dependencies(): # We support Fedora (22/23/24) and Ubuntu (14.05/15.05) if (linux_distribution()[0].lower() == "fedora"): # TODO: Add missing Fedora packages os.system('dnf install -y git gcc') os.system('dnf install -y protobuf-python protobuf-c protobuf-compiler') os.system('dnf install -y boost-system boost-devel boost-python') os.system('dnf install -y glog glog-devel gflags gflags-devel') os.system('dnf install -y python python-devel python-pip') os.system('dnf install -y atlas atlas-sse2 atlas-sse3') os.system('dnf install -y openblas openblas-devel openblas-openmp64 openblas-openmp openblas-threads64 openblas-threads') os.system('dnf install -y opencl-headers') if (linux_distribution()[0].lower() == "ubuntu"): # TODO: Add missing Ubuntu packages os.system('apt-get update -y') os.system('apt-get install -y git gcc') os.system('apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev') os.system('apt-get install -y protobuf-compiler gfortran libjpeg62 libfreeimage-dev libatlas-base-dev') os.system('apt-get install -y libopenblas-base libopenblas-dev') os.system('apt-get install -y libgoogle-glog-dev libbz2-dev libxml2-dev libxslt-dev libffi-dev libssl-dev libgflags-dev liblmdb-dev') os.system('apt-get install -y python-dev python-pip python-yaml') os.system('apt-get install -y libviennacl-dev opencl-headers') os.system('pip install --upgrade pip') os.system('pip install cython') def compile_malis(path): cwd = os.getcwd() os.chdir(path) os.system('sh make.sh') os.chdir(cwd) def compile_caffe(path): cpus = multiprocessing.cpu_count() cwd = os.getcwd() os.chdir(path) # Copy the default Caffe configuration if not existing os.system("cp -n Makefile.config.example Makefile.config") result = os.system("make all -j %s" % cpus) if result != 0: sys.exit(result) result = os.system("make pycaffe -j %s" % cpus) if result != 0: sys.exit(result) os.chdir(cwd) def clone_malis(path, clone, update): if clone: os.system('git clone https://github.com/srinituraga/malis.git %s' % path) if update: cwd = os.getcwd() os.chdir(path) os.system('git pull') os.chdir(cwd) def clone_caffe(path, clone, update): if clone: os.system('git clone https://github.com/naibaf7/caffe.git %s' % path) if update: cwd = os.getcwd() os.chdir(path) os.system('git pull') os.chdir(cwd) def set_environment_vars(): # Fix up OpenCL variables. Can interfere with the # frame buffer if the GPU is also a display driver os.environ["GPU_MAX_ALLOC_PERCENT"] = "100" os.environ["GPU_SINGLE_ALLOC_PERCENT"] = "100" os.environ["GPU_MAX_HEAP_SIZE"] = "100" os.environ["GPU_FORCE_64BIT_PTR"] = "1"
175274
import csv import operator import os from collections import defaultdict from datetime import datetime from twilio.rest import TwilioRestClient FAILED_STATUSES = set(['busy', 'no-answer', 'ringing', 'failed', 'canceled']) account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] client = TwilioRestClient(account_sid, auth_token) inbound_calls = [] outbound_calls = [] durations = [] nonzero_durations = [] failed_calls = [] to = [] total = 0 c = 0 calls = client.calls.iter() with open('logs_844usa.csv', 'w') as csvfile: fieldnames = ['from', 'to', 'status', 'duration', 'direction', 'time'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() for call in calls: duration = 0 if call.duration is None else int(call.duration) if call.direction == 'inbound': inbound_calls.append(call) if call.direction == 'outbound-dial': outbound_calls.append(call) durations.append(duration) if duration > 0: nonzero_durations.append(duration) to.append(call.to_formatted) if call.status in FAILED_STATUSES: failed_calls.append(call) writer.writerow({ 'from': call.from_formatted, 'to': call.to_formatted, 'status': call.status, 'duration': duration, 'direction': call.direction, 'time': call.date_created.isoformat(), }) total += 1 c += 1 if c > 100: print total, '...' c = 0 print('busy/failed', len(failed_calls)) print('inbound', len(inbound_calls)) print('outbound', len(outbound_calls)) print('in/out ratio', round(float(len(outbound_calls))/(float(len(inbound_calls)))),3)[0] print('total duration', sum(durations)) print('average duration', float(sum(durations))/max(1, len(durations))) print('total nonzero duration', sum(nonzero_durations)) print('average nonzero duration', float(sum(nonzero_durations))/max(1, len(nonzero_durations))) print('num reps', len(set(to))) freq = defaultdict(int) for phone in to: freq[phone] += 1 print('frequencies') print(sorted(freq.items(), key=operator.itemgetter(1)))
175281
import requests import urllib.parse funcs = {'commande': {}, 'action': {}} class Cmd(str): ''' Object for text of message ''' __atts = [] def __init__(self, text): str.__init__(text) def set_atts(self, atts): for att in atts: self.__atts.append(att) @property def attachments(self): return self.__atts class Payload: ''' Object for Payload Management ''' def __init__(self, payload, **kwargs) -> None: ''' Object for Payload Management ''' self.payload = payload self.data = kwargs def __str__(self): return self.payload @staticmethod def trt_payload_in(payload): """ processing of payloads received in a sequence of structured parameters @params: payload [String] @return: payload [String] , structured parameters Dict """ payload = urllib.parse.unquote(str(payload)) res = {} while '{{' in payload: start = payload.index('{{') end = payload.index('}}') items = payload[start+2:end].split('===') res[items[0]] = items[1] payload = payload.replace(payload[start:end+2], '') return payload.strip(), res @staticmethod def trt_payload_out(payload): """ Processing of a Payload type as a character string @params: payload [ Payload | String ] @return: String """ if isinstance(payload, Payload): tmp = '' for key_data, val_data in payload.data.items(): tmp += f'{{{{{key_data}==={val_data}}}}} ' return urllib.parse.quote(payload.payload + ' ' + tmp) return urllib.parse.quote(payload) def analyse(data): ''' Function analyzing data received from Facebook The data received are of type Json . ''' def struct_atts(data): return data['payload']['url'] for event in data['entry']: messaging = event['messaging'] for message in messaging: if message.get('message'): # Get user_id sender_id = message['sender']['id'] if message['message'].get('attachments'): # Get file name data = message['message'].get('attachments') # creation de l'objet cmd personalisé atts = list(map(struct_atts, data)) cmd = Cmd(atts[0]) cmd.set_atts(atts) return sender_id, cmd, message elif message['message'].get('quick_reply'): # if the response is a quick reply return sender_id, Cmd(message['message']['quick_reply'].get('payload')), message elif message['message'].get('text'): # if the response is a simple text return sender_id, Cmd(message['message'].get('text')), message if message.get('postback'): recipient_id = message['sender']['id'] pst_payload = message['postback']['payload'] return recipient_id, Cmd(pst_payload), message def command(*args, **kwargs): """ A decorator that registers the function as the route of a processing per command sent. """ def call_fn(function): funcs['commande'][args[0]] = function return call_fn def action(*args, **kwargs): """ A decorator that registers the function as the route of a defined action handler. """ def call_fn(function): funcs['action'][args[0]] = function return call_fn def download_file(url, file): ''' Downloading a file from an url. Args: url: direct link for the attachment file: filename with path ''' res = requests.get(url, allow_redirects=True) with open(file, 'wb') as f: f.write(res.content) return file
175304
from typing import Dict, Any, List, Optional from pydantic import BaseModel def find_element_in_list( element_list: List[Dict[str, Any]], **fields ) -> Optional[Dict[str, Any]]: """ Find element with some fields in list of elements >>> element_list = [dict(n="a", v=2), dict(n="b", v=3)] >>> find_element_in_list(element_list, n="a") ... dict(n="a", v=2) >>> find_element_in_list(element_list, n="b", v=3) ... dict(n="b", v=3) >>> find_element_in_list(element_list, v=42) ... None Args: element_list (List[Dict[str, Any]]): list of element with differents fields Returns: Dict[str, Any]: return element. Otherwise, return None. """ for element in element_list: if element.items() >= fields.items(): return element return None def generate_workflow_response(status_code=201, **kwargs) -> Dict[str, Any]: """ Generate CATCH workflow response Args: status_code (int, optional): status code like HTTP code. Defaults to 201. **kwargs: additional fields to add to the returned response Returns: Dict[str, Any]: Generated response """ headers = {"Content-Type": "application/json"} response = dict(status_code=status_code, headers=headers) response.update(kwargs) return response class Source(BaseModel): """ Hrflow Source """ key: str class Profile(BaseModel): """ Hrflow Profile """ key: str source: Source class EventParser(BaseModel): request: Dict[str, Any] def get_profile(self, source_to_listen: List[str] = None) -> Optional[Profile]: """ Get profile If the parser does not find `Profile` object, then it will return `None` Args: source_to_listen (List[str], optional): list of source keys to listen. Defaults to None if you want to listen all available sources. Returns: Optional[Profile]: `Profile` object or `None` if not found """ profile_dict = self.request.get("profile") if profile_dict is not None: profile_obj = Profile.parse_obj(profile_dict) if source_to_listen is None or profile_obj.source.key in source_to_listen: return profile_obj return None
175308
import pytest from common.version import InvalidVersionError, GenericVersion from indy_common.version import NodeVersion from indy_node.utils.node_control_utils import DebianVersion, NodeControlUtil, ShellError # TODO # - conditionally skip all tests for non-debian systems generated_command = None class UpstreamTest(NodeVersion): pass class DebianVersionTest(DebianVersion): def __init__(self, *args, **kwargs): super().__init__(*args, upstream_cls=UpstreamTest, **kwargs) @pytest.fixture(autouse=True) def clear_cache(): DebianVersionTest.clear_cache() @pytest.fixture def catch_generated_command(monkeypatch): global generated_command generated_command = None def _f(command, *args, **kwargs): global generated_command generated_command = command return '' monkeypatch.setattr(NodeControlUtil, 'run_shell_script_extended', _f) monkeypatch.setattr(NodeControlUtil, 'run_shell_command', _f) # TODO coverage @pytest.mark.parametrize( 'version', [ '', '1:' '-1' ] ) def test_invalid_no_upstream(version): with pytest.raises(InvalidVersionError): DebianVersionTest(version) @pytest.mark.parametrize( 'version', [ 'a:1.2.3', '12:3.4', '1.:2.3', ] ) def test_invalid_epoch(version): with pytest.raises(InvalidVersionError): DebianVersionTest(version) @pytest.mark.parametrize( 'version', [ 'a1.2.3', '1.2.3:3', # '1.2', TODO uncomment once new release logic becomes completed ] ) def test_invalid_upstream(version): with pytest.raises(InvalidVersionError): DebianVersionTest(version) def test_invalid_upstream_keep_tilde(): with pytest.raises(InvalidVersionError): DebianVersionTest('1.2.3~rc1', keep_tilde=True) # TODO coverage @pytest.mark.parametrize( 'epoch,upstream,revision', [ ('1', '1.2.3', ''), ('', '1.2.3~rc4', ''), ('', '1.2.3~rc4', '5'), ('', '1.2.3~dev4', '5'), ] ) def test_valid_version(epoch, upstream, revision): version = "{}{}{}".format( epoch + ':' if epoch else '', upstream, '-' + revision if revision else '' ) dv = DebianVersionTest(version) epoch = epoch if epoch else None upstream = UpstreamTest(upstream.replace('~', '.')) revision = revision if revision else None assert dv.epoch == epoch assert dv.upstream == upstream assert type(dv.upstream) == UpstreamTest assert dv.revision == revision assert dv.full == version assert dv.parts == (epoch, upstream, revision) assert dv.release == version assert dv.release_parts == (epoch, upstream, revision) def test_default_upstream_cls(): assert isinstance(DebianVersion('1.2.3').upstream, GenericVersion) def test_generated_cmd_cmp(catch_generated_command): version1 = '1.2.2' version2 = '1.2.3' DebianVersionTest(version1) == DebianVersionTest(version2) assert generated_command == ( "dpkg --compare-versions {} gt {}".format(version1, version2) ) def test_equal_no_shell_cmd(monkeypatch): called = 0 run_shell_script_extended = NodeControlUtil.run_shell_script_extended def _f(*args, **kwargs): nonlocal called called += 1 return run_shell_script_extended(*args, **kwargs) monkeypatch.setattr(NodeControlUtil, 'run_shell_script_extended', _f) assert DebianVersionTest('1.2.3') == DebianVersionTest('1.2.3') assert not called def test_comparison_operators(): assert DebianVersionTest('1.2.2') < DebianVersionTest('1.2.3') assert DebianVersionTest('1.2.3') > DebianVersionTest('1.2.2') assert DebianVersionTest('1.2.3') == DebianVersionTest('1.2.3') assert DebianVersionTest('1.2.2') <= DebianVersionTest('1.2.3') assert DebianVersionTest('1.2.3') >= DebianVersionTest('1.2.2') assert DebianVersionTest('1.2.3') != DebianVersionTest('1.2.2') def test_compare_called_once(monkeypatch): called = 0 run_shell_script_extended = NodeControlUtil.run_shell_script_extended def _f(*args, **kwargs): nonlocal called called += 1 return run_shell_script_extended(*args, **kwargs) monkeypatch.setattr(NodeControlUtil, 'run_shell_script_extended', _f) assert DebianVersionTest('1.2.3') > DebianVersionTest('1.2.2') assert DebianVersionTest('1.2.3') > DebianVersionTest('1.2.2') assert DebianVersionTest('1.2.2') < DebianVersionTest('1.2.3') assert called == 1 @pytest.mark.parametrize( 'v1,v2,expected', [ ('1.2.3', '1.2.2', True), ('1.2.3~dev1', '1.2.3', False), ('1.2.3~dev2', '1.2.3~dev1', True), ('1.2.3~rc1', '1.2.3', False), ('1.2.3~rc1', '1.2.3~dev1', True), ('1.2.3~rc2', '1.2.3~rc1', True), ] ) def test_compare_valid(v1, v2, expected): res = DebianVersionTest(v1) > DebianVersionTest(v2) assert res if expected else not res def test_compare_shell_error(monkeypatch): run_shell_script_extended = NodeControlUtil.run_shell_script_extended def _f(command, *args, **kwargs): return run_shell_script_extended('unknown command run', *args, **kwargs) monkeypatch.setattr(NodeControlUtil, 'run_shell_script_extended', _f) with pytest.raises(ShellError): DebianVersionTest('1.2.3') > DebianVersionTest('1.2.2')
175418
import torch import torch.nn as nn import torch.nn.functional as F class Loss(object): """docstring for Loss""" def __init__(self, opts): super(Loss, self).__init__() self.opts = opts def StackedHourGlass(self, output, target, meta=None): meta = 1 if self.opts.dataset == 'MPII' else meta loss = 0 for i in range(self.opts.nStack): loss += F.mse_loss(output[i]*meta, target*meta) return loss def PoseAttention(self, output, target, meta=None): meta = 1 if self.opts.dataset == 'MPII' else meta loss = 0 for i in range(self.opts.nStack): loss += F.mse_loss(output[i]*meta, target*meta) return loss def PyraNet(self, output, target, meta=None): meta = 1 if self.opts.dataset == 'MPII' else meta loss = 0 for i in range(self.opts.nStack): loss += F.mse_loss(output[i]*meta, target*meta) return loss def ChainedPredictions(self, output, target, meta=None): meta = 1 if self.opts.dataset == 'MPII' else meta return F.mse_loss(output*meta, target*meta) def DeepPose(self, output, target, meta=None): meta = (target > -0.5 + 1e-8).float().reshape(-1, self.opts.nJoints, 2) if self.opts.dataset == 'MPII' else meta[:,:,:,0] return F.mse_loss(output.reshape(-1, self.opts.nJoints, 2)*meta, target.reshape(-1, self.opts.nJoints, 2)*meta)
175442
from bc211.is_inactive import is_inactive class InactiveRecordsCollector: def __init__(self): self.inactive_organizations_ids = [] self.inactive_services_ids = [] self.inactive_locations_ids = [] def add_inactive_organization_id(self, organization_id): self.inactive_organizations_ids.append(organization_id) def add_inactive_service_id(self, service_id): self.inactive_services_ids.append(service_id) def add_inactive_location_id(self, location_id): self.inactive_locations_ids.append(location_id) def organization_has_inactive_data(self, organization_id, description): if is_inactive(description): self.add_inactive_organization_id(organization_id) return True return False def service_has_inactive_data(self, organization_id, service_id, description): if is_inactive(description) or self.has_inactive_organization_id(organization_id): self.add_inactive_service_id(service_id) return True return False def location_has_inactive_data(self, organization_id, location_id, description): if is_inactive(description) or self.has_inactive_organization_id(organization_id): self.add_inactive_location_id(location_id) return True return False def has_inactive_organization_id(self, organization_id): return organization_id in self.inactive_organizations_ids def has_inactive_service_id(self, service_id): return service_id in self.inactive_services_ids def has_inactive_location_id(self, location_id): return location_id in self.inactive_locations_ids